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
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9318aecc47afe83b195c2ef5812485b4db86f52e5fe3b1fcb540507bc87f7e80 |
|
MD5 | 83c44932ec9f1ccfd25ecfef20da7151 |
|
BLAKE2b-256 | d28866be3e4a1c9bc7d9cbdbc41843ef97ea69e2a79b3822fd4fe5087e22c198 |
File details
Details for the file dragonmapper-0.2.7-py3-none-any.whl
.
File metadata
- Download URL: dragonmapper-0.2.7-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f05ab759244f14f393da814a18cae6ac6efea44686a15c208d239e39e91e9c3 |
|
MD5 | 2754d81011167cdb544848172d873c71 |
|
BLAKE2b-256 | 826c635416d3a2dc9426a6368cf326ef1c7e06af79e924ac90b4dd8814bca4f0 |