A lib for Chinese text preprocessing
Project description
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(delete=True, args=['email', 'number'], limit=5) ext.extract(message)
delete: delete the found info (except blur) args: option e.g. ['email', 'telephone'] or 'email, telephone' email telephone web QQ tex wechat blur (Ⅰ①壹...) limit: parameter for get_number (blur)
Also, you can use ‘’ext.reset_param()’’ to reset the parameters.
Attention
The URL extractor only support ‘http(s)’ and ‘www’ with ASCII
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cnprep-0.1.7.tar.gz
(4.9 kB
view details)
File details
Details for the file cnprep-0.1.7.tar.gz
.
File metadata
- Download URL: cnprep-0.1.7.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30a64277f27a7e3ea5de8ae37b8ce60682dd44da5c6486253d27b602a47f911a |
|
MD5 | 16075bd2dc0071d50b3454c11eaa4419 |
|
BLAKE2b-256 | caf79c722de91da81faaa603c3e821586152b1958281d63950a74e85362ae763 |