Commit 9b41d64
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 a70b8d1 commit 9b41d64
5 files changed
Lines changed: 562 additions & 106 deletions
0 commit comments