From fd375e15d59e9e83dbfcc82c8e36a429883f3dad Mon Sep 17 00:00:00 2001 From: vahidrezanezhad Date: Fri, 2 May 2025 01:02:32 +0200 Subject: [PATCH] adding space between splitted textline predicted text in the case of trocr --- src/eynollah/eynollah.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eynollah/eynollah.py b/src/eynollah/eynollah.py index 5793d37..d148c67 100644 --- a/src/eynollah/eynollah.py +++ b/src/eynollah/eynollah.py @@ -5164,7 +5164,7 @@ class Eynollah_ocr: extracted_texts = extracted_texts + generated_text_merged - extracted_texts_merged = [extracted_texts[ind] if cropped_lines_meging_indexing[ind]==0 else extracted_texts[ind]+extracted_texts[ind+1] if cropped_lines_meging_indexing[ind]==1 else None for ind in range(len(cropped_lines_meging_indexing))] + extracted_texts_merged = [extracted_texts[ind] if cropped_lines_meging_indexing[ind]==0 else extracted_texts[ind]+" "+extracted_texts[ind+1] if cropped_lines_meging_indexing[ind]==1 else None for ind in range(len(cropped_lines_meging_indexing))] extracted_texts_merged = [ind for ind in extracted_texts_merged if ind is not None] #print(extracted_texts_merged, len(extracted_texts_merged))