Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

A set of utility functions for processing Chinese text.

Project description

A set of utility functions for processing Chinese text. Current features include:

  • Add spaces between Chinese/Japanese/Korean characters and halfwidth characters
  • Convert traditional Chinese to simplified Chinese and the other way around


$ pip install bisheng


Add spaces between Chinese characters and halfwidth characters:

>>> import bisheng
>>> print bisheng.add_spaces(u'BiSheng由Python寫成,名字源自1000多年前的活字印刷術發明人-畢昇。')
BiSheng 由 Python 寫成,名字源自 1000 多年前的活字印刷術發明人 - 畢昇。

Specify the characters you want to exclude:

>>> print bisheng.add_spaces(u'中[括]弧')
中 [括] 孤

>>> print bisheng.add_spaces(u'中[括]弧', exclude='[]')

Traditional/simplified Chinese convertion:

>>> print bisheng.to_simp(u'畢昇')

>>> print bisheng.to_trad(u'毕升')

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for bisheng, version 0.10.0
Filename, size File type Python version Upload date Hashes
Filename, size bisheng-0.10.0.tar.gz (33.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page