From 369dc845b8adef85b0c443ea1b904fa3cb11244d Mon Sep 17 00:00:00 2001 From: s152483 Date: Wed, 22 Apr 2020 22:37:07 +0200 Subject: [PATCH] Metrics --- cl.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cl.sh b/cl.sh index 5d02bfc..3401790 100644 --- a/cl.sh +++ b/cl.sh @@ -14,9 +14,9 @@ awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < reference.txt > reference.trn sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout | grep Scores > scores # WER -awk 'BEGIN{OFS="\t"}' < scores | awk '{print ($2+$3+$4)/($2+$3+$1)}' > wer.tsv +awk 'BEGIN{OFS="\t"}{print $6, $7, $8, $9}' < scores | awk '{print ($2+$3+$4)/($2+$3+$1)}' > wer.tsv paste wikiniews_results.tsv wer.tsv > wikiniews_results_wer.tsv -awk '{notCorrect+=$1; sum++} END {print notCorrect/sum}' < wer.tsv >> wer.txt +awk 'BEGIN{FS=OFS="\t"}{notCorrect+=$1; sum++} END {print notCorrect/sum}' < wer.tsv >> wer.txt # SRR -awk '{if($1==0) correct++; total++} END {print correct/total}' < wer.tsv >> srr.txt \ No newline at end of file +awk 'BEGIN{FS=OFS="\t"}{if($1==0) correct++; total++} END {print correct/total}' < wer.tsv >> srr.txt \ No newline at end of file