Repository navigation
Fix Wade-Giles romanization of pinyin "tie" (t'oeh -> t'ieh) - #385
Open
selimfedakar wants to merge 1 commit into
Open
selimfedakar wants to merge 1 commit into
selimfedakar wants to merge 1 commit into
Conversation
Typo in the whole-syllable pinyin->Wade-Giles table: tie mapped to t'oeh. Correct Wade-Giles is t'ieh (final ie -> ieh, consistent with die -> tieh and every other -ie syllable in the table); affects 铁/贴/帖 etc.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
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.
Problem
The Wade-Giles romanization of the pinyin syllable
tieis wrong.t'oehis not a valid Wade-Giles syllable —oehis not a Wade-Giles final.The same affects every character read
tie: 铁, 贴, 帖, 餮, etc.Root cause
pypinyin/style/wadegiles.pycontains a whole-syllable conversion table(
_convert_table) that is matched before the initial/final decompositionfallback, so a single wrong entry silently overrides the correct result.
The entry for
tiewas a typo:tiewas the lone-ieoutlier in the table. Every other pinyin-iesyllable maps to a Wade-Giles
-iehfinal:die(its unaspirated partner) already maps totieh, so the aspiratedtiemust bet'ieh. The-iehfinal is consistent across the whole family.Fix
Correct the single table entry:
This is a bug in the romanization table in this repository (the mapping
logic), not a per-character pinyin-data error — the input pinyin
tieiscorrect; only the Wade-Giles target was mistyped.
Test added
Added two regression cases to the existing parametrized
test_wadegilesin
tests/test_pinyin.py:With the typo reverted these two cases fail (
["t'oeh"] != ["t'ieh"]);with the fix they pass.
Suite
pytest tests/test_pinyin.py— 252 passed, 2 skipped. The fullwadegiles selection (60 cases) is green.
修正威妥瑪拼音 tie 的轉寫:t'oeh → t'ieh。