"""Abstract base class for normalizer config objects.

Each normalizer class is a thin config object that serializes to a spec dict
via to_normalizer_spec(). No text processing logic lives in the SDK ---
all normalization runs server-side.
"""

from abc import ABC, abstractmethod


class BaseNormalizer(ABC):
    """Base class for normalizers.

    Normalizers pre-process text before scanning (e.g., unicode normalization,
    invisible character stripping, homoglyph normalization). Each subclass
    serializes its config to a spec dict for the server.
    """

    @abstractmethod
    def to_normalizer_spec(self) -> dict:
        """Translate normalizer config into a server-side normalizer spec.

        Returns:
            dict: {"type": str, "config": dict} for the server normalizer
                  pipeline.
        """
