Nathan Jones
Nathan Jones

Reputation: 5174

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?

Upvotes: 2

Views: 1372

Answers (1)

ujawg
ujawg

Reputation: 221

this should be the one

import nltk
nltk.download('words')
from nltk.corpus import words

Upvotes: 7

Related Questions