Last active
March 5, 2016 23:48
-
-
Save michaelgodshall/a27821c0d1030a096c12 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 textblob.download_corpora | |
# 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_textblob_corpora ]; then | |
echo "-----> Running install_textblob_corpora" | |
chmod +x bin/install_textblob_corpora | |
bin/install_textblob_corpora | |
fi | |
echo "-----> Post-compile done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment