Zaktualizuj 'licz_linie_a_potem_metryki.sh'
This commit is contained in:
parent
3f8c33f942
commit
b022f810cb
@ -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
|
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < hypothesis.txt > hypothesis.trn
|
||||||
|
|
||||||
#Sclite sluzy do obliczenia WER. Kod ponizej z pkt 3.Metryki
|
#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
|
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
|
awk 'BEGIN{OFS="\t"}{print $6, $7, $8, $9}' < scores | awk '{ print ($2 + $3 + $4)/($2 + $3 + $1) }' > wer.tsv
|
||||||
|
Loading…
Reference in New Issue
Block a user