detector_benchmark.detector.detector¶

Classes¶

Detector

Helper class that provides a standard way to create an ABC using

Module Contents¶

class detector_benchmark.detector.detector.Detector¶

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

abstract detect(texts: list[str], batch_size: int, detection_threshold: float = 0.0) tuple[list[int], list[float], list[int]]¶

Detect the watermark in the texts.

Parameters:¶

texts: list[str]

The texts to detect the watermark in

batch_size: int

The batch size

detection_threshold: float

The threshold to use for the detection

Returns:¶

tuple[list[int], list[float], list[int]]

The predictions, the logits, and the predictions at the threshold