A lib for Chinese text preprocessing
Project description
===========
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(delete=True, args=['email', 'number'], blur=True, limit=5)
ext.extract(message)
::
delete: delete the found info (except blur)
args: option
e.g. ['email', 'number'] or 'email, number'
blur: convert Chinese to pinyin and extract useful numbers
limit: parameter for get_number
Also, you can use ''ext.reset_param()'' to reset the parameters.
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(delete=True, args=['email', 'number'], blur=True, limit=5)
ext.extract(message)
::
delete: delete the found info (except blur)
args: option
e.g. ['email', 'number'] or 'email, number'
blur: convert Chinese to pinyin and extract useful numbers
limit: parameter for get_number
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.0.5.tar.gz
(4.5 kB
view details)
File details
Details for the file cnprep-0.0.5.tar.gz
.
File metadata
- Download URL: cnprep-0.0.5.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 287ae33f5be462fb9e4f5582e1745fb6d5bce1636e1d55798e05952c36296042 |
|
MD5 | 358508ae889dd0c4fbc960f9925c0823 |
|
BLAKE2b-256 | c0b61ecd70e6e9a85d0f94732e1f21c11e74fcbbb4eb94c827aa6274dcf1db9f |