ggeop / Python-ai-assistant

Python AI assistant 🧠
MIT License
939 stars 247 forks source link

NLTK Error #118

Closed preetsuthar17 closed 2 years ago

preetsuthar17 commented 2 years ago

      ██╗ █████╗ ██████╗ ██╗   ██╗██╗███████╗
      ██║██╔══██╗██╔══██╗██║   ██║██║██╔════╝
      ██║███████║██████╔╝██║   ██║██║███████╗
 ██   ██║██╔══██║██╔══██╗╚██╗ ██╔╝██║╚════██║
 ╚█████╔╝██║  ██║██║  ██║ ╚████╔╝ ██║███████║
  ╚════╝ ╚═╝  ╚═╝╚═╝  ╚═╝  ╚═══╝  ╚═╝╚══════╝
 -  Voice Assistant Platform  v1.0.0-beta  -
     NOTE: CTRL + C If you want to Quit.
====================================================== GENERAL INFO ======================================================
RESPONSE IN SPEECH: NOT ENABLED
INPUT MODE: TEXT
========================================================= SYSTEM =========================================================
RAM USAGE: 0.10 GB
====================================== LOG -/var/log/jarvis.log (Total Lines: 343) ======================================
2022-01-17 17:40:57,069 - root - INFO - Wait a second for startup checks..
2022-01-17 17:40:57,126 - root - INFO - Checking internet connection..
2022-01-17 17:40:57,439 - root - INFO - Internet connection passed!
2022-01-17 17:40:57,490 - root - INFO - Application started
2022-01-17 17:40:57,540 - root - INFO - I'm ready! Say something :-)

======================================================= ASSISTANT =======================================================
:-$ Jarvis open youtube
Traceback (most recent call last):
  File "./src/jarvis/start.py", line 26, in <module>
    main()
  File "./src/jarvis/start.py", line 22, in main
    processor.run()
  File "/home/preet/Python-ai-assistant-develop/src/jarvis/jarvis/core/processor.py", line 51, in run
    response = self.response_creator.create_positive_response(transcript)
  File "/home/preet/Python-ai-assistant-develop/src/jarvis/jarvis/core/nlp.py", line 91, in create_positive_response
    positive_response = self._create_response(sentence)
  File "/home/preet/Python-ai-assistant-develop/src/jarvis/jarvis/core/nlp.py", line 106, in _create_response
    parts_of_speech = self.create_parts_of_speech(sentence)
  File "/home/preet/Python-ai-assistant-develop/src/jarvis/jarvis/core/nlp.py", line 43, in create_parts_of_speech
    tokens = nltk.word_tokenize(text)
  File "/home/preet/Python-ai-assistant-develop/jarvis_virtualenv/lib/python3.8/site-packages/nltk/tokenize/__init__.py", line 144, in word_tokenize
    sentences = [text] if preserve_line else sent_tokenize(text, language)
  File "/home/preet/Python-ai-assistant-develop/jarvis_virtualenv/lib/python3.8/site-packages/nltk/tokenize/__init__.py", line 105, in sent_tokenize
    tokenizer = load('tokenizers/punkt/{0}.pickle'.format(language))
  File "/home/preet/Python-ai-assistant-develop/jarvis_virtualenv/lib/python3.8/site-packages/nltk/data.py", line 868, in load
    opened_resource = _open(resource_url)
  File "/home/preet/Python-ai-assistant-develop/jarvis_virtualenv/lib/python3.8/site-packages/nltk/data.py", line 993, in _open
    return find(path_, path + ['']).open()
  File "/home/preet/Python-ai-assistant-develop/jarvis_virtualenv/lib/python3.8/site-packages/nltk/data.py", line 701, 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/PY3/english.pickle

  Searched in:
    - '/root/nltk_data'
    - '/home/preet/Python-ai-assistant-develop/jarvis_virtualenv/nltk_data'
    - '/home/preet/Python-ai-assistant-develop/jarvis_virtualenv/share/nltk_data'
    - '/home/preet/Python-ai-assistant-develop/jarvis_virtualenv/lib/nltk_data'
    - '/usr/share/nltk_data'
    - '/usr/local/share/nltk_data'
    - '/usr/lib/nltk_data'
    - '/usr/local/lib/nltk_data'

Help me please