Skip to main content

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pinyinsplit-0.1.4-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

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

Hashes for pinyinsplit-0.1.4.tar.gz
Algorithm Hash digest
SHA256 e0a767ba7ea1ab84c61532db209b3ea5c7c0c388f13a0150c633880c34b4ab4d
MD5 207e2240cfb14d7500b31e972294f025
BLAKE2b-256 d9d11dcf5cfa012beb692e3cbc72a65b418a9e5fd0a728f81ab388cc77757090

See more details on using hashes here.

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

Hashes for pinyinsplit-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 21ad509e70b07a9488100c1dc1794be4829e00366a4270672f633543164e3cfa
MD5 a28c5b1359c897e05ce7ea03ff445726
BLAKE2b-256 e7be03802d0843ee8ed7170605802fb63076387aa33cd8755d8377682387b026

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page