textcleaner:文本数据预处理库
textcleaner的Python项目详细描述
功能!
干洗工在一个电话里完成以下所有工作!或
删除不必要的空行
stip out a perticular character or default one
如果需要,将所有字符转换为小写
从整个文本中删除数字、符号和停止字
在一次调用中标记文本数据
由nltk支持的词干处理和元素化
The goal is to make basic cleaning of data hassle free. Most of the developers who are working with text data have faced this situation where data is not consumable and they end up wasting their time on these issues rather than fine tunning the model and get better accuracy. In that scenario this library can be useful and save you a tone of time.
安装
textcleaner需要Python 3.x 去跑步。
如果尚未安装依赖项,请安装它!
- nltk:安装步骤 [documentation]
- 正则表达式:
pip install regex
- text清洁剂:
pip install textcleaner
或
pip install textcleaner==0.4.26
使用量
importtextcleanerastctc.main_cleaner('<FILE_NAME>')#ortc.document('<FILE_NAME>')
上面的命令将文本文件转换为单词列表 打扫。函数的默认响应是list useop 参数并将其设置为“words”,您将得到一个简单的单词列表。
待办事项
- 更高级的功能
- 能够读取更多格式而不仅仅是.txt
许可证
麻省理工学院
免费软件,见鬼!