MegaCallResult
Represents the result of a mega call containing multiple analysis types.
Each field is null when its analysis was not requested. When spam was requested and first-pass screening is confident the comment is spam, only spam_check is filled in and every other field is null, even if requested. A comment answered as suspected spam (spam_check.suspected_spam is true) is not spam, so every requested field is filled in as usual. See Megacall → First-Pass Screening.
- Python
- PHP
- JSON
from respectify.schemas import CommentRelevanceResult, CommentScore, DogwhistleResult, MegaCallResult, PerspectiveAnalyzeCommentResponse, SpamDetectionResult
use Respectify\Schemas\CommentRelevanceResult;
use Respectify\Schemas\CommentScore;
use Respectify\Schemas\DogwhistleResult;
use Respectify\Schemas\MegaCallResult;
use Respectify\Schemas\PerspectiveAnalyzeCommentResponse;
use Respectify\Schemas\SpamDetectionResult;
Types are returned as JSON objects in API responses.
Fields
comment_score
Comment score result. Null unless requested via include_comment_score (Python) or 'commentscore' service (PHP).
- Python
- PHP
- JSON
result.comment_score: Optional[CommentScore]
$result->commentScore: ?CommentScore
"comment_score": {
"logical_fallacies": [LogicalFallacy, ...],
"objectionable_phrases": [ObjectionablePhrase, ...],
"negative_tone_phrases": [NegativeTonePhrase, ...],
"appears_low_effort": true,
"overall_score": 1,
"toxicity_score": 0.5,
"toxicity_explanation": "string",
"exceeds_tolerance": true,
"health_score": 1.41,
"health_items": { "quality": HealthItemScore, ... },
"tolerances": ModerationTolerances
} // or null
This is a CommentScore object (or null).
spam_check
Spam detection result. Null unless requested via include_spam (Python) or 'spam' service (PHP).
- Python
- PHP
- JSON
result.spam_check: Optional[SpamDetectionResult]
$result->spamCheck: ?SpamDetectionResult
"spam_check": {
"reasoning": "string",
"is_spam": true,
"confidence": 0.5,
"suspected_spam": false,
"suggestion": ""
} // or null
This is a SpamDetectionResult object (or null).
relevance_check
Comment relevance result. Null unless requested via include_relevance (Python) or 'relevance' service (PHP).
- Python
- PHP
- JSON
result.relevance_check: Optional[CommentRelevanceResult]
$result->relevanceCheck: ?CommentRelevanceResult
"relevance_check": {
"on_topic": OnTopicResult,
"banned_topics": BannedTopicsResult
} // or null
This is a CommentRelevanceResult object (or null).
dogwhistle_check
Dogwhistle detection result. Null unless requested via include_dogwhistle (Python) or 'dogwhistle' service (PHP).
- Python
- PHP
- JSON
result.dogwhistle_check: Optional[DogwhistleResult]
$result->dogwhistleCheck: ?DogwhistleResult
"dogwhistle_check": {
"detection": DogwhistleDetection,
"details": DogwhistleDetails
} // or null
This is a DogwhistleResult object (or null).
perspective
Perspective-compatible analyzeComment response. Null unless requested via include_perspective_analyze_comment (Python) or 'perspectiveAnalyzeComment' service (PHP).
- Python
- PHP
- JSON
result.perspective: Optional[PerspectiveAnalyzeCommentResponse]
$result->perspective: ?PerspectiveAnalyzeCommentResponse
"perspective": {
"attributeScores": { "KEY": PerspectiveAnalyzeCommentAttributeScore },
"languages": ["...", "..."],
"detectedLanguages": ["...", "..."],
"clientToken": "string"
} // or null
This is a PerspectiveAnalyzeCommentResponse object (or null).