diff --git a/qurator/dinglehopper/cli.py b/qurator/dinglehopper/cli.py index 09c26f0..32e159f 100644 --- a/qurator/dinglehopper/cli.py +++ b/qurator/dinglehopper/cli.py @@ -4,6 +4,7 @@ import click from jinja2 import Environment, FileSystemLoader from markupsafe import escape from uniseg.graphemecluster import grapheme_clusters +from ocrd_utils import initLogging from .character_error_rate import character_error_rate_n from .word_error_rate import word_error_rate_n, words_normalized @@ -176,6 +177,7 @@ def main(gt, ocr, report_prefix, metrics, textequiv_level, progress): By default, the text of PAGE files is extracted on 'region' level. You may use "--textequiv-level line" to extract from the level of TextLine tags. """ + initLogging() Config.progress = progress process(gt, ocr, report_prefix, metrics=metrics, textequiv_level=textequiv_level) diff --git a/qurator/dinglehopper/cli_extract.py b/qurator/dinglehopper/cli_extract.py index ce49db4..0d4f713 100644 --- a/qurator/dinglehopper/cli_extract.py +++ b/qurator/dinglehopper/cli_extract.py @@ -1,6 +1,7 @@ import os import click +from ocrd_utils import initLogging from .extracted_text import ExtractedText from .ocr_files import extract @@ -24,6 +25,7 @@ def main(input_file, textequiv_level): By default, the text of PAGE files is extracted on 'region' level. You may use "--textequiv-level line" to extract from the level of TextLine tags. """ + initLogging() input_text = extract(input_file, textequiv_level=textequiv_level).text print(input_text)