From 1ffcca88d666ea52d4edba478e32831aa32c96b6 Mon Sep 17 00:00:00 2001 From: sunveil Date: Wed, 20 Dec 2023 21:03:41 +0800 Subject: [PATCH] Fix corrected_path --- dedoc/scripts/calc_tesseract_benchmarks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dedoc/scripts/calc_tesseract_benchmarks.py b/dedoc/scripts/calc_tesseract_benchmarks.py index 5d1d2288..17bc8d3e 100644 --- a/dedoc/scripts/calc_tesseract_benchmarks.py +++ b/dedoc/scripts/calc_tesseract_benchmarks.py @@ -197,6 +197,8 @@ def __calculate_ocr_reports(cache_dir_accuracy: str, benchmark_data_path: str, c corrector, corrected_path = init_correction_step(cache_dir) elif USE_CORRECTION_OCR == LANGUAGE_TOOL_CORRECTION: corrector = LanguageToolCorrector() + corrected_path = os.path.join(cache_dir, "result_corrected") + os.makedirs(corrected_path, exist_ok=True) with zipfile.ZipFile(benchmark_data_path, "r") as arch_file: names_dirs = [member.filename for member in arch_file.infolist() if member.file_size > 0]