Forked from michaelgodshall/install_textblob_corpora
Last active
March 5, 2016 23:50
-
-
Save kennethjmyers/d2ec6f53e141bbd46b9d to your computer and use it in GitHub Desktop.
How to Install Texblob NLTK Corpora on Heroku
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Put this file in the `bin` directory at the root of your project | |
source $BIN_DIR/utils | |
echo "-----> Starting corpora installation" | |
# Assumes NLTK_DATA environment variable is already set | |
# $ heroku config:set NLTK_DATA='/app/nltk_data' | |
# Install the default corpora to NLTK_DATA directory | |
python -m nltk.downloader all | |
# Open the NLTK_DATA directory | |
cd ${NLTK_DATA} | |
# Delete all of the zip files in the NLTK DATA directory | |
find . -name "*.zip" -type f -delete | |
echo "-----> Finished corpora installation" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Put this file in the `bin` directory at the root of your project | |
if [ -f bin/install_nltk_corpora ]; then | |
echo "-----> Running install_nltk_corpora" | |
chmod +x bin/install_nltk_corpora | |
bin/install_nltk_corpora | |
fi | |
echo "-----> Post-compile done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment