1
0
Fork 0
mirror of https://github.com/mikegerber/ocrd_calamari.git synced 2025-06-09 19:59:53 +02:00

🐛 Sort predictions in exactly the same way, also when building the text

This commit is contained in:
Gerber, Mike 2020-02-12 17:18:37 +01:00
parent 0c9e1f13c7
commit 0334a35870

View file

@ -122,7 +122,7 @@ class CalamariRecognize(Processor):
positions = _drop_double_spaces(positions)
positions = list(positions)
line_text = ''.join(p.chars[0].char for p in positions)
line_text = ''.join(_sort_chars(p)[0].char for p in positions)
if line_text != prediction.sentence:
log.warning("Our own line text is not the same as Calamari's: '%s' != '%s'",
line_text, prediction.sentence)