1
0
forked from tdwojak/Python2017

commited tasks

This commit is contained in:
s45150 2017-12-12 18:40:59 +01:00
parent 832c2d6460
commit e41ec1cb80

24
labs03/task05.py Normal file
View File

@ -0,0 +1,24 @@
#task05
import os
import glob
BLEUValue = 0
BLEUFileMax = ''
for Fname in glob.glob(os.getcwd() + '\scores\*.bleu'):
with open(Fname, 'r') as fp:
#print(fp.name)
for lineFile in fp:
iList=lineFile
iList= iList.split(',')
#print(iList)
BLEUValueTmp = iList[0][7:]
BLEUValueTmp = float(BLEUValueTmp)
#print(BLEUValueTmp)
if BLEUValueTmp > BLEUValue:
BLEUValue = BLEUValueTmp
BLEUFileMax = fp.name
print(BLEUValue)
print(BLEUFileMax)