From 554bf3e89fb6f381ba2c5c0b7d61d631ab8640d9 Mon Sep 17 00:00:00 2001 From: s452111 Date: Tue, 21 Apr 2020 23:09:17 +0200 Subject: [PATCH] Task 3 - metrics - starting point --- metrics_service.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/metrics_service.sh b/metrics_service.sh index c3ac2dc..5ebc1e0 100644 --- a/metrics_service.sh +++ b/metrics_service.sh @@ -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