Keep 夥 unchanged in t2s when it means "many" - #1491
Merged
Merged
Conversation
Fixes BYVoid#1489. 夥 is only simplified to 伙 in the 伙伴/伙食 sense; in the "many" sense (獲益甚夥, 夥頤, 夥多) it is itself the standard form, so add self-mapping TSPhrases entries for those phrases and cover them with t2s/tw2s/hk2s tests plus an s2t/s2tw/s2hk roundtrip check. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UZTNTBA97LMM3PVYvQv9he
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.
Fixes #1489.
t2scurrently simplifies every 夥 to 伙, so 獲益甚夥 becomes 获益甚伙. Per 《簡化字總表》, 夥 is only simplified to 伙 in the 伙伴/伙食 sense; in the "many" sense it is itself the standard form (《通用規範漢字表》 keeps 夥 for this meaning).Changes
data/dictionary/TSPhrases.txt: add self-mapping entries for the "many" sense so they override the character-level default:甚夥,夥多,夥頤 → 夥颐. The character-level夥 → 伙 夥is unchanged, so 合夥人/夥計/一夥人/夥同 still convert to 伙.test/testcases/testcases.json: addBYVoid_OpenCC_Issue_1489_*cases coveringt2s/tw2s/hk2s(夥 preserved, 伙-sense words still converted) and ans2t/s2tw/s2hkroundtrip check (Simplified input 获益甚夥 is left intact).Verification
CMake build with
ENABLE_GTEST=ON,ctest: 21/21 pass.