1
0
forked from tdwojak/Python2017
This commit is contained in:
s45159 2017-12-16 09:14:44 +01:00
parent 4f878a9849
commit 1664154717

View File

@ -2,16 +2,15 @@ import glob
path = 'scores/model.iter*.npz.bleu'
for file in glob(path):
with open(file, 'r') as f:
for line in f.readlines():
num = float(line[line.find("=")+1:line.find(",")])
for file in glob.glob(path):
with open(file, 'r') as f:
for line in f.readlines():
num = float(line[line.find("=") + 1:line.find(",")])
if num > 0:
if num > 0:
max_num = num
max_num_file = file
file.close()
f.close()
print(max_num_file)