s452108-mlworkshops/count.sh
2020-04-03 16:13:15 +02:00

9 lines
388 B
Bash
Executable File

#!/bin/bash
cut -f2 -s wikiniews_results.tsv > hipotezy.txt
cut -f3 -s wikiniews_results.tsv > referencje.txt
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < referencje.txt > reference.trn
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < hipotezy.txt > hypothesis.trn
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout | grep "Scores: " > output.txt