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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pinyinsplit-0.1.4.tar.gz.
File metadata
- Download URL: pinyinsplit-0.1.4.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0a767ba7ea1ab84c61532db209b3ea5c7c0c388f13a0150c633880c34b4ab4d
|
|
| MD5 |
207e2240cfb14d7500b31e972294f025
|
|
| BLAKE2b-256 |
d9d11dcf5cfa012beb692e3cbc72a65b418a9e5fd0a728f81ab388cc77757090
|
File details
Details for the file pinyinsplit-0.1.4-py3-none-any.whl.
File metadata
- Download URL: pinyinsplit-0.1.4-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21ad509e70b07a9488100c1dc1794be4829e00366a4270672f633543164e3cfa
|
|
| MD5 |
a28c5b1359c897e05ce7ea03ff445726
|
|
| BLAKE2b-256 |
e7be03802d0843ee8ed7170605802fb63076387aa33cd8755d8377682387b026
|