NLTK 停用词 returns 错误 "LazyCorpusLoader is not callable"
NLTK stopwords returns error "LazyCorpusLoader is not callable"
我正在尝试编写一个 python 程序来使用 nltk 包从句子中删除停用词
from nltk.corpus import stopwords
chachedWords = stopwords.words('english')
下面给出TypeError: 'LazyCorpusLoader' object is not callable
尝试:
from nltk.corpus import stopwords
import nltk
nltk.download("stopwords")
chachedWords = stopwords.words('english')
我正在尝试编写一个 python 程序来使用 nltk 包从句子中删除停用词
from nltk.corpus import stopwords
chachedWords = stopwords.words('english')
下面给出TypeError: 'LazyCorpusLoader' object is not callable
尝试:
from nltk.corpus import stopwords
import nltk
nltk.download("stopwords")
chachedWords = stopwords.words('english')