📜  使用 nltk 删除停用词 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:46.636000             🧑  作者: Mango

代码示例1
from nltk.corpus import stopwords
nltk.download("stopwords")
stop = set(stopwords.words("english"))
filtered_words = [word.lower() for word in text.split() if word.lower() not in stop]