diff --git a/metrics_docker.sh b/metrics_docker.sh index 7faa1ce..d3aca58 100644 --- a/metrics_docker.sh +++ b/metrics_docker.sh @@ -1,16 +1,24 @@ -while read line; do - echo "processing: $line" - echo "$line" | awk -F '\t' '{print $1}' - echo "$line" | awk -F '\t' '{print $2}' > hypothesis.txt - echo "$line" | awk -F '\t' '{print $3}' > reference.txt +# while read line; do +# echo "processing: $line" +# echo "$line" | awk -F '\t' '{print $1}' +# echo "$line" | awk -F '\t' '{print $2}' > hypothesis.txt +# echo "$line" | awk -F '\t' '{print $3}' > reference.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 +# +# sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout +# +# done < wikiniews_results.tsv + + +awk -F '\t' '{print $2}' < wikiniews_results.tsv > hypothesis.txt +awk -F '\t' '{print $3}' < wikiniews_results.tsv > reference.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 - sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout - -done < wikiniews_results.tsv - +sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout # # awk '{print gensub("^\\*\\*", "\\\\**", "g", $0) "\t(sp1_"NR")"}'\