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'], blur=True, 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.
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.3.tar.gz
(4.8 kB
view details)
File details
Details for the file cnprep-0.1.3.tar.gz
.
File metadata
- Download URL: cnprep-0.1.3.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1bb6f1b670d605a76ea7863e0ac4ec7deb10ac99adba9112b16715ef50c21e5 |
|
MD5 | 31385e32eb1442c22748cfa612163564 |
|
BLAKE2b-256 | 511396ed2bf8e783a5bcd00b00b8421919c0628279e2689a734ba2201ed51238 |