Search code examples
pythonnltk

I am having trouble downloading nltk's punkt tokenizer


I'm trying to download punkt, but I'm getting the following error...

>>> import nltk
>>> nltk.download('punkt')
>>> [nltk_data] Error loading punkt: <urlopen error [SSL] unknown error
>>> [nltk_data]     (_ssl.c:590)>
>>> False
>>> 

can someone please help I've been trying for days...


Solution

  • I guess the downloader script is broken. As a temporal workaround can manually download the punkt tokenizer from here and then place the unzipped folder in the corresponding location. The default folders for each OS are:

    • Windows: C:\nltk_data\tokenizers
    • OSX: /usr/local/share/nltk_data/tokenizers
    • Unix: /usr/share/nltk_data/tokenizers

    I am not sure but you may find this post helpful.