Efficient Algorithms for the Uniform Tokenization Problem
Angela W. Li, Konstantinos Mamouras
Abstract
Tokenization (also known as scanning or lexing) is a computational task that has applications in the lexical analysis of programs during compilation and in data extraction and analysis for unstructured or semistructured data (e.g., data represented using the JSON and CSV data formats). We propose two algorithms for the tokenization problem that have linear time complexity (in the length of the input text) without using large amounts of memory. We also show that an optimized version of one of these algorithms performs well compared to prior approaches on practical tokenization workloads.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 4f0aee3e-2bbc-4d15-9890-47494b3c4017Cited by top-tier papers3
- Streaming Validation of JSON Documents Against SchemasAlexis Le Glaunec, Angela W. Li, Konstantinos MamourasVLDB 2026 · 2 citations
- Static Analysis for Efficient Streaming TokenizationAngela W. Li, Yudi Yang, Konstantinos MamourasASPLOS 2026 · 1 citation
- Formally Verified Linear-Time Invertible LexingSamuel Chassot, Viktor KuncakCAV 2026
Builds on6
- Software-hardware codesign for efficient in-memory regular pattern matchingLingkun Kong, Qixuan Yu, Agnishom Chattopadhyay, Alexis Le Glaunec et al.PLDI 2022 · 23 citations
- Regular Expression Matching using Bit Vector AutomataAlexis Le Glaunec, Lingkun Kong, Konstantinos MamourasOOPSLA 2023 · 22 citations
- Efficient Matching of Regular Expressions with Lookaround AssertionsKonstantinos Mamouras, Agnishom ChattopadhyayPOPL 2024 · 19 citations
- Linear Matching of JavaScript Regular ExpressionsAurèle Barrière, Clément Pit-ClaudelPLDI 2024 · 11 citations
- BVAP: Energy and Memory Efficient Automata Processing for Regular Expressions with Bounded RepetitionsZiyuan Wen, Lingkun Kong, Alexis Le Glaunec, Konstantinos Mamouras et al.ASPLOS 2024 · 11 citations
Related papers
- A Partition Cover Approach to TokenizationJia Peng Lim, Shawn Tan, Davin Choo, Hady W. LauwNeurIPS 2025 · 6 citations
- Tokenisation is NP-CompletePhilip Whittington, Gregor Bachmann, Tiago PimentelACL 2025 · 6 citations
- LoPT: Lossless Parallel Tokenization Acceleration for Long Context Inference of Large Language ModelWei Shao, Lingchao Zheng, Pengyu Wang, Peizhen Zheng et al.ACL 2026 · 1 citation
- Tokenisation over Bounded Alphabets is HardVioleta Kastreva, Philip Whittington, Dennis Komm, Tiago PimentelICLR 2026 · 6 citations
- An Efficient Algorithm for Streaming BPE TokenizationKonstantinos Mamouras, Angela W. Li, Yudi YangPLDI 2026
