Skip to main content

Module ocr

Module ocr 

Source
Expand description

Pluggable raster OCR engines (Tesseract CLI / ocrs). Pluggable raster OCR engines for table recovery.

Dependency inversion: lattice / cell bucketing consume OcrWord lists; only the recognizer implementation changes.

  • TesseractCliEngine — default on native (Tesseract / RapidOCR CLI).
  • [OcrsEngine] — pure-Rust RTen models behind feature ocr-ocrs.
  • [HostOcrEngine] — wasm32 host callback (PP-OCRv6 etc.).

Structs§

OcrWord
One recognized word with axis-aligned box in image pixel space.
TesseractCliEngine
Shells out to Tesseract (or RapidOCR via Python when EDGEPARSE_OCR_ENGINE=rapidocr).

Traits§

OcrEngine
Raster OCR provider (SOLID: depend on this abstraction, not a CLI spawn).

Functions§

default_engine
Default engine for the current build / env.