From 745cf9b5b3f1378263d77d0699e7407185a65048 Mon Sep 17 00:00:00 2001 From: Zuzanna Ric Date: Fri, 26 Apr 2019 16:16:49 +0200 Subject: [PATCH] pierwszy --- skrypt2.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/skrypt2.sh b/skrypt2.sh index 70941cf..11c1824 100644 --- a/skrypt2.sh +++ b/skrypt2.sh @@ -3,11 +3,9 @@ cut -f 2 wikiniews_results.tsv > reference.txt cut -f 3 wikiniews_results.tsv > hypothesis.txt 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 -sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o -all > tekst.txt +sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout > tekst.txt grep 'Scores:' tekst.txt | cut -d ' ' -f 6-9 > oceny.txt awk '{print ($2 + $3 + $4)/($1 + $2 + $3)} oceny.txt > WER.txt paste $FILE WER.txt> wikiniews_results.tsv -awk '{sum += $1; n++} END {if (n>0) print sum/n;}' WER.txt > -WER_SRR.txt +awk '{sum += $1; n++} END {if (n>0) print sum/n;}' WER.txt > WER_SRR.txt awk '{n++; if ($2==0 && $3==0 && $4==0) corr++} END {print corr/n;}' oceny.txt >> WER_SRR.txt