UjjwalAnand364 / Self-Intelligent-Chatbot

This repository contains Python files for a chat software, the client and server. We need to build code that allows users to talk to a intelligent bot (without connecting over).
0 stars 0 forks source link

Getting the error 'Resource punkt not found. Please use the NLTK Downloader to obtain the resource:' #9

Open UjjwalAnand364 opened 1 year ago

UjjwalAnand364 commented 1 year ago

Check line 6 as 'punkt' tokenizer is not getting downloaded, and the following error pops:

[nltk_data] Error loading punkt: <urlopen error [WinError 10060] A [nltk_data] connection attempt failed because the connected party [nltk_data] did not properly respond after a period of time, or [nltk_data] established connection failed because connected host [nltk_data] has failed to respond> Traceback (most recent call last): File "c:\Users\dell\Documents\GitHub\Self-Intelligent-Chatbot\model.py", line 34, in word_list=nltk.word_tokenize(pattern) File "C:\Users\dell\AppData\Local\Programs\Python\Python310\lib\site-packages\nltk\tokenize__init__.py", line 129, in word_tokenize sentences = [text] if preserve_line else sent_tokenize(text, language) File "C:\Users\dell\AppData\Local\Programs\Python\Python310\lib\site-packages\nltk\tokenize__init__.py", line 106, in sent_tokenize tokenizer = load(f"tokenizers/punkt/{language}.pickle") File "C:\Users\dell\AppData\Local\Programs\Python\Python310\lib\site-packages\nltk\data.py", line 750, in load opened_resource = _open(resource_url) File "C:\Users\dell\AppData\Local\Programs\Python\Python310\lib\site-packages\nltk\data.py", line 876, in open return find(path, path + [""]).open() File "C:\Users\dell\AppData\Local\Programs\Python\Python310\lib\site-packages\nltk\data.py", line 583, in find raise LookupError(resource_not_found) 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/english.pickle

Searched in: