pkufool / cppinyin

Converting Chinese sentences into pinyin sequences, implemented in C++, very fast and easy to deploy.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

简介

cppinyin 是一个用 C++ 实现的中文转拼音工具,可作为pypinyin 的替代方案,之所以使用 C++ 实现,一是方便部署,二也是为了提升效率,我相信 cppinyin 的转换速度要比 pypinyin 好不少。

安装

python

pip install cppinyin

C++

可从源码编译:

mkdir build
cd build
cmake ..
make -j

集成可用 cmake

使用

python

import cppinyin

encoder = cppinyin.Encoder()

encoder.encode("我是**人民的儿子")

命令行

cppinyin encode 我是**人民的儿子

About

Converting Chinese sentences into pinyin sequences, implemented in C++, very fast and easy to deploy.

License:Apache License 2.0


Languages

Language:C++ 58.0%Language:CMake 33.3%Language:Python 8.7%