From fdc53fd16ce9c296e6ddc848d2c910d14f510d2c Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Mon, 15 Apr 2019 09:56:47 +0200 Subject: [PATCH] Use a single core for deu_frak --- ocr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ocr b/ocr index bc96101..85807d8 100755 --- a/ocr +++ b/ocr @@ -172,9 +172,10 @@ class OCRWorkflow(WorkflowRunner): ''' ' Tesseract runs fastest with four cores. So we run it with either four ' or, if there are less then four cores available for this workflow, the - ' available core number. + ' available core number. The deu_frak language model only supports + ' single core processing, so we use use only one core for this language. ''' - ocr_job_nCores = min(4, self.nCores) + ocr_job_nCores = 1 if self.lang == "deu_frak" else min(4, self.nCores) for job in self.jobs: for file in filter(lambda x: x.endswith(".tif") if self.skipBinarization else x.endswith(".bin.png"), os.listdir(os.path.join(job["output_dir"], "tmp"))): ocr_job_number += 1