mozillazg / Go Pinyin
Licence: mit
汉字转拼音
Stars: ✭ 907
Projects that are alternatives of or similar to Go Pinyin
Xpinyin
Translate Chinese hanzi to pinyin (拼音) by Python, 汉字转拼音
Stars: ✭ 709 (-21.83%)
Mutual labels: chinese, pinyin
Somiao Pinyin
Somiao Pinyin: Train your own Chinese Input Method with Seq2seq Model 搜喵拼音输入法
Stars: ✭ 209 (-76.96%)
Mutual labels: chinese, pinyin
hanzi-pinyin-font
Chinese font displaying Hanzi (汉字) characters with by transliteration/pronunciation (Pīnyīn).
Stars: ✭ 79 (-91.29%)
Mutual labels: pinyin, chinese
pinyin data
🐼 Easy to use and portable pronunciation data for Hanzi characters.
Stars: ✭ 13 (-98.57%)
Mutual labels: pinyin, chinese
Cn sort
中文排序:按拼音/笔顺快速排序简体中文词组(百万数量级,可含中英/多音字)。如果对您有所帮助,欢迎点个star鼓励一下。
Stars: ✭ 102 (-88.75%)
Mutual labels: chinese, pinyin
syng
A free, open source, cross-platform, Chinese-To-English dictionary for desktops.
Stars: ✭ 108 (-88.09%)
Mutual labels: pinyin, chinese
pinyin4js
A opensource javascript library for converting chinese to pinyin。welcome Star : P
Stars: ✭ 153 (-83.13%)
Mutual labels: pinyin, chinese
chinese-rhymer
轻量中文押韵神器,100%绝对可用,傻瓜式命令行操作,秒速实现烈焰单押,闪电双押,龙卷三押以及海啸式四押,目前版本 v0.2.6。Search for rhymes for Chinese words, with 1, 2, 3 and 4 characters, released on PyPI with current version of 0.2.6.
Stars: ✭ 72 (-92.06%)
Mutual labels: pinyin, chinese
Chineseutil
PHP 中文工具包,支持汉字转拼音、拼音分词、简繁互转、数字、金额大写;QQ群:17916227
Stars: ✭ 413 (-54.47%)
Mutual labels: chinese, pinyin
Hanbaobao
Mandarin Chinese text segmentation and mobile dictionary Android app (中文分词)
Stars: ✭ 17 (-98.13%)
Mutual labels: chinese, pinyin
Algorithm interview notes Chinese
学习笔记:自然语言处理(NLP)/深度学习(Deep Learning)/机器学习(Machine Learning)/Python/Pytorch
Stars: ✭ 29 (-96.8%)
Mutual labels: chinese
Rasa chatbot cn
building a chinese dialogue system based on the newest version of rasa(基于最新版本rasa搭建的对话系统)
Stars: ✭ 723 (-20.29%)
Mutual labels: chinese
Opentracing Specification Zh
OpenTracing标准(中文版) `zh` (Chinese) translation of the opentracing/specification
Stars: ✭ 717 (-20.95%)
Mutual labels: chinese
Cluener2020
CLUENER2020 中文细粒度命名实体识别 Fine Grained Named Entity Recognition
Stars: ✭ 689 (-24.04%)
Mutual labels: chinese
go-pinyin
汉语拼音转换工具 Go 版。
Installation
go get -u github.com/mozillazg/go-pinyin
install CLI tool:
go get -u github.com/mozillazg/go-pinyin/cmd/pinyin
$ pinyin 中国人
zhōng guó rén
Documentation
API documentation can be found here: https://godoc.org/github.com/mozillazg/go-pinyin
Usage
package main
import (
"fmt"
"github.com/mozillazg/go-pinyin"
)
func main() {
hans := "中国人"
// 默认
a := pinyin.NewArgs()
fmt.Println(pinyin.Pinyin(hans, a))
// [[zhong] [guo] [ren]]
// 包含声调
a.Style = pinyin.Tone
fmt.Println(pinyin.Pinyin(hans, a))
// [[zhōng] [guó] [rén]]
// 声调用数字表示
a.Style = pinyin.Tone2
fmt.Println(pinyin.Pinyin(hans, a))
// [[zho1ng] [guo2] [re2n]]
// 开启多音字模式
a = pinyin.NewArgs()
a.Heteronym = true
fmt.Println(pinyin.Pinyin(hans, a))
// [[zhong zhong] [guo] [ren]]
a.Style = pinyin.Tone2
fmt.Println(pinyin.Pinyin(hans, a))
// [[zho1ng zho4ng] [guo2] [re2n]]
fmt.Println(pinyin.LazyPinyin(hans, pinyin.NewArgs()))
// [zhong guo ren]
fmt.Println(pinyin.Convert(hans, nil))
// [[zhong] [guo] [ren]]
fmt.Println(pinyin.LazyConvert(hans, nil))
// [zhong guo ren]
}
注意:
- 默认情况下会忽略没有拼音的字符(可以通过自定义
Fallback
参数的值来自定义如何处理没有拼音的字符, 详见 示例)。 - 根据 《汉语拼音方案》 y,w,ü (yu) 都不是声母,
以及不是所有拼音都有声母,如果这不是你预期的话,你可能需要的是首字母风格
FirstLetter
( 详细信息 )。
Related Projects
- hotoo/pinyin: 汉语拼音转换工具 Node.js/JavaScript 版。
- mozillazg/python-pinyin: 汉语拼音转换工具 Python 版。
- mozillazg/rust-pinyin: 汉语拼音转换工具 Rust 版。
pinyin data
- 使用 pinyin-data 的拼音数据
License
Under the MIT License.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].