From 1c44a198afda4432490411917a4e69e9c308b109 Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Mon, 25 Nov 2019 18:05:10 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Report=20missing=20reading=20direct?= =?UTF-8?q?ion/textline=20order?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ocrd_repair_inconsistencies.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ocrd_repair_inconsistencies/ocrd_repair_inconsistencies.py b/ocrd_repair_inconsistencies/ocrd_repair_inconsistencies.py index 853566c..8f498c2 100644 --- a/ocrd_repair_inconsistencies/ocrd_repair_inconsistencies.py +++ b/ocrd_repair_inconsistencies/ocrd_repair_inconsistencies.py @@ -38,9 +38,11 @@ class RepairInconsistencies(Processor): for region in regions: if region.readingDirection != 'left-to-right': - raise NotImplementedError - if region.textLineOrder != 'top-to-bottom': - raise NotImplementedError + LOG.info('Not processing region "%s" (not left-to-right)', region.id) + continue + if len(region.get_TextLine()) > 1 and region.textLineOrder != 'top-to-bottom': + LOG.info('Not processing region "%s" (not top-to-bottom)', region.id) + continue _fix_lines(region)