Skip to content

Commit

Permalink
Added option to download NLTK data sets for non Docker users
Browse files Browse the repository at this point in the history
Download missing nltk datasets in setup.py
  • Loading branch information
alfredfrancis authored Feb 28, 2017
2 parents 93030fc + 262b24a commit ed6b9fc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import nltk
import os

# Downloading necessary NLTK datasets
nltk.download("stopwords")
nltk.download("wordnet")
nltk.download('averaged_perceptron_tagger')
nltk.download('punkt')

#creating directory for storing chat logs
if not os.path.exists("logs"):
os.makedirs("logs")
Expand Down Expand Up @@ -43,4 +49,4 @@
newStory.labeledSentences.append(newLabeledSentence)
newStory.save()
except:
print("Stories already exists..skipping..")
print("Stories already exists..skipping..")

0 comments on commit ed6b9fc

Please sign in to comment.