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:
parent
0c9e1f13c7
commit
0334a35870
1 changed files with 1 additions and 1 deletions
|
@ -122,7 +122,7 @@ class CalamariRecognize(Processor):
|
||||||
positions = _drop_double_spaces(positions)
|
positions = _drop_double_spaces(positions)
|
||||||
positions = list(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:
|
if line_text != prediction.sentence:
|
||||||
log.warning("Our own line text is not the same as Calamari's: '%s' != '%s'",
|
log.warning("Our own line text is not the same as Calamari's: '%s' != '%s'",
|
||||||
line_text, prediction.sentence)
|
line_text, prediction.sentence)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue