Skip to content

Instantly share code, notes, and snippets.

@ltddev
Created April 15, 2014 04:45
Show Gist options
  • Save ltddev/10702869 to your computer and use it in GitHub Desktop.
Save ltddev/10702869 to your computer and use it in GitHub Desktop.
ImportNltkData
'''
ImportNltkData.py - This scriot is a wrapper to invoke the NLTK downloader
in an interactive commanline format. It will first try to, by default, call
the graphical downloader, but once it finds no support for the graphical
mode it, which is currently the case for Pythonista, it falls back to the
non-graphical, interactive mode which is still quite useful to list and
download some or all of the data sets or copora. When the downloader
comes up it presents the following to the user:
<open file 'NLTK_DATA', mode 'r' at 0x5c7c338>
('env=', None)
NLTK Downloader
---------------------------------------------------------------------------
d) Download l) List u) Update c) Config h) Help q) Quit
---------------------------------------------------------------------------
Downloader>
'''
import nltk
nltk.download()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment