Repository navigation
Conversation
Apply the net change since the 2026-04-07 sync (LT 0761ec3..329295d, which reached this state after a same-day revert and re-revert of one commit, 1b267acce7): the superscript lookbehind class gains U+00B3, and U+21B5 (wikipedia line break) joins the always-split control set. More significantly, \b now anchors four abbreviation-dot patterns (v./u./k.s./ ch.-l./st.-l./s.-g.) so they no longer match starting mid-word, using the last letter of an unrelated preceding word as their own first character (e.g. "щиколоток. с." previously matched "к. с." as one abbreviation unit spanning the two words). Python's `regex` module resolves \b against Cyrillic word characters with no extra flags needed, unlike Java's \b which requires Pattern.UNICODE_CHARACTER_CLASS to see past ASCII \w. Test file synced: uncommented the км² case and added примітка³² to test_superscript, added the щиколоток./с./жел boundary case to test_abbreviations. All existing tests still pass.
Corpus differential against the pinned revision stays byte-identical: 92,870 tokens across tests/data/ci_corpus/uk_wikipedia.txt (1,292 lines), zero differences from the Java driver.
This branch has not been deployed
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.
Closes #15.
Ports the drift between
0761ec3e(the pinned sync commit) and329295d5d4. Only three commits touchUkrainianWordTokenizer.javabetween those points, and two of them cancel out: a revert and a
revert of the revert - so the net change is the content of
1b267acce7:³(U+00B3) added to the superscript class after Cyrillic words,and
↵(U+21B5) added to the always-split characters.\badded to the four abbreviation-with-dot patterns. Without it,ABBR_DOT_VO_PATTERN2matchedк. с.insideщиколоток. с. жел,reading the final letter of an unrelated word as the start of an
abbreviation.
One note on the port: upstream pairs
\bwithPattern.UNICODE_CHARACTER_CLASS, since Java's\bis defined overASCII
\wand would not see a boundary on Cyrillic. This port usesregex, where\bis Unicode-aware by default forstrpatterns, sono flag is needed. Checked directly rather than assumed.
Test drift went into the existing
test_superscriptandtest_abbreviations- upstream added assertions to existing methodsrather than new ones, so the test count is unchanged at 41.
Corpus differential against the Java driver on
tests/data/ci_corpus/uk_wikipedia.txt: 92,870 tokens, identical to Java.