-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathpreprocess.sh
23 lines (21 loc) · 843 Bytes
/
preprocess.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
task=$1
GloVe="./data/glove/glove.840B.300d.txt"
WikiQA="./data/raw_data/WikiQA/WikiQACorpus.zip"
TrecQA="./data/raw_data/TrecQA"
if [ ! -f "$GloVe" ]; then
wget http://nlp.stanford.edu/data/glove.840B.300d.zip -P data/glove
unzip -o -d data/glove/ data/glove/glove.840B.300d.zip
fi;
if [ "$task" = "wikiqa" ]; then
if [ -f "$WikiQA" ]; then
unzip -o -d "data/raw_data/WikiQA/" "data/raw_data/WikiQA/WikiQACorpus.zip"
else
echo "!!!!!!!!Please dowload the file \"WikiQACorpus.zip\" to the path ./data/raw_data/WikiQA/ through address: https://www.microsoft.com/en-us/download/details.aspx?id=52419"
fi;
python preprocess.py wikiqa
elif [ "$task" = "trecqa" ]; then
if [ ! -d "$TrecQA" ]; then
svn checkout https://github.com/castorini/NCE-CNN-Torch/trunk/data/TrecQA ./data/raw_data/TrecQA
fi;
python preprocess.py trecqa
fi