mozillazg / python-pinyin

汉字转拼音(pypinyin)
https://pypinyin.readthedocs.io
MIT License
4.84k stars 608 forks source link

曾的拼音首字母应该是《Z》 ,现在获取到的《C》 #287

Closed BeautifulNow97 closed 1 year ago

BeautifulNow97 commented 1 year ago

运行环境

问题描述

曾的拼音首字母应该是《Z》 ,现在获取到的《C》

问题复现步骤

def get_name_prefix(name_str: str): """ 将汉字的每个首字母合大写合并在字符串中 :param name_str: :return: """ res = [] for i in lazy_pinyin(name_str, style=Style.FIRST_LETTER): res.append(i.upper()) return "".join(res)

print(get_name_prefix('曾')) result->>C

mozillazg commented 1 year ago

@BeautifulNow97 曾 是多音字, C 是曾经的曾那个音