cnprep
Chinese text preprocess
You can extract numbers, email, website, emoji, tex, and delete spaces, punctuations.
Install
>> pip install cnprep
Usage
from cnprep import Extractor ext = Extractor(args=['email', 'number'], limit=5) ext.extract(message)
args: option
e.g. ['email', 'telephone'] or 'email, telephone'
email
telephone
web
QQ
tex
wechat
message (without punctuation)
blur (Ⅰ①壹...)
limit: parameter for get_number (blur)
Also, you can use ‘’ext.reset_param()’’ to reset the parameters.
Attention
The URL extractor only support ASCII
Metadata
Release files for cnprep 0.1.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cnprep-0.1.12-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for cnprep-0.1.12-py2.py3-none-any.whl |
Release files / cnprep-0.1.12-py2.py3-none-any.whl
| Download URL | cnprep-0.1.12-py2.py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
483ae57599402fd4421ed1b436d3fe7e7a29c813bb54586d49b48b98f6ce5323
|
|
BLAKE2b-256 checksum How to use checksums |
a8f57940a7544d04cfbaf3f892e2e7b9019a60d54f5f1120916feae94bcebfd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for cnprep 0.1.12
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.