commit b5f9dcb7f34b72c66fdd19e14df43d0995b9f619 Author: Gerber, Mike Date: Wed Jun 19 12:22:41 2019 +0200 Initial commit diff --git a/my_ocrd_workflow b/my_ocrd_workflow new file mode 100755 index 0000000..8bc2648 --- /dev/null +++ b/my_ocrd_workflow @@ -0,0 +1,28 @@ +#!/bin/bash + +set -e # Abort on error +set -x + + +remove_filegrp() { + filegrp_use=$1 + mets=$2 + + xmlstarlet ed --inplace \ + -N mets=http://www.loc.gov/METS/ \ + -d "//mets:fileGrp[@USE='$filegrp_use']" $mets +} + + +remove_filegrp OCR-D-FONTIDENT mets.xml +ocrd-typegroups-classifier -l DEBUG -m mets.xml -I OCR-D-IMG -O OCR-D-FONTIDENT -p <(echo '{"network": "/home/mike/devel/OCR-D/monorepo/ocrd_typegroups_classifier/ocrd_typegroups_classifier/models/classifier.tgc", "stride":143}') +# XXX does DEFAULT have any meaning? /buerger_gedichte_1778.ocrd does not have +# any DEFAULT, yet -I DEFAULT seems to work for ocrd-typegroups-classifier +#ocrd workspace validate mets.xml +# XXX Unspecified USE category 'FONTIDENT' in fileGrp 'OCR-D-FONTIDENT' +# XXX File 'OCR-D-FONTIDENT_OCR-D-IMG_0002' does not manifest any physical page. +# XXX Won't download remote image + +remove_filegrp OCR-D-SEG-LINE mets.xml +ocrd-tesserocr-segment-line -l DEBUG -m mets.xml -I OCR-D-IMG -O OCR-D-SEG-LINE +#ocrd workspace validate mets.xml