huggingface/tokenizers
https://pypi.org/project/tokenizers/
https://github.com/huggingface/tokenizers
各言語へのbindingがある
Python
https://github.com/huggingface/tokenizers/tree/main/bindings/python
ここにREADMEもある
実装はRustなのでまだ追っていないが、
https://github.com/huggingface/tokenizers/blob/v0.12.0/bindings/python/py_src/tokenizers/__init__.pyi
がPythonで見える範囲で実装に近い
Python向けドキュメント
https://huggingface.co/docs/tokenizers/index
huggingface/tokenizersのQuicktour
Normalizers (huggingface/tokenizers)