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.2.7.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for dragonmapper-0.2.7.tar.gz
Algorithm Hash digest
SHA256 9318aecc47afe83b195c2ef5812485b4db86f52e5fe3b1fcb540507bc87f7e80
MD5 83c44932ec9f1ccfd25ecfef20da7151
BLAKE2b-256 d28866be3e4a1c9bc7d9cbdbc41843ef97ea69e2a79b3822fd4fe5087e22c198

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dragonmapper-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 7f05ab759244f14f393da814a18cae6ac6efea44686a15c208d239e39e91e9c3
MD5 2754d81011167cdb544848172d873c71
BLAKE2b-256 826c635416d3a2dc9426a6368cf326ef1c7e06af79e924ac90b4dd8814bca4f0

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