1import type * as comprehend from "@distilled.cloud/aws/comprehend";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `comprehend:DetectTargetedSentiment` — analyze the
7 * sentiment expressed toward each entity mentioned in the input text
8 * (entity-level sentiment rather than whole-document sentiment).
9 *
10 * The binding takes no arguments and grants the action on `*` (the action
11 * has no resource-level IAM).
12 *
13 * ### Real-Time Analysis
14 * **Example:** Sentiment per Entity
15 * ```typescript
16 * // init
17 * const detectTargetedSentiment = yield* AWS.Comprehend.DetectTargetedSentiment();
18 *
19 * // runtime
20 * const result = yield* detectTargetedSentiment({
21 * Text: "The screen is gorgeous but the battery life is disappointing.",
22 * LanguageCode: "en",
23 * });
24 * // result.Entities[…].Mentions[…].MentionSentiment.Sentiment
25 * ```
26 *
27 * @binding
28 */
29export interface DetectTargetedSentiment extends Binding.Service<
30 DetectTargetedSentiment,
31 "AWS.Comprehend.DetectTargetedSentiment",
32 () => Effect.Effect<
33 (
34 request: comprehend.DetectTargetedSentimentRequest,
35 ) => Effect.Effect<
36 comprehend.DetectTargetedSentimentResponse,
37 comprehend.DetectTargetedSentimentError
38 >
39 >
40> {}
41export const DetectTargetedSentiment = Binding.Service<DetectTargetedSentiment>(
42 "AWS.Comprehend.DetectTargetedSentiment",
43);