Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

請問 wa3ng 是何種拼法? #79

Closed
coodoo opened this issue Feb 2, 2016 · 8 comments · Fixed by #80
Closed

請問 wa3ng 是何種拼法? #79

coodoo opened this issue Feb 2, 2016 · 8 comments · Fixed by #80

Comments

@coodoo
Copy link

coodoo commented Feb 2, 2016

在網路上看到「網」拼成 wa3ng,但用 pinyin 設定 style 為 TONE2 時,得出的是 wang3,請問這兩者差異為何?謝謝。

@hotoo
Copy link
Owner

hotoo commented Feb 3, 2016

wa3ng 是什么鬼?!

@hotoo hotoo closed this as completed Feb 3, 2016
@coodoo
Copy link
Author

coodoo commented Feb 3, 2016

就是看到有些網頁上將「網」拼成 wa3ng,但用 pinyin 測試時,輸出的是 wang3,因此好奇為何會有兩種不同拼法(數字會寫在中間)?後來已找到答案,那是 python-pinyin 的輸出格式。

>>> pinyin('中心', style=pypinyin.TONE2, heteronym=True)
[['zho1ng', 'zho4ng'], ['xi1n']]

@hotoo
Copy link
Owner

hotoo commented Feb 3, 2016

@hotoo
Copy link
Owner

hotoo commented Feb 3, 2016

应该是算法问题,直接将注音字符替换导致的。

@coodoo
Copy link
Author

coodoo commented Feb 3, 2016

對的,是 mozilla 那個。

@mozillazg
Copy link
Contributor

@coodoo @hotoo
是的,python-pinyin 用的是直接将注音字符替换的方式。
数字在中间常见于外国人学中文的拼法

@hotoo
Copy link
Owner

hotoo commented Feb 4, 2016

@mozillazg 如果确实需要这种风格,可以考虑新增一个 pinyin.TO3NE

  • TONE 标准声调风格
  • TONE2 声调以数字形式在末尾的风格(当初我这样命名的原因)
  • TO3NE 声调以数字形式在声母之后的风格

直观形象。

@hotoo hotoo reopened this Feb 4, 2016
@coodoo
Copy link
Author

coodoo commented Feb 4, 2016

TO3NE 是個好主意!

也謝謝兩位的說明。

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 a pull request may close this issue.

3 participants