Skip to main content

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
cnprep-0.0.5.tar.gz (4.5 kB) Copy SHA256 hash SHA256 Source None Sep 6, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page