CommentRelevanceResult
Represents the result of comment relevance analysis.
- Python
- PHP
- JSON
from respectify.schemas import CommentRelevanceResult
use Respectify\Schemas\CommentRelevanceResult;
Types are returned as JSON objects in API responses.
Fields
on_topic
On-topic analysis result
- Python
- PHP
- JSON
result.on_topic: OnTopicResult
$result->onTopic: OnTopicResult
"on_topic": {
"reasoning": "string",
"on_topic": true,
"confidence": 0.5
}
This is a OnTopicResult object.
banned_topics
Banned topics analysis result
- Python
- PHP
- JSON
result.banned_topics: BannedTopicsResult
$result->bannedTopics: BannedTopicsResult
"banned_topics": {
"reasoning": "string",
"banned_topics": ["...", "..."],
"quantity_on_banned_topics": 0.5,
"confidence": 0.5
}
This is a BannedTopicsResult object.
Sub-types
OnTopicResult
Represents whether a comment is on-topic.
- Python
- PHP
- JSON
| Field | Type | Description |
|---|---|---|
reasoning | str | Explanation of the relevance analysis |
on_topic | bool | Whether the comment is on-topic |
confidence | float # 0.0-1.0 | Confidence level (0.0=low, 1.0=high) |
| Field | Type | Description |
|---|---|---|
reasoning | string | Explanation of the relevance analysis |
onTopic | bool | Whether the comment is on-topic |
confidence | float | Confidence level (0.0=low, 1.0=high) |
{
"reasoning": "string",
"on_topic": true,
"confidence": 0.5
}
BannedTopicsResult
Represents analysis of banned topics in a comment.
- Python
- PHP
- JSON
| Field | Type | Description |
|---|---|---|
reasoning | str | Explanation of the banned topics analysis |
banned_topics | List[str] | List of banned topics detected |
quantity_on_banned_topics | float # 0.0-1.0 | Proportion discussing banned topics (0.0=none, 1.0=entirely) |
confidence | float # 0.0-1.0 | Confidence level (0.0=low, 1.0=high) |
| Field | Type | Description |
|---|---|---|
reasoning | string | Explanation of the banned topics analysis |
bannedTopics | str[] | List of banned topics detected |
quantityOnBannedTopics | float | Proportion discussing banned topics (0.0=none, 1.0=entirely) |
confidence | float | Confidence level (0.0=low, 1.0=high) |
{
"reasoning": "string",
"banned_topics": ["...", "..."],
"quantity_on_banned_topics": 0.5,
"confidence": 0.5
}