mirror of
https://github.com/qurator-spk/sbb_textline_detection.git
synced 2025-06-09 11:50:02 +02:00
🧹 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.
This commit is contained in:
parent
f0dd955606
commit
4f28cd905a
1 changed files with 0 additions and 8 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue