Skip to main content
https://img.shields.io/travis/antfu/bopomofo.svg?style=flat-square https://img.shields.io/codecov/c/github/antfu/bopomofo.svg?style=flat-square https://img.shields.io/codacy/grade/c5ae3c7ed15f4b388218f83cda6782f9.svg?style=flat-square https://img.shields.io/pypi/v/bopomofo.svg?style=flat-square https://img.shields.io/pypi/pyversions/bopomofo.svg?style=flat-square https://img.shields.io/pypi/status/bopomofo.svg?style=flat-square https://img.shields.io/pypi/l/bopomofo.svg?style=flat-square

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

Install

pip install bopomofo

Usage

>>> 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)
'ㄓㄨˋ ㄧㄣˉ'

Metadata

Release files for bopomofo 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bopomofo 0.1.2
File Size Uploaded
bopomofo-0.1.2.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bopomofo 0.1.2
File Interpreter ABI Platform
bopomofo-0.1.2-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 10.6 kB

Release files / bopomofo-0.1.2.tar.gz

Download URL bopomofo-0.1.2.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5b1ff4632b0da291cd645186db45d92bb98f8c08aec6294299b5ce808cb44930
BLAKE2b-256 checksum
How to use checksums
1e8afea671eaf5fa609b275b5bc67014cf44400330466b71bc7f975dba07486b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

Release files / bopomofo-0.1.2-py2.py3-none-any.whl

Download URL bopomofo-0.1.2-py2.py3-none-any.whl
Size 5.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
9c41576f36ce4452f7351007254e99fbe1d172e969c3d73c5bf04727e054854d
BLAKE2b-256 checksum
How to use checksums
4031bc958570dc714573b7d906f9ab97d27d9a96ec523659f91fd605b8441b53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page