We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
没啥bug, 请问从拼音风格怎么转到bopomofo啊? 比如: pinyin = lazy_pinyin('衣裳', style=Style.TONE3, neutral_tone_with_five=True) bopomofo = to_bopomofo(pinyin) 有没有to_bopomofo的风格转化啊?
The text was updated successfully, but these errors were encountered:
@SRbone 目前没有单独的 to_bopomofo 函数,不过参考一下 https://github.com/mozillazg/python-pinyin/blob/master/pypinyin/style/bopomofo.py 这个文件里的相关内容。
Sorry, something went wrong.
多谢多谢,果然里面两句话就搞定了。
for find_re, replace in BOPOMOFO_REPLACE: pinyin = find_re.sub(replace, pinyin) pinyin = ''.join(BOPOMOFO_TABLE.get(x, x) for x in pinyin)
No branches or pull requests
运行环境
问题描述
没啥bug, 请问从拼音风格怎么转到bopomofo啊?
比如:
pinyin = lazy_pinyin('衣裳', style=Style.TONE3, neutral_tone_with_five=True)
bopomofo = to_bopomofo(pinyin)
有没有to_bopomofo的风格转化啊?
问题复现步骤
The text was updated successfully, but these errors were encountered: