Can't load nltk tokenizer

This is my app link —> https://youtube-comment-sentiment-analysis2.streamlit.app/

hi streamlit Team, I am facing this issue please help to rectify it.
my app shows this error when nltk starts working but streamlit shows no nltk_data is there but it is there. Resource e[93mpunkt_tabe[0m not found. Please use the NLTK Downloader to obtain the resource:

e[31m>>> import nltk

nltk.download(‘punkt_tab’) e[0m For more information see: NLTK :: Installing NLTK Data

Attempted to load e[93mtokenizers/punkt_tab/english/e[0m

Searched in: - ‘/home/appuser/nltk_data’ - ‘/home/adminuser/venv/nltk_data’ - ‘/home/adminuser/venv/share/nltk_data’ - ‘/home/adminuser/venv/lib/nltk_data’ - ‘/usr/share/nltk_data’ - ‘/usr/local/share/nltk_data’ - ‘/usr/lib/nltk_data’ - ‘/usr/local/lib/nltk_data’ - ‘nltk_data’ - ‘nltk_data’ - ‘nltk_data’ - ‘nltk_data’ - ‘nltk_data’ - ‘nltk_data’ - ‘nltk_data’ - ‘nltk_data’ - ‘nltk_data’ - ‘nltk_data’ - ‘nltk_data’ - ‘nltk_data’ - ‘nltk_data’ - ‘/mount/src/yt_analysis/nltk_data’ - ‘/mount/src/yt_analysis/nltk_data’ - ‘/mount/src/yt_analysis/nltk_data’

Have you tried?

yeah, I follow your suggestion but it didn’t work same error

This no longer holds:

So you need to specify a download directory.

Yes I understand but i am not facing this kind of errors

Not sure why it worked in the example. This is what the log shows:

**[12:17:53] 📦 Processed dependencies!
[nltk_data] Downloading package punkt_tab to
[nltk_data]     /home/appuser/nltk_data...**
[nltk_data]   Unzipping tokenizers/punkt_tab.zip.

Because I was wrong. I confused nltk with another package, spacy I think, that downloads models to the python installation directory.

yeah, i have specified a directory where all necessary files are there

guys help me still i am facing issues

Thank you guys problem solved

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.