NLTK -- LookupError: Resource punkt not found.

Failure:

 

LookupError: 
**********************************************************************
  Resource punkt not found.
  Please use the NLTK Downloader to obtain the resource:

  >>> import nltk
  >>> nltk.download('punkt')
  
  For more information see: https://www.nltk.org/data.html

  Attempted to load tokenizers/punkt/PY3/english.pickle

  Searched in:
    - '/home/me/nltk_data'
    - '/home/me/anaconda3/nltk_data'
    - '/home/me/anaconda3/share/nltk_data'
    - '/home/me/anaconda3/lib/nltk_data'
    - '/usr/share/nltk_data'
    - '/usr/local/share/nltk_data'
    - '/usr/lib/nltk_data'
    - '/usr/local/lib/nltk_data'
    - ''
**********************************************************************

 

 

Solution:

Move tokenizers out from packages as a whole.

 

你可能感兴趣的:(自然语言处理)