Skip to main content

SpamDetectionResult

The spam verdict: spam (delete it), suspected spam (send it back with the suggestion), or neither (publish it).

from respectify.schemas import SpamDetectionResult

Fields​

reasoning​

Explanation of the spam analysis

result.reasoning: str

is_spam​

Whether the comment is detected as spam

result.is_spam: bool

confidence​

Confidence in the verdict (0.0=uncertain, 1.0=certain the verdict is correct)

Constraints: ge=0.0, le=1.0

result.confidence: float # 0.0-1.0

suspected_spam​

Looks like spam but is not certain: send the comment back to its writer with the suggestion instead of deleting it. Always false when is_spam is true

result.suspected_spam: bool

suggestion​

What to tell the writer of a suspected-spam comment, e.g. to remove a link. Empty unless suspected_spam is true

result.suggestion: str