nosdigitalmedia's picture
Attempt to set up application
4e0f321
raw
history blame contribute delete
729 Bytes
from abc import ABC
from src.rule_based_system.Verdict import Verdict
class Rule(ABC):
def get_verdict(self, comment_text: str) -> Verdict:
"""
Takes the comment text as input, tests a specific rule and returns a verdict,
which contains whether the comment is allowed according to the specific rule and
contains a list of substrings in the comment that may explain why a comment was
marked as inappropriate.
"""
pass
def is_strict(self) -> bool:
"""
Returns True if rule can be used directly. False if results may be ambiguous.
"""
pass
@staticmethod
def get_rule_description() -> str:
pass