Skip to content

Commit

Permalink
Merge pull request #44 from OCR-D/bertsky-patch-1
Browse files Browse the repository at this point in the history
repair: fix typo in d3a75cb and 3c20ebe
  • Loading branch information
bertsky authored Sep 17, 2020
2 parents aef6517 + 5bd001c commit a71cbaa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Versioned according to [Semantic Versioning](http://semver.org/).

## Unreleased

## [0.1.2] - 2020-09-18

Fixed:

* repair: traverse all text regions recursively (typo)

## [0.1.1] - 2020-09-14

Changed:
Expand Down Expand Up @@ -32,5 +38,7 @@ Changed:
* further improve README

<!-- link-labels -->
[0.1.2]: ../../compare/v0.1.2...v0.1.1
[0.1.1]: ../../compare/v0.1.1...v0.1.0
[0.1.0]: ../../compare/v0.1.0...v0.0.2
[0.0.2]: ../../compare/HEAD...v0.0.2
2 changes: 1 addition & 1 deletion ocrd_segment/ocrd-tool.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.1",
"version": "0.1.2",
"git_url": "https://github.com/OCR-D/ocrd_segment",
"tools": {
"ocrd-segment-repair": {
Expand Down
4 changes: 2 additions & 2 deletions ocrd_segment/repair.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def process(self):
mark_for_deletion = list() # what regions get removed?
mark_for_merging = dict() # what regions get merged into which regions?
# cover recursive region structure (but compare only at the same level)
parents = list(set([region.parent_object_ for region in page.get_AllRegions(classes=['text'])]))
parents = list(set([region.parent_object_ for region in page.get_AllRegions(classes=['Text'])]))
for parent in parents:
regions = parent.get_TextRegion()
# sort by area to ensure to arrive at a total ordering compatible
Expand Down Expand Up @@ -173,7 +173,7 @@ def process(self):
content=to_xml(pcgts))

def sanitize_page(self, page, page_id):
regions = page.get_AllRegions(classes=['text'])
regions = page.get_AllRegions(classes=['Text'])
page_image, page_coords, _ = self.workspace.image_from_page(
page, page_id)
for region in regions:
Expand Down

0 comments on commit a71cbaa

Please sign in to comment.