Files
fil/docs/snippets/rust/advanced/quality_processing_example.md

18 lines
449 B
Markdown
Raw Permalink Normal View History

2026-06-01 23:40:55 +02:00
```rust title="Rust"
use kreuzberg::{extract_file, ExtractionConfig};
let config = ExtractionConfig {
enable_quality_processing: true,
..Default::default()
};
let result = extract_file("scanned_document.pdf", None, &config).await?;
if let Some(score) = result.quality_score {
if score < 0.5 {
println!("Warning: Low quality extraction ({:.2})", score);
} else {
println!("Quality score: {:.2}", score);
}
}
```