Skip to content

Commit d4de8e6

Browse files
committed
Adopt uax29 segmenter
Replacing blevesearch/segment. ~2x throughput improvement. Refactor allocations, now ~O(1). Add tests & multilingual sample text to ensure identical behavior. Known differences from previous segmenter: - The original segmenter splits runs of spaces into separate tokens; uax29 concatenates runs into a single token. - The original segmenter doesn’t handle emoji skin tone modifiers, the new one does, attributable to Unicode version update.
1 parent d89c6c0 commit d4de8e6

5 files changed

Lines changed: 562 additions & 106 deletions

File tree

0 commit comments

Comments
 (0)