-
Notifications
You must be signed in to change notification settings - Fork 8
/
prepare.sh
55 lines (53 loc) · 2.75 KB
/
prepare.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
#!/bin/bash
echo "## FETCH QUESTION CLASSIFIER TRAINING DATA ##"
cp -r /home/debjyotp/important/qcdata .
echo "## FETCH COMPLETE ##"
echo "## FETCH developset DATA ##"
cp -r /home/debjyotp/important/developset .
echo "## PREPARING input.txt ##"
cd developset
pwd > ../input.txt
ls | grep story | sed 's/.story//' >> ../input.txt
cd ..
echo "## input.txt READY "
echo "###################################################################################################"
echo "## INSTALL scikit-learn, bs4, requests IN pwd"
/usr/local/stow/python/amd64_linux26/python-2.7.3/bin/pip install -t . scikit-learn
/usr/local/stow/python/amd64_linux26/python-2.7.3/bin/pip install -t . beautifulsoup4
/usr/local/stow/python/amd64_linux26/python-2.7.3/bin/pip install -t . requests
echo "## scikit-learn, bs4, requests INSTALLATION COMPLETE"
echo "###################################################################################################"
echo "## INSTALL BART - a Beautiful Anaphora Resolution Toolkit IN pwd"
echo "FETCH BART snapshot from http://www.sfs.uni-tuebingen.de/~versley/BART/BART-snapshot.tgz "
echo "Normally takes 7 minutes though depends on network connection "
wget http://www.sfs.uni-tuebingen.de/~versley/BART/BART-snapshot.tgz
tar -xvf BART-snapshot.tgz
echo "Extraction complete"
cd BART/
#/bin/bash
source setup.sh
echo "KILL any previously invoked process using 8125 port"
kill -9 `lsof -i :8125 | tail -1 | awk '{print $2}'`
echo "READY TO LAUNCH BART SERVER "
java -Xmx1024m elkfed.webdemo.BARTServer > /dev/null 2>&1 &
#exit
echo "## BART SERVER LAUNCHED "
echo "###################################################################################################"
echo "## ALL INSTALLATION COMPLETE "
echo "## DONE!! "
echo "###################################################################################################"
echo "Example to Run program : "
echo "NOTE: DEFAULT OUTPUT will also be printed in \"myresponse.txt\""
echo "And it takes around 1 HOUR to run on developset data "
echo "Please use "screen" command and run "
echo "###################################################################################################"
echo "COMMAND: "
echo "Run WITHOUT Coreference Resolution "
echo "/usr/local/stow/python/amd64_linux26/python-2.7.3/bin/python qa.py -i input.txt -o myresponse.txt -c 0"
echo "Run WITH Coreference Resolution "
echo "/usr/local/stow/python/amd64_linux26/python-2.7.3/bin/python qa.py -i input.txt -o myresponse.txt -c 1"
echo "###################################################################################################"
echo "For further queries please contact me: "
echo "Email: [email protected]"
echo "Phone: 385-313-7219"
echo "###################################################################################################"