From a21c997179d135029d396440b3b0476fafb0782d Mon Sep 17 00:00:00 2001 From: email Date: Fri, 26 Apr 2019 13:22:43 +0200 Subject: [PATCH] WER calculated --- script.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/script.sh b/script.sh index f9ce70c..a6b0c9c 100644 --- a/script.sh +++ b/script.sh @@ -1,6 +1,11 @@ -awk '{print gensub("^\\*\\*", "\\\\**", "g", $0) "\t(sp1_"NR")"}' < wikiniews_results.tsv > reference_a.trn -cut -f2 reference_a.trn > reference.trn -cut -f3 reference_a.trn > hypothesis.trn +awk '{print gensub("^\\*\\*", "\\\\**", "g", $0) "\t(sp1_"NR")"}' < $1 > reference_a.trn + +cut -f2 $1 > reference.txt +cut -f3 $1 > hypothesis.txt + +awk '{print gensub("^\\*\\*", "\\\\**", "g", $0) "\t(sp1_"NR")"}' < reference.txt > reference.trn +awk '{print gensub("^\\*\\*", "\\\\**", "g", $0) "\t(sp1_"NR")"}' < hypothesis.txt > hypothesis.trn + sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout >> WER_SRR.txt