s407323-mlworkshops/zadanie3/trn.sh
2019-04-26 16:04:04 +02:00

8 lines
457 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 zadanie3/reference.trn trn -h zadanie3/hypothesis.trn trn -e utf-8 -i rm -o all stdout > zadanie3/sclite.txt