nlp和文本挖掘中的stopwords综合包
stopwords-guilannlp的Python项目详细描述
停用字桂林NLP
这是一个自然语言处理和文本挖掘的综合停止词。
安装
Now stopwords_guilannlp is on PyPI!
- 通过PYPI下载:
$ pip3 install stopwords_guilannlp
- 或者克隆回购协议:
$ git clone --recursive git://github.com/JoyeBright/Sstopwords_guilannlp.git
- 然后安装:
$ python3 setup.py install
用法
tokens = word_tokenize(s)
filtered_tokens = []
stopwords = stopwords_output("Persian", "nar")
for w in tokens:
if w not in stopwords:
filtered_tokens.append(w)
return filtered_tokens
- 注意:包不支持标记化过程。
支持的语言
- 英语
- 波斯语
输出类型
- 数据帧
- numpy数组
- 设置
- 列表