Skip to main content

Translate chinese chars to wubi

Project description

Translate chinese chars to pinyin based on Mandarin.dat

Install

$ pip install wubi

Usage

>>> import wubi
>>> print wubi.get('王文超,爱自由。','cw')
gggg yygy fhv , ep thd mh .

>>> print wubi.get('你好', format="strip", delimiter=" ")
王文超爱自由

License

wubi 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.2.tar.gz (408.5 kB view hashes)

Uploaded Source

Built Distribution

wubi-0.0.2-py2.py3-none-any.whl (410.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page