2020-04-03 12:39:57 +02:00
|
|
|
#/bin/bash
|
|
|
|
|
2020-04-03 13:08:35 +02:00
|
|
|
cut -f2 $1 | awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' > hypothesis.trn
|
|
|
|
cut -f3 $1 | awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' > reference.trn
|
|
|
|
|
|
|
|
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout > results.txt
|
2020-04-03 14:05:40 +02:00
|
|
|
python3 count_metrics.py results.txt
|
2020-04-03 16:37:44 +02:00
|
|
|
paste wikiniews_results.tsv wer.txt > tmp.txt && mv tmp.txt wikiniews_results.tsv
|
2020-04-03 16:43:09 +02:00
|
|
|
awk '{ total += $1; count++ } END { print total/count }' new_wer.txt >> wer.txt
|
2020-04-03 17:09:55 +02:00
|
|
|
tail -n 50 wer.txt > tmp && mv tmp wer.txt
|
|
|
|
tail -n 50 srr.txt > tmp && mv tmp srr.txt
|
2020-04-03 16:43:09 +02:00
|
|
|
rm results.txt new_wer.txt
|