jenkinsfile
This commit is contained in:
parent
49eed26e88
commit
79d4cd5bff
@ -1,2 +1,14 @@
|
|||||||
file = open("helper.txt", "r")
|
import re
|
||||||
print(file.read())
|
|
||||||
|
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()
|
@ -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
|
python ./createWERandSRRFiles.py
|
||||||
|
|
||||||
|
head -15 helper.txt
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user