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:DetectEntities` — detect named entities
7 * (people, places, organizations, dates, quantities, …) in the input text
8 * using the pre-trained model, or custom entities via a custom entity
9 * recognizer endpoint (`EndpointArn`).
10 *
11 * The binding takes no arguments and grants the action on `*` (the action
12 * has no resource-level IAM for the pre-trained model).
13 *
14 * ### Real-Time Analysis
15 * **Example:** Detect Named Entities
16 * ```typescript
17 * // init
18 * const detectEntities = yield* AWS.Comprehend.DetectEntities();
19 *
20 * // runtime
21 * const result = yield* detectEntities({
22 * Text: "Bob moved to Seattle in 2017.",
23 * LanguageCode: "en",
24 * });
25 * // result.Entities: [{ Type: "PERSON", Text: "Bob" }, { Type: "LOCATION", Text: "Seattle" }, …]
26 * ```
27 *
28 * @binding
29 */
30export interface DetectEntities extends Binding.Service<
31 DetectEntities,
32 "AWS.Comprehend.DetectEntities",
33 () => Effect.Effect<
34 (
35 request: comprehend.DetectEntitiesRequest,
36 ) => Effect.Effect<
37 comprehend.DetectEntitiesResponse,
38 comprehend.DetectEntitiesError
39 >
40 >
41> {}
42export const DetectEntities = Binding.Service<DetectEntities>(
43 "AWS.Comprehend.DetectEntities",
44);