finished
This commit is contained in:
parent
e3ac62d7de
commit
a061359a3e
@ -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
|
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
|
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout >> results.txt
|
||||||
python extract.py
|
python extract.py
|
||||||
mv results.tsv wikiniews_results.tsv
|
mv result.tsv wikiniews_results.tsv
|
@ -11,7 +11,6 @@ with open("results.txt", "r", encoding='utf-8') as ins:
|
|||||||
deletes = int(re.findall('\d+', line)[2])
|
deletes = int(re.findall('\d+', line)[2])
|
||||||
inserts = int(re.findall('\d+', line)[3])
|
inserts = int(re.findall('\d+', line)[3])
|
||||||
war = (substitutions+deletes+inserts)/(substitutions+deletes+correct)
|
war = (substitutions+deletes+inserts)/(substitutions+deletes+correct)
|
||||||
print(correct, substitutions, deletes, inserts)
|
|
||||||
wars.append(war)
|
wars.append(war)
|
||||||
if substitutions==0 and deletes==0 and inserts==0:
|
if substitutions==0 and deletes==0 and inserts==0:
|
||||||
corrects = corrects + 1
|
corrects = corrects + 1
|
||||||
|
Loading…
Reference in New Issue
Block a user