mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-08-29 11:59:55 +02:00
adding space between splitted textline predicted text in the case of trocr
This commit is contained in:
parent
5c8084a397
commit
fd375e15d5
1 changed files with 1 additions and 1 deletions
|
@ -5164,7 +5164,7 @@ class Eynollah_ocr:
|
||||||
|
|
||||||
extracted_texts = extracted_texts + generated_text_merged
|
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]
|
extracted_texts_merged = [ind for ind in extracted_texts_merged if ind is not None]
|
||||||
#print(extracted_texts_merged, len(extracted_texts_merged))
|
#print(extracted_texts_merged, len(extracted_texts_merged))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue