mozillazg / python-pinyin

汉字转拼音(pypinyin)

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

同样的输入,string 和 list 的结果不同。。。

daming-lu opened this issue · comments

20240703-164654

了却君王天下事
list 是 ‘le’
string 是 ‘liao’

玄幻。。。

参数值为列表时表示输入的是已分词后的数据
https://github.com/mozillazg/python-pinyin?tab=readme-ov-file#%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B

输入是 string 的时候内部会做二次分词,输入是 list 的时候会跳过这个分词步骤。