Zaktualizuj 'licz_linie_a_potem_metryki.sh'

This commit is contained in:
Monika Janocha 2020-04-21 13:05:54 +00:00
parent 3f8c33f942
commit b022f810cb
1 changed files with 1 additions and 0 deletions

View File

@ -10,6 +10,7 @@ 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 sluzy do obliczenia WER. Kod ponizej z pkt 3.Metryki
#W hypothesis.trn powinny znaleźć się wyniki działania ASR W reference.trn - referencyjne zdania
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout | grep Scores > scores
awk 'BEGIN{OFS="\t"}{print $6, $7, $8, $9}' < scores | awk '{ print ($2 + $3 + $4)/($2 + $3 + $1) }' > wer.tsv