Access wordnet file with nltk without nltk.download()

Viewed 861

I'm trying to use wordnet without nltk.download('wordnet') as that function is blocked through the companies IT policy. I have downloaded the wordnet file and unzipped it into my local directory and used nltk.data.path.append("my/wordnet/directory"). When I try and execute a command say "jump" in wn.words() I get the error -

Resource wordnet not found. 
Searched in:
- 'my/wordnet/directory'
- 'standard/directories'

To be clear, IT is fine with me uploading the file directly. How do I get nltk to interact with this file? File found at https://www.nltk.org/nltk_data/ Corpus number 69.

1 Answers

Found this solution inside the notes: https://www.nltk.org/data.html . After creating the appropriate directories and placing the wordnet files inside the corpora directory and pointing nltk.data.path etc to that directory it worked.

Related