Skip to main content

CommentScore

Represents the comprehensive evaluation of a comment's quality and toxicity, under the site's tolerances.

Findings the site's tolerances accept have already been removed. health_items, health_score, overall_score and exceeds_tolerance report the comment's health under the tolerances sent with the request. See Comment Health.

from respectify.schemas import CommentScore, HealthItemScore, LogicalFallacy, NegativeTonePhrase, ObjectionablePhrase

Fields​

logical_fallacies​

List of logical fallacies found

result.logical_fallacies: List[LogicalFallacy]

objectionable_phrases​

List of objectionable phrases found

result.objectionable_phrases: List[ObjectionablePhrase]

negative_tone_phrases​

List of phrases with negative tone

result.negative_tone_phrases: List[NegativeTonePhrase]

appears_low_effort​

Whether the comment appears to be low effort

result.appears_low_effort: bool

overall_score​

Comment health, 1-5: health_score rounded half up. The quality score alone is health_items["quality"].score. When every item is off (so there is no health_score), this is the quality rubric's score.

Responses from older servers, without health_items, give the quality score here.

Constraints: ge=1, le=5

result.overall_score: int # 1-5

toxicity_score​

Toxicity score (0.0=not toxic, 1.0=highly toxic)

Constraints: ge=0.0, le=1.0

result.toxicity_score: float # 0.0-1.0

toxicity_explanation​

Educational explanation of toxicity issues found

result.toxicity_explanation: str

exceeds_tolerance​

True when any comment health item scores below what the site accepts (any health_items entry has is_acceptable false), or the comment is severely toxic. Use this, rather than toxicity_score or overall_score alone, to decide whether to coach.

See exceeds_tolerance for exactly when it is set.

result.exceeds_tolerance: bool

health_score​

Comment health: the geometric mean of the quality score and the worst problem item's score, leaving out whichever is turned off. 1.0-5.0, to two decimal places.

Optional. Omitted from the JSON (not null) when every item is off, and absent from older servers' responses.

Constraints: ge=1.0, le=5.0

result.health_score: Optional[float] # 1.0-5.0, None when every item is off

health_items​

Each comment health item not turned off, by name: any of the nine categories and quality. Items set to off have no entry. Empty or absent in older servers' responses, so treat it as optional.

See Item scores for how each score is measured.

result.health_items: Dict[str, HealthItemScore]

tolerances​

The tolerances this score was judged under

All ten items are present: the nine categories and quality. Each value is one of off, permissive, relaxed, standard, strict or zero_tolerance. Items the request did not name are standard. See Comment Health.

result.tolerances: ModerationTolerances

Sub-types​

HealthItemScore​

One comment health item: how the comment scored on it, and the lowest score the site accepts.

FieldTypeDescription
scoreint # 1-55 means nothing found. For a category: minor finding 4, clear 3, severe 2, extreme 1. For quality: the quality score.
minimumint # 1-5The lowest score this item's level accepts
is_acceptableboolWhether score is at or above minimum

LogicalFallacy​

Represents a logical fallacy identified in a comment.

FieldTypeDescription
fallacy_namestrThe name of the logical fallacy, e.g., 'straw man'
quoted_logical_fallacy_examplestrThe part of the comment that contains the logical fallacy
explanationstrExplanation of the fallacy and suggestions for improvement
suggested_rewritestrSuggested rewrite (only provided when comment appears good-faith; otherwise empty)
severityint # 1-41 minor, 2 clear, 3 severe, 4 extreme

ObjectionablePhrase​

Represents an objectionable phrase identified in a comment.

FieldTypeDescription
quoted_objectionable_phrasestrThe objectionable phrase found in the comment
explanationstrExplanation of why this phrase is objectionable
suggested_rewritestrSuggested rewrite (only provided when comment appears good-faith; otherwise empty)
categoryModerationCategoryWhat kind of problem the phrase is: one of threat, identity_attack, sexual_content, harassment, insult, profanity, dismissive_tone
severityint # 1-41 minor, 2 clear, 3 severe, 4 extreme

NegativeTonePhrase​

Represents a phrase with negative tone identified in a comment.

FieldTypeDescription
quoted_negative_tone_phrasestrThe phrase with negative tone
explanationstrExplanation of the negative tone
suggested_rewritestrSuggested rewrite (only provided when comment appears good-faith; otherwise empty)
categoryModerationCategoryWhat kind of problem the phrase is: one of threat, identity_attack, sexual_content, harassment, insult, profanity, dismissive_tone
severityint # 1-41 minor, 2 clear, 3 severe, 4 extreme