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

accuracy

Text similarity metrics for OCR evaluation.

auto_local

auto-local OCR backend: fan out over the local engines and keep the best.

backends

OCR backends.

batch

Batch OCR processor.

cli

Command line entry point.

errors

Exceptions raised by the package.

imaging

Frame handling for multi-page raster images.

layout

Positioned text: the vocabulary shared by the backends and the PDF writer.

outputs

Output formats for a finished transcript.

pdf_output

Write a searchable PDF: the scan, with the transcript invisible over it.

qa_score

Reference-free OCR quality metrics.

registry

Resolve a backend by name.

telemetry

Append-only run log: what was processed, by which backend, and how long it took.