"""
Initialize corpa used by NLTK
"""
- virtenv_exec('python -c "import nltk\n'
- 'nltk.download(\'maxent_treebank_pos_tagger\')'"")
+ virtenv_exec('{0}/manage.py nltk_download'.format(env.code_root))
@task
def first_deploy():
--- /dev/null
+#!/usr/bin/env python2
+from django.core.management import BaseCommand
+
+import nltk
+
+
+class Command(BaseCommand):
+ help = "Download the data needed for the Natural Language Toolkit to find note keywords."
+
+ def handle(self, *args, **kwargs):
+ nltk.download('punkt')
+ nltk.download('maxent_treebank_pos_tagger')
+ nltk.download('stopwords')
+