-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
53 lines (37 loc) · 2.18 KB
/
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
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
.PHONY: paper site serve process-en process-es process-zh process neleval clean-model rerun
ifneq ($(CONDA_DEFAULT_ENV),nlp-project)
$(error Not in conda environment)
endif
site: src/static/elm_debug.js src/static/elm.js src/server.py src/templates/debug.html
src/static/elm.min.js: src/static/elm.js
uglifyjs $< --compress 'pure_funcs="F2,F3,F4,F5,F6,F7,F8,F9,A2,A3,A4,A5,A6,A7,A8,A9",pure_getters,keep_fargs=false,unsafe_comps,unsafe' | uglifyjs --mangle --output=$@
src/static/elm.js: src/Main.elm
cd src && \
elm make Main.elm --optimize --output=static/elm.js
src/static/elm_debug.js: src/DocDebug.elm
cd src && \
elm make DocDebug.elm --optimize --output=static/elm_debug.js
serve: site
FLASK_APP=src/server.py python3 -m flask run
paper: paper.pdf
paper.pdf:
pdflatex paper.tex
prepare-s3:
mkdir -p corpus/tac/lang/en/ glove/
aws s3 cp s3://nlp-project-edan70/eng.2015.train.pickle corpus/tac/lang/en/
aws s3 cp s3://nlp-project-edan70/eng.2015.eval.pickle corpus/tac/lang/en/
aws s3 cp s3://nlp-project-edan70/glove.6B.100d.pickle glove
process-es:
python3 src/process.py corpus/tac/lang/es/spa.2015.eval.pickle corpus/tac/lang/es/spa.2015.train.pickle corpus/tac/lang/es/spa.2016.eval.pickle glove/tac-es-top200k.case.pickle model.es.pickle es corpus/wikimap_es.pickle --predict corpus/tac/lang/es/spa.2017.eval.pickle
process-zh:
python3 src/process.py corpus/tac/lang/zh/cmn.2015.eval.pickle corpus/tac/lang/zh/cmn.2015.train.pickle corpus/tac/lang/zh/cmn.2016.eval.pickle glove/tac-zh.pickle model.zh.pickle zh corpus/wikimap_zh.pickle --predict corpus/tac/lang/zh/cmn.2017.eval.pickle
process-en:
python3 src/process.py corpus/tac/lang/en/eng.2015.eval.pickle corpus/tac/lang/en/eng.2015.train.pickle corpus/tac/lang/en/eng.2016.eval.pickle glove/glove.6B.100d.pickle model.en.pickle en corpus/wikimap_en.pickle --predict corpus/tac/lang/en/eng.2017.eval.pickle
plot:
python3 tedl_parser.py tedl/* strong_typed_mention_match plot_tmm.png "(0.844,0.586)" "(0.817,0.759)"
python3 tedl_parser.py tedl/* strong_typed_all_match plot_tam.png "(0.602,0.418)" "(0.760,0.613)"
neleval:
./run_neleval.sh
clean-model:
rm -f model.*.pickle
rerun: clean-model process-en process-es process-zh