mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-08 20:58:11 +00:00
feat: Introduce automatic language detection in TesseractOcrCliModel (#800)
* feat: Introduce automatic language detection in tesseract_ocr_cli model. Extend unit tests. Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com> * docs: Add example how to use "auto" language with tesseract OCR engines Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com> * fix: Refactor the TesseractOcrModel and TesseractOcrCliModel to validate if the auto-detected language is installed in the system and if not fall back to a default option without language. Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com> --------- Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
This commit is contained in:
@@ -62,6 +62,7 @@ def test_e2e_conversions():
|
||||
TesseractOcrOptions(force_full_page_ocr=True),
|
||||
TesseractOcrOptions(force_full_page_ocr=True, lang=["auto"]),
|
||||
TesseractCliOcrOptions(force_full_page_ocr=True),
|
||||
TesseractCliOcrOptions(force_full_page_ocr=True, lang=["auto"]),
|
||||
RapidOcrOptions(force_full_page_ocr=True),
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user