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'注音', '、')

>>> 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 (7.2 kB view hashes)

Uploaded source

Built Distribution

bopomofo-0.1.0-py2.py3-none-any.whl (4.0 kB view hashes)

Uploaded 3 5

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page