Translate chinese chars to wubi
Project description
Translate chinese chars to pinyin based on Mandarin.dat
Install
$ pip install pinyin
Usage
>>> import wubi
>>> print wubi.get('你 好')wubi.get('你 好')
nǐ hǎo
>>> print pinyin.get('你好', format="strip", delimiter=" ")
ni hao
>>> print pinyin.get('你好', format="numerical")
ni3hao3
>>> print pinyin.get_initial('你好')
n h
License
pinyin is free software, under an MIT-style license. See LICENSE for details.
The data file for translations is the CC-BY-SA 3.0.
The translations are from the CC-CE-DICT project (https://cc-cedict.org/wiki/), by Denisowski, Peterson, Brelsford, and others.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wubi-0.0.1.tar.gz
(408.7 kB
view hashes)
Built Distributions
wubi-0.0.1-py2.py3-none-any.whl
(410.0 kB
view hashes)
wubi-0.0.1-py2.7.egg
(411.7 kB
view hashes)