-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanalyze_results.sh
43 lines (38 loc) · 1.1 KB
/
analyze_results.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
year=$1
evalset=$2
if [[ "$year" = "2019" ]]
then
truth=2019qrels.txt
if [[ "$evalset" = "train" ]]
then
truth=train_topics_mod.qrel
fi
fi
if [[ "$year" = "2020" ]]
then
truth=2020qrels.txt
fi
# baseline
trec_eval-9.0.7/trec_eval -q \
-m ndcg_cut.3 \
data/cast${year}/$truth \
runs/cast${year}/cast${year}.${evalset}.cqe.trec | cut -f2,3 > $year.result0.txt
# monot5
trec_eval-9.0.7/trec_eval -q \
-m ndcg_cut.3 \
data/cast${year}/$truth \
runs/cast${year}/cast${year}.${evalset}.cqe.rerank.trec | cut -f2,3 > $year.resultx.txt
# convrerank
trec_eval-9.0.7/trec_eval -q \
-m ndcg_cut.3 \
data/cast${year}/$truth \
runs/cast${year}/cast${year}.${evalset}.cqe.conv.rerank.t40.trec | cut -f2,3 > $year.resulty.txt
python3 tools/analyze_results.py \
--result0 $year.result0.txt \
--resultx $year.resultx.txt \
--resulty $year.resulty.txt \
--runx runs/cast${year}/cast${year}.${evalset}.cqe.rerank.trec \
--runy runs/cast${year}/cast${year}.${evalset}.cqe.conv.rerank.t40.trec
rm $year.result0.txt
rm $year.resultx.txt
rm $year.resulty.txt