go-ego / gpy Goto Github PK
View Code? Open in Web Editor NEWGo 语言汉字转拼音工具
License: MIT License
Go 语言汉字转拼音工具
License: MIT License
You MUST delete the content above including this line before posting, otherwise your issue will be invalid.
...
v0.40.0
go1.14.3
gcc version 9.3.0
5.4.0-33-generic x86_64
Note that
style = flag.String("s", "zh4ao", str)
I.e., the default output should be with the tone.
However, the pinyin
output is without the tone.
Also:
$ pinyin -s zh **话
zhong guo hua
whereas it should be zh g h
v0.40.0
go1.14.3
gcc version 9.3.0
5.4.0-33-generic x86_64
I need a special format of the tools/pinyin
output to be:
$ pinyin **话
ZhongGuoHua
Justification: this is mainly to rename Chinese-named files into their pinyin counterparts. Thus
I.e., two more switches will be needed/added, for space and capitalization. This would be the 99.9% use case for me to use this tool.
I was planning to fork and add the feature on my own, but think I'd better ask first and see if such added output format would be welcome upstream -- I can do all the modification and send in PR myself, if idea accepted.
pinyin_dict.go中的0x5757没有yué这个读音
v0.40.0
go1.14.3
gcc version 9.3.0
5.4.0-33-generic x86_64
The output of pinyin -p
sometimes are not correct.
Correct example:
$ pinyin -p 银行
2020/10/11 13:47:09 Load the gse dictionary: "/home/tong/l/ws/Go/pkg/mod/github.com/go-ego/[email protected]/data/dict/dictionary.txt"
2020/10/11 13:47:12 Gse dictionary loaded finished.
yín xíng
Incorrect example:
$ pinyin -p **话
2020/10/11 13:46:54 Load the gse dictionary: "/home/tong/l/ws/Go/pkg/mod/github.com/go-ego/[email protected]/data/dict/dictionary.txt"
2020/10/11 13:46:56 Gse dictionary loaded finished.
zhng gu huà
somehow the 韵母 of the first two letters are incorrect.
Please double-check. thx.
v0.40.0
go1.14.3
gcc version 9.3.0
5.4.0-33-generic x86_64
Is the extra output from pinyin -p
intended?
$ pinyin -p 银行
2020/10/08 22:29:30 Load the gse dictionary: "/home/tong/l/ws/Go/pkg/mod/github.com/go-ego/[email protected]/data/dict/dictionary.txt"
2020/10/08 22:29:32 Gse dictionary loaded finished.
yin xing
This looks like debug output, and should have a way to disable it.
What does the Heteronym
(多音字模式) do?
$ pinyin 银行
yin xing
$ pinyin -e 银行
yin xing
I was hoping that when the Heteronym
(多音字模式) is on, the second output would be
yin hang
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.