Metadata-Version: 2.4
Name: cppinyin
Version: 0.9
Summary: A simple and fast pinyin encoder and decoder.
Author-email: Next-gen Kaldi development team <wkang@pku.edu.cn>
Project-URL: Homepage, https://github.com/pkufool/cppinyin
Project-URL: Bug Tracker, https://github.com/pkufool/cppinyin/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: importlib-resources
Requires-Dist: click
Dynamic: license-file

# 简介

cppinyin 是一个用 C++ 实现的中文转拼音工具，可作为[pypinyin](https://github.com/mozillazg/python-pinyin) 的替代方案，之所以使用 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 我是中国人民的儿子
```

