forked from tdwojak/Python2018
18 lines
348 B
Python
18 lines
348 B
Python
import glob
|
|
|
|
sciezka = "/scores/model.iter*.npz.bleu"
|
|
|
|
for file in glob.glob(sciezka):
|
|
with open(file, 'r') as plik:
|
|
for line in plik.readlines():
|
|
bleu = float(line[line.find("=")+ 1:line.find(",")])
|
|
if bleu >0:
|
|
max = bleu
|
|
maxi = file
|
|
|
|
plik.close()
|
|
|
|
print ( maxi )
|
|
|
|
|