diff --git a/my_ocrd_workflow b/my_ocrd_workflow index fce225b..8a5d4fa 100755 --- a/my_ocrd_workflow +++ b/my_ocrd_workflow @@ -2,8 +2,11 @@ set -e # Abort on error -# Set up logging +# Configuration export LOG_LEVEL=${LOG_LEVEL:-DEBUG} # /etc/ocrd_logging.py uses this to set level for all OCR-D modules +export TEXTEQUIV_LEVEL=word + +# Set up logging if [ "$LOG_LEVEL" = "DEBUG" -o "$LOG_LEVEL" = "TRACE" ]; then set -x fi @@ -69,7 +72,7 @@ do_ocr() { ocrd_tesserocr_recognize_parameters='{ "model": "GT4HistOCR_2000000", - "textequiv_level": "word" + "textequiv_level": "'$TEXTEQUIV_LEVEL'" }' ocrd workspace remove-group -rf OCR-D-OCR-TESS ocrd-tesserocr-recognize -I OCR-D-SEG-LINE -O OCR-D-OCR-TESS -p "$ocrd_tesserocr_recognize_parameters" @@ -80,7 +83,7 @@ do_ocr_calamari() { ocrd_calamari_recognize_parameters='{ "checkpoint": "/var/lib/calamari-models/GT4HistOCR/2019-07-22T15:49+0200/*.ckpt.json", - "textequiv_level": "word" + "textequiv_level": "'$TEXTEQUIV_LEVEL'" }' ocrd workspace remove-group -rf OCR-D-OCR-CALAMARI ocrd-calamari-recognize -I OCR-D-SEG-LINE -O OCR-D-OCR-CALAMARI -p "$ocrd_calamari_recognize_parameters"