forked from tdwojak/Python2017
24 lines
570 B
Python
24 lines
570 B
Python
![]() |
#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)
|