Lexical analysis
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 identifiers, operators, grouping symbols, data types and language keywords. Lexical tokenization is related to the type of tokenization used in large language models (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.
Lexical analysis - Wikipedia Jump to content From Wikipedia, the free encyclopedia "Lexer" redirects here. For people with this name, see Lexer (surname) . "Lexing" redirects here. For the Chinese guerrilla leader, see Zhang Lexing . For the mathematician, see Lexing Ying . 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, punctu
saved by
related reading
- Context-free grammar - Wikipediaen.wikipedia.org
- Scanning · Crafting Interpreterscraftinginterpreters.com
- Language Modelinglena-voita.github.io
- Introduction to Large Language Models | Machine Learning | Google for Developersdevelopers.google.com
- [2112.10508] Between words and characters: A Brief History of Open-Vocabulary Modeling and Tokenization in NLParxiv.org
- Parsing Expressions · Crafting Interpreterscraftinginterpreters.com
- [2605.22821] Tokenisation via Convex Relaxationsarxiv.org
- Transformer (deep learning) - Wikipediaen.wikipedia.org
- What Are Stemming and Lemmatization? | IBMibm.com
- How LLMs Actually Work | 0xkato0xkato.xyz
- Tokenizers · Hugging Facehuggingface.co
- Seq2seq and Attentionlena-voita.github.io