Skip to main content

Module file_processing

Module file_processing 

Source
Expand description

File processing abstraction for document text extraction.

This module provides a unified interface for extracting text content from various document formats (PDF, DOCX, images, etc.) using configurable providers.

§Providers

§Usage

ⓘ
use crate::uar::file_processing::{FileProcessorFactory, FileProcessor};

let processor = FileProcessorFactory::create(&config)?;
let result = processor.process(Path::new("document.pdf")).await?;
println!("Extracted: {}", result.content);

Structs§

ExtractedImage
An image extracted from a document.
FileProcessorFactory
Factory for creating file processors based on configuration.
KreuzbergProvider
Kreuzberg-based file processor using the native Rust core.
LocalProvider
Local file processor for text-based files.
MistralProvider
File processor using Mistral OCR API.
ProcessingResult
Result of file processing.
UnstructuredProvider
File processor using Unstructured.io API.

Enums§

ProcessingError
Errors that can occur during file processing.

Traits§

FileProcessor
Trait for file processing providers.

Functions§

process_bytes
Process bytes directly without writing to disk. Useful for processing uploaded file data.