ocrd.cli.validate module

OCR-D CLI: syntax validation

ocrd validate

All the validation in one CLI

ocrd validate [OPTIONS] COMMAND [ARGS]...

page

Validate PAGE against OCR-D conventions

ocrd validate page [OPTIONS] PAGE

Options

--page-textequiv-consistency <page_textequiv_consistency>

How strict to check PAGE multi-level textequiv consistency

Options:

strict | lax | fix | off

--page-textequiv-strategy <page_textequiv_strategy>

Strategy to determine the correct textequiv

Options:

first

--check-baseline

Whether Baseline must be fully within TextLine/Coords

--check-coords

Whether *Region/TextLine/Word/Glyph must each be fully contained within Border/*Region/TextLine/Word, resp.

Arguments

PAGE

Required argument

parameters

Validate PARAM_JSON against parameter definition of EXECUTABLE in OCRD_TOOL

ocrd validate parameters [OPTIONS] OCRD_TOOL EXECUTABLE PARAM_JSON

Arguments

OCRD_TOOL

Required argument

EXECUTABLE

Required argument

PARAM_JSON

Required argument

tasks

Validate a sequence of tasks passable to ‘ocrd process’

ocrd validate tasks [OPTIONS] TASKS...

Options

--workspace <workspace>

Workspace directory these tasks are to be run. If omitted, only validate syntax

-M, --mets-basename <mets_basename>

Basename of the METS file, used in conjunction with –workspace

--overwrite

When checking against a concrete workspace, simulate overwriting output or page range.

-g, --page-id <page_id>

ID(s) of the pages to process

Arguments

TASKS

Required argument(s)

tool-json

Validate OCRD_TOOL as an ocrd-tool.json file.

ocrd validate tool-json [OPTIONS] [OCRD_TOOL]

Arguments

OCRD_TOOL

Optional argument