Skip to content

Keep 夥 unchanged in t2s when it means "many" - #1491

Merged
frankslin merged 1 commit into
BYVoid:masterfrom
frankslin:upstream-master
Sep 9, 2026
Merged

frankslin merged 1 commit into
BYVoid:masterfrom
frankslin:upstream-master

Conversation

@frankslin

Copy link
Copy Markdown
Collaborator

Fixes #1489.

t2s currently 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: add BYVoid_OpenCC_Issue_1489_* cases covering t2stw2shk2s (夥 preserved, 伙-sense words still converted) and an s2ts2tws2hk roundtrip check (Simplified input 获益甚夥 is left intact).

Verification

CMake build with ENABLE_GTEST=ON, ctest: 21/21 pass.

t2s:  獲益甚夥 為數甚夥 夥頤 夥多 合夥人 夥計 一夥人 夥同
   →  获益甚夥 为数甚夥 夥颐 夥多 合伙人 伙计 一伙人 伙同

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
@frankslin
frankslin merged commit c363a7b into BYVoid:master Sep 9, 2026
41 checks passed
@frankslin
frankslin deleted the upstream-master branch September 9, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

繁体转简体时错误转换表示“多”的“夥”(如“获益甚夥”)

1 participant