fix: remove the implicit casing convention; Ruby has none - #14
Merged
Merged
Conversation
The parallel engine kept an anchor fast path mapping an uppercase source token to the lowercase rule's result, uppercased only inside an all-caps word. Measured against the Ruby interpreter, there is no such convention: with rules for Б Г А but none for Я, Ruby yields BЯGA and Яga (unmapped characters pass through). Maps carry their uppercase rules explicitly, and the anchors shadowed them — bgnpcgn-ukr's sub "А" "A" lost to а's anchor and Авдіївська came out lowercase, all 33 examples failing. Group replacement is now the plain results map. Direct corpus sweep: 173 failures / 33 maps -> 137 / 30.
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.
Measured against the Ruby interpreter: with rules for Б, Г, А but none for Я, Ruby produces
BЯGAandЯga— unmapped characters pass through. There is no implicit casing convention; every corpus map carries its uppercase rules explicitly.The Python engine's anchor fast path (uppercase source token → lowercase rule's result, uppercased only inside an all-caps word) was a fabrication that shadowed explicit rules: bgnpcgn-ukr's
sub "А" "A"lost to а's anchor, soАвдіївськаcame outavdiyivs’ka— all 33 of the map's examples failing. The mechanism is removed; group replacement is now the plain results map.Direct corpus sweep: 173 failures / 33 maps → 137 / 30 (bgnpcgn-ukr fully healed). Suite 42 passed / 1 xpassed, including a new Ruby-measured pin for the unmapped-uppercase behavior.