Skip to main content

CommentScore

Represents the results of a comment evaluation by Respectify, and contains info on various aspects.

This includes if it's spam, low effort, and an overall quality evaluation, plus more detailed evaluation of logical fallacies, objectionable phrases, and negative tone.

  • Full name: \Respectify\CommentScore

Properties

logicalFallacies

An array of potential logical fallacies identified in the comment.

public array $logicalFallacies

See Also:

  • LogicalFallacy - each entry in the array is an instance of this class.

objectionablePhrases

An array of potential objectionable phrases identified in the comment.

public array $objectionablePhrases

See Also:

negativeTonePhrases

An array of potential phrases not conducive to healthy conversation identified in the comment.

public array $negativeTonePhrases

See Also:

appearsLowEffort

Indicates whether the comment appears to be low effort, such as 'me too', 'first', etc.

public bool $appearsLowEffort

isSpam

Indicates whether the comment is likely spam. This is an 'early exit' condition so if true, the other fields may not be calculated.

public bool $isSpam

overallScore

Represents an approximate evaluation of the 'quality' of the comment, in terms of how well it contributes to a healthy conversation. This is a number from 1 to 5.

public int $overallScore

Methods

__construct

CommentScore constructor. You should never need to call this. It is created internally by the Respectify client class when it gets a response.

public __construct(array $data): mixed

Parameters:

ParameterTypeDescription
$dataarrayThe data to initialize the comment score, coming from JSON.