/pinyin

A small library to manipulate Hanyu Pinyin.

Primary LanguagePythonISC LicenseISC

Linux build status Windows build status Coverage Code health Dependencies

pinyin is a small library to manipulate Hanyu Pinyin.

Usage

Right now there is quite limited functionality, but you can do stuff like this:

>>> pinyin.num_to_inline('wo3 you3 25 kuai4')
'wǒ yǒu 25 kuài'

Installation

pinyin isn't on PyPi yet. For now, you can download it and run it by itself (it has no external dependencies).

Testing

$ pip install -r tests/requirements.txt
$ nosetests

License

pinyin is licensed under an ISC license. Full information is in LICENSE.md.