diff --git a/WERcreator.py b/WERcreator.py index 084ca4b..eb889ab 100644 --- a/WERcreator.py +++ b/WERcreator.py @@ -13,10 +13,13 @@ if __name__ == '__main__': for line in x: done = False if line[:21] == 'Scores: (#C #S #D #I)': - lines = line.split(" ") sentenceNumber += 1 - c, s, d, i = line.strip().split() - map(int, [c,s,d,i]) + line.strip('Scores: (#C #S #D #I) ') + c1, s1, d1, i1 = line.split(' ') + c = int(c1) + s = int(s1) + d = int(d1) + i = int(i1) werC = (s + d + i)/(s + d + c) done = True