Skip to content

Commit

Permalink
Finish renaming the project and the existing processor
Browse files Browse the repository at this point in the history
  • Loading branch information
wrznr committed Aug 13, 2019
1 parent ed0a68c commit 4d22809
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 24 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,7 @@ venv.bak/

# mypy
.mypy_cache/

# vim tmp
*.swp
*.swo
2 changes: 1 addition & 1 deletion ocrd-tool.json
1 change: 0 additions & 1 deletion ocrd_evaluate_segmentation/__init__.py

This file was deleted.

9 changes: 0 additions & 9 deletions ocrd_evaluate_segmentation/cli.py

This file was deleted.

1 change: 1 addition & 0 deletions ocrd_segment/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .repair import RepairSegmentation
9 changes: 9 additions & 0 deletions ocrd_segment/cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import click

from ocrd.decorators import ocrd_cli_options, ocrd_cli_wrap_processor
from ocrd_segment.repair import RepairSegmentation

@click.command()
@ocrd_cli_options
def ocrd_segment_repair(*args, **kwargs):
return ocrd_cli_wrap_processor(RepairSegmentation, *args, **kwargs)
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"version": "0.0.1",
"git_url": "https://github.com/OCR-D/ocrd_evaluate_segmentation",
"git_url": "https://github.com/OCR-D/ocrd_segment",
"tools": {
"ocrd-evaluate-segmentation": {
"executable": "ocrd-evaluate-segmentation",
"ocrd-segment-repair": {
"executable": "ocrd-segment-repair",
"categories": ["Image preprocessing"],
"description": "Evaluate regions",
"description": "Evaluate and repair region segmentation",
"input_file_grp": [
"OCR-D-IMG",
"OCR-D-SEG-BLOCK"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@

from shapely.geometry import Polygon

TOOL = 'ocrd-evaluate-segmentation'
LOG = getLogger('processor.EvaluateSegmentation')
TOOL = 'ocrd-segment-repair'
LOG = getLogger('processor.RepairSegmentation')

class EvaluateSegmentation(Processor):
class RepairSegmentation(Processor):

def __init__(self, *args, **kwargs):
kwargs['ocrd_tool'] = OCRD_TOOL['tools'][TOOL]
kwargs['version'] = OCRD_TOOL['version']
super(EvaluateSegmentation, self).__init__(*args, **kwargs)
super(RepairSegmentation, self).__init__(*args, **kwargs)


def process(self):
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
"""
Installs:
- ocrd-evaluate-segmentation
- ocrd-segment-repair
"""
import codecs

from setuptools import setup, find_packages

setup(
name='ocrd_evaluate_segmentation',
name='ocrd_segment',
version='0.0.1',
description='Segmentation evaluation',
description='Page segmentation and segmentation evaluation',
long_description=codecs.open('README.md', encoding='utf-8').read(),
author='Konstantin Baierer, Kay-Michael Würzner, Robert Sachunsky',
author_email='[email protected], [email protected], [email protected]',
url='https://github.com/OCR-D/ocrd_evaluate_segmentation',
url='https://github.com/OCR-D/ocrd_segment',
license='Apache License 2.0',
packages=find_packages(exclude=('tests', 'docs')),
install_requires=open('requirements.txt').read().split('\n'),
Expand All @@ -24,7 +24,7 @@
},
entry_points={
'console_scripts': [
'ocrd-evaluate-segmentation=ocrd_evaluate_segmentation.cli:ocrd_evaluate_segmentation',
'ocrd-segment-repair=ocrd_segment.cli:ocrd_segment_repair',
]
},
)

0 comments on commit 4d22809

Please sign in to comment.