mozillazg / python-pinyin

汉字转拼音(pypinyin)

Home Page:https://pypinyin.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Method "to_tone3" from "pypinyin.contrib.tone_convert" returns wrong result for "lün"

stefantaubert opened this issue · comments

运行环境

  • 操作系统(Linux/macOS/Windows):Linux
  • Python 版本:3.8.10
  • pypinyin 版本:0.47.1

问题描述

Method to_tone3 from pypinyin.contrib.tone_convert returns wrong result for lün5. Expected is lvn5 but it returns lv5n.
Using v instead of ü or using other tones/formats, i.e., lǘn don't work either.

问题复现步骤

from pypinyin.contrib.tone_convert import to_tone3

pinyin = to_tone3("lün5")

# next command fails because pinyin is "lv5n"
assert pinyin == "lvn5"

@stefantaubert Thanks for reporting. I'll take a look at it.