s407323-mlworkshops/zadanie3/trn.sh

8 lines
417 B
Bash

cut -f 2 ASR-eval/wikiniews_results.tsv > zadanie3/hypothesis.txt
cut -f 3 ASR-eval/wikiniews_results.tsv > zadanie3/reference.txt
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < zadanie3/hypothesis.txt > zadanie3/hypothesis.trn
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < zadanie3/reference.txt > zadanie3/reference.trn
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout