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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! Core extraction orchestration module.
//!
//! This module contains the main extraction logic and orchestration layer for Xberg.
//! It provides the primary entry points for bytes and URI extraction, manages the
//! extractor registry, MIME type detection, configuration, and post-processing pipeline.
//!
//! # Architecture
//!
//! The core module is responsible for:
//! - **Entry Points**: Main `extract()` and `extract_batch()` functions
//! - **Registry**: Mapping MIME types to extractors with priority-based selection
//! - **MIME Detection**: Detecting and validating MIME types from files and extensions
//! - **Pipeline**: Orchestrating post-processing steps (chunking, quality, etc.)
//! - **Configuration**: Loading and managing extraction configuration
//! - **I/O**: File reading and validation utilities
//!
//! # Example
//!
//! ```rust,no_run
//! use xberg::core::extract::extract;
//! use xberg::core::config::{ExtractInput, ExtractionConfig};
//!
//! # async fn example() -> xberg::Result<()> {
//! let config = ExtractionConfig::default();
//! let output = extract(ExtractInput::from_uri("document.pdf"), &config).await?;
//! println!("Extracted content: {}", output.results[0].content);
//! # Ok(())
//! # }
//! ```
pub
// Unconditional: every extractor that reports partial extraction goes through
// these helpers, not just the pdf/ocr pipelines that first needed them (#171).
pub
pub
pub
pub
pub
pub
pub
/// Split-and-extract for multi-document PDFs. Core-only, not part of the
/// binding surface (see `alef.toml` `[crates.exclude]`).
pub use HierarchyConfig;
pub use ;
pub use ServerConfig;
pub use PdfConfig;
pub use ;