Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds support for Unicode 16.0.0, upgrading from Unicode 15.0.0. The primary changes include updating Unicode data sources and implementing the GB9c rule for grapheme cluster boundaries, which handles Indic conjunct breaks.
Changes:
- Updated Unicode version from 15.0.0 to 16.0.0 across all data generation and test files
- Implemented GB9c rule with Indic_Conjunct_Break (InCB) property support for proper handling of Indic conjunct clusters
- Added 3 new word break tests and 10 new sentence break tests from Unicode 16.0.0 test suite
Reviewed changes
Copilot reviewed 6 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/gen/main.go | Added unicodeVersion constant (16.0.0), InCB property fetching, and three-part property format parsing for DerivedCoreProperties.txt |
| graphemes/splitfunc.go | Implemented GB9c rule with incbState state machine to track Indic conjunct clusters (Consonant-Linker-Consonant patterns) |
| graphemes/trie.go | Auto-generated with Unicode 16.0.0 data, added InCB property constants (_InCBConsonant, _InCBLinker, _InCBExtend) |
| words/trie.go | Auto-generated with Unicode 16.0.0 data |
| sentences/trie.go | Auto-generated with Unicode 16.0.0 data |
| phrases/trie.go | Auto-generated with Unicode 16.0.0 data |
| words/unicode_test.go | Added 3 new test cases from Unicode 16.0.0 test suite, updated array size to 1826 |
| sentences/unicode_test.go | Added 10 new test cases from Unicode 16.0.0 test suite, updated array size to 512 |
| graphemes/unicode_test.go | Auto-generated with Unicode 16.0.0 data |
| graphemes/comparative/go.mod | Updated module version reference from v2.2.0 to v2.3.0 |
| graphemes/comparative/comparative_test.go | Removed TestGraphemeCountConsistency test (likely because implementations now differ due to Unicode version mismatch with comparison library) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for Unicode 16.
Indic_Conjunct_BreakLooks like ~3% perf hit, since there are now more conditionals in the graphemes logic, and the trie now requires int32.
Removed comparative test with
uniseg, we have diverged in terms of graphemes count —unisegis on Unicode 15 and we are on 16, which gives different results. So the test is no longer helpful.