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(p.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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
smart_pinyin-0.3.2.tar.gz
(145.1 kB
view hashes)