Newer
Older

Michał Pogoda
committed
from src.detections import Detection
from src.string_replacements import replace
from src.replacers.interface import ReplacerInterface
class DeleteReplacer(ReplacerInterface):
def __init__(self):
pass
def replace(

Michał Pogoda
committed
self, text: str, detections: List[Tuple[int, int, Detection]]
) -> Tuple[str, List[Tuple[int, int, Detection]]]:
result = [(start, end, "") for start, end, _ in detections]
return replace(text, result), []