2020-04-03 13:05:00 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-04-03 14:16:40 +02:00
|
|
|
myfile = wikiniews_results.tsv
|
|
|
|
|
|
|
|
#wc -l $myfile > result.txt
|
|
|
|
|
|
|
|
# create trn
|
|
|
|
cut -f2 $myfile | awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' > hypothesis.trn
|
|
|
|
cut -f3 $myfile | awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' > reference.trn
|
|
|
|
|
|
|
|
#wer for each line
|
|
|
|
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout > results.txt
|