Module 'stopwords' has no attribute 'words'

Hi!

AttributeError                            Traceback (most recent call last)
<ipython-input-27-c11d0c52c7db> in <module>
      7 jobs_list = ' '.join(words)
      8 
----> 9 stop_words = stopwords.words('english')
     10 stop_words = set(stop_words)
     11 

AttributeError: module 'stopwords' has no attribute 'words'

I’m getting this error when I try to run stopwords. Already imported nltk and installed and imported stopwords. I’m using Colab.

Did you import the module like this:

from nltk.corpus import stopwords

and then something like (or whatever language you are using):
stop_words = set(stopwords.words('english'))

See:

https://www.nltk.org/book/ch02.html#wordlist-corpora