Skip to main content

Smart Chinese-to-Pinyin converter.

Project description

Pinyin

Smart Chinese-to-Pinyin converter.

Getting Started

pip install smart_pinyin

Usage

>>> from pinyin import Pinyin
>>> pinyin = Pinyin()
>>> ' '.join(pinyin.get_pinyin('银行行长潘玮柏长了一头乌黑的白发, 睡觉睡的很晚, 道行很深', failure=''))
>>> u'yin hang hang zhang pan wei bo zhang le yi tou wu hei de bai fa  shui jiao shui de hen wan  dao heng hen shen'
>>> for i in pinyin.get_pinyin_all('自行车'): print list(i)
[u'zi', u'hang', u'che']
[u'zi', u'hang', u'ju']
[u'zi', u'heng', u'che']
[u'zi', u'heng', u'ju']
[u'zi', u'xing', u'che']
[u'zi', u'xing', u'ju']

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for smart_pinyin, version 0.4.5
Filename, size File type Python version Upload date Hashes
Filename, size smart_pinyin-0.4.5.tar.gz (145.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page