"""Interface for detectors.""" from abc import ABC, abstractmethod from typing import Any, Dict, List, Tuple from src.detections import Detection class Detector(ABC): """Interface for detectors.""" @abstractmethod def detect( self, text: str, annotations: Dict[str, List[Tuple[int, int, Any]]] ) -> List[Tuple[int, int, Detection]]: """Detects entities in text. Args: text (str): Text to be processed. annotations (Dict[str, List[Tuple[int, int, Any]]]): Annotations. Returns: List[Tuple[int, int, Detection]]: List of detections. """