[嗯]字的声母韵母问题

Open
#284 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start by reproducing the supplied Python example using pinyin with Style.INITIALS and Style.FINALS_TONE3, both with and without neutral_tone_with_five. Review the handling discussed in issue #109 and identify the expected representation for 嗯. Done when the agreed initials and finals behavior is implemented and covered by tests.

Written by the indexing model from the issue text.

Description

discuss

运行环境

  • 操作系统(Linux/macOS/Windows):Linux(Ubuntu 18.04)
  • Python 版本: 3.8.1
  • pypinyin 版本:0.47.0

问题描述

开始我以为[嗯]字的拼音错了,在issue里面查了一下,发现了 #109
但是当我想使用[嗯]字的声韵母的时候,发现好像提取不出来
如果加了 neutral_tone_with_five=True 那么韵母就是 5,感觉比较奇怪

问题复现步骤

Python 3.8.1 (default, Jan 8 2020, 22:29:32)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.

from pypinyin import pinyin, Style
txt = '嗯'
shengmu = pinyin(txt, style=Style.INITIALS, neutral_tone_with_five=True)
yunmu = pinyin(txt, style=Style.FINALS_TONE3, neutral_tone_with_five=True)
shengmu
[['']]
yunmu
[['5']]
yunmu = pinyin(txt, style=Style.FINALS_TONE3)
yunmu
[['']]

Dominant language
Python
Stars
5.4k
Forks
628
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozillazg/python-pinyin

All issues in mozillazg/python-pinyin

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.