Programmatically install NLTK corpora / models, i.e. without the GUI downloader?

The NLTK site does list a command line interface for downloading packages and collections at the bottom of this page :

http://www.nltk.org/data

The command line usage varies by which version of Python you are using, but on my Python2.6 install I noticed I was missing the ‘spanish_grammar’ model and this worked fine:

python -m nltk.downloader spanish_grammars

You mention listing the project’s corpus and model requirements and while I’m not sure of a way to automagically do that, I figured I would at least share this.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)