汉字转拼音
汉语拼音转换工具 Go 版。
go get github.com/mozillazg/go-pinyin
install CLI tool:
# go version>=1.17
go install github.com/mozillazg/go-pinyin/cli/pinyin@latest
# go version<1.17
go get -u github.com/mozillazg/go-pinyin/cli/pinyin
$ pinyin 中国人
zhōng guó rén
API documentation can be found here: https://godoc.org/github.com/mozillazg/go-pinyin
…
注意:
Fallback 参数的值来自定义如何处理没有拼音的字符,
详见 示例)。FirstLetter
( 详细信息 )。Under the MIT License.
暂无开放 Issues,或尚未同步最近议题。