Reputation: 798
I am trying to write a python program to remove stopword from a sentence using nltk package
from nltk.corpus import stopwords
chachedWords = stopwords.words('english')
the following gives TypeError: 'LazyCorpusLoader' object is not callable
Upvotes: 4
Views: 3588
Reputation: 433
Try:
from nltk.corpus import stopwords
import nltk
nltk.download("stopwords")
chachedWords = stopwords.words('english')
Upvotes: 9