uax29
uax29 copied to clipboard
A tokenizer based on Unicode text segmentation (UAX #29), for Go. Split words, sentences and graphemes.
This package tokenizes (splits) words, sentences and graphemes, based on Unicode text segmentation (UAX #29), for Unicode version 13.0.0. Details and usage are in the respective packages:
Why tokenize?
Any time our code operates on individual words, we are tokenizing. Often, we do it ad hoc, such as splitting on spaces, which gives inconsistent results. The Unicode standard is better: it is multi-lingual, and handles punctuation, special characters, etc.
Conformance
We use the official test suites. Status:
See also
jargon, a text pipelines package for CLI and Go, which consumes this package.