Skip to main content

This is a package to translate a chinese sentence into bopomofo letters

Project description

bopomo

This is a package to translate a chinese sentence into bopomofo letters baesed on revised dictionary of Ministry of Education, segment corpus, artificial label data, and python package jieba and python-crfsuite.

>>> import bopomo
>>> sent = '妹妹背著洋娃娃,走到花園來看花。'
>>> bopomo_sent = bopomo.bopomo_sent(sent)
>>> print(bopomo_sent.bopomo_tag())
[['妹妹背著洋娃娃', 'ㄇㄟˋ ˙ㄇㄟ ㄅㄟ ˙ㄓㄜ ㄧㄤˊ ㄨㄚˊ ˙ㄨㄚ'], ['走到花園來看花', 'ㄗㄡˇ ㄉㄠˋ ㄏㄨㄚ ㄩㄢˊ ㄌㄞˊ ㄎㄢˋ ㄏㄨㄚ']]

>>> sent = '如果薪水不到4萬8,可向老闆說你給的薪水太低了。'
>>> bopomo_sent = bopomo.bopomo_sent(sent)
>>> print(bopomo_sent.bopomo_tag())
[['如果薪水不到4萬8', 'ㄖㄨˊ ㄍㄨㄛˇ ㄒㄧㄣ ㄕㄨㄟˇ ㄅㄨˋ ㄉㄠˋ 4 ㄨㄢˋ 8'], ['可向老闆說你給的薪水太低了', 'ㄎㄜˇ ㄒㄧㄤˋ ㄌㄠˇ ㄅㄢˇ ㄕㄨㄛ ㄋㄧˇ ㄍㄟˇ ˙ㄉㄜ ㄒㄧㄣ ㄕㄨㄟˇ ㄊㄞˋ ㄉㄧ ˙ㄌㄜ']]

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

bopomo-0.0.8.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

bopomo-0.0.8-py3-none-any.whl (3.3 MB view details)

Uploaded Python 3

File details

Details for the file bopomo-0.0.8.tar.gz.

File metadata

  • Download URL: bopomo-0.0.8.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for bopomo-0.0.8.tar.gz
Algorithm Hash digest
SHA256 a05da7452c039efee8ea0b6c2ff21cdadae020502ff63a494c1ce5efdaa31b71
MD5 24fcfad786f4fb6110b43f42c31b887a
BLAKE2b-256 710b66c7944b91f7df22319426b51c5fdcafbfb60ad903a3ebadf1634ddcde3f

See more details on using hashes here.

File details

Details for the file bopomo-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: bopomo-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for bopomo-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 a7d235244e62eaa52a33fb02bf43a6f77f639b142815340bfbbb8defd8b23e39
MD5 e16435fa1aa97826677aaf71b8355f4e
BLAKE2b-256 a1683101dd65f2221e23c6ee277210b355336338d7792c9552347d7d723d42c6

See more details on using hashes here.

Supported by

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