from __future__ import annotations

import re


class DeleteIntentHeuristic:
    _PATTERNS = (
        re.compile(r"\bdelete\b"),
        re.compile(r"\bremove\b"),
        re.compile(r"\bdecommission(?:ed|ing)?\b"),
        re.compile(r"\bудал(?:ить|ение|яем|яется|ен[аоы]?|ить страницу|ить документ)\b"),
        re.compile(r"\bдекомисс"),
    )

    def is_delete(self, text: str) -> bool:
        lowered = (text or "").lower()
        return any(pattern.search(lowered) for pattern in self._PATTERNS)
