Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

mapix/Pinyin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⛔ [DEPRECATED] Active at https://github.com/lexdene/Pinyin

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']

About

Smart Chinese-to-Pinyin converter.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published