1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! df-ocr-switcher — pipeline OCR documento in puro Rust.
//!
//! ## Architettura
//!
//! ```text
//! Input (TIFF/PNG/JPEG)
//! └── DocPipeline
//! ├── DocOrientationClassifier (ppocr-rs PP-LCNet) → rotazione
//! ├── LayoutAnalyzer (ppocr-rs PP-DocLayoutV3) → regioni
//! └── OcrEngine (impl):
//! ├── PpOcrEngine → detect_with_layout (PP-OCRv6)
//! └── TesseractEngine → Ocr5Engine + layout assignment
//! └── Output
//! ├── Markdown (to_markdown)
//! └── JSON (serde_json)
//! ```
//!
//! ## Quickstart
//!
//! ```no_run
//! use df_ocr_switcher::{DocPipeline, OutputFormat, PpOcrEngineConfig, engine::ppocr::PpOcrEngine};
//! use std::path::PathBuf;
//!
//! let engine = PpOcrEngine::new(PpOcrEngineConfig::default()).unwrap();
//! let mut pipeline = DocPipeline::new(
//! Box::new(engine),
//! "models/paddleocr/layout/PP-DocLayoutV3.onnx",
//! ).unwrap();
//!
//! let md = pipeline.process_file("scan.tiff", OutputFormat::Markdown).unwrap();
//! println!("{md}");
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;