Failed loading english.pickle with nltk.data.load

StackOverflow

When trying to load the punkt tokenizer...

import nltk.data
tokenizer = nltk.data.load("nltk:tokenizers/punkt/english.pickle")

...a LookupError was raised:

> LookupError: 
>     *********************************************************************   
> Resource "tokenizers/punkt/english.pickle" not found.  Please use the NLTK Downloader to obtain the resource: nltk.download().   Searched in:
>         - "C:UsersMartinos/nltk_data"
>         - "C:
ltk_data"
>         - "D:
ltk_data"
>         - "E:
ltk_data"
>         - "E:Python26
ltk_data"
>         - "E:Python26lib
ltk_data"
>         - "C:UsersMartinosAppDataRoaming
ltk_data"
>     **********************************************************************

Answer rating: 294

I had this same problem. Go into a python shell and type:

>>> import nltk
>>> nltk.download()

Then an installation window appears. Go to the "Models" tab and select "punkt" from under the "Identifier" column. Then click Download and it will install the necessary files. Then it should work!





Get Solution for free from DataCamp guru