I have scoured the web (including the 6 links that show similar problems with Heroku, Anaconda etc but common root cause - resource corpora/wordnet not found) and performed all that I could which includes but is not limited to -
- Changing the download directory (and subsequently setting nltk_data path by 3 methods as below) 3 times to /usr/lib/nltk_data, /home/ubuntu/nltk_data and /home/ubuntu/quepy/nltk_data.
- Changed the path by (i) changing the NLTK_DATA_PATH in settings.py in the required quepy app for all three paths (ii) using the nltk.data.path.append command for all three paths (iii) using the export NLTK_DATA command for all three paths
- I even went on to give permission 644 to the contents of nltk_data directory recursively
- Used the python -m nltk.downloader AND nltk.download command with the specific paths to install and configured the paths (they both do the same thing)
Even after 3 hours of trying I am nowhere. I would really appreciate if anyone could point me on how to successfully run the Quepy example (python main.py "Who is Tom Cruise?") at location: quepy/examples/dbpedia. It is not a problem with Quepy but why on Earth can it not find the resource.
Here is the exact error -
Resource u'corpora/wordnet' not found. Please use the NLTK
Downloader to obtain the resource: >>> nltk.download()
Searched in:
- 'home/ubuntu/nltk_data'
NOTE -
I installed it successfully on another machine without a problem and it ran correctly but on the initial machine the problem is still unresolved, exact same steps, exact version of the app and its related tools/dependencies.
Even though not showing in the error log my class-paths start with a slash as observed by nltk.data.path
from nltk.corpus import wordnet; x=wordnet.all_lemma_names(). Show the program and the full error trace here. Also state where your nltk_data directory actually is. - alexis