flow_preprocessing.preprocessing_logic.preprocess

Flow Preprocessor - Main Preprocessing Module

This module provides preprocessing functionality for PageXML datasets with: - Dependency Injection pattern - Factory Pattern for converter creation - Configuration object pattern - Support for ZIP files and HuggingFace datasets - Optional GPU-accelerated image segmentation

Classes

HuggingFacePreprocessor(input_path, config)

Preprocessor for HuggingFace datasets.

Preprocessor(config[, converter_factory])

Base preprocessor class with improved OOP design.

PreprocessorBuilder(huggingface_target_repo_name)

Builder for creating Preprocessor instances with fluent API.

ZipPreprocessor(input_path, config[, ...])

Preprocessor for ZIP files (local or remote).