我如何使用python获取停用词列表

时间:2019-04-22 19:07:54

标签: python python-3.x pandas stop-words

我该怎么办才能获得停用词的法语列表,因为我的数据是法语。 stop_words=stopwords.words('french')

1 个答案:

答案 0 :(得分:0)

您提供的代码表明您正在询问如何使用nltk的停用词。我明白你要问的意思吗?在这种情况下,停用词集如下所示:

>>> import nltk
>>> from nltk.corpus import stopwords
>>> stop_words = set(stopwords.words('french'))