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.4.tar.gz
(2.1 kB
view hashes)