🧹 sbb_textline_detector: Do not create empty/space-only TextEquivs

ocrd_tesserocr or ocrd_cis complain about already existing text if
empty/space-only TextEquivs elements exist after segmentation. Also, it
does not make sense to create them in a segmentation step.

Fix by removing the code generating the elements.
pull/1/head
Gerber, Mike 5 years ago
parent f0dd955606
commit 4f28cd905a

@ -1826,10 +1826,6 @@ class textlineerkenner:
coord = ET.SubElement(textline, 'Coords')
texteq=ET.SubElement(textline, 'TextEquiv')
uni=ET.SubElement(texteq, 'Unicode')
uni.text = ' '
#points = ET.SubElement(coord, 'Points')
@ -1859,10 +1855,6 @@ class textlineerkenner:
#print(points_co)
coord.set('points',points_co)
texteqreg=ET.SubElement(textregion, 'TextEquiv')
unireg=ET.SubElement(texteqreg, 'Unicode')
unireg.text = ' '

Loading…
Cancel
Save