From 2cf68f149db75c73bf94eac5ea9d90e51088aa13 Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Fri, 7 Feb 2020 18:57:46 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=20Extract=20a=20main()=20function=20f?= =?UTF-8?q?or=20the=20main=20stuff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- my_ocrd_workflow | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/my_ocrd_workflow b/my_ocrd_workflow index 2680aa9..da2067e 100755 --- a/my_ocrd_workflow +++ b/my_ocrd_workflow @@ -97,39 +97,44 @@ page_upgrade_to_2019() { done } -pip3 list +main() { + do_binarization + do_validate -do_binarization -do_validate + do_linesegmentation_sbb + page_upgrade_to_2019 OCR-D-SEG-LINE + page_validate_xml OCR-D-SEG-REGION + page_validate_xml OCR-D-SEG-LINE + do_validate -do_linesegmentation_sbb -page_upgrade_to_2019 OCR-D-SEG-LINE -page_validate_xml OCR-D-SEG-REGION -page_validate_xml OCR-D-SEG-LINE -do_validate + do_ocr_calamari -do_ocr_calamari + do_ocr -do_ocr + for ocr_filegrp in OCR-D-OCR-CALAMARI OCR-D-OCR-TESS; do -for ocr_filegrp in OCR-D-OCR-CALAMARI OCR-D-OCR-TESS; do + page_validate_xml $ocr_filegrp + do_validate - page_validate_xml $ocr_filegrp - do_validate + page_validate_xml $ocr_filegrp + do_validate - page_validate_xml $ocr_filegrp - do_validate + if ocrd workspace list-group | grep -q OCR-D-GT-PAGE; then + ocrd workspace remove-group -rf $ocr_filegrp-EVAL + ocrd-dinglehopper -I OCR-D-GT-PAGE,$ocr_filegrp -O $ocr_filegrp-EVAL + fi - if ocrd workspace list-group | grep -q OCR-D-GT-PAGE; then - ocrd workspace remove-group -rf $ocr_filegrp-EVAL - ocrd-dinglehopper -I OCR-D-GT-PAGE,$ocr_filegrp -O $ocr_filegrp-EVAL - fi + done +} + + +pip3 list +main -done # vim:tw=120: