Constructing a BPE Tokenization DFA
<|reference_start|>Constructing a BPE Tokenization DFA: Many natural language processing systems operate over tokenizations of text to address the open-vocabulary problem. In this paper, we give and analyze an algorithm for the efficient construction of deterministic finite automata designed to operate directly on tokenizations produced by the popular byte pair encoding technique. This makes it possible to apply many existing techniques and algorithms to the tokenized case, such as pattern matching, equivalence checking of tokenization dictionaries, and composing tokenized languages in various ways.<|reference_end|>
@article{berglund2024constructing,
    title={Constructing a BPE Tokenization DFA},
    author={Martin Berglund, Willeke Martens, Brink van der Merwe},
    journal={arXiv preprint arXiv:2405.07671},
    year={2024},
    doi={10.1007/978-3-031-71112-1_5},
    archivePrefix={arXiv},
    eprint={2405.07671},
    primaryClass={cs.FL cs.CL cs.LG}
}