Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Lexical analysis
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{redirect|Lexer|people with this name|Lexer (surname)}} {{short description|Conversion of character sequences into token sequences in computer science}} '''Lexical tokenization''' is conversion of a text into (semantically or syntactically) meaningful ''lexical tokens'' belonging to categories defined by a "lexer" program. In case of a natural language, those categories include nouns, verbs, adjectives, punctuations etc. In case of a programming language, the categories include [[Identifier (computer languages)|identifiers]], [[Operator (computer programming)|operators]], [[Symbols of grouping|grouping symbols]], [[data type]]s and language keywords. Lexical tokenization is related to the type of tokenization used in [[large language model]]s (LLMs) but with two differences. First, lexical tokenization is usually based on a [[lexical grammar]], whereas LLM tokenizers are usually [[probability]]-based. Second, LLM tokenizers perform a second step that converts the tokens into numerical values.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)