Skip to main content

BiSheng

https://badge.fury.io/py/bisheng.png https://travis-ci.org/eliangcs/bisheng.png?branch=master https://coveralls.io/repos/eliangcs/bisheng/badge.png?branch=master

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

Installation

$ pip install bisheng

Usage

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'毕升')
畢升

Metadata

Release files for bisheng 0.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bisheng 0.10.0
File Size Uploaded Provenance
bisheng-0.10.0.tar.gz 33.1 kB Without provenance Details

Release files / bisheng-0.10.0.tar.gz

Download URL bisheng-0.10.0.tar.gz
Size 33.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d53cc62fac8b191fe19e0b88417a0ff325fe40f127baf6f21696d9f29ef07d66
BLAKE2b-256 checksum
How to use checksums
15aaaafb896086ed7249dc82a33597462339318fe35fceaea1b262a21b34b0d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for bisheng 0.10.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.10.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page