jenkinsfile

This commit is contained in:
unknown 2020-04-03 14:21:13 +02:00
parent 49eed26e88
commit 79d4cd5bff
2 changed files with 16 additions and 2 deletions

View File

@ -1,2 +1,14 @@
file = open("helper.txt", "r")
print(file.read())
import re
wer = open("wer.txt","w")
with open("helper.txt", "r") as f:
for line in f:
if re.match(r'^id:.*', line):
wer.write(line + " = ")
elif re.match(r'^Scores: (#C #S #D #I).*', line):
helper = line.replace("Scores: (#C #S #D #I) ", "").split()
sum = helper[0] + helper[1] + helper[2] + helper[3]
wer.write(str((helper[0]/sum) * 100)"%\n")
wer.close()

View File

@ -10,4 +10,6 @@ sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all std
python ./createWERandSRRFiles.py
head -15 helper.txt