安装和使用NLTK问题

安装NLTK可能出现的问题:
1. pip install ntlk
2. 如果遇到缺少stopwords报错如下:( http://johnlaudun.org/20130126-nltk-stopwords/
LookupError:
**********************************************************************
  Resource u'corpora/stopwords' not found. Please use the
  NLTK Downloader to obtain the resource: >>> nltk.download()
  Searched in:
    - 'C:\\Users\\Tree/nltk_data'
    - 'C:\\nltk_data'
    - 'D:\\nltk_data'
    - 'E:\\nltk_data'
    - 'F:\\Program Files (x86)\\python\\nltk_data'
    - 'F:\\Program Files (x86)\\python\\lib\\nltk_data'
    - 'C:\\Users\\Tree\\AppData\\Roaming\\nltk_data'
**********************************************************************
则有一下输入:
In[3]: import nltk

In[4]: nltk.download()


猜你喜欢

转载自blog.csdn.net/weixin_40449300/article/details/80339952