Task 3 - metrics - starting point

This commit is contained in:
s452111 2020-04-21 23:09:17 +02:00
parent 811a6a2000
commit 554bf3e89f

View File

@ -8,3 +8,6 @@ cut -f3 'wikiniews_results.tsv' > reference.txt
# awk transfer txt to .trn
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < reference.txt > reference.trn
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < hypothesis.txt > hypothesis.trn
# use sclite to calculate WER
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout > wer_results.txt