Skip to main content

Translate chinese word to bopomofo

Project description

Translate 漢字 to ㄅㄆㄇㄈ, based on lxneng/xpinyin.


pip install bopomofo


>>> from bopomofo import to_bopomofo
>>> to_bopomofo(u'注音')
'ㄓㄨˋ ㄧㄣ'

>>> to_bopomofo(u'注音', tones=False)
'ㄓㄨ ㄧㄣ'

>>> to_bopomofo(u'注音', u'、')

>>> bopomofo.to_bopomofo(u'注音', first_tone_symbol=True)
'ㄓㄨˋ ㄧㄣˉ'

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

bopomofo-0.1.2.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

bopomofo-0.1.2-py2.py3-none-any.whl (5.5 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