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