From f90b3cfa8601c20c8401095209c00dfbb43c5a78 Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Wed, 11 Dec 2019 13:54:29 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=8A=20sbb=5Ftextline=5Fdetector:=20In?= =?UTF-8?q?=20OCR-D=20interface,=20warn=20if=20overwriting=20existing=20se?= =?UTF-8?q?gmentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qurator/sbb_textline_detector/ocrd_cli.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qurator/sbb_textline_detector/ocrd_cli.py b/qurator/sbb_textline_detector/ocrd_cli.py index 93340d3..a42027c 100644 --- a/qurator/sbb_textline_detector/ocrd_cli.py +++ b/qurator/sbb_textline_detector/ocrd_cli.py @@ -80,8 +80,14 @@ class OcrdSbbTextlineDetectorRecognize(Processor): page = pcgts.get_Page() # Merge results → PAGE file + if page.get_PrintSpace(): + log.warning("Page already contained a printspace") page.set_PrintSpace(tmp_page.get_PrintSpace()) + if page.get_ReadingOrder(): + log.warning("Page already contained a reading order") page.set_ReadingOrder(tmp_page.get_ReadingOrder()) + if page.get_TextRegion(): + log.warning("Page already contained text regions") page.set_TextRegion(tmp_page.get_TextRegion()) # Save metadata about this operation