Identification and conversion functions for Chinese text processing
Project description
Dragon Mapper is a Python library that provides identification and conversion functions for Chinese text processing.
Documentation: https://tsroten.github.io/dragonmapper/
Free software: MIT license
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
Report bugs and ask questions via GitHub Issues
Refer to the API documentation when you need more technical information
Contribute documentation, code, or feedback
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17b6a33ad98ed3d6cd2392bd41613bd57279e84ffb96fb4a5bda336f9fe0572e |
|
MD5 | ae23e3c85c8046f2d2c3710a25ff3933 |
|
BLAKE2b-256 | 44567740952e75a1e6dae78a9695fdad901f98c8fe0acc8d68fd391e267e6323 |
File details
Details for the file dragonmapper-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: dragonmapper-0.3.0-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b9f4503963e5e016bfcdfc4d58d73fc029214f54d643880fab834e51ec55f6a |
|
MD5 | 4d77b4cc737155553d82a8f594cec550 |
|
BLAKE2b-256 | 113aa906236c0fd25c0c9e25684d17643b72c01031ae5bdcd20e03d91e4c70ff |