A specific moderation result.

interface ModerationResult {
    entity: string;
    input: boolean;
    position: WatsonXAI.ModerationTextRange;
    score: number;
    word?: string;
}

Properties

entity: string

The entity that was identified by the moderation.

input: boolean

This defines if this was found in the input (true) or the output (false).

A range of text.

score: number

the probability that this is a real match.

word?: string

The text that was identified for this entity.

This field may be removed if requested in the moderation request body.