forked from mozillazg/python-pinyin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
修复 ``pypinyin.contrib.tone_convert`` 中 ``to_`` 开头的转换函数 没有正确处理输入的拼音包含 ``5`` 的场景(当包含 ``5`` 时会导致返回的格式不符合函数预期的返回格式) 以及修复没有正确处理部分拼音中的 ``ü`` 或 ``v`` 的问题 (当 ``v_to_u=False`` 时返回结果需要将 ``ü`` 替换为 ``v``) >>> to_tone('lve') 'lve' >>> to_tone2('lün5') 'lv5n' >>> to_tone3('lün5') 'lv5n' >>> to_tone2('lvn5') 'lv5n' >>> to_tone3('lvn5') 'lv5n' >>> to_tone('lve') 'lüe' >>> to_tone2('lün5') 'lvn' >>> to_tone3('lün5') 'lvn' >>> to_tone2('lvn5') 'lvn' >>> to_tone3('lvn5') 'lvn' >>> to_tone2('lvn5', v_to_u=True) 'lün' >>> to_tone3('lvn5', v_to_u=True) 'lün' >>> to_tone2('lvn', neutral_tone_with_five=True) 'lv5n' >>> to_tone3('lvn', neutral_tone_with_five=True) 'lvn5'
- Loading branch information
Showing
5 changed files
with
200 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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