1
0
forked from tdwojak/Python2017
Python2017/labs03/task05.py

21 lines
424 B
Python
Raw Normal View History

2017-12-16 00:02:00 +01:00
from glob import glob as g
i = 0
for file in g('scores/model.iter*.npz.bleu'):
with open(file, 'r') as of:
fl = of.readline()
cB = float(fl[fl.find("=") + 1:fl.find(",")])
if i == 0:
maxB = cB
maxBF =file
else:
if cB > maxB:
maxB = cB
maxBF = file
i += 1
of.close()
print(maxBF)