diff --git a/scripts/run_tac13_report.sh b/scripts/run_tac13_report.sh index 6c581a0..abaea09 100755 --- a/scripts/run_tac13_report.sh +++ b/scripts/run_tac13_report.sh @@ -14,21 +14,32 @@ outdir=$1; shift # directory to which results are written # INITIALISE REPORT HEADER report=$outdir/00report.tab -echo -e "system\tKBP2010 micro-average\tB^3 Precision\tB^3 Recall\tB^3 F1" \ - > $report +( + echo -en "system" # run name + echo -en "\tKBP2010 micro-average" # overall linking score + echo -en "\tB^3 Precision\tB^3 Recall\tB^3 F1" # B^3 clustering scores + echo -e "\tB^3+ Precision\tB^3+ Recall\tB^3+ F1" # B^3+ clustering scores +) > $report # ADD SYSTEM SCORES -# TODO add B^3+ -for eval in $outdir/*.evaluation +for sys_eval in $outdir/*.evaluation do - basename $eval \ + basename $sys_eval \ | sed 's/\.evaluation//' \ | tr '\n' '\t' \ >> $report - cat $eval \ - | egrep '(strong_all_match|b_cubed)' \ - | cut -f5,6,7,8 \ + cat $sys_eval \ + | grep -P '\tstrong_all_match$' \ + | cut -f 7 \ | tr '\n' '\t' \ - | cut -f2,5,6,7 \ + >> $report + cat $sys_eval \ + | grep -P '\tb_cubed$' \ + | cut -f 5,6,7 \ + | tr '\n' '\t' \ + >> $report + cat $sys_eval \ + | grep -P '\tb_cubed_plus$' \ + | cut -f 5,6,7 \ >> $report done diff --git a/scripts/test_tac13_evaluation.sh b/scripts/test_tac13_evaluation.sh index 7cc72c8..a488560 100755 --- a/scripts/test_tac13_evaluation.sh +++ b/scripts/test_tac13_evaluation.sh @@ -38,12 +38,10 @@ official=$outdir/00official.tab cat $scores \ | egrep -v '^[0-9]* queries' \ | head -1 \ - | cut -f1,2,3,4,5 \ > $official cat $scores \ | egrep -v '^[0-9]* queries' \ - | awk '{if (NR>1) print}' \ - | cut -f1,2,3,4,5 \ + | tail -n +2 \ | sort \ >> $official @@ -54,7 +52,7 @@ if [ "" != "`diff $official $report`" ] then difff=$outdir/00diff.txt diff -y $official $report \ - > $difff + > $difff echo "FAIL see $difff" else echo "PASS"