Repository navigation
s2t: keep 雇 as a non-default STCharacters candidate alongside 僱 (#906) - #1445
Merged
Merged
Conversation
…id#906) Co-authored-by: Cursor <cursoragent@cursor.com>
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 #906.
Problem
STCharacters.txtcurrently maps simplified雇to a single traditional candidate:Issue #906 asks to keep
僱as the default and add雇as a non-default candidate (雇 僱 雇). 《重編國語辭典修訂本》 lists forms such as 雇員 with雇, so both traditional forms should remain available. Employment phrases already pin the僱reading inSTPhrases.txt(雇员 / 雇主 / 解雇 / ...). Collaborator frankslin also noted that surname uses of雇are awkward when only僱exists as a candidate.Change
STCharacters.txt:雇 僱->雇 僱 雇(default stays僱;雇kept as non-default candidate, same multi-candidate style as丑 醜 丑/雕 雕 鵰)test/testcases/testcases.json: addBYVoid_OpenCC_Issue_906_*covering default雇/ employment phrases under s2t / s2tw / s2twp / s2hk, plus t2s round-trip for僱員No
STPhrases.txtedits. Existing phrase entries already force the employment reading.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 packaged wheel dictionaries with the same harness:Default convert behavior is unchanged (first candidate is still
僱). The point of the change is the explicit non-default雇candidate requested in #906.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.