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
我的代码如下:
hans := "一余五哎欧额" hans2 := "刘茜" hans3 := "王" py := pinyin.NewArgs() py.Heteronym = true fmt.Println(pinyin.Pinyin(hans, py)) fmt.Println(pinyin.Pinyin(hans2, py)) fmt.Println(pinyin.Pinyin(hans3, py))
输出如下:
[[yi yi yi] [yu tu xu yu] [wu] [ai] [ou] [e]] // 余的读音? [[liu] [qian xi]] [[wang wang yu]] // 王有yu的读音吗?
我简单查了下资料【余】【王】好像没有上述那么多的发音? 请大佬看看,是我代码有问题还是需要做什么?
The text was updated successfully, but these errors were encountered:
@mozillazg 请看看
Sorry, something went wrong.
我翻看了一下python版本的是可以选择数据加载的,go的版本也可以选择加载数据吗?
@chenqgp 你可以参考下面这个命令生成想使用的拼音文件(将 pinyin.txt 替换为想使用的拼音文件)的 go 源码:
go-pinyin/Makefile
Line 13 in 8930bc1
然后在你的程序里用这个生成的 go 文件的拼音数据覆盖内置的拼音数据即可:
for k, v := range PinyinDict { pinyin.PinyinDict[k] = v }
No branches or pull requests
我的代码如下:
输出如下:
我简单查了下资料【余】【王】好像没有上述那么多的发音?
请大佬看看,是我代码有问题还是需要做什么?
The text was updated successfully, but these errors were encountered: