-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.sh
53 lines (45 loc) · 1.51 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
echo -e "\e[1m>>> Running checks for roe.com"
echo -e "\e[0m"
# Check for virtualenv
echo -ne "\e[1m>> Checking if 'virtualenv' is present: "
venv_bool=$(pip3 freeze | grep virtualenv)
if [[ $venv_bool == "" ]]
then
echo -e "\e[0mNo.\nStarting Download"
pip3 install virtualenv
else
echo -e "\e[0mYes."
fi
mkdir datasets
mkdir datasets/pickle_files
# Check for dataset
echo -ne "\e[1m>> Checking if dataset is present: "
DATASET=./src/datasets/cornell_movie_dialogs_corpus.zip
if [[ -d "$DATASET" ]]
then
echo -e "\e[0mYes."
else
echo -e "\e[0mNo.\nStarting Download"
wget http://www.cs.cornell.edu/~cristian/data/cornell_movie_dialogs_corpus.zip
mv cornell_movie_dialogs_corpus.zip ./src/datasets/cornell_movie_dialogs_corpus.zip
cd ./src/datasets/
unzip cornell_movie_dialogs_corpus.zip
cd ../../
fi
# Check for virtual environment
echo -ne "\e[1m>> Checking if virtual environment is present: "
if [[ -d "./env" ]]
then
echo -e "\e[0mYes."
else
echo -e "\e[0mNo.\nCreating Virtual Environemt"
virtualenv env
fi
source "env/bin/activate"
pip install -r requirements.txt
mkdir env/lib/nltk_data
python -c "import os ; import nltk ; nltk.download('putnk', download_dir=os.path.join(os.getcwd(), \"env/lib/nltk_data\"))"
python -c "import os ; import nltk ; nltk.download('stopwords', download_dir=os.path.join(os.getcwd(), \"env/lib/nltk_data\"))"
python -c "import os ; import nltk ; nltk.download('wordnet', download_dir=os.path.join(os.getcwd(), \"env/lib/nltk_data\"))"
python setup.py
deactivate