A Python library to split a Chinese Pinyin phrase into possible permutations of Chinese Pinyin words
Project description
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') []
Installation
You can install pinyinsplit as follows:
$ pip install pinyinsplit
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.4.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for pinyinsplit-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21ad509e70b07a9488100c1dc1794be4829e00366a4270672f633543164e3cfa |
|
MD5 | a28c5b1359c897e05ce7ea03ff445726 |
|
BLAKE2b-256 | e7be03802d0843ee8ed7170605802fb63076387aa33cd8755d8377682387b026 |