pierwszy
This commit is contained in:
parent
34610c0938
commit
745cf9b5b3
@ -3,11 +3,9 @@ cut -f 2 wikiniews_results.tsv > reference.txt
|
|||||||
cut -f 3 wikiniews_results.tsv > hypothesis.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")"}' < 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 -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o
|
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout > tekst.txt
|
||||||
all > tekst.txt
|
|
||||||
grep 'Scores:' tekst.txt | cut -d ' ' -f 6-9 > oceny.txt
|
grep 'Scores:' tekst.txt | cut -d ' ' -f 6-9 > oceny.txt
|
||||||
awk '{print ($2 + $3 + $4)/($1 + $2 + $3)} oceny.txt > WER.txt
|
awk '{print ($2 + $3 + $4)/($1 + $2 + $3)} oceny.txt > WER.txt
|
||||||
paste $FILE WER.txt> wikiniews_results.tsv
|
paste $FILE WER.txt> wikiniews_results.tsv
|
||||||
awk '{sum += $1; n++} END {if (n>0) print sum/n;}' WER.txt >
|
awk '{sum += $1; n++} END {if (n>0) print sum/n;}' WER.txt > WER_SRR.txt
|
||||||
WER_SRR.txt
|
|
||||||
awk '{n++; if ($2==0 && $3==0 && $4==0) corr++} END {print corr/n;}' oceny.txt >> WER_SRR.txt
|
awk '{n++; if ($2==0 && $3==0 && $4==0) corr++} END {print corr/n;}' oceny.txt >> WER_SRR.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user