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.3.tar.gz
(1.4 kB
view hashes)
Built Distribution
Close
Hashes for pinyinsplit-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d4d4180b4a640bc43493159281aac0deae13d136960029ee8c9fb8245355385 |
|
MD5 | 70a923722edc0944a3ed9375e06eba6c |
|
BLAKE2b-256 | b2e46a682c05938a7e768075f9ec06959a7690cbce8ed9d12e9d8a224949644e |