Skip to content

Commit

Permalink
add test for region-level segmentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky committed May 29, 2024
1 parent 433c286 commit 41bec66
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ def test_run_blla(self):
proc.process()
workspace.save_mets()

def test_run_blla_regionlevel(self):
resolver = Resolver()
with pushd_popd(tempdir=True) as tempdir:
workspace = resolver.workspace_from_url(assets.path_to('kant_aufklaerung_1784-page-region/data/mets.xml'), dst_dir=tempdir, download=True)
proc = KrakenSegment(
workspace,
input_file_grp="OCR-D-GT-SEG-REGION",
output_file_grp="OCR-D-SEG-LINE-KRAKEN",
page_id="phys_0005",
parameter={'maxcolseps': 0, 'use_legacy': False}
)
proc.process()
workspace.save_mets()

def test_run_legacy(self):
resolver = Resolver()
# with pushd_popd('/tmp/kraken-test') as tempdir:
Expand Down

0 comments on commit 41bec66

Please sign in to comment.