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
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 hashes)
Built Distribution
Close
Hashes for dragonmapper-0.2.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f05ab759244f14f393da814a18cae6ac6efea44686a15c208d239e39e91e9c3 |
|
MD5 | 2754d81011167cdb544848172d873c71 |
|
BLAKE2b-256 | 826c635416d3a2dc9426a6368cf326ef1c7e06af79e924ac90b4dd8814bca4f0 |