What problem does it solve?
Modifying OCR behavior in Xberg is risky because backend outputs are not interchangeable measurements: confidence semantics, font sizes, and page acceptance differ across Tesseract, PaddleOCR, Candle, and custom backends. This Skill encodes the invariants needed to change or evaluate the OCR pipeline without silently corrupting quality metrics or cache behavior.
Core Features & Use Cases
- Backend and execution rules: Covers the
OcrBackend trait, OcrBackendType variants, blocking execution via tokio::task::spawn_blocking, language validation, and page orientation handling.
- Configuration and cache safety: Explains the dual TesseractConfig defaults, the OCR cache key composition, and when to bump
TESSERACT_RESULT_SCHEMA_VERSION for A/B or revert checks.
- Quality invariants and tables: Documents confidence semantics, hOCR font metadata requirements, page acceptance behavior, and the correct row-then-column table reconstruction order.
- Use Case: When rewriting OCR recall logic, use this Skill to require an independently grounded F1 A/B benchmark and avoid comparing Tesseract typography-derived font sizes against Sceptre/Paddle geometric proxies.
Quick Start
Load the ocr-pipeline-and-quality skill before changing the Tesseract preprocessing defaults and tell me which quality invariants and cache keys I need to update.