DetectToxicContent
Source:
src/AWS/Comprehend/DetectToxicContent.ts
Runtime binding for comprehend:DetectToxicContent — run toxicity
analysis over a list of text segments; the response carries one result per
segment with per-label scores (profanity, hate speech, harassment, …).
The binding takes no arguments and grants the action on * (the action
has no resource-level IAM).
Real-Time Analysis
Section titled “Real-Time Analysis”// initconst detectToxicContent = yield* AWS.Comprehend.DetectToxicContent();
// runtimeconst result = yield* detectToxicContent({ TextSegments: [{ Text: "You are a wonderful person." }], LanguageCode: "en",});// result.ResultList[0].Toxicity ~ 0.01