Martin Jurkiewicz
Martin Jurkiewicz
The detector counts `pages_with_images` and `pages_with_template_images` while classifying, but discards both — callers only see the final `pdf_type` and `ocr_recommended`. Pipelines that route between local extraction and OCR can't calibrate...
The Rust API accepts a `DetectionConfig` through `PdfOptions::detection()`, but the Python bindings never exposed it, so Python callers are pinned to the default `Sample(8)` strategy. On long documents that means...
In `detect_from_document` (src/detector.rs), the classification branches are ordered like this: ```rust let (pdf_type, confidence) = if has_template_images && pages_with_text > 0 { (PdfType::Mixed, ...) // ocr_recommended = true } else...