mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-10-15 19:09:58 +02:00
writer/run_single: consistent kwarg naming conf_contours_textregion(s)
This commit is contained in:
parent
75823f9bed
commit
5e11a68a3e
1 changed files with 5 additions and 5 deletions
|
@ -128,7 +128,7 @@ class EynollahXmlWriter():
|
||||||
ocr_all_textlines=None, ocr_all_textlines_h=None,
|
ocr_all_textlines=None, ocr_all_textlines_h=None,
|
||||||
ocr_all_textlines_marginals_left=None, ocr_all_textlines_marginals_right=None,
|
ocr_all_textlines_marginals_left=None, ocr_all_textlines_marginals_right=None,
|
||||||
ocr_all_textlines_drop=None,
|
ocr_all_textlines_drop=None,
|
||||||
conf_contours_textregion=None, conf_contours_textregion_h=None,
|
conf_contours_textregions=None, conf_contours_textregions_h=None,
|
||||||
skip_layout_reading_order=False):
|
skip_layout_reading_order=False):
|
||||||
self.logger.debug('enter build_pagexml')
|
self.logger.debug('enter build_pagexml')
|
||||||
|
|
||||||
|
@ -152,8 +152,8 @@ class EynollahXmlWriter():
|
||||||
Coords=CoordsType(points=self.calculate_polygon_coords(region_contour, page_coord,
|
Coords=CoordsType(points=self.calculate_polygon_coords(region_contour, page_coord,
|
||||||
skip_layout_reading_order))
|
skip_layout_reading_order))
|
||||||
)
|
)
|
||||||
if conf_contours_textregion:
|
if conf_contours_textregions:
|
||||||
textregion.Coords.set_conf(conf_contours_textregion[mm])
|
textregion.Coords.set_conf(conf_contours_textregions[mm])
|
||||||
page.add_TextRegion(textregion)
|
page.add_TextRegion(textregion)
|
||||||
if ocr_all_textlines:
|
if ocr_all_textlines:
|
||||||
ocr_textlines = ocr_all_textlines[mm]
|
ocr_textlines = ocr_all_textlines[mm]
|
||||||
|
@ -168,8 +168,8 @@ class EynollahXmlWriter():
|
||||||
id=counter.next_region_id, type_='heading',
|
id=counter.next_region_id, type_='heading',
|
||||||
Coords=CoordsType(points=self.calculate_polygon_coords(region_contour, page_coord))
|
Coords=CoordsType(points=self.calculate_polygon_coords(region_contour, page_coord))
|
||||||
)
|
)
|
||||||
if conf_contours_textregion_h:
|
if conf_contours_textregions_h:
|
||||||
textregion.Coords.set_conf(conf_contours_textregion_h[mm])
|
textregion.Coords.set_conf(conf_contours_textregions_h[mm])
|
||||||
page.add_TextRegion(textregion)
|
page.add_TextRegion(textregion)
|
||||||
if ocr_all_textlines_h:
|
if ocr_all_textlines_h:
|
||||||
ocr_textlines = ocr_all_textlines_h[mm]
|
ocr_textlines = ocr_all_textlines_h[mm]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue