This repository has been archived by the owner on Oct 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
bootstrap.sh
executable file
·81 lines (68 loc) · 2.56 KB
/
bootstrap.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
################################################################### INSTALL DEPENDENCIES #
pip3 install -U PyICU
pip3 install -U pybind11
pip3 install -U pycld2
pip3 install -U flask
pip3 install -U SPARQLWrapper
pip3 install -U gensim
pip3 install -U spacy
pip3 install -U folium
pip3 install -U geopy
pip3 install -U bson
pip3 install -U pymongo
pip3 install -U lmdb
pip3 install -U hnswlib
pip3 install -U nltk
pip3 install -U bs4
pip3 install -U symspellpy
pip3 install -U polyglot
pip3 install -U flask_wtf
pip3 install -U polyglot
pip3 install -U werkzeug==0.16.1
pip3 install -U scrapy
pip3 install -U tldextract
pip3 install -U scikit-learn
pip3 install -U pandas
pip3 install -U h5py
pip3 install -U uWSGI
pip3 install -U wordnet
pip3 install -U numexpr
pip3 install -U flask-caching
pip3 install -U pillow
pip3 install -U web3
pip3 install -U languagecodes
pip3 install -U banal
pip3 install -U psutil
pip3 install -U tranco
python3 -m spacy download en_core_web_sm
python3 -c "import nltk; nltk.download('punkt')"
python3 -c "import nltk; nltk.download('wordnet')"
touch complementary_vectors_50d.txt
wget http://nlp.stanford.edu/data/glove.6B.zip
unzip -d "glove.6B" glove.6B.zip
rm -rf glove.6B/glove.6B.100d.txt glove.6B/glove.6B.200d.txt glove.6B/glove.6B.300d.txt glove.6B.zip
GLOVE_LINE=$(head -n 1 glove.6B/glove.6B.50d.txt)
if [ "$GLOVE_LINE" != "400000 50" ]
then
sed -i '1i 400000 50' glove.6B/glove.6B.50d.txt
fi
chmod +x future.py
chmod +x save_index.sh
chmod +x build_index.sh
echo "All dependencies installed. You can now proceed to build the index with <<build_index.sh>> and later pause the process with <<save_index.sh>>. Run FUTURE with <<python3 future.py>>"
# echo "Terminate now with CTRL+C if you do not want to train any machine learning model"
# read -p "Otherwise, press enter to continue"
################################################################### TRAIN THE MODELS #####
# python3 chatbot.py
# python3 translator_esp_eng.py
################################################################### TRAIN THE MODELS #####
# echo "Building index..."
# echo "Terminate at any time with CTRL+C and proceed to execute ./save_index.sh"
# echo "The process can be resumed later by running ./build_index.sh again"
# chmod +x save_index.sh
# chmod +x build_index.sh
# ./build_index.sh
##########################################################################################
# echo "Proceed to execute ./save_index.sh"
# echo "And finally start the server with ./future.py"
# echo "The process of building the index can be resumed later by running ./build_index.sh again"