A Python library to split a Chinese Pinyin phrase into possible permutations of Chinese Pinyin words
Project description
pinyinsplit
This is a Python library for splitting a Chinese Pinyin phrase into possible permutations of valid Pinyin words.
Usage
Some examples of using the library are as follows:
>>> from pinyinsplit import PinyinSplit >>> pys = PinyinSplit() >>> pys.split('XiangGangDaXue') [['Xiang', 'Gang', 'Da', 'Xue'], ['Xiang', 'Gang', 'Da', 'Xu', 'e'], ['Xi', 'ang', 'Gang', 'Da', 'Xue'], ['Xi', 'ang', 'Gang', 'Da', 'Xu', 'e']] >>> pys.split('shediaoyingxiongchuan') [['she', 'diao', 'ying', 'xiong', 'chuan'], ['she', 'diao', 'ying', 'xiong', 'chu', 'an'], ['she', 'di', 'ao', 'ying', 'xiong', 'chuan'], ['she', 'di', 'ao', 'ying', 'xiong', 'chu', 'an']] >>> pys.split('shediaoyingxiongchuanxyz') []
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
pinyinsplit-0.1.2.tar.gz
(1.3 kB
view hashes)
Built Distribution
Close
Hashes for pinyinsplit-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3ef5dbf6d5f01a4d6379afb2a166ca20530d802df11a0fd1dcb16674ad9f4ea |
|
MD5 | 5ec355e1fe25a1a3f42f293b1e2b4ad7 |
|
BLAKE2b-256 | 7d4793ec26d4f7da6131e96944569536ab6afdc30902e4e1a838e59bb2d79c55 |