DogwhistleResult
Represents the result of dogwhistle detection analysis.
- Python
- PHP
- JSON
from respectify.schemas import DogwhistleDetails, DogwhistleResult
use Respectify\Schemas\DogwhistleDetails;
use Respectify\Schemas\DogwhistleResult;
Types are returned as JSON objects in API responses.
Fields
detection
Dogwhistle detection analysis
- Python
- PHP
- JSON
result.detection: DogwhistleDetection
$result->detection: DogwhistleDetection
"detection": {
"reasoning": "string",
"dogwhistles_detected": true,
"confidence": 0.5
}
This is a DogwhistleDetection object.
details
Optional detailed information about detected dogwhistles
- Python
- PHP
- JSON
result.details: Optional[DogwhistleDetails]
$result->details: ?DogwhistleDetails
"details": {
"dogwhistle_terms": ["...", "..."],
"categories": ["...", "..."],
"subtlety_level": 0.5,
"harm_potential": 0.5
} // or null
This is a DogwhistleDetails object (or null).
Sub-types
DogwhistleDetection
Represents the detection aspect of dogwhistle analysis.
- Python
- PHP
- JSON
| Field | Type | Description |
|---|---|---|
reasoning | str | Explanation of the dogwhistle analysis |
dogwhistles_detected | bool | Whether dogwhistles were detected |
confidence | float # 0.0-1.0 | Confidence level (0.0=low, 1.0=high) |
| Field | Type | Description |
|---|---|---|
reasoning | string | Explanation of the dogwhistle analysis |
dogwhistlesDetected | bool | Whether dogwhistles were detected |
confidence | float | Confidence level (0.0=low, 1.0=high) |
{
"reasoning": "string",
"dogwhistles_detected": true,
"confidence": 0.5
}
DogwhistleDetails
Represents detailed information about detected dogwhistles.
- Python
- PHP
- JSON
| Field | Type | Description |
|---|---|---|
dogwhistle_terms | List[str] | Specific dogwhistle terms detected |
categories | List[str] | Categories of dogwhistles detected |
subtlety_level | float # 0.0-1.0 | Subtlety level (0.0=obvious, 1.0=very subtle) |
harm_potential | float # 0.0-1.0 | Potential harm level (0.0=low, 1.0=high) |
| Field | Type | Description |
|---|---|---|
dogwhistleTerms | str[] | Specific dogwhistle terms detected |
categories | str[] | Categories of dogwhistles detected |
subtletyLevel | float | Subtlety level (0.0=obvious, 1.0=very subtle) |
harmPotential | float | Potential harm level (0.0=low, 1.0=high) |
{
"dogwhistle_terms": ["...", "..."],
"categories": ["...", "..."],
"subtlety_level": 0.5,
"harm_potential": 0.5
}