class PlateString:
#def __init__(self):
max_list_from_all_plates =
threshold = 0.05
for single_lp in seq:
maximum_plate_prob =
possible_plate_prob =
max_list =
plateresults =
lista =
newlist =
for sign in single_lp:
high_indexes =
for prob_id in range(0,len(sign)):
if threshold<sign:
high_indexes.append([sign, prob_id, CATEGORIES])
max_list.append(high_indexes)
max_list_from_all_plates.append(max_list)
listaMain =
ListaVal =
for plate in max_list_from_all_plates:
maxlen = 0
if len(plate) > maxlen:
maxlen = len(plate)
textPlate : str= “”
sumplate = 0
for probabilities in plate:
znakMax : str = “”
probabilityMax : float = 0
for probability in probabilities:
if(probabilityMax<probability):
probabilityMax = probability
znakMax = probability
valMax = probability
textPlate += znakMax
sumplate += valMax
listaMain.append(textPlate)
ListaVal.append(sumplate)
def findtotal(plateresults, listaMain, ListaVal):
for i in range(len(listaMain)):
info = [ListaVal, listaMain]
plateresults.append(info)
print(plateresults)
for mainresult in plateresults:
maxresult = max(mainresult for mainresult in plateresults)
maxelement = max((x) for x in plateresults)
print(maxelement)
if __name__ == ‘__main__’:
findtotal(plateresults, listaMain, ListaVal)