diff --git a/counter.sh b/counter.sh index 2feed96..24f4336 100644 --- a/counter.sh +++ b/counter.sh @@ -3,4 +3,4 @@ awk 'BEGIN { FS="\t" } {print gensub("^\\*\\*", "\\\\**", "g", $2) "\t(sp1_"NR") awk 'BEGIN { FS="\t" } {print gensub("^\\*\\*", "\\\\**", "g", $3) "\t(sp1_"NR")"}' wikiniews_results.tsv > hypothesis.trn sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout >> results.txt python extract.py -mv results.tsv wikiniews_results.tsv \ No newline at end of file +mv result.tsv wikiniews_results.tsv \ No newline at end of file diff --git a/extract.py b/extract.py index 4aaa5ab..f1ee432 100644 --- a/extract.py +++ b/extract.py @@ -11,7 +11,6 @@ with open("results.txt", "r", encoding='utf-8') as ins: deletes = int(re.findall('\d+', line)[2]) inserts = int(re.findall('\d+', line)[3]) war = (substitutions+deletes+inserts)/(substitutions+deletes+correct) - print(correct, substitutions, deletes, inserts) wars.append(war) if substitutions==0 and deletes==0 and inserts==0: corrects = corrects + 1