Skip to main content

Identification and conversion functions for Chinese text processing

Project description

https://badge.fury.io/py/dragonmapper.svg https://github.com/tsroten/dragonmapper/actions/workflows/ci.yml/badge.svg

Dragon Mapper is a Python library that provides identification and conversion functions for Chinese text processing.

Features

  • Convert between Chinese characters, Pinyin, Zhuyin, and the International Phonetic Alphabet.

  • Identify a string as Traditional or Simplified Chinese, Pinyin, Zhuyin, or the International Phonetic Alphabet.

>>> s = '我是一个美国人。'
>>> dragonmapper.hanzi.is_simplified(s)
True
>>> dragonmapper.hanzi.to_pinyin(s)
'wǒshìyīgèměiguórén。'
>>> dragonmapper.hanzi.to_pinyin(s, all_readings=True)
'[wǒ][shì/shi/tí][yī][gè/ge/gě/gàn][měi][guó][rén/ren]。'
>>> s = 'Wǒ shì yīgè měiguórén.'
>>> dragonmapper.transcriptions.is_pinyin(s)
True
>>> dragonmapper.transcriptions.pinyin_to_zhuyin(s)
'ㄨㄛˇ ㄕˋ ㄧ ㄍㄜˋ ㄇㄟˇ ㄍㄨㄛˊ ㄖㄣˊ.'
>>> dragonmapper.transcriptions.pinyin_to_ipa(s)
'wɔ˧˩˧ ʂɨ˥˩ i˥ kɤ˥˩ meɪ˧˩˧ kwɔ˧˥ ʐən˧˥.'

Getting Started

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

dragonmapper-0.3.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

dragonmapper-0.3.0-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file dragonmapper-0.3.0.tar.gz.

File metadata

  • Download URL: dragonmapper-0.3.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for dragonmapper-0.3.0.tar.gz
Algorithm Hash digest
SHA256 17b6a33ad98ed3d6cd2392bd41613bd57279e84ffb96fb4a5bda336f9fe0572e
MD5 ae23e3c85c8046f2d2c3710a25ff3933
BLAKE2b-256 44567740952e75a1e6dae78a9695fdad901f98c8fe0acc8d68fd391e267e6323

See more details on using hashes here.

File details

Details for the file dragonmapper-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dragonmapper-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b9f4503963e5e016bfcdfc4d58d73fc029214f54d643880fab834e51ec55f6a
MD5 4d77b4cc737155553d82a8f594cec550
BLAKE2b-256 113aa906236c0fd25c0c9e25684d17643b72c01031ae5bdcd20e03d91e4c70ff

See more details on using hashes here.

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