-
Notifications
You must be signed in to change notification settings - Fork 30
/
generate_figures.sh
executable file
·104 lines (94 loc) · 4.83 KB
/
generate_figures.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#!/bin/bash
set -e
pushd ../supervised-oie-benchmark/
# Joint figure
DIR="../evaluations/figures/joint"
echo "Creating JOINT figure in ${DIR}..."
mkdir -p $DIR
rm -f $DIR/auc.dat
python benchmark.py --gold=./oie_corpus/test.oie.orig \
--out=$DIR/ClausIE.dat --tabbed=./systems_output/test/clausie_test.txt
python benchmark.py --gold=./oie_corpus/test.oie.orig \
--out=$DIR/OpenIE-4.dat --tabbed=./systems_output/test/openie4_test.txt
python benchmark.py --gold=./oie_corpus/test.oie.orig \
--out=$DIR/PropS.dat --tabbed=./systems_output/test/props_test.txt
python benchmark.py --gold=./oie_corpus/test.oie.orig \
--out=$DIR/RnnOIE.dat --tabbed=../evaluations/extractions/joint.txt
python benchmark.py --gold=./oie_corpus/test.oie.orig \
--out=$DIR/Clean.dat --tabbed=../evaluations/extractions/clean_3.txt
# python benchmark.py --gold=./oie_corpus/test.oie.orig \
# --out=$DIR/Noisy.dat --tabbed=../evaluations/extractions/noisy.txt
python pr_plot.py --in=${DIR} --out=${DIR} --outputtype=png
# # Experimental
# DIR="../evaluations/figures/joint/experimental/"
# echo "Creating EXPERIMENTAL figure in ${DIR}..."
# mkdir -p $DIR
# rm -f $DIR/*
# python benchmark.py --gold=./oie_corpus/test.oie.orig\
# --out=$DIR/ClausIE.dat --tabbed=./systems_output/test/clausie_test.txt --exactMatch
# python benchmark.py --gold=./oie_corpus/test.oie.orig\
# --out=$DIR/OpenIE-4.dat --tabbed=./systems_output/test/openie4_test.txt --exactMatch
# python benchmark.py --gold=./oie_corpus/test.oie.orig\
# --out=$DIR/PropS.dat --tabbed=./systems_output/test/props_test.txt --exactMatch
# python benchmark.py --gold=./oie_corpus/test.oie.orig\
# --out=$DIR/RnnOIE.dat --tabbed=../evaluations/extractions/joint.txt --exactMatch
# python pr_plot.py --in=${DIR} --out=${DIR} --outputtype=png
# # Argument match
# DIR="../evaluations/figures/joint/arguments/"
# echo "Creating EXPERIMENTAL figure in ${DIR}..."
# mkdir -p $DIR
# rm -f $DIR/*
# python benchmark.py --gold=./oie_corpus/test.oie.orig\
# --out=$DIR/ClausIE.dat --tabbed=./systems_output/test/clausie_test.txt --argMatch
# python benchmark.py --gold=./oie_corpus/test.oie.orig\
# --out=$DIR/OpenIE-4.dat --tabbed=./systems_output/test/openie4_test.txt --argMatch
# python benchmark.py --gold=./oie_corpus/test.oie.orig\
# --out=$DIR/PropS.dat --tabbed=./systems_output/test/props_test.txt --argMatch
# python benchmark.py --gold=./oie_corpus/test.oie.orig\
# --out=$DIR/RnnOIE.dat --tabbed=../evaluations/extractions/joint.txt --argMatch
# python pr_plot.py --in=${DIR} --out=${DIR} --outputtype=png
# # Predicate Match
# DIR="../evaluations/figures/joint/predicate/"
# echo "Creating PREDICATE MATCH figure in ${DIR}..."
# mkdir -p $DIR
# rm -f $DIR/*
# python benchmark.py --gold=./oie_corpus/test.oie.orig\
# --out=$DIR/ClausIE.dat --tabbed=./systems_output/test/clausie_test.txt --predMatch
# python benchmark.py --gold=./oie_corpus/test.oie.orig\
# --out=$DIR/OpenIE-4.dat --tabbed=./systems_output/test/openie4_test.txt --predMatch
# python benchmark.py --gold=./oie_corpus/test.oie.orig\
# --out=$DIR/PropS.dat --tabbed=./systems_output/test/props_test.txt --predMatch
# python benchmark.py --gold=./oie_corpus/test.oie.orig\
# --out=$DIR/RnnOIE.dat --tabbed=../evaluations/extractions/joint.txt --predMatch
# python pr_plot.py --in=${DIR} --out=${DIR} --outputtype=png
# # Joint figure -- only in test
# DIR="../evaluations/only_in_test"
# echo "Creating OIT figure in ${DIR}..."
# mkdir -p $DIR
# rm -f $DIR/*.dat
# python benchmark.py --gold=../evaluations/only_in_test/test.oie.oit\
# --out="$DIR/seen.dat" --tabbed=../evaluations/only_in_test/joint.oit
# python benchmark.py --gold=../evaluations/only_in_test/test.oie.noit\
# --out="$DIR/unseen.dat" --tabbed=../evaluations/only_in_test/joint.noit
# python pr_plot.py --in=${DIR} --out=${DIR} --outputtype=png
# Calculate stats:
## avg arguments per sentence
## avg words per argument
## average predicate length
## Average proposition length
# DIR="../evaluations/figures/joint/"
# echo "Calculating stats"
# echo "ClausIE"
# python oie_readers/calc_corpus_stats.py --in=./systems_output/test/clausie_test.txt --out=$DIR/clausie_stats.txt
# echo "Open IE4"
# python oie_readers/calc_corpus_stats.py --in=./systems_output/test/openie4_test.txt --out=$DIR/openie4_stats.txt
# echo "PropS"
# python oie_readers/calc_corpus_stats.py --in=./systems_output/test/props_test.txt --out=$DIR/props_stats.txt
# echo "RnnOIE"
# python oie_readers/calc_corpus_stats.py --in=../evaluations/extractions/joint.txt --out=$DIR/rnnoie_stats.txt
# echo "Noisy"
# python oie_readers/calc_corpus_stats.py --in=../evaluations/extractions/noisy.txt --out=$DIR/rnnoie_stats.txt
# echo "Gold"
# python oie_readers/calc_corpus_stats.py --gold=./oie_corpus/test.oie.orig --out=$DIR/gold_stats.txt
echo "DONE!"
popd