Repository navigation
s2t: prefer 沖 over 衝 as the default candidate for 冲 - #1434
Closed
stantheman0128 wants to merge 1 commit into
Closed
stantheman0128 wants to merge 1 commit into
stantheman0128 wants to merge 1 commit into
Conversation
Issue BYVoid#984 retitled the desired mapping to 冲 -> 沖 (衝). Keep 衝 as a non-default candidate so existing STPhrases entries such as 水一冲 and 冲突 still convert correctly.
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 #984.
Problem
Simplified
冲merges two traditional characters:沖(rinse / flush / brew) and衝(charge / collide / impulse). On current master,STCharacters.txtprefers衝:That makes unmatched
冲convert to衝, which is wrong for everyday rinse/brew uses such as冲咖啡. Issue #984 was retitled from冲 --> 衝to冲 --> 沖 (衝), asking for沖as the default candidate and衝as the non-default alternative. Phrase-level衝senses are already covered inSTPhrases.txt(for example水一冲 -> 水一衝,冲突 -> 衝突).Change
STCharacters.txt: swap the s2t candidate order for冲from衝 沖to沖 衝, following CONTRIBUTING.md (keep the old conversion as a non-default candidate) and the precedent of s2t: fix 托/託 candidate priority so 托 stays unconverted by default #1405.testcases.json: addBYVoid_OpenCC_Issue_984_chong_variant_prioritycovering default沖uses, the issue example清水一冲 -> 清水一衝, and common衝compounds.No
STPhrases.txtedits were required; existing phrase entries already pin the衝senses.Verification
I had no C++ toolchain available, so I verified with the OpenCC 1.4.1 wheel engine driving this branch's text dictionaries directly: config JSONs identical to
data/config/*.jsonwith ocd2 references switched to text. There are no conversion related engine changes between ver.1.4.1 and master for this character mapping. A/B against master dictionaries with the same harness:Sample before/after (s2t; base = master, mod = this branch):
Please treat the CI Bazel dictionary tests as the authoritative check.
This fix was developed with AI assistance (Cursor/Grok) and verified locally as shown above.