-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
24 lines (17 loc) · 818 Bytes
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
all: prereq pip ext
.SILENT: prereq pip ext
.PHONY: all
prereq:
echo "\n+ Checking if required files present..."
test -f requirements.txt || (echo "\t- requirements.txt not found." && exit "1")
test -f prob_rerank.py || (echo "\t- prob_rerank.py not found." && exit "1")
test -f lm_rerank.py || (echo "\t- lm_rerank.py not found." && exit "1")
test -f README* || (echo "\t- [Warn] README not found.")
test -f design.pdf || (echo "\t- [Warn] design.pdf not found.")
echo "All required files for running the project found.\n\n"
pip:
echo "+ Getting external libraries..."
pip3 install -U -r requirements.txt && echo "Success.\n\n" || exit "2"
ext:
echo "+ Downloading stopwords for NLTK"
echo "import nltk\nif nltk.download('stopwords'):\n\tprint('Success.')\nelse:\n\tprint('Failed :/')" | python3