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.

Source Distribution

cnprep-0.0.4.tar.gz (2.1 kB view details)

Uploaded Source

File details

Details for the file cnprep-0.0.4.tar.gz.

File metadata

  • Download URL: cnprep-0.0.4.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cnprep-0.0.4.tar.gz
Algorithm Hash digest
SHA256 059b3c18493568116ad600b0849b7e7f251f320cbe65fe393ca54f82b067d65b
MD5 55bf6d4eee9df890e0709e26e3182503
BLAKE2b-256 74f5fdd3e0fe6423359d0ed7f07328add4aad390e9029553b33ee4eed83e8f33

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page