docling-project / docling-project/docling

Tesseract params justification

Open
#2,816 2 comments 0 reactions 0 assignees View on GitHub
question triage/close-stale
Dominant language
Python
Stars
66.4k
Forks
4.8k
Avg merge
2d 21h
Merged PRs (30d)
84

Description

### Question
```
i am using
TesseractCliOcrOptions(
force_full_page_ocr=True,
lang=["auto"],
tesseract_cmd="tesseract"
)
```
and i want to know how to specify tesseract params like oem, psm, dpi, tessedit_char_whitelist, etc...
i already tried to pass them with the tesseract_cmd

```
pipeline_options.ocr_options = TesseractCliOcrOptions(
force_full_page_ocr=True,
lang=["auto"],
tesseract_cmd="tesseract --oem 1 --psm 6 --dpi 300"
)
```

but got this error

```
RuntimeError: Tesseract is not available, aborting: [Errno 2] No such file or directory: 'tesseract --oem 1 --psm 6 --dpi 300' Install tesseract on your system and the tesseract binary is discoverable. The actual command for Tesseract can be specified in `pipeline_options.ocr_options.tesseract_cmd='tesseract'`. Alternatively, Docling has support for other OCR engines. See the documentation.
```

although without specifying the params it works just fine

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.