This commit is contained in:
Kamil Paprota 2020-04-03 14:15:13 +02:00
parent eb749b70d3
commit 25afe5e0c1
2 changed files with 13 additions and 1 deletions

2
CreateMetricFiles.py Normal file
View File

@ -0,0 +1,2 @@
file = open("sclite.txt", "r")
print(file.read())

View File

@ -1 +1,11 @@
wc -l wikiniews_results.tsv > lines_number.txt wc -l wikiniews_results.tsv > lines_number.txt
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < reference.txt > reference.trn
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < hypothesis.txt > hypothesis.trn
cut -f3 wikiniews_results.tsv > reference.txt
cut -f2 wikiniews_results.tsv > hypothesis.txt
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout > sclite.txt
python ./createMetricFiles.py