From 6ffa87ad5706a7d49b539456233d73b4fadca2e6 Mon Sep 17 00:00:00 2001 From: Konstantin Baierer Date: Wed, 7 Apr 2021 15:47:50 +0200 Subject: [PATCH] reading order conversion should recurse all regions, #2 --- ocrd_page_to_alto/convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocrd_page_to_alto/convert.py b/ocrd_page_to_alto/convert.py index 0fa7458..1a0f387 100644 --- a/ocrd_page_to_alto/convert.py +++ b/ocrd_page_to_alto/convert.py @@ -91,7 +91,7 @@ def convert_styles(self): self.textstyle_mgr.to_xml(self.alto_styles) def convert_reading_order(self): - index_order = [x.id for x in self.page_page.get_AllRegions(order='reading-order', depth=1)] + index_order = [x.id for x in self.page_page.get_AllRegions(order='reading-order', depth=0)] for id_cur, id_next in zip(index_order[:-1], index_order[1:]): self.alto_printspace.find('*[@ID="%s"]' % id_cur).set('IDNEXT', id_next)