NLTK and Stopwords Fail #lookuperror

后端 未结 6 756
我寻月下人不归
我寻月下人不归 2020-12-24 00:35

I am trying to start a project of sentiment analysis and I will use the stop words method. I made some research and I found that nltk have stopwords but when I execute the c

6条回答
  •  生来不讨喜
    2020-12-24 01:12

    You don't seem to have the stopwords corpus on your computer.

    You need to start the NLTK Downloader and download all the data you need.

    Open a Python console and do the following:

    >>> import nltk
    >>> nltk.download()
    showing info http://nltk.github.com/nltk_data/
    

    In the GUI window that opens simply press the 'Download' button to download all corpora or go to the 'Corpora' tab and only download the ones you need/want.

提交回复
热议问题