Paranoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean) and half-width characters (alphabetical letters, numerical digits and symbols).
Project description
pangu
Paranoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean) and half-width characters (alphabetical letters, numerical digits and symbols).
Go version: pangu.go
Java version: pangu.java
JavaScript version: pangu.js
Node.js version: pangu.node
Python version: pangu.py
Ruby version: pangu.rb
Installation
$ pip install pangu
Usage
>>> import pangu
>>> pangu.spacing(u'所以,請問Jackey的鼻子有幾個?3.14個')
u'所以, 請問 Jackey 的鼻子有幾個? 3.14 個'
>>> pangu.spacing(u'新八的構造成分有95%是眼鏡、3%是水、2%是垃圾')
u'新八的構造成分有 95% 是眼鏡、3% 是水、2% 是垃圾'
>>> pangu.spacing(u'新阿姆斯特朗炫風噴射阿姆斯特朗砲')
u'新阿姆斯特朗炫風噴射阿姆斯特朗砲'
History
2.5.6.2 (2015-05-17)
Fix setup.py
2.5.6 (2015-05-17)
Synchronize version number with paranoid-auto-spacing
Improve Paranoid Text Spacing algorithm
1.0.0 (2014-02-12)
Hello World
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
Built Distribution
File details
Details for the file pangu-2.5.6.2.tar.gz
.
File metadata
- Download URL: pangu-2.5.6.2.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18c67ee2b80ce53288f57b951a5dd1e6a6c6e1d6e46c80a45f2bb78b2c3d04e0 |
|
MD5 | 3643b1397ff85458fbef5af99497d032 |
|
BLAKE2b-256 | dcac3fb2011dd1f1ecb9375afcee568664e777ab46675e21ea101617704d2db7 |
File details
Details for the file pangu-2.5.6.2-py2.py3-none-any.whl
.
File metadata
- Download URL: pangu-2.5.6.2-py2.py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e30fb060e6d722380ae9f9c3416baf2597e290579fec8fec39a1035fd9ce6e91 |
|
MD5 | 16dcd139466049c2176b1c5ab0faeed9 |
|
BLAKE2b-256 | 8a50f4e7109a4a82e5038aa2a64ad1cfa647134464bae3082d40fe617de88b30 |