What does nltk.download("wordnet") accomplish

Viewed 857

I wanted to know what nltk.download() do. Also, if I add "wordnet" as an argument, then what happens. Is wordnet like some dataset or something, I would like more clarification on that.

1 Answers

The argument to nltk.download() is not a file or module, but a resource id that maps to a corpus, machine-learning model or other resource (or collection of resources) to be installed in your NLTK_DATA area. You can see a list of the available resources, and their IDs, at http://www.nltk.org/nltk_data/ .

You can use the special id "book" (as in nltk.download("book")) to download all resources mentioned in the nltk book; that's handy if you don't want to keep stopping your explorations to download missing resources.

Calling nltk.dowload() without an argument pops up an interactive browser window (if it can) that you can use to browse and select resources for download.

Related