mirror of
https://github.com/qurator-spk/ocrd-galley.git
synced 2025-06-09 14:49:53 +02:00
Refactor: Extract functions for the steps
This commit is contained in:
parent
a2d547b857
commit
c207859bcd
1 changed files with 27 additions and 19 deletions
|
@ -13,7 +13,7 @@ remove_filegrp() {
|
||||||
-d "//mets:fileGrp[@USE='$filegrp_use']" $mets
|
-d "//mets:fileGrp[@USE='$filegrp_use']" $mets
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do_fontident() {
|
||||||
ocrd_typegroups_classifier_parameters='
|
ocrd_typegroups_classifier_parameters='
|
||||||
{
|
{
|
||||||
"network": "/home/mike/devel/OCR-D/monorepo/ocrd_typegroups_classifier/ocrd_typegroups_classifier/models/classifier.tgc",
|
"network": "/home/mike/devel/OCR-D/monorepo/ocrd_typegroups_classifier/ocrd_typegroups_classifier/models/classifier.tgc",
|
||||||
|
@ -29,11 +29,19 @@ ocrd-typegroups-classifier -l DEBUG \
|
||||||
# XXX <error>Unspecified USE category 'FONTIDENT' in fileGrp 'OCR-D-FONTIDENT'</error>
|
# XXX <error>Unspecified USE category 'FONTIDENT' in fileGrp 'OCR-D-FONTIDENT'</error>
|
||||||
# XXX <error>File 'OCR-D-FONTIDENT_OCR-D-IMG_0002' does not manifest any physical page.</error>
|
# XXX <error>File 'OCR-D-FONTIDENT_OCR-D-IMG_0002' does not manifest any physical page.</error>
|
||||||
# XXX <notice>Won't download remote image <OCR-D-IMG/OCR-D-IMG_0002></notice>
|
# XXX <notice>Won't download remote image <OCR-D-IMG/OCR-D-IMG_0002></notice>
|
||||||
|
}
|
||||||
|
|
||||||
|
do_linesegmentation() {
|
||||||
remove_filegrp OCR-D-SEG-LINE mets.xml
|
remove_filegrp OCR-D-SEG-LINE mets.xml
|
||||||
ocrd-tesserocr-segment-line -l DEBUG \
|
ocrd-tesserocr-segment-line -l DEBUG \
|
||||||
-m mets.xml -I OCR-D-IMG -O OCR-D-SEG-LINE
|
-m mets.xml -I OCR-D-IMG -O OCR-D-SEG-LINE
|
||||||
#ocrd workspace validate mets.xml
|
#ocrd workspace validate mets.xml
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
do_fontident
|
||||||
|
do_linesegmentation
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# vim:tw=120:
|
# vim:tw=120:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue