Home > Software engineering >  nltk.download('punkt') giving output as false
nltk.download('punkt') giving output as false

Time:01-29

When I trying to install nltk and download the file punket using nltk.download('punkt'). I am getting the following errors. Have tried many alternative codes and changing networks.

error

Please help with this error.

Post applying :- = df['num_words'] = df['text'].apply(lambda x:len(nltk.word_tokenize(x)))

I am gettring the error:-

**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/english.pickle**

I tried some alternative codes like

import nltk import ssl

try: _create_unverified_https_context = ssl._create_unverified_context except AttributeError: pass else: ssl._create_default_https_context = _create_unverified_https_context

nltk.download()

Also tried changing the networks as at some places I found it is saying server issue.

CodePudding user response:

Try to launch the jupyter notebooks session as administrator (open the command or anaconda prompt as administrator).

The last option would be to download the corpus manually. You may find this, helpful in your case.

  • Related