Nathan Jones Nathan Jones - 1 year ago 80
Python Question

Which corpus should I download to access nltk.corpus.words?

My code references

nltk.corpus.words.words()
.

Which NLTK data set to I need to download to access it?

Right now I'm telling the downloader to download all data sets by doing
python -m nltk.downloader -d /usr/local/share/nltk_data all
. I don't need all data sets, though, I just the one that provides
nltk.corpus.words.words()
.

My question is: what should I replace
all
with in the downloader command above?

Answer Source

this should be the one

import nltk
nltk.download('words')
from nltk.corpus import words
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download