From 36e513604efbd5ed377c23a5c66d5ec4f9533100 Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Mon, 11 Jul 2022 00:14:16 +0200 Subject: [PATCH] descend to all available TextRegions recursively --- ocrd_calamari/recognize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocrd_calamari/recognize.py b/ocrd_calamari/recognize.py index 2e7bbc9..ed59003 100644 --- a/ocrd_calamari/recognize.py +++ b/ocrd_calamari/recognize.py @@ -85,7 +85,7 @@ class CalamariRecognize(Processor): page_image, page_coords, page_image_info = self.workspace.image_from_page( page, page_id, feature_selector=self.features) - for region in page.get_TextRegion(): + for region in page.get_AllRegions(classes=['Text']): region_image, region_coords = self.workspace.image_from_segment( region, page_image, page_coords, feature_selector=self.features)