When I write nltk.corpus.wordnet., method suggestions don't show up and I can't see the signatures of the functions that I call, even though the code executes fine.
This happens both in notebook and in regular .py files.
import nltk
nltk.corpus.wordnet
This code prints <WordNetCorpusReader in '/home/user/nltk_data/corpora/wordnet.zip/wordnet/'>
Is the module is stored in a .zip file that gets unzipped at runtime? Is that why it's invisible to the IDE?
I also can't find an api reference for this module. They have a reference for nltk.corpus.READER.wordnet but not for the one without reader. There's just no way for me to even know the names of the methods that are available.
Solved with a clutch...
Suggestions do work for
nltk.corpus.reader.wordnet.WordNetCorpusReader, which is the same class that's imported withnltk.corpus.wordnet. I only needed to initialize it, so I did this:Now reader works exactly like
nltk.corpus.wordnetand has method suggestions