Skip to content

Commit

Permalink
Merge branch 'master' of github.com:qurator-spk/dinglehopper
Browse files Browse the repository at this point in the history
  • Loading branch information
mikegerber committed May 20, 2021
2 parents 2a6cc58 + 0b9af3a commit 2497876
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qurator/dinglehopper/ocr_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ def extract_texts_from_reading_order_group(group, tree, nsmap, textequiv_level):

ro_children = filter(lambda child: "index" in child.attrib.keys(), ro_children)
ro_children = sorted(ro_children, key=lambda child: int(child.attrib["index"]))
elif ET.QName(group.tag).localname == "UnorderedGroup":
elif ET.QName(group.tag).localname in ["UnorderedGroup","UnorderedGroupIndexed"]:
ro_children = list(group)
else:
raise NotImplementedError


for ro_child in ro_children:
if ET.QName(ro_child.tag).localname in ["OrderedGroup", "OrderedGroupIndexed", "UnorderedGroup"]:
if ET.QName(ro_child.tag).localname in ["OrderedGroup", "OrderedGroupIndexed", "UnorderedGroup", "UnorderedGroupIndexed"]:
regions.extend(
extract_texts_from_reading_order_group(
ro_child, tree, nsmap, textequiv_level
Expand Down

0 comments on commit 2497876

Please sign in to comment.