tetrak_ocrΒΆ
Batch OCR pipeline and backend comparison harness for archival images.
Every backend exposes ocr_image(path) -> str. Resolve one by name through
tetrak_ocr.registry rather than importing it directly, so that a
missing optional dependency reports which extra to install.
>>> from tetrak_ocr.registry import get_backend
>>> ocr = get_backend("tesseract")
>>> text = ocr(Path("scan.jpg"))
Modules
Text similarity metrics for OCR evaluation. |
|
auto-local OCR backend: fan out over the local engines and keep the best. |
|
OCR backends. |
|
Batch OCR processor. |
|
Command line entry point. |
|
Exceptions raised by the package. |
|
Frame handling for multi-page raster images. |
|
Positioned text: the vocabulary shared by the backends and the output writers. |
|
The batch's CSV manifest: one row per file, for a spreadsheet or an import. |
|
Which way up a page is, read from the ink, and the turn that rights it. |
|
Output formats for a finished transcript. |
|
Write a searchable PDF: the scan, with the transcript invisible over it. |
|
Reference-free OCR quality metrics. |
|
Resolve a backend by name. |
|
Append-only run log: what was processed, by which backend, and how long it took. |
|
The triage queue: what was held, why, and a local page that lists it. |