Task 3 - calculate wer per line

This commit is contained in:
s452111 2020-04-22 13:29:35 +02:00
parent fc726bb064
commit 900b08d8c8
2 changed files with 102 additions and 1146 deletions

View File

@ -11,3 +11,6 @@ awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < hypothesis.txt > hypothesis.tr
# use sclite to calculate WER, actually we need only lines starting with 'Scores'
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout | grep "Scores:" > wer_results.txt
cat wer_results.txt | awk 'BEGIN{OFS="\t"}{print ( ($7 + $8 + $9) / ($7 + $8 + &6) ) * 100;}' > wer_per_line.txt
paste wer_per_line.txt wikiniews_results.tsv

File diff suppressed because it is too large Load Diff