Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource \x1b[93mpunkt\x1b[0m not found.\n Please use the NLTK Downloader to obtain the resource:\n\n #10

Closed
Qi-Zhangyang opened this issue Apr 2, 2022 · 1 comment

Comments

@Qi-Zhangyang
Copy link

Hello, when I run the code .
When it arrives the line 220 of main_group_vit.py.
for idx, samples in enumerate(data_loader):
it will show the information:

/data/miniconda3/envs/groupvit/lib/python3.7/site-packages/torchvision/transforms/functional.py:365: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum.
"Argument interpolation should be of type InterpolationMode instead of int. "
/group/20016/zhangyangqi/debug/GroupViT/datasets/builder.py:105: UserWarning: LookupError("\n**********************************************************************\n Resource \x1b[93mpunkt\x1b[0m not found.\n Please use the NLTK Downloader to obtain the resource:\n\n \x1b[31m>>> import nltk\n >>> nltk.download('punkt')\n \x1b[0m\n For more information see: https://www.nltk.org/data.html\n\n Attempted to load \x1b[93mtokenizers/punkt/PY3/english.pickle\x1b[0m\n\n Searched in:\n - '/usr/local/app/nltk_data'\n - '/data/miniconda3/envs/groupvit/nltk_data'\n - '/data/miniconda3/envs/groupvit/share/nltk_data'\n - '/data/miniconda3/envs/groupvit/lib/nltk_data'\n - '/usr/share/nltk_data'\n - '/usr/local/share/nltk_data'\n - '/usr/lib/nltk_data'\n - '/usr/local/lib/nltk_data'\n - ''\n**********************************************************************\n")
warnings.warn(repr(exn))
/data/miniconda3/envs/groupvit/lib/python3.7/site-packages/torchvision/transforms/functional.py:365: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum.
"Argument interpolation should be of type InterpolationMode instead of int. "
/group/20016/zhangyangqi/debug/GroupViT/datasets/builder.py:105: UserWarning: LookupError("\n**********************************************************************\n Resource \x1b[93mpunkt\x1b[0m not found.\n Please use the NLTK Downloader to obtain the resource:\n\n \x1b[31m>>> import nltk\n >>> nltk.download('punkt')\n \x1b[0m\n For more information see: https://www.nltk.org/data.html\n\n Attempted to load \x1b[93mtokenizers/punkt/PY3/english.pickle\x1b[0m\n\n Searched in:\n - '/usr/local/app/nltk_data'\n - '/data/miniconda3/envs/groupvit/nltk_data'\n - '/data/miniconda3/envs/groupvit/share/nltk_data'\n - '/data/miniconda3/envs/groupvit/lib/nltk_data'\n - '/usr/share/nltk_data'\n - '/usr/local/share/nltk_data'\n - '/usr/lib/nltk_data'\n - '/usr/local/lib/nltk_data'\n - ''\n**********************************************************************\n")
warnings.warn(repr(exn))

I do not know what it is and what should I do next?

@Qi-Zhangyang
Copy link
Author

That is because my internet can not access the nltk (can not download the nltk).
To solve this, you can mkdir nltk_data in usr/local

Wget the nltk.zip file form
https://drive.google.com/file/d/1o1NsADZ6AZicQWY_jk-csk9gKcIX58mZ/view?usp=sharing

Put it in the usr/local/nltk_data
and then unzip the file.

In this way can you solve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant