diff --git a/labs04/cw5.py b/labs04/cw5.py new file mode 100644 index 0000000..233565b --- /dev/null +++ b/labs04/cw5.py @@ -0,0 +1,17 @@ +import glob + +sciezka = "/home/andrea/Pulpit/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 ) + +