跳转到主要内容

中文文本预处理库

项目描述

https://travis-ci.org/Momingcoder/cnprep.svg?branch=master

中文文本预处理

您可以提取数字、电子邮件、网站、表情符号、tex,并删除空格和标点符号。

安装

>> pip install cnprep

用法

from cnprep import Extractor
ext = Extractor(args=['email', 'number'], limit=5)
ext.extract(message)
args: option
    e.g. ['email', 'telephone'] or 'email, telephone'
    email
    telephone
    web
    QQ
    tex
    wechat
    message (without punctuation)
    blur (Ⅰ①壹...)
limit: parameter for get_number (blur)

此外,您还可以使用‘ext.reset_param()’重置参数。

注意

URL提取器仅支持ASCII

项目详情


下载文件

下载适用于您的平台文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源代码发行版

本发行版没有可用的源代码发行版文件。请参阅生成发行版存档的教程。

构建发行版

cnprep-0.1.12-py2.py3-none-any.whl (6.6 kB 查看哈希值)

上传于 Python 2 Python 3

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面