13 lines
370 B
Bash
13 lines
370 B
Bash
#!/bin/bash
|
|
|
|
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
|