Skip to content

edspdf.aggregators.base

BaseAggregator

Bases: ABC

Source code in edspdf/aggregators/base.py
 7
 8
 9
10
11
12
13
14
15
16
17
class BaseAggregator(ABC):
    @abstractmethod
    def aggregate(self, lines: pd.DataFrame) -> Dict[str, str]:
        """
        Handles the text aggregation
        """

    def __call__(self, lines: pd.DataFrame, copy: bool = False) -> Dict[str, str]:
        if copy:
            lines = lines.copy()
        return self.aggregate(lines)

aggregate(lines) abstractmethod

Handles the text aggregation

Source code in edspdf/aggregators/base.py
 8
 9
10
11
12
@abstractmethod
def aggregate(self, lines: pd.DataFrame) -> Dict[str, str]:
    """
    Handles the text aggregation
    """