Repository navigation
Keep common Simplified 么 words intact in tw2t/tw2s conversion for compatibility - #1473
Merged
Merged
Conversation
Collaborator
Author
|
See also: nk2028/opencc-js#45 |
…patibility The generated TWVariantsRev dictionary maps 么 -> 幺 (reversing the Taiwan-standard 幺 -> 么 variant), which corrupted already-Simplified input such as 什么 into 什幺 in tw2t, tw2s and tw2sp (issue BYVoid#1469). Detailed Changes: - **TWVariantsRevPhrases.txt**: - Add phrase exceptions mapping 什么/怎么/这么/那么/多么/要么/好么/甚么/ 這么 to their 麼 forms, with inline comments so they are not mistaken for typos. tw2t now outputs proper Traditional (什么 -> 什麼), tw2s reaches the expected Simplified form via the TS stage, and genuine yao1 words like 老么 still convert to 老幺. 这么 maps to 这麼 because Simplified-to-Traditional 这 -> 這 is the TS/ST stage's job, not the variant-reverse stage's. - **TWVariants.txt**: - Add 麼 -> 麼 么 with @reverse-prefer so the generated TWVariantsRev.txt lists 么 -> 幺 麼, declaring the 么 -> 麼 substitution required by the phrase-character dependency test while keeping 幺 the default. - **test/testcases/testcases.json**: - Add issue-1469 passthrough case covering tw2t and tw2s.
frankslin
force-pushed
the
upstream-master
branch
from
August 5, 2026 19:09
d7d9981 to
3699d4c
Compare
Collaborator
Author
|
Resource diff: https://github.com/BYVoid/OpenCC/actions/runs/31039605242 |
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.
The generated TWVariantsRev dictionary maps
么->幺(reversing the Taiwan-standard幺->么variant), which corrupted already-Simplified input such as什么into什幺in tw2t, tw2s and tw2sp (issue #1469).Add phrase exceptions mapping
什么/怎么/这么/那么/多么/要么/好么/甚么/這么to their Traditional麼forms in TWVariantsRevPhrases.txt, with inline comments so they are not mistaken for typos.tw2t now outputs proper Traditional (
什么->什麼), tw2s reaches the expected Simplified form via the TS stage, and genuine 幺(yao1) words like老么still convert to老幺.