Skip to content

Commit

Permalink
fix get_text_regions_in_reading_order
Browse files Browse the repository at this point in the history
  • Loading branch information
brambg committed Nov 15, 2022
1 parent 18d6a9f commit 814a34f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pagexml/model/physical_document_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ def json(self) -> Dict[str, any]:
def get_text_regions_in_reading_order(self):
if not self.reading_order:
return self.text_regions
tr_ids = {region_id for _index, region_id in sorted(self.reading_order.items(), key=lambda x: x[0])}
tr_ids = list({region_id: None for _index, region_id in sorted(self.reading_order.items(), key=lambda x: x[0])})
tr_map = {}
for text_region in self.text_regions:
# if text_region.id not in tr_ids:
Expand Down

0 comments on commit 814a34f

Please sign in to comment.