diff --git a/script.sh b/script.sh index 388cb12..70cdf8f 100644 --- a/script.sh +++ b/script.sh @@ -8,4 +8,6 @@ awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < hypothesis.txt > hypothesis.tr sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout > WER_SSR.txt -cat WER_SSR.txt | grep -oP '(?<=Scores: \(#C #S #D #I\)).*' > values.txt +cat WER_SSR.txt | grep -oP '(?<=Scores: \(#C #S #D #I\) ).*' > values.txt + +for i in `cat values.txt`; do $WER=($2+$3+$4)/($2+$3+$1);echo $WER done; > values_WER.txt