import logging
from pathlib import Path

from .mapping import create_mappings


class PreprocessingManager:
    """Manages the ID mapping preprocessing.

    Converts source IDs to continuous numeric IDs.
    """

    def create_mappings(
        self,
        dataset_folder: Path,
        mapped_data_dir: Path,
    ) -> None:
        """Create ID mappings for entities and relations."""
        logging.info("Creating ID mappings...")
        create_mappings(
            input_folder=dataset_folder,
            output_folder=mapped_data_dir,
        )
