s2t: keep earthly-branch 丑 in 子丑寅卯 (not 醜)#1438
Open
stantheman0128 wants to merge 1 commit into
Open
Conversation
Issue BYVoid#591: s2t mapped bare 丑 to 醜, so 子丑寅卯 became 子醜寅卯. Add STPhrases self-maps for 子丑寅卯 / 子丑 (same pattern as 丁丑, 丑时) and a testcase that still expects 醜 for 丑陋 / 丑闻 / 出丑 / 他很丑. Co-authored-by: Cursor <cursoragent@cursor.com>
Collaborator
|
感謝貢獻。關於這個 ticket,我覺得,最好將所有合法的帶有「丑」的干支組合全部加入。 |
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 #591.
Problem
STCharacters.txtmaps丑to醜 丑, so unmatched丑becomes醜. Earthly-branch phrases such as丁丑/丑时already haveSTPhrases.txtself-maps, but子丑寅卯(and bare子丑) did not. Result:子丑寅卯->子醜寅卯.Change
Add identity entries in
STPhrases.txt:Do not change the character-level candidate order, so existing ugly-sense conversions (
丑陋,丑闻,出丑,他很丑, etc.) stay on醜via their phrase / character defaults.Test plan
BYVoid_OpenCC_Issue_591_chou_earthly_branchintest/testcases/testcases.json子丑寅卯/子丑/丁丑/丑时to keep earthly-branch丑丑陋/丑闻/出丑/他很丑to keep醜Evidence
Installed wheel
s2t(published dicts, before this fix):This branch, text-dict harness driving
data/dictionary/*.txtthrough the same configs (s2t/s2tw/s2twp/s2hk):sort.pyrun onSTPhrases.txtafter the edit (idempotent).Please treat CI Bazel tests as authoritative; no local C++/Bazel toolchain was available here.
AI assistance
This fix was developed with AI assistance (Cursor / Grok) and verified locally as shown above.