Skip to content

Commit

Permalink
added b^3+ to tac13 report and updated test to include b^3+
Browse files Browse the repository at this point in the history
  • Loading branch information
benhachey committed Aug 8, 2014
1 parent f949119 commit 86ec7a3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
29 changes: 20 additions & 9 deletions scripts/run_tac13_report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 2 additions & 4 deletions scripts/test_tac13_evaluation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"
Expand Down

0 comments on commit 86ec7a3

Please sign in to comment.