From e5bb0cc6331e410980cbdf9fb7373b559b1a0f8d Mon Sep 17 00:00:00 2001
From: Konstantin Baierer <unixprog@gmail.com>
Date: Fri, 8 Nov 2019 10:33:58 +0100
Subject: [PATCH] update repos.json

---
 kwalitee/config.yml |   2 +-
 repos.json          | 796 ++++++++++++++++++++++----------------------
 2 files changed, 407 insertions(+), 391 deletions(-)

diff --git a/kwalitee/config.yml b/kwalitee/config.yml
index cdc24e5..5e55822 100644
--- a/kwalitee/config.yml
+++ b/kwalitee/config.yml
@@ -31,6 +31,6 @@ repolist:
     official: true
     compliant_cli: false
   - url: https://github.com/qurator-spk/dinglehopper
-  - url: https://github.com/qurator-spk/pixelwise_segmentation_SBB
+  # - url: https://github.com/qurator-spk/pixelwise_segmentation_SBB
   - url: https://github.com/seuretm/ocrd_typegroups_classifier
     official: true
diff --git a/repos.json b/repos.json
index 1e4309f..2e6b153 100644
--- a/repos.json
+++ b/repos.json
@@ -1,5 +1,6 @@
 [
     {
+        "compliant_cli": true,
         "files": {
             "Dockerfile": null,
             "README.md": "# cor-asv-ann\n    OCR post-correction with encoder-attention-decoder LSTMs\n\n## Introduction\n\nThis is a tool for automatic OCR _post-correction_ (reducing optical character recognition errors) with recurrent neural networks. It uses sequence-to-sequence transduction on the _character level_ with a model architecture akin to neural machine translation, i.e. a stacked **encoder-decoder** network with attention mechanism. \n\nThe **attention model** always applies to full lines (in a _global_ configuration), and uses a linear _additive_ alignment model. (This transfers information between the encoder and decoder hidden layer states, and calculates a _soft alignment_ between input and output characters. It is imperative for character-level processing, because with a simple final-initial transfer, models tend to start \"forgetting\" the input altogether at some point in the line and behave like unconditional LM generators.)\n\n...FIXME: mention: \n- stacked architecture (with bidirectional bottom and attentional top), configurable depth/width\n- weight tying\n- underspecification and gap\n- confidence input and alternative input\n- CPU/GPU option\n- incremental training, LM transfer, shallow transfer\n- evaluation (CER, PPL)\n\n### Processing PAGE annotations\n\nWhen applied on PAGE-XML (as OCR-D workspace processor), this component also allows processing below the `TextLine` hierarchy level, i.e. on `Word` or `Glyph` level. For that it uses the soft alignment scores to calculate an optimal hard alignment path for characters, and thereby distributes the transduction onto the lower level elements (keeping their coordinates and other meta-data), while changing Word segmentation if necessary.\n\n...\n\n### Architecture\n\n...FIXME: show!\n\n### Input with confidence and/or alternatives\n\n...FIXME: explain!\n\n### Multi-OCR input\n\nnot yet!\n\n### Modes\n\nWhile the _encoder_ can always be run in parallel over a batch of lines and by passing the full sequence of characters in one tensor (padded to the longest line in the batch), which is very efficient with Keras backends like Tensorflow, a **beam-search** _decoder_ requires passing initial/final states character-by-character, with parallelism employed to capture multiple history hypotheses of a single line. However, one can also **greedily** use the best output only for each position (without beam search). And in doing so, another option is to feed back the softmax output directly into the decoder input instead of its argmax unit vector. This effectively passes the full probability distribution from state to state, which (not very surprisingly) can increase correction accuracy quite a lot \u2013 it can get as good as a medium-sized beam search results. This latter option also allows to run in parallel again, which is also much faster \u2013 consuming up to ten times less CPU time.\n\nThererfore, the backend function `lib.Sequence2Sequence.correct_lines` can operate the encoder-decoder network in either of the following modes:\n\n#### _fast_\n\nDecode greedily, but feeding back the full softmax distribution in batch mode.\n\n#### _greedy_\n\nDecode greedily, but feeding back the argmax unit vectors for each line separately.\n\n#### _default_\n\nDecode beamed, feeding back the argmax unit vectors for the best history/output hypotheses of each line. More specifically:\n\n> Start decoder with start-of-sequence, then keep decoding until\n> end-of-sequence is found or output length is way off, repeatedly.\n> Decode by using the best predicted output characters and several next-best\n> alternatives (up to some degradation threshold) as next input.\n> Follow-up on the N best overall candidates (estimated by accumulated\n> score, normalized by length and prospective cost), i.e. do A*-like\n> breadth-first search, with N equal `batch_size`.\n> Pass decoder initial/final states from character to character,\n> for each candidate respectively.\n> Reserve 1 candidate per iteration for running through `source_seq`\n> (as a rejection fallback) to ensure that path does not fall off the\n> beam and at least one solution can be found within the search limits.\n\n### Evaluation\n\nText lines can be compared (by aligning and computing a distance under some metric) across multiple inputs. (This would typically be GT and OCR vs post-correction.) This can be done both on plain text files (`cor-asv-ann-eval`) and PAGE-XML annotations (`ocrd-cor-asv-ann-evaluate`).\n\nThere are a number of distance metrics available:\n- `Levenshtein`: simple unweighted edit distance (fastest, standard)\n- `combining-e-umlauts`: like the former, but umlauts with combining letter e get smaller distance to precomposed umlauts (and vice versa), as in \"Wu\u0364\u017fte\" (as opposed to \"W\u00fc\u017fte\")\n- `historic_latin`: like the former, but with additional exceptions (i.e. zero distances) for certain (isolated) character confusions \u2013 roughly the difference between GT level 1 and 2\n- `NFC`: like `Levenshtein`, but apply Unicode normal form with canonical composition before (i.e. less than `historic_latin`)\n- `NFKC`: like `Levenshtein`, but apply Unicode normal form with compatibility composition before (i.e. more than `historic_latin`)\n\n\n## Installation\n\nRequired Ubuntu packages:\n\n* Python (``python`` or ``python3``)\n* pip (``python-pip`` or ``python3-pip``)\n* virtualenv (``python-virtualenv`` or ``python3-virtualenv``)\n\nCreate and activate a virtualenv as usual.\n\nTo install Python dependencies and this module, then do:\n```shell\nmake deps install\n```\nWhich is the equivalent of:\n```shell\npip install -r requirements.txt\npip install -e .\n```\n\n## Usage\n\nThis packages has the following user interfaces:\n\n### command line interface `cor-asv-ann-train`\n\nTo be used with string arguments and plain-text files.\n\n...\n\n### command line interface `cor-asv-ann-eval`\n\nTo be used with string arguments and plain-text files.\n\n...\n\n### command line interface `cor-asv-ann-repl`\n\ninteractive\n\n...\n\n### [OCR-D processor](https://github.com/OCR-D/core) interface `ocrd-cor-asv-ann-process`\n\nTo be used with [PageXML](https://www.primaresearch.org/tools/PAGELibraries) documents in an [OCR-D](https://github.com/OCR-D/spec/) annotation workflow. Input could be anything with a textual annotation (`TextEquiv` on the given `textequiv_level`). \n\n...\n\n```json\n    \"ocrd-cor-asv-ann-process\": {\n      \"executable\": \"ocrd-cor-asv-ann-process\",\n      \"categories\": [\n        \"Text recognition and optimization\"\n      ],\n      \"steps\": [\n        \"recognition/post-correction\"\n      ],\n      \"description\": \"Improve text annotation by character-level encoder-attention-decoder ANN model\",\n      \"input_file_grp\": [\n        \"OCR-D-OCR-TESS\",\n        \"OCR-D-OCR-KRAK\",\n        \"OCR-D-OCR-OCRO\",\n        \"OCR-D-OCR-CALA\",\n        \"OCR-D-OCR-ANY\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-COR-ASV\"\n      ],\n      \"parameters\": {\n        \"model_file\": {\n          \"type\": \"string\",\n          \"format\": \"uri\",\n          \"content-type\": \"application/x-hdf;subtype=bag\",\n          \"description\": \"path of h5py weight/config file for model trained with cor-asv-ann-train\",\n          \"required\": true,\n          \"cacheable\": true\n        },\n        \"textequiv_level\": {\n          \"type\": \"string\",\n          \"enum\": [\"line\", \"word\", \"glyph\"],\n          \"default\": \"glyph\",\n          \"description\": \"PAGE XML hierarchy level to read/write TextEquiv input/output on\"\n        }\n      }\n    }\n```\n\n...\n\n### [OCR-D processor](https://github.com/OCR-D/core) interface `ocrd-cor-asv-ann-evaluate`\n\nTo be used with [PageXML](https://www.primaresearch.org/tools/PAGELibraries) documents in an [OCR-D](https://github.com/OCR-D/spec/) annotation workflow. Inputs could be anything with a textual annotation (`TextEquiv` on the line level), but at least 2. The first in the list of input file groups will be regarded as reference/GT.\n\n...\n\n```json\n    \"ocrd-cor-asv-ann-evaluate\": {\n      \"executable\": \"ocrd-cor-asv-ann-evaluate\",\n      \"categories\": [\n        \"Text recognition and optimization\"\n      ],\n      \"steps\": [\n        \"recognition/evaluation\"\n      ],\n      \"description\": \"Align different textline annotations and compute distance\",\n      \"parameters\": {\n        \"metric\": {\n          \"type\": \"string\",\n          \"enum\": [\"Levenshtein\", \"combining-e-umlauts\", \"NFC\", \"NFKC\", \"historic_latin\"],\n          \"default\": \"Levenshtein\",\n          \"description\": \"Distance metric to calculate and aggregate\"\n        }\n      }\n    }\n```\n\n...\n\n## Testing\n\nnot yet!\n...\n",
@@ -9,8 +10,8 @@
         "git": {
             "last_commit": "Sat Oct 26 00:13:18 2019 +0200",
             "latest_tag": "",
-            "number_of_commits": "38",
-            "url": "https://github.com/ASVLeipzig/cor-asv-ann.git"
+            "number_of_commits": "3",
+            "url": "https://github.com/ASVLeipzig/cor-asv-ann"
         },
         "name": "cor-asv-ann",
         "ocrd_tool": {
@@ -96,6 +97,7 @@
         "url": "https://github.com/ASVLeipzig/cor-asv-ann"
     },
     {
+        "compliant_cli": true,
         "files": {
             "Dockerfile": null,
             "README.md": "# cor-asv-fst\n    OCR post-correction with error/lexicon Finite State Transducers and\n    chararacter-level LSTM language models\n\n## Introduction\n\n\n## Installation\n\nRequired Ubuntu packages:\n\n* Python (``python`` or ``python3``)\n* pip (``python-pip`` or ``python3-pip``)\n* virtualenv (``python-virtualenv`` or ``python3-virtualenv``)\n\nCreate and activate a virtualenv as usual.\n\nTo install Python dependencies and this module, then do:\n```shell\nmake deps install\n```\nWhich is the equivalent of:\n```shell\npip install -r requirements.txt\npip install -e .\n```\n\nIn addition to the requirements listed in `requirements.txt`, the tool\nrequires the\n[pynini](http://www.opengrm.org/twiki/bin/view/GRM/Pynini)\nlibrary, which has to be installed from source.\n\n## Usage\n\nThe package has two user interfaces:\n\n### Command Line Interface\n\nThe package contains a suite of CLI tools to work with plaintext data (prefix:\n`cor-asv-fst-*`). The minimal working examples and data formats are described\nbelow. Additionally, each tool has further optional parameters - for a detailed\ndescription, call the tool with the `--help` option.\n\n#### `cor-asv-fst-train`\n\nTrain FST models. The basic invocation is as follows:\n\n```shell\ncor-asv-fst-train -l LEXICON_FILE -e ERROR_MODEL_FILE -t TRAINING_FILE\n```\n\nThis will create two transducers, which will be stored in `LEXICON_FILE` and\n`ERROR_MODEL_FILE`, respectively. As the training of the lexicon and the error\nmodel is done independently, any of them can be skipped by omitting the\nrespective parameter.\n\n`TRAINING_FILE` is a plain text file in tab-separated, two-column format\ncontaining a line of OCR-output and the corresponding ground truth line:\n\n```\n\u00bb Bergebt mir, da\u00df ih niht wei\u00df, wie\t\u00bbVergebt mir, da\u00df ich nicht wei\u00df, wie\naus dem (Gei\u017fte aller Nationen Mahrunq\taus dem Gei\u017fte aller Nationen Nahrung\nKann\u017ft Du mir die re<h\u00e9e Bahn nich\u00e9 zeigen ?\tKann\u017ft Du mir die rechte Bahn nicht zeigen?\nfrag zu bringen. \u2014\ttrag zu bringen. \u2014\n\u017fie ins irdij<he Leben hinein, Mit leichtem,\t\u017fie ins irdi\u017fche Leben hinein. Mit leichtem,\n```\n\nEach line is treated independently. Alternatively to the above, the training\ndata may also be supplied as two files:\n\n```shell\ncor-asv-fst-train -l LEXICON_FILE -e ERROR_MODEL_FILE -i INPUT_FILE -g GT_FILE\n```\n\nIn this variant, `INPUT_FILE` and `GT_FILE` are both in tab-separated,\ntwo-column format, in which the first column is the line ID and the second the\nline:\n\n```\n>=== INPUT_FILE ===<\nalexis_ruhe01_1852_0018_022     ih denke. Aber was die \u017felige Frau Geheimr\u00e4th1n\nalexis_ruhe01_1852_0035_019     \u201eDas fann ich niht, c\u2019esl absolument impos-\nalexis_ruhe01_1852_0087_027     rend. In dem Augenbli> war 1hr niht wohl zu\nalexis_ruhe01_1852_0099_012     \u00fcr die fle \u017fich \u017fchlugen.\u201c\nalexis_ruhe01_1852_0147_009     \u017follte. Nur \u00dcber die Familien, wo man \u017fie einf\u00fchren\n\n>=== GT_FILE ===<\nalexis_ruhe01_1852_0018_022     ich denke. Aber was die \u017felige Frau Geheimr\u00e4thin\nalexis_ruhe01_1852_0035_019     \u201eDas kann ich nicht, c'est absolument impos\u2014\nalexis_ruhe01_1852_0087_027     rend. Jn dem Augenblick war ihr nicht wohl zu\nalexis_ruhe01_1852_0099_012     f\u00fcr die \u017fie \u017fich \u017fchlugen.\u201c\nalexis_ruhe01_1852_0147_009     \u017follte. Nur \u00fcber die Familien, wo man \u017fie einf\u00fchren\n```\n\n#### `cor-asv-fst-process`\n\nThis tool applies a trained model to correct plaintext data on a line basis.\nThe basic invocation is:\n\n```shell\ncor-asv-fst-process -i INPUT_FILE -o OUTPUT_FILE -l LEXICON_FILE -e ERROR_MODEL_FILE (-m LM_FILE)\n```\n\n`INPUT_FILE` is in the same format as for the training procedure. `OUTPUT_FILE`\ncontains the post-correction results in the same format.\n\n`LM_FILE` is a `ocrd_keraslm` language model - if supplied, it is used for\nrescoring.\n\n#### `cor-asv-fst-evaluate`\n\nThis tool can be used to evaluate the post-correction results. The minimal\nworking invocation is:\n\n```shell\ncor-asv-fst-evaluate -i INPUT_FILE -o OUTPUT_FILE -g GT_FILE\n```\n\nAdditionally, the parameter `-M` can be used to select the evaluation measure\n(`Levenshtein` by default). The files should be in the same two-column format\nas described above.\n\n### [OCR-D processor](https://github.com/OCR-D/core) interface `ocrd-cor-asv-fst-process`\n\nTo be used with [PageXML](https://www.primaresearch.org/tools/PAGELibraries)\ndocuments in an [OCR-D](https://github.com/OCR-D/spec/) annotation workflow.\nInput could be anything with a textual annotation (`TextEquiv` on the given\n`textequiv_level`).\n\n...\n\n```json\n  \"tools\": {\n    \"cor-asv-fst-process\": {\n      \"executable\": \"cor-asv-fst-process\",\n      \"categories\": [\n        \"Text recognition and optimization\"\n      ],\n      \"steps\": [\n        \"recognition/post-correction\"\n      ],\n      \"description\": \"Improve text annotation by FST error and lexicon model with character-level LSTM language model\",\n      \"input_file_grp\": [\n        \"OCR-D-OCR-TESS\",\n        \"OCR-D-OCR-KRAK\",\n        \"OCR-D-OCR-OCRO\",\n        \"OCR-D-OCR-CALA\",\n        \"OCR-D-OCR-ANY\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-COR-ASV\"\n      ],\n      \"parameters\": {\n        \"keraslm_file\": {\n          \"type\": \"string\",\n          \"format\": \"uri\",\n          \"content-type\": \"application/x-hdf;subtype=bag\",\n          \"description\": \"path of h5py weight/config file for language model trained with keraslm\",\n          \"required\": true,\n          \"cacheable\": true\n        },\n        \"errorfst_file\": {\n          \"type\": \"string\",\n          \"format\": \"uri\",\n          \"content-type\": \"application/vnd.openfst\",\n          \"description\": \"path of FST file for error model\",\n          \"required\": true,\n          \"cacheable\": true\n        },\n        \"lexiconfst_file\": {\n          \"type\": \"string\",\n          \"format\": \"uri\",\n          \"content-type\": \"application/vnd.openfst\",\n          \"description\": \"path of FST file for lexicon model\",\n          \"required\": true,\n          \"cacheable\": true\n        },\n        \"textequiv_level\": {\n          \"type\": \"string\",\n          \"enum\": [\"word\", \"glyph\"],\n          \"default\": \"glyph\",\n          \"description\": \"PAGE XML hierarchy level to read TextEquiv input on (output will always be word level)\"\n        },\n        \"beam_width\": {\n          \"type\": \"number\",\n          \"format\": \"integer\",\n          \"description\": \"maximum number of best partial paths to consider during beam search in language modelling\",\n          \"default\": 100\n        },\n        \"lm_weight\": {\n          \"type\": \"number\",\n          \"format\": \"float\",\n          \"description\": \"share of the LM scores over the FST output confidences\",\n          \"default\": 0.5\n        }\n      }\n    }\n  }\n```\n\n...\n\n## Testing\n\n...\n",
@@ -105,7 +107,7 @@
         "git": {
             "last_commit": "Tue Jul 23 17:00:16 2019 +0200",
             "latest_tag": "",
-            "number_of_commits": "172",
+            "number_of_commits": "1",
             "url": "https://github.com/ASVLeipzig/cor-asv-fst"
         },
         "name": "cor-asv-fst",
@@ -123,17 +125,18 @@
         "url": "https://github.com/ASVLeipzig/cor-asv-fst"
     },
     {
+        "compliant_cli": true,
         "files": {
             "Dockerfile": "FROM ocrd/core:edge\nMAINTAINER OCR-D\nENV DEBIAN_FRONTEND noninteractive\nENV PYTHONIOENCODING utf8\nENV LC_ALL C.UTF-8\nENV LANG C.UTF-8\n\nWORKDIR /build\nCOPY Makefile .\nCOPY setup.py .\nCOPY ocrd-tool.json .\nCOPY requirements.txt .\nCOPY ocrd_calamari ocrd_calamari\n\nRUN make calamari/build\nRUN pip3 install .\n\nENTRYPOINT [\"/usr/local/bin/ocrd-calamari-recognize\"]\n\n",
             "README.md": "# ocrd_calamari\n\nRecognize text using [Calamari OCR](https://github.com/Calamari-OCR/calamari).\n\n## Introduction\n\nThis offers a OCR-D compliant workspace processor for some of the functionality of Calamari OCR.\n\nThis processor only operates on the text line level and so needs a line segmentation (and by extension a binarized \nimage) as its input.\n\n## Example Usage\n\n```sh\nocrd-calamari-recognize -p test-parameters.json -m mets.xml -I OCR-D-SEG-LINE -O OCR-D-OCR-CALAMARI\n```\n\nWith `test-parameters.json`:\n\n```json\n{\n    \"checkpoint\": \"/path/to/some/trained/models/*.ckpt.json\"\n}\n```\n\nTODO\n----\n\n* Support Calamari's \"extended prediction data\" output\n* Currently, the processor only supports a prediction using confidence voting of multiple models. While this is\n  superior, it makes sense to support single model prediction, too.\n",
-            "ocrd-tool.json": "{\n  \"git_url\": \"https://github.com/kba/ocrd_calamari\",\n  \"version\": \"0.0.1\",\n  \"tools\": {\n    \"ocrd-calamari-recognize\": {\n      \"executable\": \"ocrd-calamari-recognize\",\n      \"categories\": [\n        \"Text recognition and optimization\"\n      ],\n      \"steps\": [\n        \"recognition/text-recognition\"\n      ],\n      \"description\": \"Recognize lines with Calamari\",\n      \"input_file_grp\": [\n        \"OCR-D-SEG-LINE\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-OCR-CALAMARI\"\n      ],\n      \"parameters\": {\n        \"checkpoint\": {\"type\": \"string\", \"format\": \"file\", \"cacheable\": true},\n        \"voter\": {\"type\": \"string\", \"default\": \"confidence_voter_default_ctc\"}\n      }\n    }\n  }\n}\n",
+            "ocrd-tool.json": "{\n  \"git_url\": \"https://github.com/kba/ocrd_calamari\",\n  \"version\": \"0.0.1\",\n  \"tools\": {\n    \"ocrd-calamari-recognize\": {\n      \"executable\": \"ocrd-calamari-recognize\",\n      \"categories\": [\n        \"Text recognition and optimization\"\n      ],\n      \"steps\": [\n        \"recognition/text-recognition\"\n      ],\n      \"description\": \"Recognize lines with Calamari\",\n      \"input_file_grp\": [\n        \"OCR-D-SEG-LINE\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-OCR-CALAMARI\"\n      ],\n      \"parameters\": {\n        \"checkpoint\": {\n          \"description\": \"The calamari model files (*.ckpt.json)\",\n          \"type\": \"string\", \"format\": \"file\", \"cacheable\": true\n        },\n        \"voter\": {\n          \"description\": \"The voting algorithm to use\",\n          \"type\": \"string\", \"default\": \"confidence_voter_default_ctc\"\n        }\n      }\n    }\n  }\n}\n",
             "setup.py": "# -*- coding: utf-8 -*-\nfrom pathlib import Path\n\nfrom setuptools import setup, find_packages\n\nsetup(\n    name='ocrd_calamari',\n    version='0.0.1',\n    description='Calamari bindings',\n    long_description=Path('README.md').read_text(),\n    long_description_content_type='text/markdown',\n    author='Konstantin Baierer, Mike Gerber',\n    author_email='unixprog@gmail.com, mike.gerber@sbb.spk-berlin.de',\n    url='https://github.com/kba/ocrd_calamari',\n    license='Apache License 2.0',\n    packages=find_packages(exclude=('tests', 'docs')),\n    install_requires=Path('requirements.txt').read_text().split('\\n'),\n    package_data={\n        '': ['*.json', '*.yml', '*.yaml'],\n    },\n    entry_points={\n        'console_scripts': [\n            'ocrd-calamari-recognize=ocrd_calamari.cli:ocrd_calamari_recognize',\n        ]\n    },\n)\n"
         },
         "git": {
-            "last_commit": "Thu Oct 31 17:28:36 2019 +0100",
+            "last_commit": "Wed Nov 6 18:47:36 2019 +0100",
             "latest_tag": "",
-            "number_of_commits": "29",
-            "url": "https://github.com/OCR-D/ocrd_calamari.git"
+            "number_of_commits": "31",
+            "url": "https://github.com/kba/ocrd_calamari"
         },
         "name": "ocrd_calamari",
         "ocrd_tool": {
@@ -154,11 +157,13 @@
                     "parameters": {
                         "checkpoint": {
                             "cacheable": true,
+                            "description": "The calamari model files (*.ckpt.json)",
                             "format": "file",
                             "type": "string"
                         },
                         "voter": {
                             "default": "confidence_voter_default_ctc",
+                            "description": "The voting algorithm to use",
                             "type": "string"
                         }
                     },
@@ -169,7 +174,7 @@
             },
             "version": "0.0.1"
         },
-        "ocrd_tool_validate": "<report valid=\"false\">\n  <error>[tools.ocrd-calamari-recognize.parameters.checkpoint] 'description' is a required property</error>\n  <error>[tools.ocrd-calamari-recognize.parameters.voter] 'description' is a required property</error>\n</report>",
+        "ocrd_tool_validate": "<report valid=\"true\">\n</report>",
         "official": false,
         "org_plus_name": "OCR-D/ocrd_calamari",
         "python": {
@@ -301,6 +306,7 @@
         "url": "https://github.com/OCR-D/ocrd_calamari"
     },
     {
+        "compliant_cli": true,
         "files": {
             "Dockerfile": "FROM ocrd/core:edge\nMAINTAINER OCR-D\nENV DEBIAN_FRONTEND noninteractive\n\nWORKDIR /build\nCOPY ocrd-im6convert .\nCOPY ocrd-tool.json .\nCOPY Makefile .\n\nRUN apt-get update && \\\n    apt-get -y install --no-install-recommends \\\n    ca-certificates \\\n    make \\\n    imagemagick\n\nRUN make install PREFIX=/usr/local\n\nENTRYPOINT [\"/usr/local/bin/ocrd-im6convert\"]\n",
             "README.md": "# ocrd_imageconvert/\n\n> Thin wrapper around convert(1)\n\n## Introduction\n\n```sh\n# Actual conversion\nconvert \"$infile\" \"$outfile\"\n```\n### What it could do\n\n[One or more of these](http://www.fmwconcepts.com/imagemagick/textcleaner/index.php) or\n[these](http://web.archive.org/web/20110517204536/http://www.ict.griffith.edu.au/anthony/graphics/imagick6/quantize/)\nor convert to grayscale, binarize etc. With threshold configurable as a\nparameter.\n\n## Installation\n\n```\nmake install\n```\n\n## Usage\n...\n\n## Testing\n\nNone yet\n",
@@ -354,6 +360,7 @@
         "url": "https://github.com/OCR-D/ocrd_im6convert"
     },
     {
+        "compliant_cli": false,
         "files": {
             "Dockerfile": null,
             "README.md": "# ocrd_keraslm\n    character-level language modelling using Keras\n\n\n## Introduction\n\nThis is a tool for statistical _language modelling_ (predicting text from context) with recurrent neural networks. It models probabilities not on the word level but the _character level_ so as to allow open vocabulary processing (avoiding morphology, historic orthography and word segmentation problems). It manages a vocabulary of mapped characters, which can be easily extended by training on more text. Above that, unmapped characters are treated with underspecification.\n\nIn addition to character sequences, (meta-data) context variables can be configured as extra input. \n\n### Architecture\n\nThe model consists of:\n\n0. an input layer: characters are represented as indexes from the vocabulary mapping, in windows of a number `length` of characters,\n1. a character embedding layer: window sequences are converted into dense vectors by looking up the indexes in an embedding weight matrix,\n2. a context embedding layer: context variables are converted into dense vectors by looking up the indexes in an embedding weight matrix, \n3. character and context vector sequences are concatenated,\n4. a number `depth` of hidden layers: each with a number `width` of hidden recurrent units of _LSTM cells_ (Long Short-term Memory) connected on top of each other,\n5. an output layer derived from the transposed character embedding matrix (weight tying): hidden activations are projected linearly to vectors of dimensionality equal to the character vocabulary size, then softmax is applied returning a probability for each possible value of the next character, respectively.\n\n![model graph depiction](model-graph.png \"graph with 1 context variable\")\n\nThe model is trained by feeding windows of text in index representation to the input layer, calculating output and comparing it to the same text shifted backward by 1 character, and represented as unit vectors (\"one-hot coding\") as target. The loss is calculated as the (unweighted) cross-entropy between target and output. Backpropagation yields error gradients for each layer, which is used to iteratively update the weights (stochastic gradient descent).\n\nThis is implemented in [Keras](https://keras.io) with [Tensorflow](https://www.tensorflow.org/) as backend. It automatically uses a fast CUDA-optimized LSTM implementation (Nividia GPU and Tensorflow installation with GPU support, see below), both in learning and in prediction phase, if available.\n\n\n### Modes of operation\n\nNotably, this model (by default) runs _statefully_, i.e. by implicitly passing hidden state from one window (batch of samples) to the next. That way, the context available for predictions can be arbitrarily long (above `length`, e.g. the complete document up to that point), or short (below `length`, e.g. at the start of a text). (However, this is a passive perspective above `length`, because errors are never back-propagated any further in time during gradient-descent training.) This is favourable to stateless mode because all characters can be output in parallel, and no partial windows need to be presented during training (which slows down).\n\nBesides stateful mode, the model can also be run _incrementally_, i.e. by explicitly passing hidden state from the caller. That way, multiple alternative hypotheses can be processed together. This is used for generation (sampling from the model) and alternative decoding (finding the best path through a sequence of alternatives).\n\n### Context conditioning\n\nEvery text has meta-data like time, author, text type, genre, production features (e.g. print vs typewriter vs digital born rich text, OCR version), language, structural element (e.g. title vs heading vs paragraph vs footer vs marginalia), font family (e.g. Antiqua vs Fraktura) and font shape (e.g. bold vs letter-spaced vs italic vs normal) etc. \n\nThis information (however noisy) can be very useful to facilitate stochastic modelling, since language has an extreme diversity and complexity. To that end, models can be conditioned on extra inputs here, termed _context variables_. The model learns to represent these high-dimensional discrete values as low-dimensional continuous vectors (embeddings), also entering the recurrent hidden layers (as a form of simple additive adaptation).\n\n### Underspecification\n\nIndex zero is reserved for unmapped characters (unseen contexts). During training, its embedding vector is regularised to occupy a center position of all mapped characters (all other contexts), and the hidden layers get to see it every now and then by random degradation. At runtime, therefore, some unknown character (some unknown context) represented as zero does not disturb follow-up predictions too much.\n\n\n## Installation\n\nRequired Ubuntu packages:\n\n* Python (``python`` or ``python3``)\n* pip (``python-pip`` or ``python3-pip``)\n* virtualenv (``python-virtualenv`` or ``python3-virtualenv``)\n\nCreate and activate a virtualenv as usual.\n\nIf you need a custom version of ``keras`` or ``tensorflow`` (like [GPU support](https://www.tensorflow.org/install/install_sources)), install them via `pip` now.\n\nTo install Python dependencies and this module, then do:\n```shell\nmake deps install\n```\nWhich is the equivalent of:\n```shell\npip install -r requirements.txt\npip install -e .\n```\n\nUseful environment variables are:\n- ``TF_CPP_MIN_LOG_LEVEL`` (set to `1` to suppress most of Tensorflow's messages\n- ``CUDA_VISIBLE_DEVICES`` (set empty to force CPU even in a GPU installation)\n\n\n## Usage\n\nThis packages has two user interfaces:\n\n### command line interface `keraslm-rate`\n\nTo be used with string arguments and plain-text files.\n\n```shell\nUsage: keraslm-rate [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n  --help  Show this message and exit.\n\nCommands:\n  train                           train a language model\n  test                            get overall perplexity from language model\n  apply                           get individual probabilities from language model\n  generate                        sample characters from language model\n  print-charset                   Print the mapped characters\n  prune-charset                   Delete one character from mapping\n  plot-char-embeddings-similarity\n                                  Paint a heat map of character embeddings\n  plot-context-embeddings-similarity\n                                  Paint a heat map of context embeddings\n  plot-context-embeddings-projection\n                                  Paint a 2-d PCA projection of context embeddings\n```\n\nExamples:\n```shell\nkeraslm-rate train --width 64 --depth 4 --length 256 --model model_dta_64_4_256.h5 dta_komplett_2017-09-01/txt/*.tcf.txt\nkeraslm-rate generate -m model_dta_64_4_256.h5 --number 6 \"f\u00fcr die Wi\u017f\u017fen\"\nkeraslm-rate apply -m model_dta_64_4_256.h5 \"so sch\u00e4dlich ist es Borkickheile zu pflanzen\"\nkeraslm-rate test -m model_dta_64_4_256.h5 dta_komplett_2017-09-01/txt/grimm_*.tcf.txt\n```\n\n### [OCR-D processor](https://github.com/OCR-D/core) interface `ocrd-keraslm-rate`\n\nTo be used with [PageXML](https://www.primaresearch.org/tools/PAGELibraries) documents in an [OCR-D](https://github.com/OCR-D/spec/) annotation workflow. Input could be anything with a textual annotation (`TextEquiv` on the given `textequiv_level`). The LM rater could be used for both quality control (without alternative decoding, using only each first index `TextEquiv`) and part of post-correction (with `alternative_decoding=True`, finding the best path among `TextEquiv` indexes).\n\n```json\n  \"tools\": {\n    \"ocrd-keraslm-rate\": {\n      \"executable\": \"ocrd-keraslm-rate\",\n      \"categories\": [\n        \"Text recognition and optimization\"\n      ],\n      \"steps\": [\n        \"recognition/text-recognition\"\n      ],\n      \"description\": \"Rate elements of the text with a character-level LSTM language model in Keras\",\n      \"input_file_grp\": [\n        \"OCR-D-OCR-TESS\",\n        \"OCR-D-OCR-KRAK\",\n        \"OCR-D-OCR-OCRO\",\n        \"OCR-D-OCR-CALA\",\n        \"OCR-D-OCR-ANY\",\n        \"OCR-D-COR-CIS\",\n        \"OCR-D-COR-ASV\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-COR-LM\"\n      ],\n      \"parameters\": {\n        \"model_file\": {\n          \"type\": \"string\",\n          \"format\": \"uri\",\n          \"content-type\": \"application/x-hdf;subtype=bag\",\n          \"description\": \"path of h5py weight/config file for model trained with keraslm\",\n          \"required\": true,\n          \"cacheable\": true\n        },\n        \"textequiv_level\": {\n          \"type\": \"string\",\n          \"enum\": [\"region\", \"line\", \"word\", \"glyph\"],\n          \"default\": \"glyph\",\n          \"description\": \"PAGE XML hierarchy level to evaluate TextEquiv sequences on\"\n        },\n        \"alternative_decoding\": {\n          \"type\": \"boolean\",\n          \"description\": \"whether to process all TextEquiv alternatives, finding the best path via beam search, and delete each non-best alternative\",\n          \"default\": true\n        },\n        \"beam_width\": {\n          \"type\": \"number\",\n          \"format\": \"integer\",\n          \"description\": \"maximum number of best partial paths to consider during search with alternative_decoding\",\n          \"default\": 100\n        }\n      }\n    }\n  }\n```\n\nExamples:\n```shell\nmake deps-test # installs ocrd_tesserocr\nmake test/assets # downloads GT, imports PageXML, builds workspaces\nocrd workspace clone -a test/assets/kant_aufklaerung_1784/mets.xml ws1\ncd ws1\nocrd-tesserocr-segment-region -I OCR-D-IMG -O OCR-D-SEG-BLOCK\nocrd-tesserocr-segment-line -I OCR-D-SEG-BLOCK -O OCR-D-SEG-LINE\nocrd-tesserocr-recognize -I OCR-D-SEG-LINE -O OCR-D-OCR-TESS-WORD -p '{ \"textequiv_level\" : \"word\", \"model\" : \"Fraktur\" }'\nocrd-tesserocr-recognize -I OCR-D-SEG-LINE -O OCR-D-OCR-TESS-GLYPH -p '{ \"textequiv_level\" : \"glyph\", \"model\" : \"deu-frak\" }'\n# get confidences and perplexity:\nocrd-keraslm-rate -I OCR-D-OCR-TESS-WORD -O OCR-D-OCR-LM-WORD -p '{ \"model_file\": \"model_dta_64_4_256.h5\", \"textequiv_level\": \"word\", \"alternative_decoding\": false }'\n# also get best path:\nocrd-keraslm-rate -I OCR-D-OCR-TESS-GLYPH -O OCR-D-OCR-LM-GLYPH -p '{ \"model_file\": \"model_dta_64_4_256.h5\", \"textequiv_level\": \"glyph\", \"alternative_decoding\": true, \"beam_width\": 10 }'\n```\n\n## Testing\n\n```shell\nmake deps-test test\n```\nWhich is the equivalent of:\n```shell\npip install -r requirements_test.txt\ntest -e test/assets || test/prepare_gt.bash test/assets\ntest -f model_dta_test.h5 || keraslm-rate train -m model_dta_test.h5 test/assets/*.txt\nkeraslm-rate test -m model_dta_test.h5 test/assets/*.txt\npython -m pytest test $(PYTEST_ARGS)\n```\n\nSet `PYTEST_ARGS=\"-s --verbose\"` to see log output (`-s`) and individual test results (`--verbose`).\n",
@@ -362,9 +369,9 @@
         },
         "git": {
             "last_commit": "Sat Oct 26 01:06:39 2019 +0200",
-            "latest_tag": "0.3.1",
+            "latest_tag": "",
             "number_of_commits": "84",
-            "url": "https://github.com/OCR-D/ocrd_keraslm.git"
+            "url": "https://github.com/OCR-D/ocrd_keraslm"
         },
         "name": "ocrd_keraslm",
         "ocrd_tool": {
@@ -568,6 +575,7 @@
         "url": "https://github.com/OCR-D/ocrd_keraslm"
     },
     {
+        "compliant_cli": false,
         "files": {
             "Dockerfile": "FROM ocrd/core\nMAINTAINER OCR-D\nENV DEBIAN_FRONTEND noninteractive\nENV PYTHONIOENCODING utf8\nENV LC_ALL C.UTF-8\nENV LANG C.UTF-8\n\nWORKDIR /build-ocrd\nCOPY setup.py .\nCOPY requirements.txt .\nRUN apt-get update && \\\n    apt-get -y install --no-install-recommends \\\n    ca-certificates \\\n    make \\\n    git\nCOPY ocrd_kraken ./ocrd_kraken\nRUN pip3 install --upgrade pip\nRUN pip3 install .\n\nENTRYPOINT [\"/bin/sh\", \"-c\"]\n",
             "README.md": "# ocrd_kraken\n\n> Wrapper for the kraken OCR engine\n\n[![image](https://travis-ci.org/OCR-D/ocrd_kraken.svg?branch=master)](https://travis-ci.org/OCR-D/ocrd_kraken)\n[![Docker Automated build](https://img.shields.io/docker/automated/ocrd/kraken.svg)](https://hub.docker.com/r/ocrd/kraken/tags/)\n[![image](https://circleci.com/gh/OCR-D/ocrd_kraken.svg?style=svg)](https://circleci.com/gh/OCR-D/ocrd_kraken)\n",
@@ -578,7 +586,7 @@
             "last_commit": "Mon Oct 21 20:52:26 2019 +0200",
             "latest_tag": "v0.1.1",
             "number_of_commits": "85",
-            "url": "https://github.com/OCR-D/ocrd_kraken.git"
+            "url": "https://github.com/OCR-D/ocrd_kraken"
         },
         "name": "ocrd_kraken",
         "ocrd_tool": {
@@ -897,6 +905,7 @@
         "url": "https://github.com/OCR-D/ocrd_kraken"
     },
     {
+        "compliant_cli": false,
         "files": {
             "Dockerfile": "FROM ocrd/core\nMAINTAINER OCR-D\nENV DEBIAN_FRONTEND noninteractive\nENV PYTHONIOENCODING utf8\nENV LC_ALL C.UTF-8\nENV LANG C.UTF-8\n\nWORKDIR /build-ocrd\nCOPY setup.py .\nCOPY requirements.txt .\nCOPY README.md .\nRUN apt-get update && \\\n    apt-get -y install --no-install-recommends \\\n    ca-certificates \\\n    make \\\n    git\nCOPY ocrd_ocropy ./ocrd_ocropy\nRUN pip3 install --upgrade pip\nRUN make deps install\n\nENTRYPOINT [\"/bin/sh\", \"-c\"]\n",
             "README.md": "# ocrd_ocropy\n\n[![image](https://travis-ci.org/OCR-D/ocrd_ocropy.svg?branch=master)](https://travis-ci.org/OCR-D/ocrd_ocropy)\n\n[![Docker Automated build](https://img.shields.io/docker/automated/ocrd/ocropy.svg)](https://hub.docker.com/r/ocrd/ocropy/tags/)\n\n> Wrapper for the ocropy OCR engine\n",
@@ -907,7 +916,7 @@
             "last_commit": "Tue Jun 11 14:51:00 2019 +0200",
             "latest_tag": "v0.0.3",
             "number_of_commits": "66",
-            "url": "https://github.com/OCR-D/ocrd_ocropy.git"
+            "url": "https://github.com/kba/ocrd_ocropy"
         },
         "name": "ocrd_ocropy",
         "ocrd_tool": {
@@ -1204,6 +1213,7 @@
         "url": "https://github.com/OCR-D/ocrd_ocropy"
     },
     {
+        "compliant_cli": true,
         "files": {
             "Dockerfile": null,
             "README.md": "# ocrd_olena\n\n> Bundle olena as an OCR-D tool\n\n[![Build Status](https://travis-ci.org/OCR-D/ocrd_olena.svg?branch=master)](https://travis-ci.org/OCR-D/ocrd_olena)\n\n## Requirements\n\n```\nmake deps-ubuntu\n```\n\n...will try to install the required packages on Ubuntu.\n\n## Installation\n\n```\nmake install\n```\n\n...will download, patch and build olena/scribo from source, and install locally (in a path relative to the CWD).\n\n## Testing\n\n```\nmake test\n```\n\n...will clone the assets repository from Github, make a workspace copy, and run checksum tests for binarization on them.\n\n## Usage\n\nThis package has the following user interfaces:\n\n### [OCR-D processor](https://github.com/OCR-D/core) interface `ocrd-olena-binarize`\n\nTo be used with [PageXML](https://www.primaresearch.org/tools/PAGELibraries) documents in an [OCR-D](https://github.com/OCR-D/spec/) annotation workflow. Input could be any valid workspace with source images available. Currently covers the `Page` hierarchy level only. Uses either (the last) `AlternativeImage`, if any, or `imageFilename`, otherwise. Adds an `AlternativeImage` with the result of binarization for every page.\n\n```json\n    \"ocrd-olena-binarize\": {\n      \"executable\": \"ocrd-olena-binarize\",\n      \"description\": \"OLENA's binarization algos for OCR-D (on page-level)\",\n      \"categories\": [\n        \"Image preprocessing\"\n      ],\n      \"steps\": [\n        \"preprocessing/optimization/binarization\"\n      ],\n      \"input_file_grp\": [\n        \"OCR-D-SEG-BLOCK\",\n        \"OCR-D-SEG-LINE\",\n        \"OCR-D-SEG-WORD\",\n        \"OCR-D-IMG\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-SEG-BLOCK\",\n        \"OCR-D-SEG-LINE\",\n        \"OCR-D-SEG-WORD\"\n      ],\n      \"parameters\": {\n        \"impl\": {\n          \"description\": \"The name of the actual binarization algorithm\",\n          \"type\": \"string\",\n          \"required\": true,\n          \"enum\": [\"sauvola\", \"sauvola-ms\", \"sauvola-ms-fg\", \"sauvola-ms-split\", \"kim\", \"wolf\", \"niblack\", \"singh\", \"otsu\"]\n        },\n        \"win-size\": {\n          \"description\": \"Window size\",\n          \"type\": \"number\",\n          \"format\": \"integer\",\n          \"default\": 101\n        },\n        \"k\": {\n          \"description\": \"Sauvola's formulae parameter\",\n          \"format\": \"float\",\n          \"type\": \"number\",\n          \"default\": 0.34\n        }\n      }\n    }\n```\n",
@@ -1211,10 +1221,10 @@
             "setup.py": null
         },
         "git": {
-            "last_commit": "Thu Oct 24 12:18:12 2019 +0200",
+            "last_commit": "Mon Sep 9 22:21:57 2019 +0200",
             "latest_tag": "",
-            "number_of_commits": "60",
-            "url": "https://github.com/OCR-D/ocrd_olena.git"
+            "number_of_commits": "47",
+            "url": "https://github.com/kba/ocrd_olena"
         },
         "name": "ocrd_olena",
         "ocrd_tool": {
@@ -1280,6 +1290,7 @@
         "url": "https://github.com/OCR-D/ocrd_olena"
     },
     {
+        "compliant_cli": true,
         "files": {
             "Dockerfile": null,
             "README.md": "# ocrd_segment\n\nThis repository aims to provide a number of OCR-D-compliant processors for layout analysis and evaluation.\n\n  - pattern-based segmentation aka. `ocrd-segment-via-template` (input file groups N=1, based on a PAGE template, e.g. from Aletheia, and some XSLT or Python to apply it to the input file group)\n  - data-driven segmentation aka. `ocrd-segment-via-model` (input file groups N=1, based on a statistical model, e.g. Neural Network)\n  - comparing different layout segmentations aka. `ocrd-segment-evaluate` (input file groups N = 2, compute the distance between two segmentations, e.g. automatic vs. manual)\n  - repairing of layout segmentations aka. `ocrd-segment-repair` (input file groups N >= 1, based on heuristics implemented using Shapely)\n",
@@ -1289,8 +1300,8 @@
         "git": {
             "last_commit": "Wed Oct 30 10:34:06 2019 +0100",
             "latest_tag": "",
-            "number_of_commits": "37",
-            "url": "https://github.com/OCR-D/ocrd_segment.git"
+            "number_of_commits": "36",
+            "url": "https://github.com/OCR-D/ocrd_segment"
         },
         "name": "ocrd_segment",
         "ocrd_tool": {
@@ -1404,17 +1415,18 @@
         "url": "https://github.com/OCR-D/ocrd_segment"
     },
     {
+        "compliant_cli": true,
         "files": {
-            "Dockerfile": "FROM ocrd/core\nMAINTAINER OCR-D\nENV DEBIAN_FRONTEND noninteractive\nENV PYTHONIOENCODING utf8\nENV LC_ALL C.UTF-8\nENV LANG C.UTF-8\n\nWORKDIR /build-ocrd\nCOPY setup.py .\nCOPY requirements.txt .\nCOPY requirements_test.txt .\nCOPY README.md .\nCOPY LICENSE .\nRUN apt-get update && \\\n    apt-get -y install --no-install-recommends \\\n    ca-certificates \\\n    make \\\n    git\nCOPY Makefile .\nRUN make deps-ubuntu\nCOPY ocrd_tesserocr ./ocrd_tesserocr\nRUN pip3 install --upgrade pip\nRUN make PYTHON=python3 PIP=pip3 deps install\nCOPY test ./test\nRUN make PYTHON=python3 PIP=pip3 deps-test\n\nENTRYPOINT [\"/bin/sh\", \"-c\"]\n",
-            "README.md": "# ocrd_tesserocr\n\n> Crop, deskew, segment into regions / lines / words, or recognize with tesserocr\n\n[![image](https://circleci.com/gh/OCR-D/ocrd_tesserocr.svg?style=svg)](https://circleci.com/gh/OCR-D/ocrd_tesserocr)\n[![image](https://img.shields.io/pypi/v/ocrd_tesserocr.svg)](https://pypi.org/project/ocrd_tesserocr/)\n[![image](https://codecov.io/gh/OCR-D/ocrd_tesserocr/branch/master/graph/badge.svg)](https://codecov.io/gh/OCR-D/ocrd_tesserocr)\n[![Docker Automated build](https://img.shields.io/docker/automated/ocrd/tesserocr.svg)](https://hub.docker.com/r/ocrd/tesserocr/tags/)\n\n## Introduction\n\nThis offers [OCR-D](https://ocr-d.github.io) compliant workspace processors for (much of) the functionality of [Tesseract](https://github.com/tesseract-ocr) via its Python API wrapper [tesserocr](https://github.com/sirfz/tesserocr) . (Each processor is a step in the OCR-D functional model, and can be replaced with an alternative implementation. Data is represented within METS/PAGE.)\n\nThis includes image preprocessing (cropping, binarization, deskewing), layout analysis (region, line, word segmentation) and OCR proper. Most processors can operate on different levels of the PAGE hierarchy, depending on the workflow configuration. Image results are referenced (read and written) via `AlternativeImage`, text results via `TextEquiv`, deskewing via `@orientation`, cropping via `Border` and segmentation via `Region` / `TextLine` / `Word` elements with `Coords/@points`.\n\n## Installation\n\nRequired ubuntu packages:\n\n- Tesseract headers (`libtesseract-dev`)\n- Some tesseract language models (`tesseract-ocr-{eng,deu,frk,...}` or script models (`tesseract-ocr-script-{latn,frak,...}`)\n- Leptonica headers (`libleptonica-dev`)\n\nRun:\n\n```sh\nmake deps-ubuntu # or manually\nmake deps # or pip install -r requirements\nmake install # or pip install .\n```\n\n## Usage\n\nSee docstrings and in the individual processors and [ocrd-tool.json](ocrd_tesserocr/ocrd-tool.json) descriptions.\n\nAvailable processors are:\n\n- [ocrd-tesserocr-crop](ocrd_tesserocr/crop.py)\n- [ocrd-tesserocr-deskew](ocrd_tesserocr/deskew.py)\n- [ocrd-tesserocr-binarize](ocrd_tesserocr/binarize.py)\n- [ocrd-tesserocr-segment-region](ocrd_tesserocr/segment_region.py)\n- [ocrd-tesserocr-segment-line](ocrd_tesserocr/segment_line.py)\n- [ocrd-tesserocr-segment-word](ocrd_tesserocr/segment_word.py)\n- [ocrd-tesserocr-recognize](ocrd_tesserocr/recognize.py)\n\n## Testing\n\n```sh\nmake test\n```\n\nThis downloads some test data from https://github.com/OCR-D/assets under `repo/assets`, and runs some basic test of the Python API as well as the CLIs.\n\nSet `PYTEST_ARGS=\"-s --verbose\"` to see log output (`-s`) and individual test results (`--verbose`).\n\n## Development\n\nLatest changes that require pre-release of [ocrd >= 2.0.0](https://github.com/OCR-D/core/tree/edge) are kept in branch [`edge`](https://github.com/OCR-D/ocrd_tesserocr/tree/edge).\n",
-            "ocrd-tool.json": "{\n  \"version\": \"0.3.0\",\n  \"git_url\": \"https://github.com/OCR-D/ocrd_tesserocr\",\n  \"dockerhub\": \"ocrd/tesserocr\",\n  \"tools\": {\n    \"ocrd-tesserocr-deskew\": {\n      \"executable\": \"ocrd-tesserocr-deskew\",\n      \"categories\": [\"Image preprocessing\"],\n      \"description\": \"Deskew pages or regions\",\n      \"input_file_grp\": [\n        \"OCR-D-IMG\",\n        \"OCR-D-SEG-BLOCK\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-DESKEW-BLOCK\"\n      ],\n      \"steps\": [\"preprocessing/optimization/deskewing\"],\n      \"parameters\": {\n        \"operation_level\": {\n          \"type\": \"string\",\n          \"enum\": [\"page\",\"region\"],\n          \"default\": \"region\",\n          \"description\": \"PAGE XML hierarchy level to operate on\"\n        }\n      }\n    },\n    \"ocrd-tesserocr-recognize\": {\n      \"executable\": \"ocrd-tesserocr-recognize\",\n      \"categories\": [\"Text recognition and optimization\"],\n      \"description\": \"Recognize text in lines with tesseract\",\n      \"input_file_grp\": [\n        \"OCR-D-SEG-BLOCK\",\n        \"OCR-D-SEG-LINE\",\n        \"OCR-D-SEG-WORD\",\n        \"OCR-D-SEG-GLYPH\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-OCR-TESS\"\n      ],\n      \"steps\": [\"recognition/text-recognition\"],\n      \"parameters\": {\n        \"textequiv_level\": {\n          \"type\": \"string\",\n          \"enum\": [\"region\", \"line\", \"word\", \"glyph\"],\n          \"default\": \"line\",\n          \"description\": \"PAGE XML hierarchy level to add the TextEquiv results to (requires existing layout annotation up to one level above that)\"\n        },\n        \"overwrite_words\": {\n          \"type\": \"boolean\",\n          \"default\": false,\n          \"description\": \"remove existing layout and text annotation below the TextLine level (regardless of textequiv_level)\"\n        },\n        \"model\": {\n          \"type\": \"string\",\n          \"description\": \"tessdata model to apply (an ISO 639-3 language specification or some other basename, e.g. deu-frak or Fraktur)\"\n        }\n      }\n    },\n     \"ocrd-tesserocr-segment-region\": {\n      \"executable\": \"ocrd-tesserocr-segment-region\",\n      \"categories\": [\"Layout analysis\"],\n      \"description\": \"Segment regions into lines with tesseract\",\n      \"input_file_grp\": [\n        \"OCR-D-IMG\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-SEG-BLOCK\"\n      ],\n      \"steps\": [\"layout/segmentation/region\"],\n      \"parameters\": {\n        \"overwrite_regions\": {\n          \"type\": \"boolean\",\n          \"default\": true,\n          \"description\": \"remove existing layout and text annotation below the Page level\"\n        },\n        \"padding\": {\n          \"type\": \"number\",\n          \"format\": \"integer\",\n          \"description\": \"extend detected region rectangles by this many (true) pixels\",\n          \"default\": 8\n        },\n        \"crop_polygons\": {\n          \"type\": \"boolean\",\n          \"default\": false,\n          \"description\": \"annotate polygon coordinates instead of rectangles, and create cropped AlternativeImage masked by the polygon outlines\"\n        },\n        \"find_tables\": {\n          \"type\": \"boolean\",\n          \"default\": true,\n          \"description\": \"recognise table regions (textord_tabfind_find_tables)\"\n        }\n      }\n    },\n    \"ocrd-tesserocr-segment-line\": {\n      \"executable\": \"ocrd-tesserocr-segment-line\",\n      \"categories\": [\"Layout analysis\"],\n      \"description\": \"Segment page into regions with tesseract\",\n      \"input_file_grp\": [\n        \"OCR-D-SEG-BLOCK\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-SEG-LINE\"\n      ],\n      \"steps\": [\"layout/segmentation/line\"],\n      \"parameters\": {\n        \"overwrite_lines\": {\n          \"type\": \"boolean\",\n          \"default\": true,\n          \"description\": \"remove existing layout and text annotation below the TextRegion level\"\n        }\n      }\n    },\n    \"ocrd-tesserocr-segment-word\": {\n      \"executable\": \"ocrd-tesserocr-segment-word\",\n      \"categories\": [\"Layout analysis\"],\n      \"description\": \"Segment lines into words with tesseract\",\n      \"input_file_grp\": [\n        \"OCR-D-SEG-LINE\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-SEG-WORD\"\n      ],\n      \"steps\": [\"layout/segmentation/word\"],\n      \"parameters\": {\n        \"overwrite_words\": {\n          \"type\": \"boolean\",\n          \"default\": true,\n          \"description\": \"remove existing layout and text annotation below the TextLine level\"\n        }\n      }\n    },\n    \"ocrd-tesserocr-crop\": {\n      \"executable\": \"ocrd-tesserocr-crop\",\n      \"categories\": [\"Image preprocessing\"],\n      \"description\": \"Poor man's cropping with tesseract\",\n      \"input_file_grp\": [\n\t\"OCR-D-IMG\"\n      ],\n      \"output_file_grp\": [\n\t\"OCR-D-IMG-CROPPED\"\n      ],\n      \"steps\": [\"preprocessing/optimization/cropping\"],\n      \"parameters\" : {\n        \"padding\": {\n          \"type\": \"number\",\n          \"format\": \"integer\",\n          \"description\": \"extend detected border by this many (true) pixels on every side\",\n          \"default\": 4\n        }\n      }\n    },\n    \"ocrd-tesserocr-binarize\": {\n      \"executable\": \"ocrd-tesserocr-binarize\",\n      \"categories\": [\"Image preprocessing\"],\n      \"description\": \"Binarize regions or lines\",\n      \"input_file_grp\": [\n        \"OCR-D-IMG\",\n        \"OCR-D-SEG-BLOCK\",\n        \"OCR-D-SEG-LINE\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-BIN-BLOCK\",\n        \"OCR-D-BIN-LINE\"\n      ],\n      \"steps\": [\"preprocessing/optimization/binarization\"],\n      \"parameters\": {\n        \"operation_level\": {\n          \"type\": \"string\",\n          \"enum\": [\"region\", \"line\"],\n          \"default\": \"region\",\n          \"description\": \"PAGE XML hierarchy level to operate on\"\n        }\n      }\n    }\n  }\n}\n",
-            "setup.py": "# -*- coding: utf-8 -*-\n\"\"\"\nInstalls five executables:\n\n    - ocrd_tesserocr_recognize\n    - ocrd_tesserocr_segment_region\n    - ocrd_tesserocr_segment_line\n    - ocrd_tesserocr_segment_word\n    - ocrd_tesserocr_crop\n    - ocrd_tesserocr_deskew\n    - ocrd_tesserocr_binarize\n\"\"\"\nimport codecs\n\nfrom setuptools import setup, find_packages\n\nsetup(\n    name='ocrd_tesserocr',\n    version='0.4.1',\n    description='Tesserocr bindings',\n    long_description=codecs.open('README.md', encoding='utf-8').read(),\n    long_description_content_type='text/markdown',\n    author='Konstantin Baierer, Kay-Michael W\u00fcrzner, Robert Sachunsky',\n    author_email='unixprog@gmail.com, wuerzner@gmail.com, sachunsky@informatik.uni-leipzig.de',\n    url='https://github.com/OCR-D/ocrd_tesserocr',\n    license='Apache License 2.0',\n    packages=find_packages(exclude=('tests', 'docs')),\n    install_requires=open('requirements.txt').read().split('\\n'),\n    package_data={\n        '': ['*.json', '*.yml', '*.yaml'],\n    },\n    entry_points={\n        'console_scripts': [\n            'ocrd-tesserocr-recognize=ocrd_tesserocr.cli:ocrd_tesserocr_recognize',\n            'ocrd-tesserocr-segment-region=ocrd_tesserocr.cli:ocrd_tesserocr_segment_region',\n            'ocrd-tesserocr-segment-line=ocrd_tesserocr.cli:ocrd_tesserocr_segment_line',\n            'ocrd-tesserocr-segment-word=ocrd_tesserocr.cli:ocrd_tesserocr_segment_word',\n            'ocrd-tesserocr-crop=ocrd_tesserocr.cli:ocrd_tesserocr_crop',\n            'ocrd-tesserocr-deskew=ocrd_tesserocr.cli:ocrd_tesserocr_deskew',\n            'ocrd-tesserocr-binarize=ocrd_tesserocr.cli:ocrd_tesserocr_binarize',\n        ]\n    },\n)\n"
+            "Dockerfile": "FROM ocrd/core\nMAINTAINER OCR-D\nENV DEBIAN_FRONTEND noninteractive\nENV PYTHONIOENCODING utf8\n\nWORKDIR /build-ocrd\nCOPY setup.py .\nCOPY README.md .\nCOPY requirements.txt .\nCOPY requirements_test.txt .\nCOPY ocrd_tesserocr ./ocrd_tesserocr\nCOPY Makefile .\nRUN apt-get update && \\\n    apt-get -y install --no-install-recommends \\\n    libtesseract-dev \\\n    tesseract-ocr \\\n    build-essential \\\n    && make deps install \\\n    && rm -rf /build-ocrd \\\n    && apt-get -y remove --auto-remove build-essential\n",
+            "README.md": "# ocrd_tesserocr\n\n> Crop, deskew, segment into regions / lines / words, or recognize with tesserocr\n\n[![image](https://circleci.com/gh/OCR-D/ocrd_tesserocr.svg?style=svg)](https://circleci.com/gh/OCR-D/ocrd_tesserocr)\n[![image](https://img.shields.io/pypi/v/ocrd_tesserocr.svg)](https://pypi.org/project/ocrd_tesserocr/)\n[![image](https://codecov.io/gh/OCR-D/ocrd_tesserocr/branch/master/graph/badge.svg)](https://codecov.io/gh/OCR-D/ocrd_tesserocr)\n[![Docker Automated build](https://img.shields.io/docker/automated/ocrd/tesserocr.svg)](https://hub.docker.com/r/ocrd/tesserocr/tags/)\n\n## Introduction\n\nThis offers [OCR-D](https://ocr-d.github.io) compliant workspace processors for (much of) the functionality of [Tesseract](https://github.com/tesseract-ocr) via its Python API wrapper [tesserocr](https://github.com/sirfz/tesserocr) . (Each processor is a step in the OCR-D functional model, and can be replaced with an alternative implementation. Data is represented within METS/PAGE.)\n\nThis includes image preprocessing (cropping, binarization, deskewing), layout analysis (region, line, word segmentation) and OCR proper. Most processors can operate on different levels of the PAGE hierarchy, depending on the workflow configuration. Image results are referenced (read and written) via `AlternativeImage`, text results via `TextEquiv`, deskewing via `@orientation`, cropping via `Border` and segmentation via `Region` / `TextLine` / `Word` elements with `Coords/@points`.\n\n## Installation\n\n### Required ubuntu packages:\n\n- Tesseract headers (`libtesseract-dev`)\n- Some tesseract language models (`tesseract-ocr-{eng,deu,frk,...}` or script models (`tesseract-ocr-script-{latn,frak,...}`)\n- Leptonica headers (`libleptonica-dev`)\n\n### From PyPI\n\nThis is the best option if you want to use the stable, released version.\n\n---\n\n**NOTE**\n\nocrd_tesserocr requires **Tesseract >= 4.1.0**. The Tesseract packages\nbundled with **Ubuntu < 19.10** are too old. If you are on Ubuntu 18.04 LTS,\nplease enable [Alexander Pozdnyakov PPA](https://launchpad.net/~alex-p/+archive/ubuntu/tesseract-ocr) which\nhas up-to-date builds of Tesseract and its dependencies:\n\n```sh\nsudo add-apt-repository ppa:alex-p/tesseract-ocr\nsudo apt-get update\n```\n\n---\n\n```sh\nsudo apt-get install git python3 python3-pip libtesseract-dev libleptonica-dev tesseract-ocr-eng tesseract-ocr wget\npip install ocrd_tesserocr\n```\n\n### With docker\n\nThis is the best option if you want to run the software in a container.\n\nYou need to have [Docker](https://docs.docker.com/install/linux/docker-ce/ubuntu/)\n\n```sh\ndocker pull ocrd/tesserocr\n```\n\n### From git \n\nThis is the best option if you want to change the source code or install the latest, unpublished changes.\n\nWe strongly recommend to use [venv](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/).\n\n```sh\ngit clone https://github.com/OCR-D/ocrd_tesserocr\ncd ocrd_tesserocr\nmake deps-ubuntu # or manually with apt-get\nmake deps        # or pip install -r requirements\nmake install     # or pip install .\n```\n\n## Usage\n\nSee docstrings and in the individual processors and [ocrd-tool.json](ocrd_tesserocr/ocrd-tool.json) descriptions.\n\nAvailable processors are:\n\n- [ocrd-tesserocr-crop](ocrd_tesserocr/crop.py)\n- [ocrd-tesserocr-deskew](ocrd_tesserocr/deskew.py)\n- [ocrd-tesserocr-binarize](ocrd_tesserocr/binarize.py)\n- [ocrd-tesserocr-segment-region](ocrd_tesserocr/segment_region.py)\n- [ocrd-tesserocr-segment-line](ocrd_tesserocr/segment_line.py)\n- [ocrd-tesserocr-segment-word](ocrd_tesserocr/segment_word.py)\n- [ocrd-tesserocr-recognize](ocrd_tesserocr/recognize.py)\n\n## Testing\n\nTo run with docker:\n\n```\ndocker run ocrd/tesserocr ocrd-tesserocrd-crop ...\n```\n\n## Testing\n\n```sh\nmake test\n```\n\nThis downloads some test data from https://github.com/OCR-D/assets under `repo/assets`, and runs some basic test of the Python API as well as the CLIs.\n\nSet `PYTEST_ARGS=\"-s --verbose\"` to see log output (`-s`) and individual test results (`--verbose`).\n\n## Development\n\nLatest changes that require pre-release of [ocrd >= 2.0.0](https://github.com/OCR-D/core/tree/edge) are kept in branch [`edge`](https://github.com/OCR-D/ocrd_tesserocr/tree/edge).\n",
+            "ocrd-tool.json": "{\n  \"version\": \"0.6.0\",\n  \"git_url\": \"https://github.com/OCR-D/ocrd_tesserocr\",\n  \"dockerhub\": \"ocrd/tesserocr\",\n  \"tools\": {\n    \"ocrd-tesserocr-deskew\": {\n      \"executable\": \"ocrd-tesserocr-deskew\",\n      \"categories\": [\"Image preprocessing\"],\n      \"description\": \"Detect script, orientation and skew angle for pages or regions\",\n      \"input_file_grp\": [\n        \"OCR-D-IMG\",\n        \"OCR-D-SEG-BLOCK\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-DESKEW-BLOCK\"\n      ],\n      \"steps\": [\"preprocessing/optimization/deskewing\"],\n      \"parameters\": {\n        \"operation_level\": {\n          \"type\": \"string\",\n          \"enum\": [\"page\",\"region\"],\n          \"default\": \"region\",\n          \"description\": \"PAGE XML hierarchy level to operate on\"\n        },\n        \"min_orientation_confidence\": {\n          \"type\": \"number\",\n          \"format\": \"float\",\n          \"default\": 1.5,\n          \"description\": \"Minimum confidence score to apply orientation as detected by OSD\"\n        }\n      }\n    },\n    \"ocrd-tesserocr-recognize\": {\n      \"executable\": \"ocrd-tesserocr-recognize\",\n      \"categories\": [\"Text recognition and optimization\"],\n      \"description\": \"Recognize text in lines with tesseract\",\n      \"input_file_grp\": [\n        \"OCR-D-SEG-BLOCK\",\n        \"OCR-D-SEG-LINE\",\n        \"OCR-D-SEG-WORD\",\n        \"OCR-D-SEG-GLYPH\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-OCR-TESS\"\n      ],\n      \"steps\": [\"recognition/text-recognition\"],\n      \"parameters\": {\n        \"textequiv_level\": {\n          \"type\": \"string\",\n          \"enum\": [\"region\", \"line\", \"word\", \"glyph\"],\n          \"default\": \"line\",\n          \"description\": \"PAGE XML hierarchy level to add the TextEquiv results to (requires existing layout annotation up to one level above that)\"\n        },\n        \"overwrite_words\": {\n          \"type\": \"boolean\",\n          \"default\": false,\n          \"description\": \"remove existing layout and text annotation below the TextLine level (regardless of textequiv_level)\"\n        },\n        \"model\": {\n          \"type\": \"string\",\n          \"description\": \"tessdata model to apply (an ISO 639-3 language specification or some other basename, e.g. deu-frak or Fraktur)\"\n        }\n      }\n    },\n     \"ocrd-tesserocr-segment-region\": {\n      \"executable\": \"ocrd-tesserocr-segment-region\",\n      \"categories\": [\"Layout analysis\"],\n      \"description\": \"Segment regions into lines with tesseract\",\n      \"input_file_grp\": [\n        \"OCR-D-IMG\",\n        \"OCR-D-SEG-PAGE\",\n        \"OCR-D-GT-SEG-PAGE\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-SEG-BLOCK\"\n      ],\n      \"steps\": [\"layout/segmentation/region\"],\n      \"parameters\": {\n        \"overwrite_regions\": {\n          \"type\": \"boolean\",\n          \"default\": true,\n          \"description\": \"remove existing layout and text annotation below the Page level\"\n        },\n        \"padding\": {\n          \"type\": \"number\",\n          \"format\": \"integer\",\n          \"description\": \"extend detected region rectangles by this many (true) pixels\",\n          \"default\": 0\n        },\n        \"crop_polygons\": {\n          \"type\": \"boolean\",\n          \"default\": false,\n          \"description\": \"annotate polygon coordinates instead of bounding box rectangles\"\n        },\n        \"find_tables\": {\n          \"type\": \"boolean\",\n          \"default\": true,\n          \"description\": \"recognise tables as table regions (textord_tabfind_find_tables)\"\n        }\n      }\n    },\n    \"ocrd-tesserocr-segment-line\": {\n      \"executable\": \"ocrd-tesserocr-segment-line\",\n      \"categories\": [\"Layout analysis\"],\n      \"description\": \"Segment page into regions with tesseract\",\n      \"input_file_grp\": [\n        \"OCR-D-SEG-BLOCK\",\n        \"OCR-D-GT-SEG-BLOCK\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-SEG-LINE\"\n      ],\n      \"steps\": [\"layout/segmentation/line\"],\n      \"parameters\": {\n        \"overwrite_lines\": {\n          \"type\": \"boolean\",\n          \"default\": true,\n          \"description\": \"remove existing layout and text annotation below the TextRegion level\"\n        }\n      }\n    },\n    \"ocrd-tesserocr-segment-word\": {\n      \"executable\": \"ocrd-tesserocr-segment-word\",\n      \"categories\": [\"Layout analysis\"],\n      \"description\": \"Segment lines into words with tesseract\",\n      \"input_file_grp\": [\n        \"OCR-D-SEG-LINE\",\n        \"OCR-D-GT-SEG-LINE\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-SEG-WORD\"\n      ],\n      \"steps\": [\"layout/segmentation/word\"],\n      \"parameters\": {\n        \"overwrite_words\": {\n          \"type\": \"boolean\",\n          \"default\": true,\n          \"description\": \"remove existing layout and text annotation below the TextLine level\"\n        }\n      }\n    },\n    \"ocrd-tesserocr-crop\": {\n      \"executable\": \"ocrd-tesserocr-crop\",\n      \"categories\": [\"Image preprocessing\"],\n      \"description\": \"Poor man's cropping via region segmentation\",\n      \"input_file_grp\": [\n\t\"OCR-D-IMG\"\n      ],\n      \"output_file_grp\": [\n\t\"OCR-D-SEG-PAGE\"\n      ],\n      \"steps\": [\"preprocessing/optimization/cropping\"],\n      \"parameters\" : {\n        \"padding\": {\n          \"type\": \"number\",\n          \"format\": \"integer\",\n          \"description\": \"extend detected border by this many (true) pixels on every side\",\n          \"default\": 4\n        }\n      }\n    },\n    \"ocrd-tesserocr-binarize\": {\n      \"executable\": \"ocrd-tesserocr-binarize\",\n      \"categories\": [\"Image preprocessing\"],\n      \"description\": \"Binarize regions or lines with Tesseract's global Otsu\",\n      \"input_file_grp\": [\n        \"OCR-D-IMG\",\n        \"OCR-D-SEG-BLOCK\",\n        \"OCR-D-SEG-LINE\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-BIN-BLOCK\",\n        \"OCR-D-BIN-LINE\"\n      ],\n      \"steps\": [\"preprocessing/optimization/binarization\"],\n      \"parameters\": {\n        \"operation_level\": {\n          \"type\": \"string\",\n          \"enum\": [\"region\", \"line\"],\n          \"default\": \"region\",\n          \"description\": \"PAGE XML hierarchy level to operate on\"\n        }\n      }\n    }\n  }\n}\n",
+            "setup.py": "# -*- coding: utf-8 -*-\n\"\"\"\nInstalls five executables:\n\n    - ocrd_tesserocr_recognize\n    - ocrd_tesserocr_segment_region\n    - ocrd_tesserocr_segment_line\n    - ocrd_tesserocr_segment_word\n    - ocrd_tesserocr_crop\n    - ocrd_tesserocr_deskew\n    - ocrd_tesserocr_binarize\n\"\"\"\nimport codecs\n\nfrom setuptools import setup, find_packages\n\nsetup(\n    name='ocrd_tesserocr',\n    version='0.6.0',\n    description='Tesserocr bindings',\n    long_description=codecs.open('README.md', encoding='utf-8').read(),\n    long_description_content_type='text/markdown',\n    author='Konstantin Baierer, Kay-Michael W\u00fcrzner, Robert Sachunsky',\n    author_email='unixprog@gmail.com, wuerzner@gmail.com, sachunsky@informatik.uni-leipzig.de',\n    url='https://github.com/OCR-D/ocrd_tesserocr',\n    license='Apache License 2.0',\n    packages=find_packages(exclude=('tests', 'docs')),\n    install_requires=open('requirements.txt').read().split('\\n'),\n    package_data={\n        '': ['*.json', '*.yml', '*.yaml'],\n    },\n    entry_points={\n        'console_scripts': [\n            'ocrd-tesserocr-recognize=ocrd_tesserocr.cli:ocrd_tesserocr_recognize',\n            'ocrd-tesserocr-segment-region=ocrd_tesserocr.cli:ocrd_tesserocr_segment_region',\n            'ocrd-tesserocr-segment-line=ocrd_tesserocr.cli:ocrd_tesserocr_segment_line',\n            'ocrd-tesserocr-segment-word=ocrd_tesserocr.cli:ocrd_tesserocr_segment_word',\n            'ocrd-tesserocr-crop=ocrd_tesserocr.cli:ocrd_tesserocr_crop',\n            'ocrd-tesserocr-deskew=ocrd_tesserocr.cli:ocrd_tesserocr_deskew',\n            'ocrd-tesserocr-binarize=ocrd_tesserocr.cli:ocrd_tesserocr_binarize',\n        ]\n    },\n)\n"
         },
         "git": {
-            "last_commit": "Thu Oct 31 15:57:07 2019 +0100",
-            "latest_tag": "v0.4.1",
-            "number_of_commits": "262",
-            "url": "https://github.com/OCR-D/ocrd_tesserocr.git"
+            "last_commit": "Tue Nov 5 20:16:20 2019 +0100",
+            "latest_tag": "v0.4.0",
+            "number_of_commits": "290",
+            "url": "https://github.com/OCR-D/ocrd_tesserocr"
         },
         "name": "ocrd_tesserocr",
         "ocrd_tool": {
@@ -1425,7 +1437,7 @@
                     "categories": [
                         "Image preprocessing"
                     ],
-                    "description": "Binarize regions or lines",
+                    "description": "Binarize regions or lines with Tesseract's global Otsu",
                     "executable": "ocrd-tesserocr-binarize",
                     "input_file_grp": [
                         "OCR-D-IMG",
@@ -1455,13 +1467,13 @@
                     "categories": [
                         "Image preprocessing"
                     ],
-                    "description": "Poor man's cropping with tesseract",
+                    "description": "Poor man's cropping via region segmentation",
                     "executable": "ocrd-tesserocr-crop",
                     "input_file_grp": [
                         "OCR-D-IMG"
                     ],
                     "output_file_grp": [
-                        "OCR-D-IMG-CROPPED"
+                        "OCR-D-SEG-PAGE"
                     ],
                     "parameters": {
                         "padding": {
@@ -1479,7 +1491,7 @@
                     "categories": [
                         "Image preprocessing"
                     ],
-                    "description": "Deskew pages or regions",
+                    "description": "Detect script, orientation and skew angle for pages or regions",
                     "executable": "ocrd-tesserocr-deskew",
                     "input_file_grp": [
                         "OCR-D-IMG",
@@ -1489,6 +1501,12 @@
                         "OCR-D-DESKEW-BLOCK"
                     ],
                     "parameters": {
+                        "min_orientation_confidence": {
+                            "default": 1.5,
+                            "description": "Minimum confidence score to apply orientation as detected by OSD",
+                            "format": "float",
+                            "type": "number"
+                        },
                         "operation_level": {
                             "default": "region",
                             "description": "PAGE XML hierarchy level to operate on",
@@ -1551,7 +1569,8 @@
                     "description": "Segment page into regions with tesseract",
                     "executable": "ocrd-tesserocr-segment-line",
                     "input_file_grp": [
-                        "OCR-D-SEG-BLOCK"
+                        "OCR-D-SEG-BLOCK",
+                        "OCR-D-GT-SEG-BLOCK"
                     ],
                     "output_file_grp": [
                         "OCR-D-SEG-LINE"
@@ -1574,7 +1593,9 @@
                     "description": "Segment regions into lines with tesseract",
                     "executable": "ocrd-tesserocr-segment-region",
                     "input_file_grp": [
-                        "OCR-D-IMG"
+                        "OCR-D-IMG",
+                        "OCR-D-SEG-PAGE",
+                        "OCR-D-GT-SEG-PAGE"
                     ],
                     "output_file_grp": [
                         "OCR-D-SEG-BLOCK"
@@ -1582,12 +1603,12 @@
                     "parameters": {
                         "crop_polygons": {
                             "default": false,
-                            "description": "annotate polygon coordinates instead of rectangles, and create cropped AlternativeImage masked by the polygon outlines",
+                            "description": "annotate polygon coordinates instead of bounding box rectangles",
                             "type": "boolean"
                         },
                         "find_tables": {
                             "default": true,
-                            "description": "recognise table regions (textord_tabfind_find_tables)",
+                            "description": "recognise tables as table regions (textord_tabfind_find_tables)",
                             "type": "boolean"
                         },
                         "overwrite_regions": {
@@ -1596,7 +1617,7 @@
                             "type": "boolean"
                         },
                         "padding": {
-                            "default": 8,
+                            "default": 0,
                             "description": "extend detected region rectangles by this many (true) pixels",
                             "format": "integer",
                             "type": "number"
@@ -1613,7 +1634,8 @@
                     "description": "Segment lines into words with tesseract",
                     "executable": "ocrd-tesserocr-segment-word",
                     "input_file_grp": [
-                        "OCR-D-SEG-LINE"
+                        "OCR-D-SEG-LINE",
+                        "OCR-D-GT-SEG-LINE"
                     ],
                     "output_file_grp": [
                         "OCR-D-SEG-WORD"
@@ -1630,7 +1652,7 @@
                     ]
                 }
             },
-            "version": "0.3.0"
+            "version": "0.6.0"
         },
         "ocrd_tool_validate": "<report valid=\"true\">\n</report>",
         "official": true,
@@ -1645,7 +1667,7 @@
                     "author_email": "unixprog@gmail.com, wuerzner@gmail.com, sachunsky@informatik.uni-leipzig.de",
                     "bugtrack_url": null,
                     "classifiers": [],
-                    "description": "# ocrd_tesserocr\n\n> Crop, deskew, segment into regions / lines / words, or recognize with tesserocr\n\n[![image](https://circleci.com/gh/OCR-D/ocrd_tesserocr.svg?style=svg)](https://circleci.com/gh/OCR-D/ocrd_tesserocr)\n[![image](https://img.shields.io/pypi/v/ocrd_tesserocr.svg)](https://pypi.org/project/ocrd_tesserocr/)\n[![image](https://codecov.io/gh/OCR-D/ocrd_tesserocr/branch/master/graph/badge.svg)](https://codecov.io/gh/OCR-D/ocrd_tesserocr)\n[![Docker Automated build](https://img.shields.io/docker/automated/ocrd/tesserocr.svg)](https://hub.docker.com/r/ocrd/tesserocr/tags/)\n\n## Introduction\n\nThis offers [OCR-D](https://ocr-d.github.io) compliant workspace processors for (much of) the functionality of [Tesseract](https://github.com/tesseract-ocr) via its Python API wrapper [tesserocr](https://github.com/sirfz/tesserocr) . (Each processor is a step in the OCR-D functional model, and can be replaced with an alternative implementation. Data is represented within METS/PAGE.)\n\nThis includes image preprocessing (cropping, binarization, deskewing), layout analysis (region, line, word segmentation) and OCR proper. Most processors can operate on different levels of the PAGE hierarchy, depending on the workflow configuration. Image results are referenced (read and written) via `AlternativeImage`, text results via `TextEquiv`, deskewing via `@orientation`, cropping via `Border` and segmentation via `Region` / `TextLine` / `Word` elements with `Coords/@points`.\n\n## Installation\n\n### Required ubuntu packages:\n\n- Tesseract headers (`libtesseract-dev`)\n- Some tesseract language models (`tesseract-ocr-{eng,deu,frk,...}` or script models (`tesseract-ocr-script-{latn,frak,...}`)\n- Leptonica headers (`libleptonica-dev`)\n\n### From PyPI\n\nThis is the best option if you want to use the stable, released version.\n\n```sh\nsudo apt-get install git python3 python3-pip libtesseract-dev libleptonica-dev tesseract-ocr-eng tesseract-ocr wget\npip install ocrd_tesserocr\n```\n\n### With docker\n\nThis is the best option if you want to run the software in a container.\n\nYou need to have [Docker](https://docs.docker.com/install/linux/docker-ce/ubuntu/)\n\n```sh\ndocker pull ocrd/tesserocr\n```\n\n### From git \n\nThis is the best option if you want to change the source code or install the latest, unpublished changes.\n\nWe strongly recommend to use [venv](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/).\n\n```sh\ngit clone https://github.com/OCR-D/ocrd_tesserocr\ncd ocrd_tesserocr\nmake deps-ubuntu # or manually with apt-get\nmake deps        # or pip install -r requirements\nmake install     # or pip install .\n```\n\n## Usage\n\nSee docstrings and in the individual processors and [ocrd-tool.json](ocrd_tesserocr/ocrd-tool.json) descriptions.\n\nAvailable processors are:\n\n- [ocrd-tesserocr-crop](ocrd_tesserocr/crop.py)\n- [ocrd-tesserocr-deskew](ocrd_tesserocr/deskew.py)\n- [ocrd-tesserocr-binarize](ocrd_tesserocr/binarize.py)\n- [ocrd-tesserocr-segment-region](ocrd_tesserocr/segment_region.py)\n- [ocrd-tesserocr-segment-line](ocrd_tesserocr/segment_line.py)\n- [ocrd-tesserocr-segment-word](ocrd_tesserocr/segment_word.py)\n- [ocrd-tesserocr-recognize](ocrd_tesserocr/recognize.py)\n\n## Testing\n\nTo run with docker:\n\n```\ndocker run ocrd/tesserocr ocrd-tesserocrd-crop ...\n```\n\n## Testing\n\n```sh\nmake test\n```\n\nThis downloads some test data from https://github.com/OCR-D/assets under `repo/assets`, and runs some basic test of the Python API as well as the CLIs.\n\nSet `PYTEST_ARGS=\"-s --verbose\"` to see log output (`-s`) and individual test results (`--verbose`).\n\n## Development\n\nLatest changes that require pre-release of [ocrd >= 2.0.0](https://github.com/OCR-D/core/tree/edge) are kept in branch [`edge`](https://github.com/OCR-D/ocrd_tesserocr/tree/edge).\n\n\n",
+                    "description": "# ocrd_tesserocr\n\n> Crop, deskew, segment into regions / lines / words, or recognize with tesserocr\n\n[![image](https://circleci.com/gh/OCR-D/ocrd_tesserocr.svg?style=svg)](https://circleci.com/gh/OCR-D/ocrd_tesserocr)\n[![image](https://img.shields.io/pypi/v/ocrd_tesserocr.svg)](https://pypi.org/project/ocrd_tesserocr/)\n[![image](https://codecov.io/gh/OCR-D/ocrd_tesserocr/branch/master/graph/badge.svg)](https://codecov.io/gh/OCR-D/ocrd_tesserocr)\n[![Docker Automated build](https://img.shields.io/docker/automated/ocrd/tesserocr.svg)](https://hub.docker.com/r/ocrd/tesserocr/tags/)\n\n## Introduction\n\nThis offers [OCR-D](https://ocr-d.github.io) compliant workspace processors for (much of) the functionality of [Tesseract](https://github.com/tesseract-ocr) via its Python API wrapper [tesserocr](https://github.com/sirfz/tesserocr) . (Each processor is a step in the OCR-D functional model, and can be replaced with an alternative implementation. Data is represented within METS/PAGE.)\n\nThis includes image preprocessing (cropping, binarization, deskewing), layout analysis (region, line, word segmentation) and OCR proper. Most processors can operate on different levels of the PAGE hierarchy, depending on the workflow configuration. Image results are referenced (read and written) via `AlternativeImage`, text results via `TextEquiv`, deskewing via `@orientation`, cropping via `Border` and segmentation via `Region` / `TextLine` / `Word` elements with `Coords/@points`.\n\n## Installation\n\n### Required ubuntu packages:\n\n- Tesseract headers (`libtesseract-dev`)\n- Some tesseract language models (`tesseract-ocr-{eng,deu,frk,...}` or script models (`tesseract-ocr-script-{latn,frak,...}`)\n- Leptonica headers (`libleptonica-dev`)\n\n### From PyPI\n\nThis is the best option if you want to use the stable, released version.\n\n---\n\n**NOTE**\n\nocrd_tesserocr requires **Tesseract >= 4.1.0**. The Tesseract packages\nbundled with **Ubuntu < 19.10** are too old. If you are on Ubuntu 18.04 LTS,\nplease enable [Alexander Pozdnyakov PPA](https://launchpad.net/~alex-p/+archive/ubuntu/tesseract-ocr) which\nhas up-to-date builds of Tesseract and its dependencies:\n\n```sh\nsudo add-apt-repository ppa:alex-p/tesseract-ocr\nsudo apt-get update\n```\n\n---\n\n```sh\nsudo apt-get install git python3 python3-pip libtesseract-dev libleptonica-dev tesseract-ocr-eng tesseract-ocr wget\npip install ocrd_tesserocr\n```\n\n### With docker\n\nThis is the best option if you want to run the software in a container.\n\nYou need to have [Docker](https://docs.docker.com/install/linux/docker-ce/ubuntu/)\n\n```sh\ndocker pull ocrd/tesserocr\n```\n\n### From git \n\nThis is the best option if you want to change the source code or install the latest, unpublished changes.\n\nWe strongly recommend to use [venv](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/).\n\n```sh\ngit clone https://github.com/OCR-D/ocrd_tesserocr\ncd ocrd_tesserocr\nmake deps-ubuntu # or manually with apt-get\nmake deps        # or pip install -r requirements\nmake install     # or pip install .\n```\n\n## Usage\n\nSee docstrings and in the individual processors and [ocrd-tool.json](ocrd_tesserocr/ocrd-tool.json) descriptions.\n\nAvailable processors are:\n\n- [ocrd-tesserocr-crop](ocrd_tesserocr/crop.py)\n- [ocrd-tesserocr-deskew](ocrd_tesserocr/deskew.py)\n- [ocrd-tesserocr-binarize](ocrd_tesserocr/binarize.py)\n- [ocrd-tesserocr-segment-region](ocrd_tesserocr/segment_region.py)\n- [ocrd-tesserocr-segment-line](ocrd_tesserocr/segment_line.py)\n- [ocrd-tesserocr-segment-word](ocrd_tesserocr/segment_word.py)\n- [ocrd-tesserocr-recognize](ocrd_tesserocr/recognize.py)\n\n## Testing\n\nTo run with docker:\n\n```\ndocker run ocrd/tesserocr ocrd-tesserocrd-crop ...\n```\n\n## Testing\n\n```sh\nmake test\n```\n\nThis downloads some test data from https://github.com/OCR-D/assets under `repo/assets`, and runs some basic test of the Python API as well as the CLIs.\n\nSet `PYTEST_ARGS=\"-s --verbose\"` to see log output (`-s`) and individual test results (`--verbose`).\n\n## Development\n\nLatest changes that require pre-release of [ocrd >= 2.0.0](https://github.com/OCR-D/core/tree/edge) are kept in branch [`edge`](https://github.com/OCR-D/ocrd_tesserocr/tree/edge).\n\n\n",
                     "description_content_type": "text/markdown",
                     "docs_url": null,
                     "download_url": "",
@@ -1666,17 +1688,17 @@
                     "project_urls": {
                         "Homepage": "https://github.com/OCR-D/ocrd_tesserocr"
                     },
-                    "release_url": "https://pypi.org/project/ocrd-tesserocr/0.5.1/",
+                    "release_url": "https://pypi.org/project/ocrd-tesserocr/0.6.0/",
                     "requires_dist": [
-                        "ocrd (>=2.0.0a1)",
+                        "ocrd (>=2.0.0)",
                         "click",
                         "tesserocr (>=2.4.1)"
                     ],
                     "requires_python": "",
                     "summary": "Tesserocr bindings",
-                    "version": "0.5.1"
+                    "version": "0.6.0"
                 },
-                "last_serial": 6059500,
+                "last_serial": 6082508,
                 "releases": {
                     "0.1.0": [
                         {
@@ -2187,44 +2209,82 @@
                             "upload_time_iso_8601": "2019-10-31T16:43:43.864345Z",
                             "url": "https://files.pythonhosted.org/packages/15/1f/ed95415ee91659222301aa77e4f8c27be33df8e258972059bc031a2c0e3b/ocrd_tesserocr-0.5.1.tar.gz"
                         }
+                    ],
+                    "0.6.0": [
+                        {
+                            "comment_text": "",
+                            "digests": {
+                                "md5": "0f1c539e4ffd53d67a3b891586c7be48",
+                                "sha256": "41d5309efc4f886569d47dede504cea5e14ffd8e27a33acb69e15c775d34f754"
+                            },
+                            "downloads": -1,
+                            "filename": "ocrd_tesserocr-0.6.0-py3-none-any.whl",
+                            "has_sig": false,
+                            "md5_digest": "0f1c539e4ffd53d67a3b891586c7be48",
+                            "packagetype": "bdist_wheel",
+                            "python_version": "py3",
+                            "requires_python": null,
+                            "size": 37693,
+                            "upload_time": "2019-11-05T19:14:55",
+                            "upload_time_iso_8601": "2019-11-05T19:14:55.328581Z",
+                            "url": "https://files.pythonhosted.org/packages/89/a9/431c3ad62ac4612b6be3f5cad58b49910a9c00b5f28dd62f8d535ed0c0cf/ocrd_tesserocr-0.6.0-py3-none-any.whl"
+                        },
+                        {
+                            "comment_text": "",
+                            "digests": {
+                                "md5": "9c454a4d508b6d43a1551b517c125d5b",
+                                "sha256": "3a1aeff23dbf42cc8c003039cc8695cd4e01807245f935c9323e6df2832855a7"
+                            },
+                            "downloads": -1,
+                            "filename": "ocrd_tesserocr-0.6.0.tar.gz",
+                            "has_sig": false,
+                            "md5_digest": "9c454a4d508b6d43a1551b517c125d5b",
+                            "packagetype": "sdist",
+                            "python_version": "source",
+                            "requires_python": null,
+                            "size": 20588,
+                            "upload_time": "2019-11-05T19:14:57",
+                            "upload_time_iso_8601": "2019-11-05T19:14:57.128983Z",
+                            "url": "https://files.pythonhosted.org/packages/48/30/6c8253739ee61d4a42b6512be3fcfe0ce7190ff2835ee1210b1c483da025/ocrd_tesserocr-0.6.0.tar.gz"
+                        }
                     ]
                 },
                 "urls": [
                     {
                         "comment_text": "",
                         "digests": {
-                            "md5": "8835763816200fbfec9b58670bd69d8f",
-                            "sha256": "18cef805014268db86fd6c32bca83069cdf536298fe8151f59f9197d255a9d14"
+                            "md5": "0f1c539e4ffd53d67a3b891586c7be48",
+                            "sha256": "41d5309efc4f886569d47dede504cea5e14ffd8e27a33acb69e15c775d34f754"
                         },
                         "downloads": -1,
-                        "filename": "ocrd_tesserocr-0.5.1-py3-none-any.whl",
+                        "filename": "ocrd_tesserocr-0.6.0-py3-none-any.whl",
                         "has_sig": false,
-                        "md5_digest": "8835763816200fbfec9b58670bd69d8f",
+                        "md5_digest": "0f1c539e4ffd53d67a3b891586c7be48",
                         "packagetype": "bdist_wheel",
                         "python_version": "py3",
                         "requires_python": null,
-                        "size": 38309,
-                        "upload_time": "2019-10-31T16:43:42",
-                        "upload_time_iso_8601": "2019-10-31T16:43:42.078476Z",
-                        "url": "https://files.pythonhosted.org/packages/06/84/b5aca7d06e31dcb91683ab60e154b73a8d0e1cb4d5ae22debf55922573df/ocrd_tesserocr-0.5.1-py3-none-any.whl"
+                        "size": 37693,
+                        "upload_time": "2019-11-05T19:14:55",
+                        "upload_time_iso_8601": "2019-11-05T19:14:55.328581Z",
+                        "url": "https://files.pythonhosted.org/packages/89/a9/431c3ad62ac4612b6be3f5cad58b49910a9c00b5f28dd62f8d535ed0c0cf/ocrd_tesserocr-0.6.0-py3-none-any.whl"
                     },
                     {
                         "comment_text": "",
                         "digests": {
-                            "md5": "1c203160eddb792cdbd706ccbb5e35bb",
-                            "sha256": "7dd6a5fd556395deb58070d5f6196871a241d89434a26d0a0fc7e106404aa90a"
+                            "md5": "9c454a4d508b6d43a1551b517c125d5b",
+                            "sha256": "3a1aeff23dbf42cc8c003039cc8695cd4e01807245f935c9323e6df2832855a7"
                         },
                         "downloads": -1,
-                        "filename": "ocrd_tesserocr-0.5.1.tar.gz",
+                        "filename": "ocrd_tesserocr-0.6.0.tar.gz",
                         "has_sig": false,
-                        "md5_digest": "1c203160eddb792cdbd706ccbb5e35bb",
+                        "md5_digest": "9c454a4d508b6d43a1551b517c125d5b",
                         "packagetype": "sdist",
                         "python_version": "source",
                         "requires_python": null,
-                        "size": 20350,
-                        "upload_time": "2019-10-31T16:43:43",
-                        "upload_time_iso_8601": "2019-10-31T16:43:43.864345Z",
-                        "url": "https://files.pythonhosted.org/packages/15/1f/ed95415ee91659222301aa77e4f8c27be33df8e258972059bc031a2c0e3b/ocrd_tesserocr-0.5.1.tar.gz"
+                        "size": 20588,
+                        "upload_time": "2019-11-05T19:14:57",
+                        "upload_time_iso_8601": "2019-11-05T19:14:57.128983Z",
+                        "url": "https://files.pythonhosted.org/packages/48/30/6c8253739ee61d4a42b6512be3fcfe0ce7190ff2835ee1210b1c483da025/ocrd_tesserocr-0.6.0.tar.gz"
                     }
                 ]
             },
@@ -2233,22 +2293,85 @@
         "url": "https://github.com/OCR-D/ocrd_tesserocr"
     },
     {
+        "compliant_cli": true,
         "files": {
-            "Dockerfile": "FROM ocrd/core:latest\nENV VERSION=\"Mi 9. Okt 13:26:16 CEST 2019\"\nENV GITURL=\"https://github.com/cisocrgroup\"\nENV DOWNLOAD_URL=\"http://cis.lmu.de/~finkf\"\nENV DATA=\"/apps/ocrd-cis-post-correction\"\n\n# deps\nCOPY data/docker/deps.txt ${DATA}/deps.txt\nRUN apt-get update \\\n\t&& apt-get -y install --no-install-recommends $(cat ${DATA}/deps.txt)\n\n# locales\nRUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \\\n    && dpkg-reconfigure --frontend=noninteractive locales \\\n    && update-locale LANG=en_US.UTF-8\n\n# install the profiler\nRUN\tgit clone ${GITURL}/Profiler --branch devel --single-branch /tmp/profiler \\\n\t&& cd /tmp/profiler \\\n\t&& mkdir build \\\n\t&& cd build \\\n\t&& cmake -DCMAKE_BUILD_TYPE=release .. \\\n\t&& make compileFBDic trainFrequencyList profiler \\\n\t&& cp bin/compileFBDic bin/trainFrequencyList bin/profiler /apps/ \\\n\t&& cd / \\\n    && rm -rf /tmp/profiler\n\n# install the profiler's language backend\nRUN\tgit clone ${GITURL}/Resources --branch master --single-branch /tmp/resources \\\n\t&& cd /tmp/resources/lexica \\\n\t&& make FBDIC=/apps/compileFBDic TRAIN=/apps/trainFrequencyList \\\n\t&& mkdir -p /${DATA}/languages \\\n\t&& cp -r german latin greek german.ini latin.ini greek.ini /${DATA}/languages \\\n\t&& cd / \\\n\t&& rm -rf /tmp/resources\n\n# install ocrd_cis (python)\nCOPY Manifest.in Makefile setup.py ocrd-tool.json /tmp/build/\nCOPY ocrd_cis/ /tmp/build/ocrd_cis/\nCOPY bashlib/ /tmp/build/bashlib/\n# COPY . /tmp/ocrd_cis\nRUN cd /tmp/build \\\n\t&& make install \\\n\t&& cd / \\\n\t&& rm -rf /tmp/build\n\n# download ocr models and pre-trainded post-correction model\nRUN mkdir /apps/models \\\n\t&& cd /apps/models \\\n\t&& wget ${DOWNLOAD_URL}/model.zip >/dev/null 2>&1 \\\n\t&& wget ${DOWNLOAD_URL}/fraktur1-00085000.pyrnn.gz >/dev/null 2>&1 \\\n\t&& wget ${DOWNLOAD_URL}/fraktur2-00062000.pyrnn.gz >/dev/null 2>&1\n\nVOLUME [\"/data\"]\nENTRYPOINT [\"/bin/sh\", \"-c\"]\n",
-            "README.md": "![build status](https://travis-ci.org/cisocrgroup/ocrd_cis.svg?branch=dev)\n# ocrd_cis\n\n[CIS](http://www.cis.lmu.de) [OCR-D](http://ocr-d.de) command line\ntools for the automatic post-correction of OCR-results.\n\n## Introduction\n`ocrd_cis` contains different tools for the automatic post correction\nof OCR-results.  It contains tools for the training, evaluation and\nexecution of the post correction.  Most of the tools are following the\n[OCR-D cli conventions](https://ocr-d.github.io/cli).\n\nThere is a helper tool to align multiple OCR results as well as a\nversion of ocropy that works with python3.\n\n## Installation\nThere are multiple ways to install the `ocrd_cis` tools:\n * `make install` uses `pip` to install `ocrd_cis` (see below).\n * `make install-devel` uses `pip -e` to install `ocrd_cis` (see\n   below).\n * `pip install --upgrade pip ocrd_cis_dir`\n * `pip install -e --upgrade pip ocrd_cis_dir`\n\nIt is possible to install `ocrd_cis` in a custom directory using\n`virtualenv`:\n```sh\n python3 -m venv venv-dir\n source venv-dir/bin/activate\n make install # or any other command to install ocrd_cis (see above)\n # use ocrd_cis\n deactivate\n```\n\n## Usage\nMost tools follow the [OCR-D cli\nconventions](https://ocr-d.github.io/cli).  They accept the\n`--input-file-grp`, `--output-file-grp`, `--parameter`, `--mets`,\n`--log-level` command line arguments (short and long).  For some tools\n(most notably the alignment tool) expect a comma seperated list of\nmultiple input file groups.\n\nThe [ocrd-tool.json](ocrd_cis/ocrd-tool.json) contains a schema\ndescription of the parameter config file for the different tools that\naccept the `--parameter` argument.\n\n### ocrd-cis-post-correct.sh\nThis bash script runs the post correction using a pre-trained\n[model](http://cis.lmu.de/~finkf/model.zip).  If additional support\nOCRs should be used, models for these OCR steps are required and must\nbe configured in an according configuration file (see ocrd-tool.json).\n\nArguments:\n * `--parameter` path to configuration file\n * `--input-file-grp` name of the master-OCR file group\n * `--output-file-grp` name of the post-correction file group\n * `--log-level` set log level\n * `--mets` path to METS file in workspace\n\n### ocrd-cis-align\nAligns tokens of multiple input file groups to one output file group.\nThis tool is used to align the master OCR with any additional support\nOCRs.  It accepts a comma-separated list of input file groups, which\nit aligns in order.\n\nArguments:\n * `--parameter` path to configuration file\n * `--input-file-grp` comma seperated list of the input file groups;\n   first input file group is the master OCR\n * `--output-file-grp` name of the file group for the aligned result\n * `--log-level` set log level\n * `--mets` path to METS file in workspace\n\n### ocrd-cis-train.sh\nScript to train a model from a list of ground-truth archives (see\nocrd-tool.json) for the post correction.  The tool somewhat mimics the\nbehaviour of other ocrd tools:\n * `--mets` for the workspace\n * `--log-level` is passed to other tools\n * `--parameter` is used as configuration\n * `--output-file-grp` defines the output file group for the model\n\n### ocrd-cis-data\nHelper tool to get the path of the installed data files. Usage:\n`ocrd-cis-data [-jar|-3gs]` to get the path of the jar library or the\npath to th default 3-grams language model file.\n\n### ocrd-cis-wer\nHelper tool to calculate the word error rate aligned ocr files.  It\nwrites a simple JSON-formated stats file to the given output file group.\n\nArguments:\n * `--input-file-grp` input file group of aligned ocr results with\n   their respective ground truth.\n * `--output-file-grp` name of the file group for the stats file\n * `--log-level` set log level\n * `--mets` path to METS file in workspace\n\n### ocrd-cis-profile\nRun the profiler over the given files of the according the given input\nfile grp and adds a gzipped JSON-formatted profile to the output file\ngroup of the workspace.  This tools requires an installed [language\nprofiler](https://github.com/cisocrgroup/Profiler).\n\nArguments:\n * `--parameter` path to configuration file\n * `--input-file-grp` name of the input file group to profile\n * `--output-file-grp` name of the output file group where the profile\n   is stored\n * `--log-level` set log level\n * `--mets` path to METS file in the workspace\n\n### ocrd-cis-ocropy-train\nThe ocropy-train tool can be used to train LSTM models.\nIt takes ground truth from the workspace and saves (image+text) snippets from the corresponding pages.\nThen a model is trained on all snippets for 1 million (or the given number of) randomized iterations from the parameter file.\n```sh\nocrd-cis-ocropy-train \\\n  --input-file-grp OCR-D-GT-SEG-LINE \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-clip\nThe ocropy-clip tool can be used to remove intrusions of neighbouring segments in regions / lines of a workspace.\nIt runs a (ad-hoc binarization and) connected component analysis on every text region / line of every PAGE in the input file group, as well as its overlapping neighbours, and for each binary object of conflict, determines whether it belongs to the neighbour, and can therefore be clipped to white. It references the resulting segment image files in the output PAGE (as AlternativeImage).\n```sh\nocrd-cis-ocropy-clip \\\n  --input-file-grp OCR-D-SEG-LINE \\\n  --output-file-grp OCR-D-SEG-LINE-CLIP \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-resegment\nThe ocropy-resegment tool can be used to remove overlap between lines of a workspace.\nIt runs a (ad-hoc binarization and) line segmentation on every text region of every PAGE in the input file group, and for each line already annotated, determines the label of largest extent within the original coordinates (polygon outline) in that line, and annotates the resulting coordinates in the output PAGE.\n```sh\nocrd-cis-ocropy-resegment \\\n  --input-file-grp OCR-D-SEG-LINE \\\n  --output-file-grp OCR-D-SEG-LINE-RES \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-segment\nThe ocropy-segment tool can be used to segment regions into lines.\nIt runs a (ad-hoc binarization and) line segmentation on every text region of every PAGE in the input file group, and adds a TextLine element with the resulting polygon outline to the annotation of the output PAGE.\n```sh\nocrd-cis-ocropy-segment \\\n  --input-file-grp OCR-D-SEG-BLOCK \\\n  --output-file-grp OCR-D-SEG-LINE \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-deskew\nThe ocropy-deskew tool can be used to deskew pages / regions of a workspace.\nIt runs the Ocropy thresholding and deskewing estimation on every segment of every PAGE in the input file group and annotates the orientation angle in the output PAGE.\n```sh\nocrd-cis-ocropy-deskew \\\n  --input-file-grp OCR-D-SEG-LINE \\\n  --output-file-grp OCR-D-SEG-LINE-DES \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-denoise\nThe ocropy-denoise tool can be used to despeckle pages / regions / lines of a workspace.\nIt runs the Ocropy \"nlbin\" denoising on every segment of every PAGE in the input file group and references the resulting segment image files in the output PAGE (as AlternativeImage).\n```sh\nocrd-cis-ocropy-denoise \\\n  --input-file-grp OCR-D-SEG-LINE-DES \\\n  --output-file-grp OCR-D-SEG-LINE-DEN \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-binarize\nThe ocropy-binarize tool can be used to binarize, denoise and deskew pages / regions / lines of a workspace.\nIt runs the Ocropy \"nlbin\" adaptive thresholding, deskewing estimation and denoising on every segment of every PAGE in the input file group and references the resulting segment image files in the output PAGE (as AlternativeImage). (If a deskewing angle has already been annotated in a region, the tool respects that and rotates accordingly.) Images can also be produced grayscale-normalized.\n```sh\nocrd-cis-ocropy-binarize \\\n  --input-file-grp OCR-D-SEG-LINE-DES \\\n  --output-file-grp OCR-D-SEG-LINE-BIN \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-dewarp\nThe ocropy-dewarp tool can be used to dewarp text lines of a workspace.\nIt runs the Ocropy baseline estimation and dewarping on every line in every text region of every PAGE in the input file group and references the resulting line image files in the output PAGE (as AlternativeImage).\n```sh\nocrd-cis-ocropy-dewarp \\\n  --input-file-grp OCR-D-SEG-LINE-BIN \\\n  --output-file-grp OCR-D-SEG-LINE-DEW \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-recognize\nThe ocropy-recognize tool can be used to recognize lines / words / glyphs from pages of a workspace.\nIt runs the Ocropy optical character recognition on every line in every text region of every PAGE in the input file group and adds the resulting text annotation in the output PAGE.\n```sh\nocrd-cis-ocropy-recognize \\\n  --input-file-grp OCR-D-SEG-LINE-DEW \\\n  --output-file-grp OCR-D-OCR-OCRO \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### Tesserocr\nInstall essential system packages for Tesserocr\n```sh\nsudo apt-get install python3-tk \\\n  tesseract-ocr libtesseract-dev libleptonica-dev \\\n  libimage-exiftool-perl libxml2-utils\n```\n\nThen install Tesserocr from: https://github.com/OCR-D/ocrd_tesserocr\n```sh\npip install -r requirements.txt\npip install .\n```\n\nDownload and move tesseract models from:\nhttps://github.com/tesseract-ocr/tesseract/wiki/Data-Files\nor use your own models\nplace them into: /usr/share/tesseract-ocr/4.00/tessdata\n\nTesserocr v2.4.0 seems broken for tesseract 4.0.0-beta. Install\nVersion v2.3.1 instead: `pip install tesseract==2.3.1`.\n\n## Workflow configuration\n\nA decent pipeline might look like this:\n\n1. page-level cropping\n2. page-level binarization\n3. page-level deskewing\n4. page-level dewarping\n5. region segmentation\n6. region-level clipping\n7. region-level deskewing\n8. line segmentation\n9. line-level clipping or resegmentation\n10. line-level dewarping\n11. line-level recognition\n12. line-level alignment\n\nIf GT is used, steps 1, 5 and 8 can be omitted. Else if a segmentation is used in 5 and 8 which does not produce overlapping sections, steps 6 and 9 can be omitted.\n\n## Testing\nTo run a view basic test type `make test` (`ocrd_cis` has to be\ninstalled in order to run any tests).\n\n## OCR-D workspace\n\n* Create a new (empty) workspace: `ocrd workspace init workspace-dir`\n* cd into `workspace-dir`\n* Add new file to workspace: `ocrd workspace add file -G group -i id\n  -m mimetype`\n\n## OCR-D links\n\n- [OCR-D](https://ocr-d.github.io)\n- [Github](https://github.com/OCR-D)\n- [Project-page](http://www.ocr-d.de/)\n- [Ground-truth](http://www.ocr-d.de/sites/all/GTDaten/IndexGT.html)\n",
-            "ocrd-tool.json": "{\n\t\"git_url\": \"https://github.com/cisocrgroup/ocrd_cis\",\n\t\"version\": \"0.0.2\",\n\t\"tools\": {\n\t\t\"ocrd-cis-ocropy-binarize\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-binarize\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Image preprocessing\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"preprocessing/optimization/binarization\",\n\t\t\t\t\"preprocessing/optimization/grayscale_normalization\",\n\t\t\t\t\"preprocessing/optimization/deskewing\"\n\t\t\t],\n\t\t\t\"input_file_grp\": [\n\t\t\t\t\"OCR-D-IMG\",\n\t\t\t\t\"OCR-D-SEG-BLOCK\",\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"output_file_grp\": [\n\t\t\t\t\"OCR-D-IMG-BIN\",\n\t\t\t\t\"OCR-D-SEG-BLOCK\",\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"description\": \"Binarize (and optionally deskew/despeckle) pages / regions / lines with ocropy\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"method\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"enum\": [\"none\", \"global\", \"otsu\", \"gauss-otsu\", \"ocropy\"],\n\t\t\t\t\t\"description\": \"binarization method to use (only ocropy will include deskewing)\",\n\t\t\t\t\t\"default\": \"ocropy\"\n\t\t\t\t},\n\t\t\t\t\"grayscale\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"description\": \"for the ocropy method, produce grayscale-normalized instead of thresholded image\",\n\t\t\t\t\t\"default\": false\n\t\t\t\t},\n\t\t\t\t\"maxskew\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"description\": \"modulus of maximum skewing angle to detect (larger will be slower, 0 will deactivate deskewing)\",\n\t\t\t\t\t\"default\": 0.0\n\t\t\t\t},\n\t\t\t\t\"noise_maxsize\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"description\": \"maximum pixel number for connected components to regard as noise (0 will deactivate denoising)\",\n\t\t\t\t\t\"default\": 0\n\t\t\t\t},\n\t\t\t\t\"level-of-operation\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"enum\": [\"page\", \"region\", \"line\"],\n\t\t\t\t\t\"description\": \"PAGE XML hierarchy level granularity to annotate images for\",\n\t\t\t\t\t\"default\": \"page\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-ocropy-deskew\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-deskew\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Image preprocessing\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"preprocessing/optimization/deskewing\"\n\t\t\t],\n\t\t\t\"input_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-BLOCK\",\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"output_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-BLOCK\",\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"description\": \"Deskew regions with ocropy (by annotating orientation angle and adding AlternativeImage)\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"maxskew\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"description\": \"modulus of maximum skewing angle to detect (larger will be slower, 0 will deactivate deskewing)\",\n\t\t\t\t\t\"default\": 5.0\n\t\t\t\t},\n\t\t\t\t\"level-of-operation\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"enum\": [\"page\", \"region\"],\n\t\t\t\t\t\"description\": \"PAGE XML hierarchy level granularity to annotate images for\",\n\t\t\t\t\t\"default\": \"region\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-ocropy-denoise\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-denoise\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Image preprocessing\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"preprocessing/optimization/despeckling\"\n\t\t\t],\n\t\t\t\"input_file_grp\": [\n\t\t\t\t\"OCR-D-IMG\",\n\t\t\t\t\"OCR-D-SEG-BLOCK\",\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"output_file_grp\": [\n\t\t\t\t\"OCR-D-IMG-DESPECK\",\n\t\t\t\t\"OCR-D-SEG-BLOCK\",\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"description\": \"Despeckle pages / regions / lines with ocropy\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"noise_maxsize\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"format\": \"float\",\n\t\t\t\t\t\"description\": \"maximum size in points (pt) for connected components to regard as noise (0 will deactivate denoising)\",\n\t\t\t\t\t\"default\": 3.0\n\t\t\t\t},\n\t\t\t\t\"level-of-operation\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"enum\": [\"page\", \"region\", \"line\"],\n\t\t\t\t\t\"description\": \"PAGE XML hierarchy level granularity to annotate images for\",\n\t\t\t\t\t\"default\": \"page\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-ocropy-clip\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-clip\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Layout analysis\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"layout/segmentation/region\",\n\t\t\t\t\"layout/segmentation/line\"\n\t\t\t],\n\t\t\t\"input_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-BLOCK\",\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"output_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-BLOCK\",\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"description\": \"Clip text regions / lines at intersections with neighbours\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"level-of-operation\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"enum\": [\"region\", \"line\"],\n\t\t\t\t\t\"description\": \"PAGE XML hierarchy level granularity to annotate images for\",\n\t\t\t\t\t\"default\": \"region\"\n\t\t\t\t},\n\t\t\t\t\"min_fraction\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"format\": \"float\",\n\t\t\t\t\t\"description\": \"share of foreground pixels that must be retained by the largest label\",\n\t\t\t\t\t\"default\": 0.7\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-ocropy-resegment\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-resegment\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Layout analysis\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"layout/segmentation/line\"\n\t\t\t],\n\t\t\t\"input_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"output_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"description\": \"Resegment lines with ocropy (by shrinking annotated polygons)\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"min_fraction\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"format\": \"float\",\n\t\t\t\t\t\"description\": \"share of foreground pixels that must be retained by the largest label\",\n\t\t\t\t\t\"default\": 0.8\n\t\t\t\t},\n\t\t\t\t\"extend_margins\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"format\": \"integer\",\n\t\t\t\t\t\"description\": \"number of pixels to extend the input polygons horizontally and vertically before intersecting\",\n\t\t\t\t\t\"default\": 3\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-ocropy-dewarp\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-dewarp\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Image preprocessing\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"preprocessing/optimization/dewarping\"\n\t\t\t],\n\t\t\t\"description\": \"Dewarp line images with ocropy\",\n\t\t\t\"input_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"output_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"parameters\": {\n\t\t\t\t\"range\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"description\": \"maximum vertical disposition or maximum margin (will be multiplied by mean centerline deltas to yield pixels)\",\n\t\t\t\t\t\"default\": 4\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-ocropy-recognize\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-recognize\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Text recognition and optimization\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"recognition/text-recognition\"\n\t\t\t],\n\t\t\t\"description\": \"Recognize text in (binarized+deskewed+dewarped) lines with ocropy\",\n\t\t\t\"input_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-LINE\",\n\t\t\t\t\"OCR-D-SEG-WORD\",\n\t\t\t\t\"OCR-D-SEG-GLYPH\"\n\t\t\t],\n\t\t\t\"output_file_grp\": [\n\t\t\t\t\"OCR-D-OCR-OCRO\"\n\t\t\t],\n\t\t\t\"parameters\": {\n\t\t\t\t\"textequiv_level\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"enum\": [\"line\", \"word\", \"glyph\"],\n\t\t\t\t\t\"description\": \"PAGE XML hierarchy level granularity to add the TextEquiv results to\",\n\t\t\t\t\t\"default\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"model\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"description\": \"ocropy model to apply (e.g. fraktur.pyrnn)\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-ocropy-rec\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-rec\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Text recognition and optimization\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"recognition/text-recognition\"\n\t\t\t],\n\t\t\t\"description\": \"Recognize text snippets\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"model\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"description\": \"ocropy model to apply (e.g. fraktur.pyrnn)\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-ocropy-segment\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-segment\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Layout analysis\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"layout/segmentation/region\",\n\t\t\t\t\"layout/segmentation/line\"\n\t\t\t],\n\t\t\t\"input_file_grp\": [\n\t\t\t\t\"OCR-D-GT-SEG-BLOCK\",\n\t\t\t\t\"OCR-D-SEG-BLOCK\"\n\t\t\t],\n\t\t\t\"output_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"description\": \"Segment pages into regions or regions into lines with ocropy\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"level-of-operation\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"enum\": [\"page\", \"region\"],\n\t\t\t\t\t\"description\": \"PAGE XML hierarchy level to read images from\",\n\t\t\t\t\t\"default\": \"region\"\n\t\t\t\t},\n\t\t\t\t\"maxcolseps\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"format\": \"integer\",\n\t\t\t\t\t\"default\": 2,\n\t\t\t\t\t\"description\": \"number of white/background column separators to try (when operating on the page level)\"\n\t\t\t\t},\n\t\t\t\t\"maxseps\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"format\": \"integer\",\n\t\t\t\t\t\"default\": 5,\n\t\t\t\t\t\"description\": \"number of black/foreground column separators to try, counted individually as lines (when operating on the page level)\"\n\t\t\t\t},\n\t\t\t\t\"overwrite_regions\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"default\": true,\n\t\t\t\t\t\"description\": \"remove any existing TextRegion elements (when operating on the page level)\"\n\t\t\t\t},\n\t\t\t\t\"overwrite_lines\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"default\": true,\n\t\t\t\t\t\"description\": \"remove any existing TextLine elements (when operating on the region level)\"\n\t\t\t\t},\n\t\t\t\t\"spread\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"format\": \"float\",\n\t\t\t\t\t\"default\": 2.4,\n\t\t\t\t\t\"description\": \"distance in points (pt) from the foreground to project text line (or text region) labels into the background\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-ocropy-train\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-train\",\n\t\t\t\"categories\": [\n\t\t\t\t\"lstm ocropy model training\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"training\"\n\t\t\t],\n\t\t\t\"description\": \"train model with ground truth from mets data\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"textequiv_level\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"enum\": [\"line\", \"word\", \"glyph\"],\n\t\t\t\t\t\"default\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"model\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"description\": \"load model or crate new one (e.g. fraktur.pyrnn)\"\n\t\t\t\t},\n\t\t\t\t\"ntrain\": {\n\t\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\t\"description\": \"lines to train before stopping\",\n\t\t\t\t\t\"default\": 1000000\n\t\t\t\t},\n\t\t\t\t\"outputpath\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"description\": \"(existing) path for the trained model\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-align\": {\n\t\t\t\"executable\": \"ocrd-cis-align\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Text recognition and optimization\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"postprocessing/alignment\"\n\t\t\t],\n\t\t\t\"description\": \"Align multiple OCRs and/or GTs\"\n\t\t},\n\t\t\"ocrd-cis-wer\": {\n\t\t\t\"executable\": \"ocrd-cis-wer\",\n\t\t\t\"categories\": [\n\t\t\t\t\"evaluation\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"evaluation\"\n\t\t\t],\n\t\t\t\"description\": \"calculate the word error rate for aligned page xml files\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"testIndex\": {\n\t\t\t\t\t\"description\": \"text equiv index for the test/ocr tokens\",\n\t\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\t\"default\": 0\n\t\t\t\t},\n\t\t\t\t\"gtIndex\": {\n\t\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\t\"description\": \"text equiv index for the gt tokens\",\n\t\t\t\t\t\"default\": -1\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-jar\": {\n\t\t\t\"executable\": \"ocrd-cis-jar\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Text recognition and optimization\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"postprocessing/alignment\"\n\t\t\t],\n\t\t\t\"description\": \"Output path to the ocrd-cis.jar file\"\n\t\t},\n\t\t\"ocrd-cis-profile\": {\n\t\t\t\"executable\": \"ocrd-cis-profile\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Text recognition and optimization\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"postprocessing/alignment\"\n\t\t\t],\n\t\t\t\"description\": \"Add a correction suggestions and suspicious tokens (profile)\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"executable\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"required\": true\n\t\t\t\t},\n\t\t\t\t\"backend\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"required\": true\n\t\t\t\t},\n\t\t\t\t\"language\": {\n\t\t\t\t    \"type\": \"string\",\n\t\t\t\t\t\"required\": false,\n\t\t\t\t\t\"default\": \"german\"\n\t\t\t\t},\n\t\t\t\t\"additionalLexicon\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"required\": false,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-train\": {\n\t\t\t\"executable\": \"ocrd-cis-train.sh\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Text recognition and optimization\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"postprocessing/alignment\"\n\t\t\t],\n\t\t\t\"description\": \"Train post correction model\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"gtArchives\": {\n\t\t\t\t\t\"description\": \"List of ground truth archives\",\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"required\": true,\n\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\"description\": \"Path (or URL) to a ground truth archive\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"imagePreprocessingSteps\": {\n\t\t\t\t\t\"description\": \"List of image preprocessing steps\",\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"required\": true,\n\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\"description\": \"Image preprocessing command that is evaled using the bash eval command (available parameters: $METS, $LOG_LEVEL, $XML_INPUT_FILE_GRP, $XML_OUTPUT_FILE_GRP, $IMG_OUTPUT_FILE_GRP, $IMG_INPUT_FILE_GRP, $PARAMETER)\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"ocrSteps\": {\n\t\t\t\t\t\"description\": \"List of ocr steps\",\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"required\": true,\n\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\"description\": \"OCR command that is evaled using the bash eval command (available parameters: $METS, $LOG_LEVEL, $XML_INPUT_FILE_GRP, $XML_OUTPUT_FILE_GRP, $PARAMETER)\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"training\": {\n\t\t\t\t\t\"description\": \"Configuration of training command\",\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"required\": [\n\t\t\t\t\t\t\"trigrams\",\n\t\t\t\t\t\t\"maxCandidate\",\n\t\t\t\t\t\t\"profiler\",\n\t\t\t\t\t\t\"leFeatures\",\n\t\t\t\t\t\t\"rrFeatures\",\n\t\t\t\t\t\t\"dmFeatures\"\n\t\t\t\t\t],\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"trigrams\": {\n\t\t\t\t\t\t\t\"description\": \"Path to character trigrams csv file (format: n,trigram)\",\n\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\"required\": true\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"maxCandidate\": {\n\t\t\t\t\t\t\t\"description\": \"Maximum number of considered profiler candidates per token\",\n\t\t\t\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\t\t\t\"required\": true\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"filterClasses\": {\n\t\t\t\t\t\t\t\"description\": \"List of filtered feature classes\",\n\t\t\t\t\t\t\t\"required\": false,\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\"description\": \"Class name of feature class to filter\",\n\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"profiler\": {\n\t\t\t\t\t\t\t\"description\": \"Profiler configuration\",\n\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\"required\": [\n\t\t\t\t\t\t\t\t\"path\",\n\t\t\t\t\t\t\t\t\"config\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\"path\": {\n\t\t\t\t\t\t\t\t\t\"description\": \"Path to the profiler executable\",\n\t\t\t\t\t\t\t\t\t\"required\": true,\n\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"config\": {\n\t\t\t\t\t\t\t\t\t\"description\": \"Path to the profiler language config file\",\n\t\t\t\t\t\t\t\t\t\"required\": true,\n\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"leFeatures\": {\n\t\t\t\t\t\t\t\"description\": \"List of the lexicon extension features\",\n\t\t\t\t\t\t\t\"required\": true,\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\"description\": \"Feature configuration\",\n\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\"required\": [\n\t\t\t\t\t\t\t\t\t\"type\",\n\t\t\t\t\t\t\t\t\t\"name\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\"description\": \"Name of the feature\",\n\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"type\": {\n\t\t\t\t\t\t\t\t\t\t\"description\": \"Fully qualified java class name of the feature\",\n\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"class\": {\n\t\t\t\t\t\t\t\t\t\t\"description\": \"Class name of the feature\",\n\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"rrFeatures\": {\n\t\t\t\t\t\t\t\"description\": \"List of the reranker features\",\n\t\t\t\t\t\t\t\"required\": true,\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\"description\": \"Feature configuration\",\n\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\"required\": [\n\t\t\t\t\t\t\t\t\t\"type\",\n\t\t\t\t\t\t\t\t\t\"name\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\"description\": \"Name of the feature\",\n\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"type\": {\n\t\t\t\t\t\t\t\t\t\t\"description\": \"Fully qualified java class name of the feature\",\n\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"class\": {\n\t\t\t\t\t\t\t\t\t\t\"description\": \"Class name of the feature\",\n\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"dmFeatures\": {\n\t\t\t\t\t\t\t\"description\": \"List of the desicion maker features\",\n\t\t\t\t\t\t\t\"required\": true,\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\"description\": \"Feature configuration\",\n\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\"required\": [\n\t\t\t\t\t\t\t\t\t\"type\",\n\t\t\t\t\t\t\t\t\t\"name\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\"description\": \"Name of the feature\",\n\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"type\": {\n\t\t\t\t\t\t\t\t\t\t\"description\": \"Fully qualified java class name of the feature\",\n\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"class\": {\n\t\t\t\t\t\t\t\t\t\t\"description\": \"Class name of the feature\",\n\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-post-correct\": {\n\t\t\t\"executable\": \"ocrd-cis-post-correct.sh\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Text recognition and optimization\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"postprocessing/alignment\"\n\t\t\t],\n\t\t\t\"description\": \"Post correct OCR results\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"ocrSteps\": {\n\t\t\t\t\t\"description\": \"List of additional ocr steps\",\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"required\": true,\n\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\"description\": \"OCR command that is evaled using the bash eval command (available parameters: $METS, $LOG_LEVEL, $XML_INPUT_FILE_GRP, $XML_OUTPUT_FILE_GRP, $PARAMETER)\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"postCorrection\": {\n\t\t\t\t\t\"description\": \"Configuration of post correction command\",\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"required\": [\n\t\t\t\t\t\t\"maxCandidate\",\n\t\t\t\t\t\t\"profiler\",\n\t\t\t\t\t\t\"model\",\n\t\t\t\t\t\t\"runLE\",\n\t\t\t\t\t\t\"runDM\"\n\t\t\t\t\t],\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"maxCandidate\": {\n\t\t\t\t\t\t\t\"description\": \"Maximum number of considered profiler candidates per token\",\n\t\t\t\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\t\t\t\"required\": true\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"profiler\": {\n\t\t\t\t\t\t\t\"description\": \"Profiler configuration\",\n\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\"required\": [\n\t\t\t\t\t\t\t\t\"path\",\n\t\t\t\t\t\t\t\t\"config\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\"path\": {\n\t\t\t\t\t\t\t\t\t\"description\": \"Path to the profiler executable\",\n\t\t\t\t\t\t\t\t\t\"required\": true,\n\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"config\": {\n\t\t\t\t\t\t\t\t\t\"description\": \"Path to the profiler language config file\",\n\t\t\t\t\t\t\t\t\t\"required\": true,\n\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"model\": {\n\t\t\t\t\t\t\t\"description\": \"Path to the post correction model file\",\n\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\"required\": true\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"runLE\": {\n\t\t\t\t\t\t\t\"description\": \"Do run the lexicon extension step for the post correction\",\n\t\t\t\t\t\t\t\"required\": true,\n\t\t\t\t\t\t\t\"type\": \"boolean\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"runDM\": {\n\t\t\t\t\t\t\t\"description\": \"Do run the ranking and the decision step for the post correction\",\n\t\t\t\t\t\t\t\"required\": true,\n\t\t\t\t\t\t\t\"type\": \"boolean\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
-            "setup.py": "\"\"\"\nInstalls:\n    - ocrd-cis-align\n    - ocrd-cis-training\n    - ocrd-cis-profile\n    - ocrd-cis-wer\n    - ocrd-cis-data\n    - ocrd-cis-ocropy-clip\n    - ocrd-cis-ocropy-denoise\n    - ocrd-cis-ocropy-deskew\n    - ocrd-cis-ocropy-binarize\n    - ocrd-cis-ocropy-resegment\n    - ocrd-cis-ocropy-segment\n    - ocrd-cis-ocropy-dewarp\n    - ocrd-cis-ocropy-recognize\n    - ocrd-cis-ocropy-train\n\"\"\"\n\nimport codecs\nfrom setuptools import setup\nfrom setuptools import find_packages\n\nwith codecs.open('README.md', encoding='utf-8') as f:\n    README = f.read()\n\nsetup(\n    name='ocrd_cis',\n    version='0.0.6',\n    description='CIS OCR-D command line tools',\n    long_description=README,\n    long_description_content_type='text/markdown',\n    author='Florian Fink, Tobias Englmeier, Christoph Weber',\n    author_email='finkf@cis.lmu.de, englmeier@cis.lmu.de, web_chris@msn.com',\n    url='https://github.com/cisocrgroup/ocrd_cis',\n    license='MIT',\n    packages=find_packages(),\n    include_package_data=True,\n    install_requires=[\n        'ocrd>=2.0.0a1',\n        'click',\n        'scipy',\n        'numpy>=1.17.0',\n        'pillow>=6.2.0',\n        'matplotlib>3.0.0',\n        'python-Levenshtein',\n        'calamari_ocr'\n    ],\n    package_data={\n        '': ['*.json', '*.yml', '*.yaml', '*.csv.gz', '*.jar'],\n    },\n    scripts=[\n        'bashlib/ocrd-cis-lib.sh',\n        'bashlib/ocrd-cis-train.sh',\n        'bashlib/ocrd-cis-post-correct.sh',\n    ],\n    entry_points={\n        'console_scripts': [\n            'ocrd-cis-align=ocrd_cis.align.cli:cis_ocrd_align',\n            'ocrd-cis-profile=ocrd_cis.profile.cli:cis_ocrd_profile',\n            'ocrd-cis-wer=ocrd_cis.wer.cli:cis_ocrd_wer',\n            'ocrd-cis-data=ocrd_cis.data.__main__:main',\n            'ocrd-cis-ocropy-binarize=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_binarize',\n            'ocrd-cis-ocropy-clip=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_clip',\n            'ocrd-cis-ocropy-denoise=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_denoise',\n            'ocrd-cis-ocropy-deskew=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_deskew',\n            'ocrd-cis-ocropy-dewarp=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_dewarp',\n            'ocrd-cis-ocropy-recognize=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_recognize',\n            'ocrd-cis-ocropy-rec=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_rec',\n            'ocrd-cis-ocropy-resegment=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_resegment',\n            'ocrd-cis-ocropy-segment=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_segment',\n        ]\n    },\n)\n"
+            "Dockerfile": "FROM ocrd/core:edge\nMAINTAINER OCR-D\nENV DEBIAN_FRONTEND noninteractive\nENV PYTHONIOENCODING utf8\nENV LC_ALL C.UTF-8\nENV LANG C.UTF-8\n\nWORKDIR /build\nCOPY setup.py .\nCOPY ocrd_cis ./ocrd_cis\nRUN pip3 install --upgrade pip .\n\nENTRYPOINT [\"/bin/sh\", \"-c\"]\n",
+            "README.md": "# ocrd_cis\n\n![build status](https://travis-ci.org/cisocrgroup/cis-ocrd-py.svg?branch=dev)\n# cis-ocrd-py\n\n[CIS](http://www.cis.lmu.de) [OCR-D](http://ocr-d.de) command line tools\n\n## Installation\n\n### Required ubuntu packages:\n\n```sh\nsudo apt-get install \\\n  git \\\n  build-essential \\\n  python3 python3-pip \\\n  libxml2-dev \\\n  default-jdk\n```\n\n### From PyPI\n\nThis is the best option if you want to use the stable, released version.\n\n```sh\npip install cis-ocrd\n```\n\n### With docker\n\nThis is the best option if you want to run the software in a container.\n\n```sh\ndocker pull ocrd/cis_ocrd\n```\n\n### From git \n\nThis is the best option if you want to change the source code or install the latest, unpublished changes.\n\nWe strongly recommend to use a [virtualenv](https://virtualenv.pypa.io/en/stable/userguide/).\n\n```sh\ngit clone https://github.com/OCR-D/ocrd_cis\ncd ocrd_cis\npip install -e .\n```\n\n\n\n## General usage\n\n### Essential system packages\n\n```sh\nsudo apt-get install \\\n  git \\\n  build-essential \\\n  python3 python3-pip \\\n  libxml2-dev \\\n  default-jdk\n```\n\n\n\n### Virtualenv\n\nUse `virtualenv` to install dependencies:\n* `virtualenv -p python3.6 env`\n* `source env/bin/activate`\n* `pip install -e path/to/dir/containing/setup.py`\n\nUse `deactivate` to deactivate the virtualenv again.\n\n### OCR-D workspace\n\n* Create a new (empty) workspace: `ocrd workspace init workspace-dir`\n* cd into `workspace-dir`\n* Add new file to workspace: `ocrd workspace add file -G group -i id\n  -m mimetype`\n\n### Tests\n\nIssue `make test` to run the automated test suite. The tests depend on\nthe following tools:\n\n* [wget](https://www.gnu.org/software/wget/)\n* [envsubst](https://linux.die.net/man/1/envsubst)\n\nYou can run individual testcases using the `run_*_test.bash` scripts in\nthe tests directory. Use the `--persistent` or `-p` flag to keep\ntemporary directories.\n\nYou can override the temporary directory by setting the `TMP_DIR` environment\nvariable.\n\n## Tools\n\n### ocrd-cis-align\n\nThe alignment tool line-aligns multiple file groups. It can be used to\nalign the results of multiple OCRs with their respective ground-truth.\n\nThe tool expects a comma-separated list of input file groups, the\naccording output file group and the url of the configuration file:\n\n```sh\nocrd-cis-align \\\n  --input-file-grp 'ocr1,ocr2,gt' \\\n  --output-file-grp 'ocr1+ocr2+gt' \\\n  --mets mets.xml \\\n  --parameter file:///path/to/config.json\n```\n\n\n### ocrd-cis-ocropy-train\nThe ocropy-train tool can be used to train LSTM models.\nIt takes ground truth from the workspace and saves (image+text) snippets from the corresponding pages.\nThen a model is trained on all snippets for 1 million (or the given number of) randomized iterations from the parameter file.\n```sh\nocrd-cis-ocropy-train \\\n  --input-file-grp OCR-D-GT-SEG-LINE \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-clip\nThe ocropy-clip tool can be used to remove intrusions of neighbouring segments in regions / lines of a workspace.\nIt runs a (ad-hoc binarization and) connected component analysis on every text region / line of every PAGE in the input file group, as well as its overlapping neighbours, and for each binary object of conflict, determines whether it belongs to the neighbour, and can therefore be clipped to white. It references the resulting segment image files in the output PAGE (as AlternativeImage).\n```sh\nocrd-cis-ocropy-clip \\\n  --input-file-grp OCR-D-SEG-LINE \\\n  --output-file-grp OCR-D-SEG-LINE-CLIP \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-resegment\nThe ocropy-resegment tool can be used to remove overlap between lines of a workspace.\nIt runs a (ad-hoc binarization and) line segmentation on every text region of every PAGE in the input file group, and for each line already annotated, determines the label of largest extent within the original coordinates (polygon outline) in that line, and annotates the resulting coordinates in the output PAGE.\n```sh\nocrd-cis-ocropy-resegment \\\n  --input-file-grp OCR-D-SEG-LINE \\\n  --output-file-grp OCR-D-SEG-LINE-RES \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-segment\nThe ocropy-segment tool can be used to segment regions into lines.\nIt runs a (ad-hoc binarization and) line segmentation on every text region of every PAGE in the input file group, and adds a TextLine element with the resulting polygon outline to the annotation of the output PAGE.\n```sh\nocrd-cis-ocropy-segment \\\n  --input-file-grp OCR-D-SEG-BLOCK \\\n  --output-file-grp OCR-D-SEG-LINE \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-deskew\nThe ocropy-deskew tool can be used to deskew pages / regions of a workspace.\nIt runs the Ocropy thresholding and deskewing estimation on every segment of every PAGE in the input file group and annotates the orientation angle in the output PAGE.\n```sh\nocrd-cis-ocropy-deskew \\\n  --input-file-grp OCR-D-SEG-LINE \\\n  --output-file-grp OCR-D-SEG-LINE-DES \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-denoise\nThe ocropy-denoise tool can be used to despeckle pages / regions / lines of a workspace.\nIt runs the Ocropy \"nlbin\" denoising on every segment of every PAGE in the input file group and references the resulting segment image files in the output PAGE (as AlternativeImage). \n```sh\nocrd-cis-ocropy-denoise \\\n  --input-file-grp OCR-D-SEG-LINE-DES \\\n  --output-file-grp OCR-D-SEG-LINE-DEN \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-binarize\nThe ocropy-binarize tool can be used to binarize, denoise and deskew pages / regions / lines of a workspace.\nIt runs the Ocropy \"nlbin\" adaptive thresholding, deskewing estimation and denoising on every segment of every PAGE in the input file group and references the resulting segment image files in the output PAGE (as AlternativeImage). (If a deskewing angle has already been annotated in a region, the tool respects that and rotates accordingly.) Images can also be produced grayscale-normalized.\n```sh\nocrd-cis-ocropy-binarize \\\n  --input-file-grp OCR-D-SEG-LINE-DES \\\n  --output-file-grp OCR-D-SEG-LINE-BIN \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-dewarp\nThe ocropy-dewarp tool can be used to dewarp text lines of a workspace.\nIt runs the Ocropy baseline estimation and dewarping on every line in every text region of every PAGE in the input file group and references the resulting line image files in the output PAGE (as AlternativeImage).\n```sh\nocrd-cis-ocropy-dewarp \\\n  --input-file-grp OCR-D-SEG-LINE-BIN \\\n  --output-file-grp OCR-D-SEG-LINE-DEW \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-recognize\nThe ocropy-recognize tool can be used to recognize lines / words / glyphs from pages of a workspace.\nIt runs the Ocropy optical character recognition on every line in every text region of every PAGE in the input file group and adds the resulting text annotation in the output PAGE.\n```sh\nocrd-cis-ocropy-recognize \\\n  --input-file-grp OCR-D-SEG-LINE-DEW \\\n  --output-file-grp OCR-D-OCR-OCRO \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n## All in One Tool\nFor the all in One Tool install all above tools and Tesserocr as explained below.\nThen use it like:\n```sh\nocrd-cis-aio --parameter file:///path/to/config.json\n```\n\n\n### Tesserocr\nInstall essential system packages for Tesserocr\n```sh\nsudo apt-get install python3-tk \\\n  tesseract-ocr libtesseract-dev libleptonica-dev \\\n  libimage-exiftool-perl libxml2-utils\n```\n\nThen install Tesserocr from: https://github.com/OCR-D/ocrd_tesserocr\n```sh\npip install -r requirements.txt\npip install .\n```\n\nDownload and move tesseract models from:\nhttps://github.com/tesseract-ocr/tesseract/wiki/Data-Files\nor use your own models\nplace them into: /usr/share/tesseract-ocr/4.00/tessdata\n\nTesserocr v2.4.0 seems broken for tesseract 4.0.0-beta. Install\nVersion v2.3.1 instead: `pip install tesseract==2.3.1`.\n\n## Workflow configuration\n\nA decent pipeline might look like this:\n\n1. page-level cropping\n2. page-level binarization\n3. page-level deskewing\n4. page-level dewarping\n5. region segmentation\n6. region-level clipping\n7. region-level deskewing\n8. line segmentation\n9. line-level clipping or resegmentation\n10. line-level dewarping\n11. line-level recognition\n12. line-level alignment\n\nIf GT is used, steps 1, 5 and 8 can be omitted. Else if a segmentation is used in 5 and 8 which does not produce overlapping sections, steps 6 and 9 can be omitted.\n\n## OCR-D links\n\n- [OCR-D](https://ocr-d.github.io)\n- [Github](https://github.com/OCR-D)\n- [Project-page](http://www.ocr-d.de/)\n- [Ground-truth](http://www.ocr-d.de/sites/all/GTDaten/IndexGT.html)\n",
+            "ocrd-tool.json": "{\n\t\"git_url\": \"https://github.com/cisocrgroup/cis-ocrd-py\",\n\t\"version\": \"0.0.1\",\n\t\"tools\": {\n\t\t\"ocrd-cis-aio\": {\n\t\t\t\"executable\": \"ocrd-cis-aio\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Text recognition and optimization\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"postprocessing/alignment/recognition\"\n\t\t\t],\n\t\t\t\"description\": \"All in One Tool\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"tesserparampath\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"required\": true\n\t\t\t\t},\n\t\t\t\t\"ocropyparampath1\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"required\": true\n\t\t\t\t},\n\t\t\t\t\"ocropyparampath2\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"required\": true\n\t\t\t\t},\n\t\t\t\t\"alignparampath\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"required\": true\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-align\": {\n\t\t\t\"executable\": \"ocrd-cis-align\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Text recognition and optimization\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"postprocessing/alignment\"\n\t\t\t],\n\t\t\t\"description\": \"Align multiple OCRs and/or GTs\"\n\t\t},\n\t\t\"ocrd-cis-ocropy-binarize\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-binarize\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Image preprocessing\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"preprocessing/optimization/binarization\",\n\t\t\t\t\"preprocessing/optimization/grayscale_normalization\",\n\t\t\t\t\"preprocessing/optimization/deskewing\"\n\t\t\t],\n\t\t\t\"input_file_grp\": [\n\t\t\t\t\"OCR-D-IMG\",\n\t\t\t\t\"OCR-D-SEG-BLOCK\",\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"output_file_grp\": [\n\t\t\t\t\"OCR-D-IMG-BIN\",\n\t\t\t\t\"OCR-D-SEG-BLOCK\",\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"description\": \"Binarize (and optionally deskew/despeckle) pages / regions / lines with ocropy\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"method\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"enum\": [\"none\", \"global\", \"otsu\", \"gauss-otsu\", \"ocropy\"],\n\t\t\t\t\t\"description\": \"binarization method to use (only ocropy will include deskewing)\",\n\t\t\t\t\t\"default\": \"ocropy\"\n\t\t\t\t},\n\t\t\t\t\"grayscale\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"description\": \"for the ocropy method, produce grayscale-normalized instead of thresholded image\",\n\t\t\t\t\t\"default\": false\n\t\t\t\t},\n\t\t\t\t\"maxskew\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"description\": \"modulus of maximum skewing angle to detect (larger will be slower, 0 will deactivate deskewing)\",\n\t\t\t\t\t\"default\": 0.0\n\t\t\t\t},\n\t\t\t\t\"noise_maxsize\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"description\": \"maximum pixel number for connected components to regard as noise (0 will deactivate denoising)\",\n\t\t\t\t\t\"default\": 0\n\t\t\t\t},\n\t\t\t\t\"level-of-operation\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"enum\": [\"page\", \"region\", \"line\"],\n\t\t\t\t\t\"description\": \"PAGE XML hierarchy level granularity to annotate images for\",\n\t\t\t\t\t\"default\": \"page\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-ocropy-deskew\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-deskew\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Image preprocessing\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"preprocessing/optimization/deskewing\"\n\t\t\t],\n\t\t\t\"input_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-BLOCK\",\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"output_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-BLOCK\",\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"description\": \"Deskew regions with ocropy (by annotating orientation angle and adding AlternativeImage)\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"maxskew\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"description\": \"modulus of maximum skewing angle to detect (larger will be slower, 0 will deactivate deskewing)\",\n\t\t\t\t\t\"default\": 5.0\n\t\t\t\t},\n\t\t\t\t\"level-of-operation\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"enum\": [\"page\", \"region\"],\n\t\t\t\t\t\"description\": \"PAGE XML hierarchy level granularity to annotate images for\",\n\t\t\t\t\t\"default\": \"region\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-ocropy-denoise\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-denoise\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Image preprocessing\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"preprocessing/optimization/despeckling\"\n\t\t\t],\n\t\t\t\"input_file_grp\": [\n\t\t\t\t\"OCR-D-IMG\",\n\t\t\t\t\"OCR-D-SEG-BLOCK\",\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"output_file_grp\": [\n\t\t\t\t\"OCR-D-IMG-DESPECK\",\n\t\t\t\t\"OCR-D-SEG-BLOCK\",\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"description\": \"Despeckle pages / regions / lines with ocropy\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"noise_maxsize\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"format\": \"float\",\n\t\t\t\t\t\"description\": \"maximum size in points (pt) for connected components to regard as noise (0 will deactivate denoising)\",\n\t\t\t\t\t\"default\": 3.0\n\t\t\t\t},\n\t\t\t\t\"level-of-operation\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"enum\": [\"page\", \"region\", \"line\"],\n\t\t\t\t\t\"description\": \"PAGE XML hierarchy level granularity to annotate images for\",\n\t\t\t\t\t\"default\": \"page\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-ocropy-clip\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-clip\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Layout analysis\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"layout/segmentation/region\",\n\t\t\t\t\"layout/segmentation/line\"\n\t\t\t],\n\t\t\t\"input_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-BLOCK\",\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"output_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-BLOCK\",\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"description\": \"Clip text regions / lines at intersections with neighbours\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"level-of-operation\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"enum\": [\"region\", \"line\"],\n\t\t\t\t\t\"description\": \"PAGE XML hierarchy level granularity to annotate images for\",\n\t\t\t\t\t\"default\": \"region\"\n\t\t\t\t},\n\t\t\t\t\"min_fraction\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"format\": \"float\",\n\t\t\t\t\t\"description\": \"share of foreground pixels that must be retained by the largest label\",\n\t\t\t\t\t\"default\": 0.7\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-ocropy-resegment\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-resegment\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Layout analysis\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"layout/segmentation/line\"\n\t\t\t],\n\t\t\t\"input_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"output_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"description\": \"Resegment lines with ocropy (by shrinking annotated polygons)\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"min_fraction\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"format\": \"float\",\n\t\t\t\t\t\"description\": \"share of foreground pixels that must be retained by the largest label\",\n\t\t\t\t\t\"default\": 0.8\n\t\t\t\t},\n\t\t\t\t\"extend_margins\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"format\": \"integer\",\n\t\t\t\t\t\"description\": \"number of pixels to extend the input polygons horizontally and vertically before intersecting\",\n\t\t\t\t\t\"default\": 3\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-ocropy-dewarp\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-dewarp\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Image preprocessing\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"preprocessing/optimization/dewarping\"\n\t\t\t],\n\t\t\t\"description\": \"Dewarp line images with ocropy\",\n\t\t\t\"input_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"output_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"parameters\": {\n\t\t\t\t\"range\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"description\": \"maximum vertical disposition or maximum margin (will be multiplied by mean centerline deltas to yield pixels)\",\n\t\t\t\t\t\"default\": 4\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-ocropy-recognize\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-recognize\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Text recognition and optimization\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"recognition/text-recognition\"\n\t\t\t],\n\t\t\t\"description\": \"Recognize text in (binarized+deskewed+dewarped) lines with ocropy\",\n\t\t\t\"input_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-LINE\",\n\t\t\t\t\"OCR-D-SEG-WORD\",\n\t\t\t\t\"OCR-D-SEG-GLYPH\"\n\t\t\t],\n\t\t\t\"output_file_grp\": [\n\t\t\t\t\"OCR-D-OCR-OCRO\"\n\t\t\t],\n\t\t\t\"parameters\": {\n\t\t\t\t\"textequiv_level\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"enum\": [\"line\", \"word\", \"glyph\"],\n\t\t\t\t\t\"description\": \"PAGE XML hierarchy level granularity to add the TextEquiv results to\",\n\t\t\t\t\t\"default\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"model\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"description\": \"ocropy model to apply (e.g. fraktur.pyrnn)\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-ocropy-rec\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-rec\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Text recognition and optimization\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"recognition/text-recognition\"\n\t\t\t],\n\t\t\t\"description\": \"Recognize text snippets\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"model\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"description\": \"ocropy model to apply (e.g. fraktur.pyrnn)\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-ocropy-segment\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-segment\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Layout analysis\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"layout/segmentation/region\",\n\t\t\t\t\"layout/segmentation/line\"\n\t\t\t],\n\t\t\t\"input_file_grp\": [\n\t\t\t\t\"OCR-D-GT-SEG-BLOCK\",\n\t\t\t\t\"OCR-D-SEG-BLOCK\"\n\t\t\t],\n\t\t\t\"output_file_grp\": [\n\t\t\t\t\"OCR-D-SEG-LINE\"\n\t\t\t],\n\t\t\t\"description\": \"Segment pages into regions or regions into lines with ocropy\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"level-of-operation\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"enum\": [\"page\", \"region\"],\n\t\t\t\t\t\"description\": \"PAGE XML hierarchy level to read images from\",\n\t\t\t\t\t\"default\": \"region\"\n\t\t\t\t},\n\t\t\t\t\"maxcolseps\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"format\": \"integer\",\n\t\t\t\t\t\"default\": 2,\n\t\t\t\t\t\"description\": \"number of white/background column separators to try (when operating on the page level)\"\n\t\t\t\t},\n\t\t\t\t\"maxseps\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"format\": \"integer\",\n\t\t\t\t\t\"default\": 5,\n\t\t\t\t\t\"description\": \"number of black/foreground column separators to try, counted individually as lines (when operating on the page level)\"\n\t\t\t\t},\n\t\t\t\t\"overwrite_regions\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"default\": true,\n\t\t\t\t\t\"description\": \"remove any existing TextRegion elements (when operating on the page level)\"\n\t\t\t\t},\n\t\t\t\t\"overwrite_lines\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"default\": true,\n\t\t\t\t\t\"description\": \"remove any existing TextLine elements (when operating on the region level)\"\n\t\t\t\t},\n\t\t\t\t\"spread\": {\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"format\": \"float\",\n\t\t\t\t\t\"default\": 2.4,\n\t\t\t\t\t\"description\": \"distance in points (pt) from the foreground to project text line (or text region) labels into the background\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"cis-ocrd-ocropy-train\": {\n\t\t\t\"executable\": \"ocrd-cis-ocropy-train\",\n\t\t\t\"categories\": [\n\t\t\t\t\"lstm ocropy model training\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"training\"\n\t\t\t],\n\t\t\t\"description\": \"train model with ground truth from mets data\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"textequiv_level\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"enum\": [\"line\", \"word\", \"glyph\"],\n\t\t\t\t\t\"default\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"model\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"description\": \"load model or crate new one (e.g. fraktur.pyrnn)\"\n\t\t\t\t},\n\t\t\t\t\"ntrain\": {\n\t\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\t\"description\": \"lines to train before stopping\",\n\t\t\t\t\t\"default\": 1000000\n\t\t\t\t},\n\t\t\t\t\"outputpath\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"description\": \"(existing) path for the trained model\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-profile\": {\n\t\t\t\"executable\": \"ocrd-cis-profile\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Text recognition and optimization\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"postprocessing/alignment\"\n\t\t\t],\n\t\t\t\"description\": \"Add a correction suggestions and suspicious tokens (profile)\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"executable\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"required\": true\n\t\t\t\t},\n\t\t\t\t\"backend\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"required\": true\n\t\t\t\t},\n\t\t\t\t\"language\": {\n\t\t\t\t    \"type\": \"string\",\n\t\t\t\t\t\"required\": false,\n\t\t\t\t\t\"default\": \"german\"\n\t\t\t\t},\n\t\t\t\t\"additionalLexicon\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"required\": false,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-train\": {\n\t\t\t\"executable\": \"ocrd-cis-train\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Text recognition and optimization\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"postprocessing/alignment\"\n\t\t\t],\n\t\t\t\"description\": \"Train post correction model\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"jar\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"required\": true\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-stats\": {\n\t\t\t\"executable\": \"ocrd-cis-stats\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Text recognition and optimization\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"postprocessing/alignment\"\n\t\t\t],\n\t\t\t\"description\": \"Get Precision of aligned ocrs\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"none\": {\n\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-lang\": {\n\t\t\t\"executable\": \"ocrd-cis-lang\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Text recognition and optimization\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"postprocessing/alignment\"\n\t\t\t],\n\t\t\t\"description\": \"Get language and font of input-file-group\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"none\": {\n\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-importer\": {\n\t\t\t\"executable\": \"ocrd-cis-importer\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Text recognition and optimization\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"postprocessing\"\n\t\t\t],\n\t\t\t\"description\": \"different ocropy tool\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"none\": {\n\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-cutter\": {\n\t\t\t\"executable\": \"ocrd-cis-cutter\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Text recognition and optimization\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"postprocessing\"\n\t\t\t],\n\t\t\t\"description\": \"cut lines from input-file-groups\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"gtdir\": {\n\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"ocrd-cis-clean\": {\n\t\t\t\"executable\": \"ocrd-cis-clean\",\n\t\t\t\"categories\": [\n\t\t\t\t\"Text recognition and optimization\"\n\t\t\t],\n\t\t\t\"steps\": [\n\t\t\t\t\"postprocessing\"\n\t\t\t],\n\t\t\t\"description\": \"clean-up-tool\",\n\t\t\t\"parameters\": {\n\t\t\t\t\"mainLevel\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"enum\": [\"line\", \"word\", \"glyph\"],\n\t\t\t\t\t\"default\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"mainIndex\": {\n\t\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\t\"description\": \"model index\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
+            "setup.py": "\"\"\"\nInstalls:\n    - ocrd-cis-align\n    - ocrd-cis-profile\n    - ocrd-cis-ocropy-clip\n    - ocrd-cis-ocropy-denoise\n    - ocrd-cis-ocropy-deskew\n    - ocrd-cis-ocropy-binarize\n    - ocrd-cis-ocropy-resegment\n    - ocrd-cis-ocropy-segment\n    - ocrd-cis-ocropy-dewarp\n    - ocrd-cis-ocropy-recognize\n    - ocrd-cis-ocropy-train\n    - ocrd-cis-aio\n    - ocrd-cis-stats\n    - ocrd-cis-lang\n    - ocrd-cis-clean\n    - ocrd-cis-cutter\n    - ocrd-cis-importer\n\"\"\"\n\nfrom pathlib import Path\nfrom setuptools import setup\nfrom setuptools import find_packages\n\nsetup(\n    include_package_data=True,\n    name='cis-ocrd',\n    version='0.0.5',\n    description='CIS OCR-D command line tools',\n    long_description=Path('README.md').read_text(),\n    long_description_content_type=\"text/markdown\",\n    author='Florian Fink, Tobias Englmeier, Christoph Weber',\n    author_email='finkf@cis.lmu.de, englmeier@cis.lmu.de, web_chris@msn.com',\n    url='https://github.com/cisocrgroup/cis-ocrd-py',\n    license='MIT',\n    packages=find_packages(),\n    install_requires=[\n        'ocrd>=2.0.0a1',\n        'click',\n        'scipy',\n        'numpy>=1.17.0',\n        'pillow>=6.2.0',\n        'matplotlib>3.0.0',\n        'python-Levenshtein',\n        'calamari_ocr'\n    ],\n    package_data={\n        '': ['*.json', '*.yml', '*.yaml'],\n        'ocrd_cis': ['ocrd_cis/jar/ocrd-cis.jar'],\n    },\n    entry_points={\n        'console_scripts': [\n            'ocrd-cis-align=ocrd_cis.align.cli:cis_ocrd_align',\n            'ocrd-cis-profile=ocrd_cis.profile.cli:cis_ocrd_profile',\n            'ocrd-cis-ocropy-binarize=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_binarize',\n            'ocrd-cis-ocropy-clip=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_clip',\n            'ocrd-cis-ocropy-denoise=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_denoise',\n            'ocrd-cis-ocropy-deskew=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_deskew',\n            'ocrd-cis-ocropy-dewarp=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_dewarp',\n            'ocrd-cis-ocropy-recognize=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_recognize',\n            'ocrd-cis-ocropy-rec=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_rec',\n            'ocrd-cis-ocropy-resegment=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_resegment',\n            'ocrd-cis-ocropy-segment=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_segment',\n            'ocrd-cis-ocropy-train=ocrd_cis.ocropy.cli:cis_ocrd_ocropy_train',\n            'ocrd-cis-aio=ocrd_cis.aio.cli:cis_ocrd_aio',\n            'ocrd-cis-stats=ocrd_cis.div.cli:cis_ocrd_stats',\n            'ocrd-cis-lang=ocrd_cis.div.cli:cis_ocrd_lang',\n            'ocrd-cis-clean=ocrd_cis.div.cli:cis_ocrd_clean',\n            'ocrd-cis-importer=ocrd_cis.div.cli:cis_ocrd_importer',\n            'ocrd-cis-cutter=ocrd_cis.div.cli:cis_ocrd_cutter',\n        ]\n    },\n)\n"
         },
         "git": {
-            "last_commit": "Wed Oct 30 16:47:09 2019 +0100",
+            "last_commit": "",
             "latest_tag": "",
-            "number_of_commits": "392",
-            "url": "https://github.com/cisocrgroup/ocrd_cis.git"
+            "number_of_commits": "",
+            "url": ""
         },
         "name": "ocrd_cis",
         "ocrd_tool": {
-            "git_url": "https://github.com/cisocrgroup/ocrd_cis",
+            "git_url": "https://github.com/cisocrgroup/cis-ocrd-py",
             "tools": {
+                "cis-ocrd-ocropy-train": {
+                    "categories": [
+                        "lstm ocropy model training"
+                    ],
+                    "description": "train model with ground truth from mets data",
+                    "executable": "ocrd-cis-ocropy-train",
+                    "parameters": {
+                        "model": {
+                            "description": "load model or crate new one (e.g. fraktur.pyrnn)",
+                            "type": "string"
+                        },
+                        "ntrain": {
+                            "default": 1000000,
+                            "description": "lines to train before stopping",
+                            "type": "integer"
+                        },
+                        "outputpath": {
+                            "description": "(existing) path for the trained model",
+                            "type": "string"
+                        },
+                        "textequiv_level": {
+                            "default": "line",
+                            "enum": [
+                                "line",
+                                "word",
+                                "glyph"
+                            ],
+                            "type": "string"
+                        }
+                    },
+                    "steps": [
+                        "training"
+                    ]
+                },
+                "ocrd-cis-aio": {
+                    "categories": [
+                        "Text recognition and optimization"
+                    ],
+                    "description": "All in One Tool",
+                    "executable": "ocrd-cis-aio",
+                    "parameters": {
+                        "alignparampath": {
+                            "required": true,
+                            "type": "string"
+                        },
+                        "ocropyparampath1": {
+                            "required": true,
+                            "type": "string"
+                        },
+                        "ocropyparampath2": {
+                            "required": true,
+                            "type": "string"
+                        },
+                        "tesserparampath": {
+                            "required": true,
+                            "type": "string"
+                        }
+                    },
+                    "steps": [
+                        "postprocessing/alignment/recognition"
+                    ]
+                },
                 "ocrd-cis-align": {
                     "categories": [
                         "Text recognition and optimization"
@@ -2259,12 +2382,72 @@
                         "postprocessing/alignment"
                     ]
                 },
-                "ocrd-cis-jar": {
+                "ocrd-cis-clean": {
+                    "categories": [
+                        "Text recognition and optimization"
+                    ],
+                    "description": "clean-up-tool",
+                    "executable": "ocrd-cis-clean",
+                    "parameters": {
+                        "mainIndex": {
+                            "description": "model index",
+                            "type": "integer"
+                        },
+                        "mainLevel": {
+                            "default": "line",
+                            "enum": [
+                                "line",
+                                "word",
+                                "glyph"
+                            ],
+                            "type": "string"
+                        }
+                    },
+                    "steps": [
+                        "postprocessing"
+                    ]
+                },
+                "ocrd-cis-cutter": {
                     "categories": [
                         "Text recognition and optimization"
                     ],
-                    "description": "Output path to the ocrd-cis.jar file",
-                    "executable": "ocrd-cis-jar",
+                    "description": "cut lines from input-file-groups",
+                    "executable": "ocrd-cis-cutter",
+                    "parameters": {
+                        "gtdir": {
+                            "type": "string"
+                        }
+                    },
+                    "steps": [
+                        "postprocessing"
+                    ]
+                },
+                "ocrd-cis-importer": {
+                    "categories": [
+                        "Text recognition and optimization"
+                    ],
+                    "description": "different ocropy tool",
+                    "executable": "ocrd-cis-importer",
+                    "parameters": {
+                        "none": {
+                            "type": "string"
+                        }
+                    },
+                    "steps": [
+                        "postprocessing"
+                    ]
+                },
+                "ocrd-cis-lang": {
+                    "categories": [
+                        "Text recognition and optimization"
+                    ],
+                    "description": "Get language and font of input-file-group",
+                    "executable": "ocrd-cis-lang",
+                    "parameters": {
+                        "none": {
+                            "type": "string"
+                        }
+                    },
                     "steps": [
                         "postprocessing/alignment"
                     ]
@@ -2598,114 +2781,6 @@
                         "layout/segmentation/line"
                     ]
                 },
-                "ocrd-cis-ocropy-train": {
-                    "categories": [
-                        "lstm ocropy model training"
-                    ],
-                    "description": "train model with ground truth from mets data",
-                    "executable": "ocrd-cis-ocropy-train",
-                    "parameters": {
-                        "model": {
-                            "description": "load model or crate new one (e.g. fraktur.pyrnn)",
-                            "type": "string"
-                        },
-                        "ntrain": {
-                            "default": 1000000,
-                            "description": "lines to train before stopping",
-                            "type": "integer"
-                        },
-                        "outputpath": {
-                            "description": "(existing) path for the trained model",
-                            "type": "string"
-                        },
-                        "textequiv_level": {
-                            "default": "line",
-                            "enum": [
-                                "line",
-                                "word",
-                                "glyph"
-                            ],
-                            "type": "string"
-                        }
-                    },
-                    "steps": [
-                        "training"
-                    ]
-                },
-                "ocrd-cis-post-correct": {
-                    "categories": [
-                        "Text recognition and optimization"
-                    ],
-                    "description": "Post correct OCR results",
-                    "executable": "ocrd-cis-post-correct.sh",
-                    "parameters": {
-                        "ocrSteps": {
-                            "description": "List of additional ocr steps",
-                            "items": {
-                                "description": "OCR command that is evaled using the bash eval command (available parameters: $METS, $LOG_LEVEL, $XML_INPUT_FILE_GRP, $XML_OUTPUT_FILE_GRP, $PARAMETER)",
-                                "type": "string"
-                            },
-                            "required": true,
-                            "type": "array"
-                        },
-                        "postCorrection": {
-                            "description": "Configuration of post correction command",
-                            "properties": {
-                                "maxCandidate": {
-                                    "description": "Maximum number of considered profiler candidates per token",
-                                    "required": true,
-                                    "type": "integer"
-                                },
-                                "model": {
-                                    "description": "Path to the post correction model file",
-                                    "required": true,
-                                    "type": "string"
-                                },
-                                "profiler": {
-                                    "description": "Profiler configuration",
-                                    "properties": {
-                                        "config": {
-                                            "description": "Path to the profiler language config file",
-                                            "required": true,
-                                            "type": "string"
-                                        },
-                                        "path": {
-                                            "description": "Path to the profiler executable",
-                                            "required": true,
-                                            "type": "string"
-                                        }
-                                    },
-                                    "required": [
-                                        "path",
-                                        "config"
-                                    ],
-                                    "type": "object"
-                                },
-                                "runDM": {
-                                    "description": "Do run the ranking and the decision step for the post correction",
-                                    "required": true,
-                                    "type": "boolean"
-                                },
-                                "runLE": {
-                                    "description": "Do run the lexicon extension step for the post correction",
-                                    "required": true,
-                                    "type": "boolean"
-                                }
-                            },
-                            "required": [
-                                "maxCandidate",
-                                "profiler",
-                                "model",
-                                "runLE",
-                                "runDM"
-                            ],
-                            "type": "object"
-                        }
-                    },
-                    "steps": [
-                        "postprocessing/alignment"
-                    ]
-                },
                 "ocrd-cis-profile": {
                     "categories": [
                         "Text recognition and optimization"
@@ -2736,227 +2811,185 @@
                         "postprocessing/alignment"
                     ]
                 },
-                "ocrd-cis-train": {
+                "ocrd-cis-stats": {
                     "categories": [
                         "Text recognition and optimization"
                     ],
-                    "description": "Train post correction model",
-                    "executable": "ocrd-cis-train.sh",
+                    "description": "Get Precision of aligned ocrs",
+                    "executable": "ocrd-cis-stats",
                     "parameters": {
-                        "gtArchives": {
-                            "description": "List of ground truth archives",
-                            "items": {
-                                "description": "Path (or URL) to a ground truth archive",
-                                "type": "string"
-                            },
-                            "required": true,
-                            "type": "array"
-                        },
-                        "imagePreprocessingSteps": {
-                            "description": "List of image preprocessing steps",
-                            "items": {
-                                "description": "Image preprocessing command that is evaled using the bash eval command (available parameters: $METS, $LOG_LEVEL, $XML_INPUT_FILE_GRP, $XML_OUTPUT_FILE_GRP, $IMG_OUTPUT_FILE_GRP, $IMG_INPUT_FILE_GRP, $PARAMETER)",
-                                "type": "string"
-                            },
-                            "required": true,
-                            "type": "array"
-                        },
-                        "ocrSteps": {
-                            "description": "List of ocr steps",
-                            "items": {
-                                "description": "OCR command that is evaled using the bash eval command (available parameters: $METS, $LOG_LEVEL, $XML_INPUT_FILE_GRP, $XML_OUTPUT_FILE_GRP, $PARAMETER)",
-                                "type": "string"
-                            },
-                            "required": true,
-                            "type": "array"
-                        },
-                        "training": {
-                            "description": "Configuration of training command",
-                            "properties": {
-                                "dmFeatures": {
-                                    "description": "List of the desicion maker features",
-                                    "items": {
-                                        "description": "Feature configuration",
-                                        "properties": {
-                                            "class": {
-                                                "description": "Class name of the feature",
-                                                "type": "string"
-                                            },
-                                            "name": {
-                                                "description": "Name of the feature",
-                                                "type": "string"
-                                            },
-                                            "type": {
-                                                "description": "Fully qualified java class name of the feature",
-                                                "type": "string"
-                                            }
-                                        },
-                                        "required": [
-                                            "type",
-                                            "name"
-                                        ],
-                                        "type": "object"
-                                    },
-                                    "required": true,
-                                    "type": "array"
-                                },
-                                "filterClasses": {
-                                    "description": "List of filtered feature classes",
-                                    "items": {
-                                        "description": "Class name of feature class to filter",
-                                        "type": "string"
-                                    },
-                                    "required": false,
-                                    "type": "array"
-                                },
-                                "leFeatures": {
-                                    "description": "List of the lexicon extension features",
-                                    "items": {
-                                        "description": "Feature configuration",
-                                        "properties": {
-                                            "class": {
-                                                "description": "Class name of the feature",
-                                                "type": "string"
-                                            },
-                                            "name": {
-                                                "description": "Name of the feature",
-                                                "type": "string"
-                                            },
-                                            "type": {
-                                                "description": "Fully qualified java class name of the feature",
-                                                "type": "string"
-                                            }
-                                        },
-                                        "required": [
-                                            "type",
-                                            "name"
-                                        ],
-                                        "type": "object"
-                                    },
-                                    "required": true,
-                                    "type": "array"
-                                },
-                                "maxCandidate": {
-                                    "description": "Maximum number of considered profiler candidates per token",
-                                    "required": true,
-                                    "type": "integer"
-                                },
-                                "profiler": {
-                                    "description": "Profiler configuration",
-                                    "properties": {
-                                        "config": {
-                                            "description": "Path to the profiler language config file",
-                                            "required": true,
-                                            "type": "string"
-                                        },
-                                        "path": {
-                                            "description": "Path to the profiler executable",
-                                            "required": true,
-                                            "type": "string"
-                                        }
-                                    },
-                                    "required": [
-                                        "path",
-                                        "config"
-                                    ],
-                                    "type": "object"
-                                },
-                                "rrFeatures": {
-                                    "description": "List of the reranker features",
-                                    "items": {
-                                        "description": "Feature configuration",
-                                        "properties": {
-                                            "class": {
-                                                "description": "Class name of the feature",
-                                                "type": "string"
-                                            },
-                                            "name": {
-                                                "description": "Name of the feature",
-                                                "type": "string"
-                                            },
-                                            "type": {
-                                                "description": "Fully qualified java class name of the feature",
-                                                "type": "string"
-                                            }
-                                        },
-                                        "required": [
-                                            "type",
-                                            "name"
-                                        ],
-                                        "type": "object"
-                                    },
-                                    "required": true,
-                                    "type": "array"
-                                },
-                                "trigrams": {
-                                    "description": "Path to character trigrams csv file (format: n,trigram)",
-                                    "required": true,
-                                    "type": "string"
-                                }
-                            },
-                            "required": [
-                                "trigrams",
-                                "maxCandidate",
-                                "profiler",
-                                "leFeatures",
-                                "rrFeatures",
-                                "dmFeatures"
-                            ],
-                            "type": "object"
+                        "none": {
+                            "type": "string"
                         }
                     },
                     "steps": [
                         "postprocessing/alignment"
                     ]
                 },
-                "ocrd-cis-wer": {
+                "ocrd-cis-train": {
                     "categories": [
-                        "evaluation"
+                        "Text recognition and optimization"
                     ],
-                    "description": "calculate the word error rate for aligned page xml files",
-                    "executable": "ocrd-cis-wer",
+                    "description": "Train post correction model",
+                    "executable": "ocrd-cis-train",
                     "parameters": {
-                        "gtIndex": {
-                            "default": -1,
-                            "description": "text equiv index for the gt tokens",
-                            "type": "integer"
-                        },
-                        "testIndex": {
-                            "default": 0,
-                            "description": "text equiv index for the test/ocr tokens",
-                            "type": "integer"
+                        "jar": {
+                            "required": true,
+                            "type": "string"
                         }
                     },
                     "steps": [
-                        "evaluation"
+                        "postprocessing/alignment"
                     ]
                 }
             },
-            "version": "0.0.2"
+            "version": "0.0.1"
         },
-        "ocrd_tool_validate": "<report valid=\"false\">\n  <error>[tools.ocrd-cis-ocropy-rec] 'input_file_grp' is a required property</error>\n  <error>[tools.ocrd-cis-ocropy-train] 'input_file_grp' is a required property</error>\n  <error>[tools.ocrd-cis-ocropy-train.parameters.textequiv_level] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-ocropy-train.parameters.ntrain.type] 'integer' is not one of ['string', 'number', 'boolean']</error>\n  <error>[tools.ocrd-cis-ocropy-train.categories.0] 'lstm ocropy model training' is not one of ['Image preprocessing', 'Layout analysis', 'Text recognition and optimization', 'Model training', 'Long-term preservation', 'Quality assurance']</error>\n  <error>[tools.ocrd-cis-ocropy-train.steps.0] 'training' is not one of ['preprocessing/characterization', 'preprocessing/optimization', 'preprocessing/optimization/cropping', 'preprocessing/optimization/deskewing', 'preprocessing/optimization/despeckling', 'preprocessing/optimization/dewarping', 'preprocessing/optimization/binarization', 'preprocessing/optimization/grayscale_normalization', 'recognition/text-recognition', 'recognition/font-identification', 'recognition/post-correction', 'layout/segmentation', 'layout/segmentation/text-nontext', 'layout/segmentation/region', 'layout/segmentation/line', 'layout/segmentation/word', 'layout/segmentation/classification', 'layout/analysis']</error>\n  <error>[tools.ocrd-cis-align] 'input_file_grp' is a required property</error>\n  <error>[tools.ocrd-cis-align.steps.0] 'postprocessing/alignment' is not one of ['preprocessing/characterization', 'preprocessing/optimization', 'preprocessing/optimization/cropping', 'preprocessing/optimization/deskewing', 'preprocessing/optimization/despeckling', 'preprocessing/optimization/dewarping', 'preprocessing/optimization/binarization', 'preprocessing/optimization/grayscale_normalization', 'recognition/text-recognition', 'recognition/font-identification', 'recognition/post-correction', 'layout/segmentation', 'layout/segmentation/text-nontext', 'layout/segmentation/region', 'layout/segmentation/line', 'layout/segmentation/word', 'layout/segmentation/classification', 'layout/analysis']</error>\n  <error>[tools.ocrd-cis-wer] 'input_file_grp' is a required property</error>\n  <error>[tools.ocrd-cis-wer.parameters.testIndex.type] 'integer' is not one of ['string', 'number', 'boolean']</error>\n  <error>[tools.ocrd-cis-wer.parameters.gtIndex.type] 'integer' is not one of ['string', 'number', 'boolean']</error>\n  <error>[tools.ocrd-cis-wer.categories.0] 'evaluation' is not one of ['Image preprocessing', 'Layout analysis', 'Text recognition and optimization', 'Model training', 'Long-term preservation', 'Quality assurance']</error>\n  <error>[tools.ocrd-cis-wer.steps.0] 'evaluation' is not one of ['preprocessing/characterization', 'preprocessing/optimization', 'preprocessing/optimization/cropping', 'preprocessing/optimization/deskewing', 'preprocessing/optimization/despeckling', 'preprocessing/optimization/dewarping', 'preprocessing/optimization/binarization', 'preprocessing/optimization/grayscale_normalization', 'recognition/text-recognition', 'recognition/font-identification', 'recognition/post-correction', 'layout/segmentation', 'layout/segmentation/text-nontext', 'layout/segmentation/region', 'layout/segmentation/line', 'layout/segmentation/word', 'layout/segmentation/classification', 'layout/analysis']</error>\n  <error>[tools.ocrd-cis-jar] 'input_file_grp' is a required property</error>\n  <error>[tools.ocrd-cis-jar.steps.0] 'postprocessing/alignment' is not one of ['preprocessing/characterization', 'preprocessing/optimization', 'preprocessing/optimization/cropping', 'preprocessing/optimization/deskewing', 'preprocessing/optimization/despeckling', 'preprocessing/optimization/dewarping', 'preprocessing/optimization/binarization', 'preprocessing/optimization/grayscale_normalization', 'recognition/text-recognition', 'recognition/font-identification', 'recognition/post-correction', 'layout/segmentation', 'layout/segmentation/text-nontext', 'layout/segmentation/region', 'layout/segmentation/line', 'layout/segmentation/word', 'layout/segmentation/classification', 'layout/analysis']</error>\n  <error>[tools.ocrd-cis-profile] 'input_file_grp' is a required property</error>\n  <error>[tools.ocrd-cis-profile.parameters.executable] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-profile.parameters.backend] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-profile.parameters.language] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-profile.parameters.additionalLexicon] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-profile.steps.0] 'postprocessing/alignment' is not one of ['preprocessing/characterization', 'preprocessing/optimization', 'preprocessing/optimization/cropping', 'preprocessing/optimization/deskewing', 'preprocessing/optimization/despeckling', 'preprocessing/optimization/dewarping', 'preprocessing/optimization/binarization', 'preprocessing/optimization/grayscale_normalization', 'recognition/text-recognition', 'recognition/font-identification', 'recognition/post-correction', 'layout/segmentation', 'layout/segmentation/text-nontext', 'layout/segmentation/region', 'layout/segmentation/line', 'layout/segmentation/word', 'layout/segmentation/classification', 'layout/analysis']</error>\n  <error>[tools.ocrd-cis-train] 'input_file_grp' is a required property</error>\n  <error>[tools.ocrd-cis-train.parameters.gtArchives] Additional properties are not allowed ('items' was unexpected)</error>\n  <error>[tools.ocrd-cis-train.parameters.gtArchives.type] 'array' is not one of ['string', 'number', 'boolean']</error>\n  <error>[tools.ocrd-cis-train.parameters.imagePreprocessingSteps] Additional properties are not allowed ('items' was unexpected)</error>\n  <error>[tools.ocrd-cis-train.parameters.imagePreprocessingSteps.type] 'array' is not one of ['string', 'number', 'boolean']</error>\n  <error>[tools.ocrd-cis-train.parameters.ocrSteps] Additional properties are not allowed ('items' was unexpected)</error>\n  <error>[tools.ocrd-cis-train.parameters.ocrSteps.type] 'array' is not one of ['string', 'number', 'boolean']</error>\n  <error>[tools.ocrd-cis-train.parameters.training] Additional properties are not allowed ('properties' was unexpected)</error>\n  <error>[tools.ocrd-cis-train.parameters.training.type] 'object' is not one of ['string', 'number', 'boolean']</error>\n  <error>[tools.ocrd-cis-train.parameters.training.required] ['trigrams', 'maxCandidate', 'profiler', 'leFeatures', 'rrFeatures', 'dmFeatures'] is not of type 'boolean'</error>\n  <error>[tools.ocrd-cis-train.steps.0] 'postprocessing/alignment' is not one of ['preprocessing/characterization', 'preprocessing/optimization', 'preprocessing/optimization/cropping', 'preprocessing/optimization/deskewing', 'preprocessing/optimization/despeckling', 'preprocessing/optimization/dewarping', 'preprocessing/optimization/binarization', 'preprocessing/optimization/grayscale_normalization', 'recognition/text-recognition', 'recognition/font-identification', 'recognition/post-correction', 'layout/segmentation', 'layout/segmentation/text-nontext', 'layout/segmentation/region', 'layout/segmentation/line', 'layout/segmentation/word', 'layout/segmentation/classification', 'layout/analysis']</error>\n  <error>[tools.ocrd-cis-post-correct] 'input_file_grp' is a required property</error>\n  <error>[tools.ocrd-cis-post-correct.parameters.ocrSteps] Additional properties are not allowed ('items' was unexpected)</error>\n  <error>[tools.ocrd-cis-post-correct.parameters.ocrSteps.type] 'array' is not one of ['string', 'number', 'boolean']</error>\n  <error>[tools.ocrd-cis-post-correct.parameters.postCorrection] Additional properties are not allowed ('properties' was unexpected)</error>\n  <error>[tools.ocrd-cis-post-correct.parameters.postCorrection.type] 'object' is not one of ['string', 'number', 'boolean']</error>\n  <error>[tools.ocrd-cis-post-correct.parameters.postCorrection.required] ['maxCandidate', 'profiler', 'model', 'runLE', 'runDM'] is not of type 'boolean'</error>\n  <error>[tools.ocrd-cis-post-correct.steps.0] 'postprocessing/alignment' is not one of ['preprocessing/characterization', 'preprocessing/optimization', 'preprocessing/optimization/cropping', 'preprocessing/optimization/deskewing', 'preprocessing/optimization/despeckling', 'preprocessing/optimization/dewarping', 'preprocessing/optimization/binarization', 'preprocessing/optimization/grayscale_normalization', 'recognition/text-recognition', 'recognition/font-identification', 'recognition/post-correction', 'layout/segmentation', 'layout/segmentation/text-nontext', 'layout/segmentation/region', 'layout/segmentation/line', 'layout/segmentation/word', 'layout/segmentation/classification', 'layout/analysis']</error>\n</report>",
+        "ocrd_tool_validate": "<report valid=\"false\">\n  <error>[tools.ocrd-cis-aio] 'input_file_grp' is a required property</error>\n  <error>[tools.ocrd-cis-aio.parameters.tesserparampath] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-aio.parameters.ocropyparampath1] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-aio.parameters.ocropyparampath2] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-aio.parameters.alignparampath] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-aio.steps.0] 'postprocessing/alignment/recognition' is not one of ['preprocessing/characterization', 'preprocessing/optimization', 'preprocessing/optimization/cropping', 'preprocessing/optimization/deskewing', 'preprocessing/optimization/despeckling', 'preprocessing/optimization/dewarping', 'preprocessing/optimization/binarization', 'preprocessing/optimization/grayscale_normalization', 'recognition/text-recognition', 'recognition/font-identification', 'recognition/post-correction', 'layout/segmentation', 'layout/segmentation/text-nontext', 'layout/segmentation/region', 'layout/segmentation/line', 'layout/segmentation/word', 'layout/segmentation/classification', 'layout/analysis']</error>\n  <error>[tools.ocrd-cis-align] 'input_file_grp' is a required property</error>\n  <error>[tools.ocrd-cis-align.steps.0] 'postprocessing/alignment' is not one of ['preprocessing/characterization', 'preprocessing/optimization', 'preprocessing/optimization/cropping', 'preprocessing/optimization/deskewing', 'preprocessing/optimization/despeckling', 'preprocessing/optimization/dewarping', 'preprocessing/optimization/binarization', 'preprocessing/optimization/grayscale_normalization', 'recognition/text-recognition', 'recognition/font-identification', 'recognition/post-correction', 'layout/segmentation', 'layout/segmentation/text-nontext', 'layout/segmentation/region', 'layout/segmentation/line', 'layout/segmentation/word', 'layout/segmentation/classification', 'layout/analysis']</error>\n  <error>[tools.ocrd-cis-ocropy-rec] 'input_file_grp' is a required property</error>\n  <error>[tools.cis-ocrd-ocropy-train] 'input_file_grp' is a required property</error>\n  <error>[tools.cis-ocrd-ocropy-train.parameters.textequiv_level] 'description' is a required property</error>\n  <error>[tools.cis-ocrd-ocropy-train.parameters.ntrain.type] 'integer' is not one of ['string', 'number', 'boolean']</error>\n  <error>[tools.cis-ocrd-ocropy-train.categories.0] 'lstm ocropy model training' is not one of ['Image preprocessing', 'Layout analysis', 'Text recognition and optimization', 'Model training', 'Long-term preservation', 'Quality assurance']</error>\n  <error>[tools.cis-ocrd-ocropy-train.steps.0] 'training' is not one of ['preprocessing/characterization', 'preprocessing/optimization', 'preprocessing/optimization/cropping', 'preprocessing/optimization/deskewing', 'preprocessing/optimization/despeckling', 'preprocessing/optimization/dewarping', 'preprocessing/optimization/binarization', 'preprocessing/optimization/grayscale_normalization', 'recognition/text-recognition', 'recognition/font-identification', 'recognition/post-correction', 'layout/segmentation', 'layout/segmentation/text-nontext', 'layout/segmentation/region', 'layout/segmentation/line', 'layout/segmentation/word', 'layout/segmentation/classification', 'layout/analysis']</error>\n  <error>[tools.ocrd-cis-profile] 'input_file_grp' is a required property</error>\n  <error>[tools.ocrd-cis-profile.parameters.executable] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-profile.parameters.backend] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-profile.parameters.language] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-profile.parameters.additionalLexicon] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-profile.steps.0] 'postprocessing/alignment' is not one of ['preprocessing/characterization', 'preprocessing/optimization', 'preprocessing/optimization/cropping', 'preprocessing/optimization/deskewing', 'preprocessing/optimization/despeckling', 'preprocessing/optimization/dewarping', 'preprocessing/optimization/binarization', 'preprocessing/optimization/grayscale_normalization', 'recognition/text-recognition', 'recognition/font-identification', 'recognition/post-correction', 'layout/segmentation', 'layout/segmentation/text-nontext', 'layout/segmentation/region', 'layout/segmentation/line', 'layout/segmentation/word', 'layout/segmentation/classification', 'layout/analysis']</error>\n  <error>[tools.ocrd-cis-train] 'input_file_grp' is a required property</error>\n  <error>[tools.ocrd-cis-train.parameters.jar] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-train.steps.0] 'postprocessing/alignment' is not one of ['preprocessing/characterization', 'preprocessing/optimization', 'preprocessing/optimization/cropping', 'preprocessing/optimization/deskewing', 'preprocessing/optimization/despeckling', 'preprocessing/optimization/dewarping', 'preprocessing/optimization/binarization', 'preprocessing/optimization/grayscale_normalization', 'recognition/text-recognition', 'recognition/font-identification', 'recognition/post-correction', 'layout/segmentation', 'layout/segmentation/text-nontext', 'layout/segmentation/region', 'layout/segmentation/line', 'layout/segmentation/word', 'layout/segmentation/classification', 'layout/analysis']</error>\n  <error>[tools.ocrd-cis-stats] 'input_file_grp' is a required property</error>\n  <error>[tools.ocrd-cis-stats.parameters.none] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-stats.steps.0] 'postprocessing/alignment' is not one of ['preprocessing/characterization', 'preprocessing/optimization', 'preprocessing/optimization/cropping', 'preprocessing/optimization/deskewing', 'preprocessing/optimization/despeckling', 'preprocessing/optimization/dewarping', 'preprocessing/optimization/binarization', 'preprocessing/optimization/grayscale_normalization', 'recognition/text-recognition', 'recognition/font-identification', 'recognition/post-correction', 'layout/segmentation', 'layout/segmentation/text-nontext', 'layout/segmentation/region', 'layout/segmentation/line', 'layout/segmentation/word', 'layout/segmentation/classification', 'layout/analysis']</error>\n  <error>[tools.ocrd-cis-lang] 'input_file_grp' is a required property</error>\n  <error>[tools.ocrd-cis-lang.parameters.none] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-lang.steps.0] 'postprocessing/alignment' is not one of ['preprocessing/characterization', 'preprocessing/optimization', 'preprocessing/optimization/cropping', 'preprocessing/optimization/deskewing', 'preprocessing/optimization/despeckling', 'preprocessing/optimization/dewarping', 'preprocessing/optimization/binarization', 'preprocessing/optimization/grayscale_normalization', 'recognition/text-recognition', 'recognition/font-identification', 'recognition/post-correction', 'layout/segmentation', 'layout/segmentation/text-nontext', 'layout/segmentation/region', 'layout/segmentation/line', 'layout/segmentation/word', 'layout/segmentation/classification', 'layout/analysis']</error>\n  <error>[tools.ocrd-cis-importer] 'input_file_grp' is a required property</error>\n  <error>[tools.ocrd-cis-importer.parameters.none] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-importer.steps.0] 'postprocessing' is not one of ['preprocessing/characterization', 'preprocessing/optimization', 'preprocessing/optimization/cropping', 'preprocessing/optimization/deskewing', 'preprocessing/optimization/despeckling', 'preprocessing/optimization/dewarping', 'preprocessing/optimization/binarization', 'preprocessing/optimization/grayscale_normalization', 'recognition/text-recognition', 'recognition/font-identification', 'recognition/post-correction', 'layout/segmentation', 'layout/segmentation/text-nontext', 'layout/segmentation/region', 'layout/segmentation/line', 'layout/segmentation/word', 'layout/segmentation/classification', 'layout/analysis']</error>\n  <error>[tools.ocrd-cis-cutter] 'input_file_grp' is a required property</error>\n  <error>[tools.ocrd-cis-cutter.parameters.gtdir] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-cutter.steps.0] 'postprocessing' is not one of ['preprocessing/characterization', 'preprocessing/optimization', 'preprocessing/optimization/cropping', 'preprocessing/optimization/deskewing', 'preprocessing/optimization/despeckling', 'preprocessing/optimization/dewarping', 'preprocessing/optimization/binarization', 'preprocessing/optimization/grayscale_normalization', 'recognition/text-recognition', 'recognition/font-identification', 'recognition/post-correction', 'layout/segmentation', 'layout/segmentation/text-nontext', 'layout/segmentation/region', 'layout/segmentation/line', 'layout/segmentation/word', 'layout/segmentation/classification', 'layout/analysis']</error>\n  <error>[tools.ocrd-cis-clean] 'input_file_grp' is a required property</error>\n  <error>[tools.ocrd-cis-clean.parameters.mainLevel] 'description' is a required property</error>\n  <error>[tools.ocrd-cis-clean.parameters.mainIndex.type] 'integer' is not one of ['string', 'number', 'boolean']</error>\n  <error>[tools.ocrd-cis-clean.steps.0] 'postprocessing' is not one of ['preprocessing/characterization', 'preprocessing/optimization', 'preprocessing/optimization/cropping', 'preprocessing/optimization/deskewing', 'preprocessing/optimization/despeckling', 'preprocessing/optimization/dewarping', 'preprocessing/optimization/binarization', 'preprocessing/optimization/grayscale_normalization', 'recognition/text-recognition', 'recognition/font-identification', 'recognition/post-correction', 'layout/segmentation', 'layout/segmentation/text-nontext', 'layout/segmentation/region', 'layout/segmentation/line', 'layout/segmentation/word', 'layout/segmentation/classification', 'layout/analysis']</error>\n</report>",
         "official": true,
         "org_plus_name": "cisocrgroup/ocrd_cis",
         "python": {
             "author": "Florian Fink, Tobias Englmeier, Christoph Weber",
             "author-email": "finkf@cis.lmu.de, englmeier@cis.lmu.de, web_chris@msn.com",
-            "name": "ocrd_cis",
-            "pypi": null,
-            "url": "https://github.com/cisocrgroup/ocrd_cis"
+            "name": "cis-ocrd",
+            "pypi": {
+                "info": {
+                    "author": "Florian Fink, Tobias Englmeier, Christoph Weber",
+                    "author_email": "finkf@cis.lmu.de, englmeier@cis.lmu.de, web_chris@msn.com",
+                    "bugtrack_url": null,
+                    "classifiers": [],
+                    "description": "# ocrd_cis\n\n![build status](https://travis-ci.org/cisocrgroup/cis-ocrd-py.svg?branch=dev)\n# cis-ocrd-py\n\n[CIS](http://www.cis.lmu.de) [OCR-D](http://ocr-d.de) command line tools\n\n## General usage\n\n### Essential system packages\n\n```sh\nsudo apt-get install \\\n  git \\\n  build-essential \\\n  python3 python3-pip \\\n  libxml2-dev \\\n  default-jdk\n```\n\n\n\n### Virtualenv\n\nUse `virtualenv` to install dependencies:\n* `virtualenv -p python3.6 env`\n* `source env/bin/activate`\n* `pip install -e path/to/dir/containing/setup.py`\n\nUse `deactivate` to deactivate the virtualenv again.\n\n### OCR-D workspace\n\n* Create a new (empty) workspace: `ocrd workspace init workspace-dir`\n* cd into `workspace-dir`\n* Add new file to workspace: `ocrd workspace add file -G group -i id\n  -m mimetype`\n\n### Tests\n\nIssue `make test` to run the automated test suite. The tests depend on\nthe following tools:\n\n* [wget](https://www.gnu.org/software/wget/)\n* [envsubst](https://linux.die.net/man/1/envsubst)\n\nYou can run individual testcases using the `run_*_test.bash` scripts in\nthe tests directory. Use the `--persistent` or `-p` flag to keep\ntemporary directories.\n\nYou can override the temporary directory by setting the `TMP_DIR` environment\nvariable.\n\n## Tools\n\n### ocrd-cis-align\n\nThe alignment tool line-aligns multiple file groups. It can be used to\nalign the results of multiple OCRs with their respective ground-truth.\n\nThe tool expects a comma-separated list of input file groups, the\naccording output file group and the url of the configuration file:\n\n```sh\nocrd-cis-align \\\n  --input-file-grp 'ocr1,ocr2,gt' \\\n  --output-file-grp 'ocr1+ocr2+gt' \\\n  --mets mets.xml \\\n  --parameter file:///path/to/config.json\n```\n\n\n### ocrd-cis-ocropy-train\nThe ocropy-train tool can be used to train LSTM models.\nIt takes ground truth from the workspace and saves (image+text) snippets from the corresponding pages.\nThen a model is trained on all snippets for 1 million (or the given number of) randomized iterations from the parameter file.\n```sh\nocrd-cis-ocropy-train \\\n  --input-file-grp OCR-D-GT-SEG-LINE \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-clip\nThe ocropy-clip tool can be used to remove intrusions of neighbouring segments in regions / lines of a workspace.\nIt runs a (ad-hoc binarization and) connected component analysis on every text region / line of every PAGE in the input file group, as well as its overlapping neighbours, and for each binary object of conflict, determines whether it belongs to the neighbour, and can therefore be clipped to white. It references the resulting segment image files in the output PAGE (as AlternativeImage).\n```sh\nocrd-cis-ocropy-clip \\\n  --input-file-grp OCR-D-SEG-LINE \\\n  --output-file-grp OCR-D-SEG-LINE-CLIP \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-resegment\nThe ocropy-resegment tool can be used to remove overlap between lines of a workspace.\nIt runs a (ad-hoc binarization and) line segmentation on every text region of every PAGE in the input file group, and for each line already annotated, determines the label of largest extent within the original coordinates (polygon outline) in that line, and annotates the resulting coordinates in the output PAGE.\n```sh\nocrd-cis-ocropy-resegment \\\n  --input-file-grp OCR-D-SEG-LINE \\\n  --output-file-grp OCR-D-SEG-LINE-RES \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-segment\nThe ocropy-segment tool can be used to segment regions into lines.\nIt runs a (ad-hoc binarization and) line segmentation on every text region of every PAGE in the input file group, and adds a TextLine element with the resulting polygon outline to the annotation of the output PAGE.\n```sh\nocrd-cis-ocropy-segment \\\n  --input-file-grp OCR-D-SEG-BLOCK \\\n  --output-file-grp OCR-D-SEG-LINE \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-deskew\nThe ocropy-deskew tool can be used to deskew pages / regions of a workspace.\nIt runs the Ocropy thresholding and deskewing estimation on every segment of every PAGE in the input file group and annotates the orientation angle in the output PAGE.\n```sh\nocrd-cis-ocropy-deskew \\\n  --input-file-grp OCR-D-SEG-LINE \\\n  --output-file-grp OCR-D-SEG-LINE-DES \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-denoise\nThe ocropy-denoise tool can be used to despeckle pages / regions / lines of a workspace.\nIt runs the Ocropy \"nlbin\" denoising on every segment of every PAGE in the input file group and references the resulting segment image files in the output PAGE (as AlternativeImage). \n```sh\nocrd-cis-ocropy-denoise \\\n  --input-file-grp OCR-D-SEG-LINE-DES \\\n  --output-file-grp OCR-D-SEG-LINE-DEN \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-binarize\nThe ocropy-binarize tool can be used to binarize, denoise and deskew pages / regions / lines of a workspace.\nIt runs the Ocropy \"nlbin\" adaptive thresholding, deskewing estimation and denoising on every segment of every PAGE in the input file group and references the resulting segment image files in the output PAGE (as AlternativeImage). (If a deskewing angle has already been annotated in a region, the tool respects that and rotates accordingly.) Images can also be produced grayscale-normalized.\n```sh\nocrd-cis-ocropy-binarize \\\n  --input-file-grp OCR-D-SEG-LINE-DES \\\n  --output-file-grp OCR-D-SEG-LINE-BIN \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-dewarp\nThe ocropy-dewarp tool can be used to dewarp text lines of a workspace.\nIt runs the Ocropy baseline estimation and dewarping on every line in every text region of every PAGE in the input file group and references the resulting line image files in the output PAGE (as AlternativeImage).\n```sh\nocrd-cis-ocropy-dewarp \\\n  --input-file-grp OCR-D-SEG-LINE-BIN \\\n  --output-file-grp OCR-D-SEG-LINE-DEW \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n### ocrd-cis-ocropy-recognize\nThe ocropy-recognize tool can be used to recognize lines / words / glyphs from pages of a workspace.\nIt runs the Ocropy optical character recognition on every line in every text region of every PAGE in the input file group and adds the resulting text annotation in the output PAGE.\n```sh\nocrd-cis-ocropy-recognize \\\n  --input-file-grp OCR-D-SEG-LINE-DEW \\\n  --output-file-grp OCR-D-OCR-OCRO \\\n  --mets mets.xml\n  --parameter file:///path/to/config.json\n```\n\n## All in One Tool\nFor the all in One Tool install all above tools and Tesserocr as explained below.\nThen use it like:\n```sh\nocrd-cis-aio --parameter file:///path/to/config.json\n```\n\n\n### Tesserocr\nInstall essential system packages for Tesserocr\n```sh\nsudo apt-get install python3-tk \\\n  tesseract-ocr libtesseract-dev libleptonica-dev \\\n  libimage-exiftool-perl libxml2-utils\n```\n\nThen install Tesserocr from: https://github.com/OCR-D/ocrd_tesserocr\n```sh\npip install -r requirements.txt\npip install .\n```\n\nDownload and move tesseract models from:\nhttps://github.com/tesseract-ocr/tesseract/wiki/Data-Files\nor use your own models\nplace them into: /usr/share/tesseract-ocr/4.00/tessdata\n\nTesserocr v2.4.0 seems broken for tesseract 4.0.0-beta. Install\nVersion v2.3.1 instead: `pip install tesseract==2.3.1`.\n\n## Workflow configuration\n\nA decent pipeline might look like this:\n\n1. page-level cropping\n2. page-level binarization\n3. page-level deskewing\n4. page-level dewarping\n5. region segmentation\n6. region-level clipping\n7. region-level deskewing\n8. line segmentation\n9. line-level clipping or resegmentation\n10. line-level dewarping\n11. line-level recognition\n12. line-level alignment\n\nIf GT is used, steps 1, 5 and 8 can be omitted. Else if a segmentation is used in 5 and 8 which does not produce overlapping sections, steps 6 and 9 can be omitted.\n\n## OCR-D links\n\n- [OCR-D](https://ocr-d.github.io)\n- [Github](https://github.com/OCR-D)\n- [Project-page](http://www.ocr-d.de/)\n- [Ground-truth](http://www.ocr-d.de/sites/all/GTDaten/IndexGT.html)\n\n\n",
+                    "description_content_type": "text/markdown",
+                    "docs_url": null,
+                    "download_url": "",
+                    "downloads": {
+                        "last_day": -1,
+                        "last_month": -1,
+                        "last_week": -1
+                    },
+                    "home_page": "https://github.com/cisocrgroup/cis-ocrd-py",
+                    "keywords": "",
+                    "license": "MIT",
+                    "maintainer": "",
+                    "maintainer_email": "",
+                    "name": "cis-ocrd",
+                    "package_url": "https://pypi.org/project/cis-ocrd/",
+                    "platform": "",
+                    "project_url": "https://pypi.org/project/cis-ocrd/",
+                    "project_urls": {
+                        "Homepage": "https://github.com/cisocrgroup/cis-ocrd-py"
+                    },
+                    "release_url": "https://pypi.org/project/cis-ocrd/0.0.5/",
+                    "requires_dist": [
+                        "ocrd (>=2.0.0a1)",
+                        "click",
+                        "scipy",
+                        "numpy (>=1.17.0)",
+                        "pillow (>=6.2.0)",
+                        "matplotlib (>3.0.0)",
+                        "python-Levenshtein",
+                        "calamari-ocr"
+                    ],
+                    "requires_python": "",
+                    "summary": "CIS OCR-D command line tools",
+                    "version": "0.0.5"
+                },
+                "last_serial": 6034741,
+                "releases": {
+                    "0.0.5": [
+                        {
+                            "comment_text": "",
+                            "digests": {
+                                "md5": "0cb7c271e269610696de659dd5e6366a",
+                                "sha256": "f99c92453445e4896a856cb0f146d0aadf0ceeb48addd75ff6b9f4ffda49ac33"
+                            },
+                            "downloads": -1,
+                            "filename": "cis_ocrd-0.0.5-py3-none-any.whl",
+                            "has_sig": false,
+                            "md5_digest": "0cb7c271e269610696de659dd5e6366a",
+                            "packagetype": "bdist_wheel",
+                            "python_version": "py3",
+                            "requires_python": null,
+                            "size": 116744,
+                            "upload_time": "2019-10-26T19:26:55",
+                            "upload_time_iso_8601": "2019-10-26T19:26:55.970846Z",
+                            "url": "https://files.pythonhosted.org/packages/9e/bf/b1818c9f698b1b99475bcd85ae8649a09ee8e802644dedc759bc728f4114/cis_ocrd-0.0.5-py3-none-any.whl"
+                        },
+                        {
+                            "comment_text": "",
+                            "digests": {
+                                "md5": "049c5b627214c7afcce8f51a5a0eee11",
+                                "sha256": "059e22fa0ab0ffd92f2bbfdb26279dbe507a25050bfe38eaa977546da6f60523"
+                            },
+                            "downloads": -1,
+                            "filename": "cis-ocrd-0.0.5.tar.gz",
+                            "has_sig": false,
+                            "md5_digest": "049c5b627214c7afcce8f51a5a0eee11",
+                            "packagetype": "sdist",
+                            "python_version": "source",
+                            "requires_python": null,
+                            "size": 88597,
+                            "upload_time": "2019-10-26T19:26:59",
+                            "upload_time_iso_8601": "2019-10-26T19:26:59.427545Z",
+                            "url": "https://files.pythonhosted.org/packages/c9/64/f6d8e1cb2ac04a6ef81387ad279faf5660f682fada0bb324f4280cb0dd17/cis-ocrd-0.0.5.tar.gz"
+                        }
+                    ]
+                },
+                "urls": [
+                    {
+                        "comment_text": "",
+                        "digests": {
+                            "md5": "0cb7c271e269610696de659dd5e6366a",
+                            "sha256": "f99c92453445e4896a856cb0f146d0aadf0ceeb48addd75ff6b9f4ffda49ac33"
+                        },
+                        "downloads": -1,
+                        "filename": "cis_ocrd-0.0.5-py3-none-any.whl",
+                        "has_sig": false,
+                        "md5_digest": "0cb7c271e269610696de659dd5e6366a",
+                        "packagetype": "bdist_wheel",
+                        "python_version": "py3",
+                        "requires_python": null,
+                        "size": 116744,
+                        "upload_time": "2019-10-26T19:26:55",
+                        "upload_time_iso_8601": "2019-10-26T19:26:55.970846Z",
+                        "url": "https://files.pythonhosted.org/packages/9e/bf/b1818c9f698b1b99475bcd85ae8649a09ee8e802644dedc759bc728f4114/cis_ocrd-0.0.5-py3-none-any.whl"
+                    },
+                    {
+                        "comment_text": "",
+                        "digests": {
+                            "md5": "049c5b627214c7afcce8f51a5a0eee11",
+                            "sha256": "059e22fa0ab0ffd92f2bbfdb26279dbe507a25050bfe38eaa977546da6f60523"
+                        },
+                        "downloads": -1,
+                        "filename": "cis-ocrd-0.0.5.tar.gz",
+                        "has_sig": false,
+                        "md5_digest": "049c5b627214c7afcce8f51a5a0eee11",
+                        "packagetype": "sdist",
+                        "python_version": "source",
+                        "requires_python": null,
+                        "size": 88597,
+                        "upload_time": "2019-10-26T19:26:59",
+                        "upload_time_iso_8601": "2019-10-26T19:26:59.427545Z",
+                        "url": "https://files.pythonhosted.org/packages/c9/64/f6d8e1cb2ac04a6ef81387ad279faf5660f682fada0bb324f4280cb0dd17/cis-ocrd-0.0.5.tar.gz"
+                    }
+                ]
+            },
+            "url": "https://github.com/cisocrgroup/cis-ocrd-py"
         },
         "url": "https://github.com/cisocrgroup/ocrd_cis"
     },
     {
+        "compliant_cli": false,
         "files": {
-            "Dockerfile": null,
-            "README.md": "# Document Preprocessing and Segmentation\n\n[![CircleCI](https://circleci.com/gh/mjenckel/OCR-D-LAYoutERkennung.svg?style=svg)](https://circleci.com/gh/mjenckel/OCR-D-LAYoutERkennung)\n\n> Tools for preprocessing scanned images for OCR\n\n# Installing\n\nTo install anyBaseOCR dependencies system-wide:\n\n    $ sudo pip install .\n\nAlternatively, dependencies can be installed into a Virtual Environment:\n\n    $ virtualenv venv\n    $ source venv/bin/activate\n    $ pip install -e .\n\n#Tools\n\n## Binarizer\n\n### Method Behaviour \n This function takes a scanned colored /gray scale document image as input and do the black and white binarize image.\n \n #### Usage:\n```sh\nocrd-anybaseocr-binarize -m (path to METs input file) -I (Input group name) -O (Output group name) [-p (path to parameter file) -o (METs output filename)]\n```\n\n#### Example: \n```sh\nocrd-anybaseocr-binarize \\\n   -m mets.xml \\\n   -I OCR-D-IMG \\\n   -O OCR-D-IMG-BIN \\\n   -O OCR-D-PAGE-BIN\n```\n\n## Deskewer\n\n### Method Behaviour \n This function takes a document image as input and do the skew correction of that document.\n \n #### Usage:\n```sh\nocrd-anybaseocr-deskew -m (path to METs input file) -I (Input group name) -O (Output group name) [-p (path to parameter file) -o (METs output filename)]\n```\n\n#### Example: \n```sh\nocrd-anybaseocr-deskew \\\n  -m mets.xml \\\n  -I OCR-D-PAGE-BIN \\\n  -O OCR-D-IMG-DESKEW \\\n  -O OCR-D-PAGE-DESKEW\n```\n\n## Cropper\n\n### Method Behaviour \n This function takes a document image as input and crops/selects the page content area only (that's mean remove textual noise as well as any other noise around page content area)\n \n #### Usage:\n```sh\nocrd-anybaseocr-crop -m (path to METs input file) -I (Input group name) -O (Output group name) [-p (path to parameter file) -o (METs output filename)]\n```\n\n#### Example: \n```sh\nocrd-anybaseocr-crop \\\n   -m mets.xml \\\n   -I OCR-D-PAGE-DESKEW \\\n   -O OCR-D-IMG-CROP \\\n   -O OCR-D-PAGE-CROP\n```\n\n\n## Dewarper\n\n### Method Behaviour \n This function takes a document image as input and make the text line straight if its curved.\n \n #### Usage:\n```sh\nocrd-anybaseocr-dewarp -m (path to METs input file) -I (Input group name) -O (Output group name) [-p (path to parameter file) -o (METs output filename)]\n```\n\n\n#### Example: \n```sh\nCUDA_VISIBLE_DEVICES=0 ocrd-anybaseocr-dewarp \\\n   -m mets.xml \\\n   -I OCR-D-PAGE-CROP \\\n   -O OCR-D-IMG-DEWARP \\\n   -O OCR-D-PAGE-DEWARP\n```\n\n## Text/Non-Text Segmenter\n\n### Method Behaviour \n This function takes a document image as an input and separates the text and non-text part from the input document image.\n \n #### Usage:\n```sh\nocrd-anybaseocr-tiseg -m (path to METs input file) -I (Input group name) -O (Output group name) [-p (path to parameter file) -o (METs output filename)]\n```\n\n#### Example: \n```sh\nocrd-anybaseocr-tiseg \\\n   -m mets.xml \\\n   -I OCR-D-PAGE-CROP \\\n   -O OCR-D-IMG-TISEG \\\n   -O OCR-D-PAGE-TISEG\n```\n\n## Textline Segmenter\n\n### Method Behaviour \n This function takes a cropped document image as an input and segment the image into textline images.\n \n #### Usage:\n```sh\nocrd-anybaseocr-textline -m (path to METs input file) -I (Input group name) -O (Output group name) [-p (path to parameter file) -o (METs output filename)]\n```\n\n#### Example: \n```sh\nocrd-anybaseocr-textline \\\n   -m mets.xml \\\n   -I OCR-D-PAGE-TISEG \\\n   -O OCR-D-IMG-TL \\\n   -O OCR-D-PAGE-TL\n```\n\n\n## Testing\n\nTo test the tools, download [OCR-D/assets](https://github.com/OCR-D/assets). In\nparticular, the code is tested with the\n[dfki-testdata](https://github.com/OCR-D/assets/tree/master/data/dfki-testdata)\ndataset.\n\nRun `make test` to run all tests.\n\n## License\n\n\n```\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n ```\n",
-            "ocrd-tool.json": "{\n  \"git_url\": \"https://github.com/mjenckel/LAYoutERkennung/\",\n  \"version\": \"0.0.1\",\n  \"tools\": {\n    \"ocrd-anybaseocr-binarize\": {\n      \"executable\": \"ocrd-anybaseocr-binarize\",\n      \"description\": \"Binarize images with the algorithm from ocropy\",\n      \"categories\": [\"Image preprocessing\"],\n      \"steps\": [\"preprocessing/optimization/binarization\"],\n      \"input_file_grp\": [\"OCR-D-IMG\"],\n      \"output_file_grp\": [\"OCR-D-IMG-BIN\"],\n      \"parameters\": {\n        \"nocheck\":         {\"type\": \"boolean\",                     \"default\": false, \"description\": \"disable error checking on inputs\"},\n        \"show\":            {\"type\": \"boolean\",                     \"default\": false, \"description\": \"display final results\"},\n        \"raw_copy\":        {\"type\": \"boolean\",                     \"default\": false, \"description\": \"also copy the raw image\"},\n        \"gray\":            {\"type\": \"boolean\",                     \"default\": false, \"description\": \"force grayscale processing even if image seems binary\"},\n        \"bignore\":         {\"type\": \"number\", \"format\": \"float\",   \"default\": 0.1,   \"description\": \"ignore this much of the border for threshold estimation\"},\n        \"debug\":           {\"type\": \"number\", \"format\": \"integer\", \"default\": 0,     \"description\": \"display intermediate results\"},\n        \"escale\":          {\"type\": \"number\", \"format\": \"float\",   \"default\": 1.0,   \"description\": \"scale for estimating a mask over the text region\"},\n        \"hi\":              {\"type\": \"number\", \"format\": \"float\",   \"default\": 90,    \"description\": \"percentile for white estimation\"},\n        \"lo\":              {\"type\": \"number\", \"format\": \"float\",   \"default\": 5,     \"description\": \"percentile for black estimation\"},\n        \"perc\":            {\"type\": \"number\", \"format\": \"float\",   \"default\": 80,    \"description\": \"percentage for filters\"},\n        \"range\":           {\"type\": \"number\", \"format\": \"integer\", \"default\": 20,    \"description\": \"range for filters\"},\n        \"threshold\":       {\"type\": \"number\", \"format\": \"float\",   \"default\": 0.5,   \"description\": \"threshold, determines lightness\"},\n        \"zoom\":            {\"type\": \"number\", \"format\": \"float\",   \"default\": 0.5,   \"description\": \"zoom for page background estimation, smaller=faster\"},\n        \"operation_level\": {\"type\": \"string\", \"enum\": [\"page\",\"region\", \"line\"], \"default\": \"page\",\"description\": \"PAGE XML hierarchy level to operate on\"}\n      }\n    },\n    \"ocrd-anybaseocr-deskew\": {\n      \"executable\": \"ocrd-anybaseocr-deskew\",\n      \"description\": \"Deskew images with the algorithm from ocropy\",\n      \"categories\": [\"Image preprocessing\"],\n      \"steps\": [\"preprocessing/optimization/deskewing\"],\n      \"input_file_grp\": [\"OCR-D-IMG-BIN\"],\n      \"output_file_grp\": [\"OCR-D-IMG-DESKEW\"],\n      \"parameters\": {\n        \"escale\":    {\"type\": \"number\", \"format\": \"float\",   \"default\": 1.0, \"description\": \"scale for estimating a mask over the text region\"},\n        \"bignore\":   {\"type\": \"number\", \"format\": \"float\",   \"default\": 0.1, \"description\": \"ignore this much of the border for threshold estimation\"},\n        \"threshold\": {\"type\": \"number\", \"format\": \"float\",   \"default\": 0.5, \"description\": \"threshold, determines lightness\"},\n        \"maxskew\":   {\"type\": \"number\", \"format\": \"float\",   \"default\": 1.0, \"description\": \"skew angle estimation parameters (degrees)\"},\n        \"skewsteps\": {\"type\": \"number\", \"format\": \"integer\", \"default\": 8,   \"description\": \"steps for skew angle estimation (per degree)\"},\n        \"debug\":     {\"type\": \"number\", \"format\": \"integer\", \"default\": 0,   \"description\": \"display intermediate results\"},\n        \"parallel\":  {\"type\": \"number\", \"format\": \"integer\", \"default\": 0,   \"description\": \"???\"},\n        \"lo\":        {\"type\": \"number\", \"format\": \"integer\", \"default\": 5,   \"description\": \"percentile for black estimation\"},\n        \"hi\":        {\"type\": \"number\", \"format\": \"integer\", \"default\": 90,   \"description\": \"percentile for white estimation\"},\n        \"operation_level\": {\"type\": \"string\", \"enum\": [\"page\",\"region\", \"line\"], \"default\": \"page\",\"description\": \"PAGE XML hierarchy level to operate on\"}\n      }\n    },\n    \"ocrd-anybaseocr-crop\": {\n      \"executable\": \"ocrd-anybaseocr-crop\",\n      \"description\": \"Image crop using non-linear processing\",\n      \"categories\": [\"Image preprocessing\"],\n      \"steps\": [\"preprocessing/optimization/cropping\"],\n      \"input_file_grp\": [\"OCR-D-IMG-DESKEW\"],\n      \"output_file_grp\": [\"OCR-D-IMG-CROP\"],\n      \"parameters\": {\n        \"colSeparator\":  {\"type\": \"number\", \"format\": \"float\", \"default\": 0.04, \"description\": \"consider space between column. 25% of width\"},\n        \"maxRularArea\":  {\"type\": \"number\", \"format\": \"float\", \"default\": 0.3, \"description\": \"Consider maximum rular area\"},\n        \"minArea\":       {\"type\": \"number\", \"format\": \"float\", \"default\": 0.05, \"description\": \"rular position in below\"},\n        \"minRularArea\":  {\"type\": \"number\", \"format\": \"float\", \"default\": 0.01, \"description\": \"Consider minimum rular area\"},\n        \"positionBelow\": {\"type\": \"number\", \"format\": \"float\", \"default\": 0.75, \"description\": \"rular position in below\"},\n        \"positionLeft\":  {\"type\": \"number\", \"format\": \"float\", \"default\": 0.4, \"description\": \"rular position in left\"},\n        \"positionRight\": {\"type\": \"number\", \"format\": \"float\", \"default\": 0.6, \"description\": \"rular position in right\"},\n        \"rularRatioMax\": {\"type\": \"number\", \"format\": \"float\", \"default\": 10.0, \"description\": \"rular position in below\"},\n        \"rularRatioMin\": {\"type\": \"number\", \"format\": \"float\", \"default\": 3.0, \"description\": \"rular position in below\"},\n        \"rularWidth\":    {\"type\": \"number\", \"format\": \"float\", \"default\": 0.95, \"description\": \"maximum rular width\"},\n        \"operation_level\": {\"type\": \"string\", \"enum\": [\"page\",\"region\", \"line\"], \"default\": \"page\",\"description\": \"PAGE XML hierarchy level to operate on\"}\n      }\n    },\n    \"ocrd-anybaseocr-dewarp\": {\n      \"executable\": \"ocrd-anybaseocr-dewarp\",\n      \"description\": \"dewarp image with anyBaseOCR\",\n      \"categories\": [\"Image preprocessing\"],\n      \"steps\": [\"preprocessing/optimization/dewarping\"],\n      \"input_file_grp\": [\"OCR-D-IMG-CROP\"],\n      \"output_file_grp\": [\"OCR-D-IMG-DEWARP\"],\n      \"parameters\": {\n        \"imgresize\":    { \"type\": \"string\",                      \"default\": \"resize_and_crop\", \"description\": \"run on original size image\"},\n        \"pix2pixHD\":    { \"type\": \"string\", \"default\":\"/home/ahmed/project/pix2pixHD\", \"description\": \"Path to pix2pixHD library\"},\n        \"model_name\":\t{ \"type\": \"string\", \"default\":\"models\", \"description\": \"name of dir with trained pix2pixHD model (latest_net_G.pth)\"},\n        \"checkpoint_dir\":   { \"type\": \"string\", \"default\":\"./\", \"description\": \"Path to where to look for dir with model name\"},\n        \"gpu_id\":       { \"type\": \"number\", \"format\": \"integer\", \"default\": 0,    \"description\": \"gpu id\"},\n        \"resizeHeight\": { \"type\": \"number\", \"format\": \"integer\", \"default\": 1024, \"description\": \"resized image height\"},\n        \"resizeWidth\":  { \"type\": \"number\", \"format\": \"integer\", \"default\": 1024, \"description\": \"resized image width\"},\n        \"operation_level\": {\"type\": \"string\", \"enum\": [\"page\",\"region\", \"line\"], \"default\": \"page\",\"description\": \"PAGE XML hierarchy level to operate on\"}\n      }\n    },\n    \"ocrd-anybaseocr-tiseg\": {\n      \"executable\": \"ocrd-anybaseocr-tiseg\",\n      \"input_file_grp\": [\"OCR-D-IMG-CROP\"],\n      \"output_file_grp\": [\"OCR-D-SEG-TISEG\"],\n      \"categories\": [\"Layout analysis\"],\n      \"steps\": [\"layout/segmentation/text-image\"],\n      \"description\": \"separate text and non-text part with anyBaseOCR\",\n      \"parameters\": {\n        \"operation_level\": {\"type\": \"string\", \"enum\": [\"page\",\"region\", \"line\"], \"default\": \"page\",\"description\": \"PAGE XML hierarchy level to operate on\"}\n      }\n    },\n    \"ocrd-anybaseocr-textline\": {\n      \"executable\": \"ocrd-anybaseocr-textline\",\n      \"input_file_grp\": [\"OCR-D-SEG-TISEG\"],\n      \"output_file_grp\": [\"OCR-D-SEG-LINE-ANY\"],\n      \"categories\": [\"Layout analysis\"],\n      \"steps\": [\"layout/segmentation/line\"],\n      \"description\": \"separate each text line\",\n      \"parameters\": {\n        \"minscale\":    {\"type\": \"number\", \"format\": \"float\", \"default\": 12.0, \"description\": \"minimum scale permitted\"},\n        \"maxlines\":    {\"type\": \"number\", \"format\": \"float\", \"default\": 300, \"description\": \"non-standard scaling of horizontal parameters\"},\n        \"scale\":       {\"type\": \"number\", \"format\": \"float\", \"default\": 0.0, \"description\": \"the basic scale of the document (roughly, xheight) 0=automatic\"},\n        \"hscale\":      {\"type\": \"number\", \"format\": \"float\", \"default\": 1.0, \"description\": \"non-standard scaling of horizontal parameters\"},\n        \"vscale\":      {\"type\": \"number\", \"format\": \"float\", \"default\": 1.7, \"description\": \"non-standard scaling of vertical parameters\"},\n        \"threshold\":   {\"type\": \"number\", \"format\": \"float\", \"default\": 0.2, \"description\": \"baseline threshold\"},\n        \"noise\":       {\"type\": \"number\", \"format\": \"integer\", \"default\": 8, \"description\": \"noise threshold for removing small components from lines\"},\n        \"usegauss\":    {\"type\": \"boolean\", \"default\": false, \"description\": \"use gaussian instead of uniform\"},\n        \"maxseps\":     {\"type\": \"number\", \"format\": \"integer\", \"default\": 2, \"description\": \"maximum black column separators\"},\n        \"sepwiden\":    {\"type\": \"number\", \"format\": \"integer\", \"default\": 10, \"description\": \"widen black separators (to account for warping)\"},\n        \"blackseps\":   {\"type\": \"boolean\", \"default\": false, \"description\": \"also check for black column separators\"},\n        \"maxcolseps\":  {\"type\": \"number\", \"format\": \"integer\", \"default\": 2, \"description\": \"maximum # whitespace column separators\"},\n        \"csminaspect\": {\"type\": \"number\", \"format\": \"float\", \"default\": 1.1, \"description\": \"minimum aspect ratio for column separators\"},\n        \"csminheight\": {\"type\": \"number\", \"format\": \"float\", \"default\": 6.5, \"description\": \"minimum column height (units=scale)\"},\n        \"pad\":         {\"type\": \"number\", \"format\": \"integer\", \"default\": 3, \"description\": \"padding for extracted lines\"},\n        \"expand\":      {\"type\": \"number\", \"format\": \"integer\", \"default\": 3, \"description\": \"expand mask for grayscale extraction\"},\n        \"parallel\":    {\"type\": \"number\", \"format\": \"integer\", \"default\": 0, \"description\": \"number of CPUs to use\"},\n        \"libpath\":     {\"type\": \"string\", \"default\": \".\", \"description\": \"Library Path for C Executables\"},\n        \"operation_level\": {\"type\": \"string\", \"enum\": [\"page\",\"region\", \"line\"], \"default\": \"page\",\"description\": \"PAGE XML hierarchy level to operate on\"}\n      }\n    },\n    \"ocrd-anybaseocr-layout-analysis\": {\n      \"executable\": \"ocrd-anybaseocr-layout-analysis\",\n      \"input_file_grp\": [\"OCR-D-IMG-CROP\"],\n      \"output_file_grp\": [\"OCR-D-SEG-LAYOUT\"],\n      \"categories\": [\"Layout analysis\"],\n      \"steps\": [\"layout/segmentation/text-image\"],\n      \"description\": \"Analysis of the input document\",\n      \"parameters\": {\n        \"batch_size\":         {\"type\": \"number\", \"format\": \"integer\", \"default\": 4, \"description\": \"Batch size for generating test images\"},\n        \"model_path\":         { \"type\": \"string\", \"default\":\"models/structure_analysis.h5\", \"required\": false, \"description\": \"Path to Layout Structure Classification Model\"},\n        \"class_mapping_path\": { \"type\": \"string\", \"default\":\"models/mapping_DenseNet.h5\",\"required\": false, \"description\": \"Path to Layout Structure Classes\"}\n      }\n    },\n    \"ocrd-anybaseocr-block-segmentation\": {\n      \"executable\": \"ocrd-anybaseocr-block-segmentation\",\n      \"input_file_grp\": [\"OCR-D-IMG\"],\n      \"output_file_grp\": [\"OCR-D-BLOCK-SEGMENT\"],\n      \"categories\": [\"Layout analysis\"],\n      \"steps\": [\"layout/segmentation/text-image\"],\n      \"description\": \"Analysis of the input document\",\n      \"parameters\": {        \n        \"block_segmentation_model\":   { \"type\": \"string\",\"default\":\"mrcnn/\", \"required\": false, \"description\": \"Path to block segmentation Model\"},\n        \"block_segmentation_weights\": { \"type\": \"string\",\"default\":\"mrcnn/block_segmentation_weights.h5\",  \"required\": false, \"description\": \"Path to model weights\"},\n        \"operation_level\": {\"type\": \"string\", \"enum\": [\"page\",\"region\", \"line\"], \"default\": \"page\",\"description\": \"PAGE XML hierarchy level to operate on\"}\n      }       \n    }\n  }\n}\n",
-            "setup.py": "# -*- coding: utf-8 -*-\nfrom setuptools import setup, find_packages\n\nsetup(\n    name='ocrd-anybaseocr',\n    version='v0.0.1',\n    author=\"DFKI\",\n    author_email=\"Saqib.Bukhari@dfki.de, Mohammad_mohsin.reza@dfki.de\",\n    url=\"https://github.com/mjenckel/LAYoutERkennung\",\n    license='Apache License 2.0',\n    long_description=open('README.md').read(),\n    long_description_content_type='text/markdown',\n    install_requires=open('requirements.txt').read().split('\\n'),\n    packages=find_packages(exclude=[\"work_dir\", \"src\"]),\n    package_data={\n        '': ['*.json']\n    },\n    entry_points={\n        'console_scripts': [\n            'ocrd-anybaseocr-binarize           = ocrd_anybaseocr.cli.cli:ocrd_anybaseocr_binarize',\n            'ocrd-anybaseocr-deskew             = ocrd_anybaseocr.cli.cli:ocrd_anybaseocr_deskew',\n            'ocrd-anybaseocr-crop               = ocrd_anybaseocr.cli.cli:ocrd_anybaseocr_cropping',        \n            'ocrd-anybaseocr-dewarp             = ocrd_anybaseocr.cli.cli:ocrd_anybaseocr_dewarp',\n            'ocrd-anybaseocr-tiseg              = ocrd_anybaseocr.cli.cli:ocrd_anybaseocr_tiseg',\n            'ocrd-anybaseocr-textline           = ocrd_anybaseocr.cli.cli:ocrd_anybaseocr_textline',\n            'ocrd-anybaseocr-layout-analysis    = ocrd_anybaseocr.cli.cli:ocrd_anybaseocr_layout_analysis',\n            'ocrd-anybaseocr-block-segmentation = ocrd_anybaseocr.cli.cli:ocrd_anybaseocr_block_segmentation'\n        ]\n    },\n)\n"
+            "Dockerfile": "FROM ocrd/core:edge\nMAINTAINER OCR-D\nENV DEBIAN_FRONTEND noninteractive\nENV PYTHONIOENCODING utf8\n\nWORKDIR /build-layouterkennung\nCOPY setup.py .\nCOPY requirements.txt .\nCOPY README.md .\nCOPY ocrd_anybaseocr ./ocrd_anybaseocr\nRUN pip3 install .\n\nENTRYPOINT [\"/bin/sh\", \"-c\"]\n",
+            "README.md": "# Document Preprocessing and Segmentation\n\n[![CircleCI](https://circleci.com/gh/mjenckel/OCR-D-LAYoutERkennung.svg?style=svg)](https://circleci.com/gh/mjenckel/OCR-D-LAYoutERkennung)\n\n> Tools for preprocessing scanned images for OCR\n\n# Installing\n\nTo install anyBaseOCR dependencies system-wide:\n\n    $ sudo pip install .\n\nAlternatively, dependencies can be installed into a Virtual Environment:\n\n    $ virtualenv venv\n    $ source venv/bin/activate\n    $ pip install -e .\n\n#Tools\n\n## Binarizer\n\n### Method Behaviour \n This function takes a scanned colored /gray scale document image as input and do the black and white binarize image.\n \n #### Usage:\n```sh\nocrd-anybaseocr-binarize -m (path to METs input file) -I (Input group name) -O (Output group name) [-p (path to parameter file) -o (METs output filename)]\n```\n\n#### Example: \n```sh\nocrd-anybaseocr-binarize \\\n   -m mets.xml \\\n   -I OCR-D-IMG \\\n   -O OCR-D-PAGE-BIN\n```\n\n## Deskewer\n\n### Method Behaviour \n This function takes a document image as input and do the skew correction of that document.\n \n #### Usage:\n```sh\nocrd-anybaseocr-deskew -m (path to METs input file) -I (Input group name) -O (Output group name) [-p (path to parameter file) -o (METs output filename)]\n```\n\n#### Example: \n```sh\nocrd-anybaseocr-deskew \\\n  -m mets.xml \\\n  -I OCR-D-PAGE-BIN \\\n  -O OCR-D-PAGE-DESKEW\n```\n\n## Cropper\n\n### Method Behaviour \n This function takes a document image as input and crops/selects the page content area only (that's mean remove textual noise as well as any other noise around page content area)\n \n #### Usage:\n```sh\nocrd-anybaseocr-crop -m (path to METs input file) -I (Input group name) -O (Output group name) [-p (path to parameter file) -o (METs output filename)]\n```\n\n#### Example: \n```sh\nocrd-anybaseocr-crop \\\n   -m mets.xml \\\n   -I OCR-D-PAGE-DESKEW \\\n   -O OCR-D-PAGE-CROP\n```\n\n\n## Dewarper\n\n### Method Behaviour \n This function takes a document image as input and make the text line straight if its curved.\n \n #### Usage:\n```sh\nocrd-anybaseocr-dewarp -m (path to METs input file) -I (Input group name) -O (Output group name) [-p (path to parameter file) -o (METs output filename)]\n```\n\n\n#### Example: \n```sh\nCUDA_VISIBLE_DEVICES=0 ocrd-anybaseocr-dewarp \\\n   -m mets.xml \\\n   -I OCR-D-PAGE-CROP \\\n   -O OCR-D-PAGE-DEWARP\n```\n\n## Text/Non-Text Segmenter\n\n### Method Behaviour \n This function takes a document image as an input and separates the text and non-text part from the input document image.\n \n #### Usage:\n```sh\nocrd-anybaseocr-tiseg -m (path to METs input file) -I (Input group name) -O (Output group name) [-p (path to parameter file) -o (METs output filename)]\n```\n\n#### Example: \n```sh\nocrd-anybaseocr-tiseg \\\n   -m mets.xml \\\n   -I OCR-D-PAGE-CROP \\\n   -O OCR-D-PAGE-TISEG\n```\n\n## Textline Segmenter\n\n### Method Behaviour \n This function takes a cropped document image as an input and segment the image into textline images.\n \n #### Usage:\n```sh\nocrd-anybaseocr-textline -m (path to METs input file) -I (Input group name) -O (Output group name) [-p (path to parameter file) -o (METs output filename)]\n```\n\n#### Example: \n```sh\nocrd-anybaseocr-textline \\\n   -m mets.xml \\\n   -I OCR-D-PAGE-TISEG \\\n   -O OCR-D-PAGE-TL\n```\n\n## Block Segmenter\n\n### Method Behaviour \n This function takes raw document image as an input and segments the image into the different text blocks.\n \n #### Usage:\n```sh\nocrd-anybaseocr-block-segmenter -m (path to METs input file) -I (Input group name) -O (Output group name) [-p (path to parameter file) -o (METs output filename)]\n```\n\n#### Example: \n```sh\nocrd-anybaseocr-block-segmenter \\\n   -m mets.xml \\\n   -I OCR-IMG \\\n   -O OCR-D-PAGE-BLOCK\n```\n\n## Document Analyser\n\n### Method Behaviour \n This function takes all the cropped document images of a single book and its corresponding text regions as input and generates the logical structure on the book level.\n \n #### Usage:\n```sh\nocrd-anybaseocr-layout-analysis -m (path to METs input file) -I (Input group name) -O (Output group name) [-p (path to parameter file) -o (METs output filename)]\n```\n\n#### Example: \n```sh\nocrd-anybaseocr-layout-analysis \\\n   -m mets.xml \\\n   -I OCR-IMG \\\n   -O OCR-D-PAGE-BLOCK\n```\n\n\n## Testing\n\nTo test the tools, download [OCR-D/assets](https://github.com/OCR-D/assets). In\nparticular, the code is tested with the\n[dfki-testdata](https://github.com/OCR-D/assets/tree/master/data/dfki-testdata)\ndataset.\n\nRun `make test` to run all tests.\n\n## License\n\n\n```\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n ```\n",
+            "ocrd-tool.json": "{\n  \"git_url\": \"https://github.com/mjenckel/LAYoutERkennung/\",\n  \"version\": \"0.0.1\",\n  \"tools\": {\n    \"ocrd-anybaseocr-binarize\": {\n      \"executable\": \"ocrd-anybaseocr-binarize\",\n      \"description\": \"Binarize images with the algorithm from ocropy\",\n      \"categories\": [\"Image preprocessing\"],\n      \"steps\": [\"preprocessing/optimization/binarization\"],\n      \"input_file_grp\": [\"OCR-D-IMG\"],\n      \"output_file_grp\": [\"OCR-D-IMG-BIN\"],\n      \"parameters\": {\n        \"nocheck\":         {\"type\": \"boolean\",                     \"default\": false, \"description\": \"disable error checking on inputs\"},\n        \"show\":            {\"type\": \"boolean\",                     \"default\": false, \"description\": \"display final results\"},\n        \"raw_copy\":        {\"type\": \"boolean\",                     \"default\": false, \"description\": \"also copy the raw image\"},\n        \"gray\":            {\"type\": \"boolean\",                     \"default\": false, \"description\": \"force grayscale processing even if image seems binary\"},\n        \"bignore\":         {\"type\": \"number\", \"format\": \"float\",   \"default\": 0.1,   \"description\": \"ignore this much of the border for threshold estimation\"},\n        \"debug\":           {\"type\": \"number\", \"format\": \"integer\", \"default\": 0,     \"description\": \"display intermediate results\"},\n        \"escale\":          {\"type\": \"number\", \"format\": \"float\",   \"default\": 1.0,   \"description\": \"scale for estimating a mask over the text region\"},\n        \"hi\":              {\"type\": \"number\", \"format\": \"float\",   \"default\": 90,    \"description\": \"percentile for white estimation\"},\n        \"lo\":              {\"type\": \"number\", \"format\": \"float\",   \"default\": 5,     \"description\": \"percentile for black estimation\"},\n        \"perc\":            {\"type\": \"number\", \"format\": \"float\",   \"default\": 80,    \"description\": \"percentage for filters\"},\n        \"range\":           {\"type\": \"number\", \"format\": \"integer\", \"default\": 20,    \"description\": \"range for filters\"},\n        \"threshold\":       {\"type\": \"number\", \"format\": \"float\",   \"default\": 0.5,   \"description\": \"threshold, determines lightness\"},\n        \"zoom\":            {\"type\": \"number\", \"format\": \"float\",   \"default\": 0.5,   \"description\": \"zoom for page background estimation, smaller=faster\"},\n        \"operation_level\": {\"type\": \"string\", \"enum\": [\"page\",\"region\", \"line\"], \"default\": \"page\",\"description\": \"PAGE XML hierarchy level to operate on\"}\n      }\n    },\n    \"ocrd-anybaseocr-deskew\": {\n      \"executable\": \"ocrd-anybaseocr-deskew\",\n      \"description\": \"Deskew images with the algorithm from ocropy\",\n      \"categories\": [\"Image preprocessing\"],\n      \"steps\": [\"preprocessing/optimization/deskewing\"],\n      \"input_file_grp\": [\"OCR-D-IMG-BIN\"],\n      \"output_file_grp\": [\"OCR-D-IMG-DESKEW\"],\n      \"parameters\": {\n        \"escale\":    {\"type\": \"number\", \"format\": \"float\",   \"default\": 1.0, \"description\": \"scale for estimating a mask over the text region\"},\n        \"bignore\":   {\"type\": \"number\", \"format\": \"float\",   \"default\": 0.1, \"description\": \"ignore this much of the border for threshold estimation\"},\n        \"threshold\": {\"type\": \"number\", \"format\": \"float\",   \"default\": 0.5, \"description\": \"threshold, determines lightness\"},\n        \"maxskew\":   {\"type\": \"number\", \"format\": \"float\",   \"default\": 1.0, \"description\": \"skew angle estimation parameters (degrees)\"},\n        \"skewsteps\": {\"type\": \"number\", \"format\": \"integer\", \"default\": 8,   \"description\": \"steps for skew angle estimation (per degree)\"},\n        \"debug\":     {\"type\": \"number\", \"format\": \"integer\", \"default\": 0,   \"description\": \"display intermediate results\"},\n        \"parallel\":  {\"type\": \"number\", \"format\": \"integer\", \"default\": 0,   \"description\": \"???\"},\n        \"lo\":        {\"type\": \"number\", \"format\": \"integer\", \"default\": 5,   \"description\": \"percentile for black estimation\"},\n        \"hi\":        {\"type\": \"number\", \"format\": \"integer\", \"default\": 90,   \"description\": \"percentile for white estimation\"},\n        \"operation_level\": {\"type\": \"string\", \"enum\": [\"page\",\"region\", \"line\"], \"default\": \"page\",\"description\": \"PAGE XML hierarchy level to operate on\"}\n      }\n    },\n    \"ocrd-anybaseocr-crop\": {\n      \"executable\": \"ocrd-anybaseocr-crop\",\n      \"description\": \"Image crop using non-linear processing\",\n      \"categories\": [\"Image preprocessing\"],\n      \"steps\": [\"preprocessing/optimization/cropping\"],\n      \"input_file_grp\": [\"OCR-D-IMG-DESKEW\"],\n      \"output_file_grp\": [\"OCR-D-IMG-CROP\"],\n      \"parameters\": {\n        \"colSeparator\":  {\"type\": \"number\", \"format\": \"float\", \"default\": 0.04, \"description\": \"consider space between column. 25% of width\"},\n        \"maxRularArea\":  {\"type\": \"number\", \"format\": \"float\", \"default\": 0.3, \"description\": \"Consider maximum rular area\"},\n        \"minArea\":       {\"type\": \"number\", \"format\": \"float\", \"default\": 0.05, \"description\": \"rular position in below\"},\n        \"minRularArea\":  {\"type\": \"number\", \"format\": \"float\", \"default\": 0.01, \"description\": \"Consider minimum rular area\"},\n        \"positionBelow\": {\"type\": \"number\", \"format\": \"float\", \"default\": 0.75, \"description\": \"rular position in below\"},\n        \"positionLeft\":  {\"type\": \"number\", \"format\": \"float\", \"default\": 0.4, \"description\": \"rular position in left\"},\n        \"positionRight\": {\"type\": \"number\", \"format\": \"float\", \"default\": 0.6, \"description\": \"rular position in right\"},\n        \"rularRatioMax\": {\"type\": \"number\", \"format\": \"float\", \"default\": 10.0, \"description\": \"rular position in below\"},\n        \"rularRatioMin\": {\"type\": \"number\", \"format\": \"float\", \"default\": 3.0, \"description\": \"rular position in below\"},\n        \"rularWidth\":    {\"type\": \"number\", \"format\": \"float\", \"default\": 0.95, \"description\": \"maximum rular width\"},\n        \"operation_level\": {\"type\": \"string\", \"enum\": [\"page\",\"region\", \"line\"], \"default\": \"page\",\"description\": \"PAGE XML hierarchy level to operate on\"}\n      }\n    },\n    \"ocrd-anybaseocr-dewarp\": {\n      \"executable\": \"ocrd-anybaseocr-dewarp\",\n      \"description\": \"dewarp image with anyBaseOCR\",\n      \"categories\": [\"Image preprocessing\"],\n      \"steps\": [\"preprocessing/optimization/dewarping\"],\n      \"input_file_grp\": [\"OCR-D-IMG-CROP\"],\n      \"output_file_grp\": [\"OCR-D-IMG-DEWARP\"],\n      \"parameters\": {\n        \"imgresize\":    { \"type\": \"string\",                      \"default\": \"resize_and_crop\", \"description\": \"run on original size image\"},\n        \"pix2pixHD\":    { \"type\": \"string\", \"default\":\"/home/ahmed/project/pix2pixHD\", \"description\": \"Path to pix2pixHD library\"},\n        \"model_name\":\t{ \"type\": \"string\", \"default\":\"models\", \"description\": \"name of dir with trained pix2pixHD model (latest_net_G.pth)\"},\n        \"checkpoint_dir\":   { \"type\": \"string\", \"default\":\"./\", \"description\": \"Path to where to look for dir with model name\"},\n        \"gpu_id\":       { \"type\": \"number\", \"format\": \"integer\", \"default\": 0,    \"description\": \"gpu id\"},\n        \"resizeHeight\": { \"type\": \"number\", \"format\": \"integer\", \"default\": 1024, \"description\": \"resized image height\"},\n        \"resizeWidth\":  { \"type\": \"number\", \"format\": \"integer\", \"default\": 1024, \"description\": \"resized image width\"},\n        \"operation_level\": {\"type\": \"string\", \"enum\": [\"page\",\"region\", \"line\"], \"default\": \"page\",\"description\": \"PAGE XML hierarchy level to operate on\"}\n      }\n    },\n    \"ocrd-anybaseocr-tiseg\": {\n      \"executable\": \"ocrd-anybaseocr-tiseg\",\n      \"input_file_grp\": [\"OCR-D-IMG-CROP\"],\n      \"output_file_grp\": [\"OCR-D-SEG-TISEG\"],\n      \"categories\": [\"Layout analysis\"],\n      \"steps\": [\"layout/segmentation/text-image\"],\n      \"description\": \"separate text and non-text part with anyBaseOCR\",\n      \"parameters\": {\n        \"operation_level\": {\"type\": \"string\", \"enum\": [\"page\",\"region\", \"line\"], \"default\": \"page\",\"description\": \"PAGE XML hierarchy level to operate on\"}\n      }\n    },\n    \"ocrd-anybaseocr-textline\": {\n      \"executable\": \"ocrd-anybaseocr-textline\",\n      \"input_file_grp\": [\"OCR-D-SEG-TISEG\"],\n      \"output_file_grp\": [\"OCR-D-SEG-LINE-ANY\"],\n      \"categories\": [\"Layout analysis\"],\n      \"steps\": [\"layout/segmentation/line\"],\n      \"description\": \"separate each text line\",\n      \"parameters\": {\n        \"minscale\":    {\"type\": \"number\", \"format\": \"float\", \"default\": 12.0, \"description\": \"minimum scale permitted\"},\n        \"maxlines\":    {\"type\": \"number\", \"format\": \"float\", \"default\": 300, \"description\": \"non-standard scaling of horizontal parameters\"},\n        \"scale\":       {\"type\": \"number\", \"format\": \"float\", \"default\": 0.0, \"description\": \"the basic scale of the document (roughly, xheight) 0=automatic\"},\n        \"hscale\":      {\"type\": \"number\", \"format\": \"float\", \"default\": 1.0, \"description\": \"non-standard scaling of horizontal parameters\"},\n        \"vscale\":      {\"type\": \"number\", \"format\": \"float\", \"default\": 1.7, \"description\": \"non-standard scaling of vertical parameters\"},\n        \"threshold\":   {\"type\": \"number\", \"format\": \"float\", \"default\": 0.2, \"description\": \"baseline threshold\"},\n        \"noise\":       {\"type\": \"number\", \"format\": \"integer\", \"default\": 8, \"description\": \"noise threshold for removing small components from lines\"},\n        \"usegauss\":    {\"type\": \"boolean\", \"default\": false, \"description\": \"use gaussian instead of uniform\"},\n        \"maxseps\":     {\"type\": \"number\", \"format\": \"integer\", \"default\": 2, \"description\": \"maximum black column separators\"},\n        \"sepwiden\":    {\"type\": \"number\", \"format\": \"integer\", \"default\": 10, \"description\": \"widen black separators (to account for warping)\"},\n        \"blackseps\":   {\"type\": \"boolean\", \"default\": false, \"description\": \"also check for black column separators\"},\n        \"maxcolseps\":  {\"type\": \"number\", \"format\": \"integer\", \"default\": 2, \"description\": \"maximum # whitespace column separators\"},\n        \"csminaspect\": {\"type\": \"number\", \"format\": \"float\", \"default\": 1.1, \"description\": \"minimum aspect ratio for column separators\"},\n        \"csminheight\": {\"type\": \"number\", \"format\": \"float\", \"default\": 6.5, \"description\": \"minimum column height (units=scale)\"},\n        \"pad\":         {\"type\": \"number\", \"format\": \"integer\", \"default\": 3, \"description\": \"padding for extracted lines\"},\n        \"expand\":      {\"type\": \"number\", \"format\": \"integer\", \"default\": 3, \"description\": \"expand mask for grayscale extraction\"},\n        \"parallel\":    {\"type\": \"number\", \"format\": \"integer\", \"default\": 0, \"description\": \"number of CPUs to use\"},\n        \"libpath\":     {\"type\": \"string\", \"default\": \".\", \"description\": \"Library Path for C Executables\"},\n        \"operation_level\": {\"type\": \"string\", \"enum\": [\"page\",\"region\", \"line\"], \"default\": \"page\",\"description\": \"PAGE XML hierarchy level to operate on\"}\n      }\n    },\n    \"ocrd-anybaseocr-layout-analysis\": {\n      \"executable\": \"ocrd-anybaseocr-layout-analysis\",\n      \"input_file_grp\": [\"OCR-D-IMG-CROP\"],\n      \"output_file_grp\": [\"OCR-D-SEG-LAYOUT\"],\n      \"categories\": [\"Layout analysis\"],\n      \"steps\": [\"layout/segmentation/text-image\"],\n      \"description\": \"Analysis of the input document\",\n      \"parameters\": {\n        \"batch_size\":         {\"type\": \"number\", \"format\": \"integer\", \"default\": 4, \"description\": \"Batch size for generating test images\"},\n        \"model_path\":         { \"type\": \"string\", \"default\":\"models/structure_analysis.h5\", \"required\": false, \"description\": \"Path to Layout Structure Classification Model\"},\n        \"class_mapping_path\": { \"type\": \"string\", \"default\":\"models/mapping_DenseNet.pickle\",\"required\": false, \"description\": \"Path to Layout Structure Classes\"}\n      }\n    },\n    \"ocrd-anybaseocr-block-segmentation\": {\n      \"executable\": \"ocrd-anybaseocr-block-segmentation\",\n      \"input_file_grp\": [\"OCR-D-IMG\"],\n      \"output_file_grp\": [\"OCR-D-BLOCK-SEGMENT\"],\n      \"categories\": [\"Layout analysis\"],\n      \"steps\": [\"layout/segmentation/text-image\"],\n      \"description\": \"Analysis of the input document\",\n      \"parameters\": {        \n        \"block_segmentation_model\":   { \"type\": \"string\",\"default\":\"mrcnn/\", \"required\": false, \"description\": \"Path to block segmentation Model\"},\n        \"block_segmentation_weights\": { \"type\": \"string\",\"default\":\"mrcnn/block_segmentation_weights.h5\",  \"required\": false, \"description\": \"Path to model weights\"},\n        \"operation_level\": {\"type\": \"string\", \"enum\": [\"page\",\"region\", \"line\"], \"default\": \"page\",\"description\": \"PAGE XML hierarchy level to operate on\"}\n      }       \n    }\n  }\n}\n",
+            "setup.py": "# -*- coding: utf-8 -*-\nfrom setuptools import setup, find_packages\n\nsetup(\n    name='ocrd-anybaseocr',\n    version='0.0.1',\n    author=\"DFKI\",\n    author_email=\"Saqib.Bukhari@dfki.de, Mohammad_mohsin.reza@dfki.de\",\n    url=\"https://github.com/mjenckel/LAYoutERkennung\",\n    license='Apache License 2.0',\n    long_description=open('README.md').read(),\n    long_description_content_type='text/markdown',\n    install_requires=open('requirements.txt').read().split('\\n'),\n    packages=find_packages(exclude=[\"work_dir\", \"src\"]),\n    package_data={\n        '': ['*.json']\n    },\n    entry_points={\n        'console_scripts': [\n            'ocrd-anybaseocr-binarize           = ocrd_anybaseocr.cli.cli:ocrd_anybaseocr_binarize',\n            'ocrd-anybaseocr-deskew             = ocrd_anybaseocr.cli.cli:ocrd_anybaseocr_deskew',\n            'ocrd-anybaseocr-crop               = ocrd_anybaseocr.cli.cli:ocrd_anybaseocr_cropping',        \n            'ocrd-anybaseocr-dewarp             = ocrd_anybaseocr.cli.cli:ocrd_anybaseocr_dewarp',\n            'ocrd-anybaseocr-tiseg              = ocrd_anybaseocr.cli.cli:ocrd_anybaseocr_tiseg',\n            'ocrd-anybaseocr-textline           = ocrd_anybaseocr.cli.cli:ocrd_anybaseocr_textline',\n            'ocrd-anybaseocr-layout-analysis    = ocrd_anybaseocr.cli.cli:ocrd_anybaseocr_layout_analysis',\n            'ocrd-anybaseocr-block-segmentation = ocrd_anybaseocr.cli.cli:ocrd_anybaseocr_block_segmentation'\n        ]\n    },\n)\n"
         },
         "git": {
-            "last_commit": "Fri Nov 1 12:46:33 2019 +0100",
+            "last_commit": "Tue Nov 5 21:56:47 2019 +0100",
             "latest_tag": "",
-            "number_of_commits": "84",
+            "number_of_commits": "23",
             "url": "https://github.com/mjenckel/LAYoutERkennung"
         },
         "name": "LAYoutERkennung",
@@ -3361,7 +3394,7 @@
                             "type": "number"
                         },
                         "class_mapping_path": {
-                            "default": "models/mapping_DenseNet.h5",
+                            "default": "models/mapping_DenseNet.pickle",
                             "description": "Path to Layout Structure Classes",
                             "required": false,
                             "type": "string"
@@ -3554,6 +3587,7 @@
         "url": "https://github.com/mjenckel/LAYoutERkennung"
     },
     {
+        "compliant_cli": false,
         "files": {
             "Dockerfile": null,
             "README.md": "# page-segmentation module for OCRd\n\n## Requirements\n\n- For GPU-Support: [CUDA](https://developer.nvidia.com/cuda-downloads) and [CUDNN](https://developer.nvidia.com/cudnn)\n- other requirements are installed via Makefile / pip, see `requirements.txt`\n  in repository root and in `page-segmentation` submodule.\n\n## Setup\n\n```bash\nmake dep\n# or\nmake dep-gpu\n```\n\nthen\n\n```sh\nmake install\n```\n\n## Running\n\nThe main script is `ocrd-pc-seg-process`. It takes two parameters: a `--model` for the\npixel classifier and an `--image`, which must be a binarized image. For example\nwith the included model:\n\n```\nocrd-pc-seg-process --pc_model model/narren_dta02_eval_normaldh_maskfix_03 \\\n    --image abel_leibmedicus_1699_0007.bin.png\n```\n\nThis creates a folder with the basename of the image (e.g. `abel_leibmedicus_1699_0007/`)\nwith line images in `segmentation/${basename}_${paragraph_nr}_paragraph` and\nPageXML in `segmentation/clip_${filename}.xml` (where `$filename` is the input\nfile name,`$basename` is `$filename` without extensions, `$paragraph_nr` is\nsuccessive ocropus pagagraph number).\n",
@@ -3563,7 +3597,7 @@
         "git": {
             "last_commit": "Fri Oct 25 15:59:53 2019 +0200",
             "latest_tag": "",
-            "number_of_commits": "4",
+            "number_of_commits": "2",
             "url": "https://github.com/ocr-d-modul-2-segmentierung/segmentation-runner"
         },
         "name": "segmentation-runner",
@@ -3581,17 +3615,18 @@
         "url": "https://github.com/ocr-d-modul-2-segmentierung/segmentation-runner"
     },
     {
+        "compliant_cli": false,
         "files": {
             "Dockerfile": null,
-            "README.md": "dinglehopper\n============\n\ndinglehopper is an OCR evaluation tool and reads [ALTO](https://github.com/altoxml), [PAGE](https://github.com/PRImA-Research-Lab/PAGE-XML) and text files.\n\n[![Build Status](https://travis-ci.org/qurator-spk/dinglehopper.svg?branch=master)](https://travis-ci.org/qurator-spk/dinglehopper)\n\nGoals\n-----\n* Useful\n  * As an UI tool\n  * For an automated evaluation\n  * As a library\n* Unicode support\n\nUsage\n-----\n~~~\ndinglehopper some-document.gt.page.xml some-document.ocr.alto.xml\n~~~\nThis generates `report.html` and `report.json`.\n\n\nAs a OCR-D processor:\n~~~\nocrd-dinglehopper -m mets.xml -I OCR-D-GT-PAGE,OCR-D-OCR-TESS -O OCR-D-OCR-TESS-EVAL\n~~~\nThis generates HTML and JSON reports in the `OCR-D-OCR-TESS-EVAL` filegroup.\n\n\n![dinglehopper displaying metrics and character differences](.screenshots/dinglehopper.png?raw=true)\n",
+            "README.md": "dinglehopper\n============\n\ndinglehopper is an OCR evaluation tool and reads [ALTO](https://github.com/altoxml), [PAGE](https://github.com/PRImA-Research-Lab/PAGE-XML) and text files.\n\n[![Build Status](https://travis-ci.org/qurator-spk/dinglehopper.svg?branch=master)](https://travis-ci.org/qurator-spk/dinglehopper)\n\nGoals\n-----\n* Useful\n  * As a UI tool\n  * For an automated evaluation\n  * As a library\n* Unicode support\n\nUsage\n-----\n~~~\ndinglehopper some-document.gt.page.xml some-document.ocr.alto.xml\n~~~\nThis generates `report.html` and `report.json`.\n\n\nAs a OCR-D processor:\n~~~\nocrd-dinglehopper -m mets.xml -I OCR-D-GT-PAGE,OCR-D-OCR-TESS -O OCR-D-OCR-TESS-EVAL\n~~~\nThis generates HTML and JSON reports in the `OCR-D-OCR-TESS-EVAL` filegroup.\n\n\n![dinglehopper displaying metrics and character differences](.screenshots/dinglehopper.png?raw=true)\n",
             "ocrd-tool.json": "{\n  \"git_url\": \"https://github.com/qurator-spk/dinglehopper\",\n  \"tools\": {\n    \"ocrd-dinglehopper\": {\n      \"executable\": \"ocrd-dinglehopper\",\n      \"description\": \"Evaluate OCR text against ground truth with dinglehopper\",\n      \"input_file_grp\": [\n        \"OCR-D-GT-PAGE\",\n        \"OCR-D-OCR\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-OCR-EVAL\"\n      ],\n      \"categories\": [\n        \"Quality assurance\"\n      ],\n      \"steps\": [\n        \"recognition/text-recognition\"\n      ]\n    }\n  }\n}\n",
             "setup.py": "from io import open\nfrom setuptools import find_packages, setup\n\nwith open('requirements.txt') as fp:\n    install_requires = fp.read()\n\nsetup(\n    name='dinglehopper',\n    author='Mike Gerber, The QURATOR SPK Team',\n    author_email='mike.gerber@sbb.spk-berlin.de, qurator@sbb.spk-berlin.de',\n    description='The OCR evaluation tool',\n    long_description=open('README.md', 'r', encoding='utf-8').read(),\n    long_description_content_type='text/markdown',\n    keywords='qurator ocr',\n    license='Apache',\n    namespace_packages=['qurator'],\n    packages=find_packages(exclude=['*.tests', '*.tests.*', 'tests.*', 'tests']),\n    install_requires=install_requires,\n    package_data={\n        '': ['*.json', 'templates/*'],\n    },\n    entry_points={\n      'console_scripts': [\n        'dinglehopper=qurator.dinglehopper.cli:main',\n        'ocrd-dinglehopper=qurator.dinglehopper.ocrd_cli:ocrd_dinglehopper',\n      ]\n    }\n)\n"
         },
         "git": {
-            "last_commit": "Mon Oct 28 15:05:08 2019 +0100",
+            "last_commit": "Wed Nov 6 18:17:21 2019 +0100",
             "latest_tag": "",
-            "number_of_commits": "37",
-            "url": "https://github.com/qurator-spk/dinglehopper.git"
+            "number_of_commits": "11",
+            "url": "https://github.com/qurator-spk/dinglehopper"
         },
         "name": "dinglehopper",
         "ocrd_tool": {
@@ -3629,26 +3664,7 @@
         "url": "https://github.com/qurator-spk/dinglehopper"
     },
     {
-        "files": {
-            "Dockerfile": null,
-            "README.md": "# pixelwise_segmentation_SBB\nThis is a tool for pixel wise segmentation. This is developed in order to do use cases like page extraction, textline , word \nand structure recognition of library documents.\n\nDownload the repository and after you prepared your data, just run:\n\npython train.py with config_params.json\n",
-            "ocrd-tool.json": null,
-            "setup.py": null
-        },
-        "git": {
-            "last_commit": "Wed Jul 10 12:30:57 2019 +0200",
-            "latest_tag": "",
-            "number_of_commits": "6",
-            "url": "https://github.com/qurator-spk/pixelwise_segmentation_SBB.git"
-        },
-        "name": "pixelwise_segmentation_SBB",
-        "ocrd_tool": "",
-        "ocrd_tool_validate": "NO ocrd-tool.json",
-        "official": false,
-        "org_plus_name": "qurator-spk/pixelwise_segmentation_SBB",
-        "url": "https://github.com/qurator-spk/pixelwise_segmentation_SBB"
-    },
-    {
+        "compliant_cli": false,
         "files": {
             "Dockerfile": null,
             "README.md": "# ocrd_typegroups_classifier\n\n> Typegroups classifier for OCR\n\n## Quick setup\n\nIf needed, create a virtual environment for Python 3 (it was tested\nsuccessfully with Python 3.7), activate it, and install ocrd.\n\n```sh\nvirtualenv -p python3 ocrd-venv3\nsource ocrd-venv3/bin/activate\npip3 install ocrd\n```\n\nEnter in the folder containing the tool:\n```cd ocrd_typegroups_classifier/```\n\nInstall the module and its dependencies\n\n```\nmake install\nmake deps\n```\n\nFinally, run the test:\n\n```\nsh test/test.sh\n```\n\n** Important: ** The test makes sure that the system does work. For\nspeed reasons, a very small neural network is used and applied only to\nthe top-left corner of the image, therefore the quality of the results\nwill be of poor quality.\n\n## Models\n\nThe model classifier-1.tgc is based on a ResNet-18, with less neurons\nper layer than the usual model. It was briefly trained on 12 classes:\nAdornment, Antiqua, Bastarda, Book covers and other irrelevant data,\nEmpty Pages, Fraktur, Griechisch, Hebr\u00e4isch, Kursiv, Rotunda, Textura,\nand Woodcuts - Engravings.\n\n## Heatmap Generation ##\nGiven a trained model, it is possible to produce heatmaps corresponding\nto classification results. Syntax:\n\n```\npython3 tools/heatmap.py ocrd_typegroups_classifier/models/classifier.tgc sample.jpg out\n```",
-- 
GitLab