add region-based text extraction for hybrid OCR pipelines
Add `extract_text_in_regions_mem` that takes layout-detected bounding boxes (top-left origin, PDF points) and returns text within each region in reading order. Designed for pipelines where a layout model detects regions and text-based pages can skip GPU OCR by extracting text from the PDF structure directly. Also add `classify_pdf_mem` for lightweight PDF type classification returning 0-indexed pages_needing_ocr. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
4d52d7af52
commit
263ed0aa42
@@ -2,7 +2,7 @@
|
||||
//!
|
||||
//! This module extracts text with position information for structure detection.
|
||||
|
||||
mod content_stream;
|
||||
pub(crate) mod content_stream;
|
||||
mod fonts;
|
||||
mod layout;
|
||||
mod links;
|
||||
|
||||
Reference in New Issue
Block a user