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:BatchDetectDominantLanguage` — determine the dominant language for a batch of up to 25 documents in a single call.
7 *
8 * The response carries a `ResultList` (index-aligned with `TextList`) and an
9 * `ErrorList` for documents that could not be processed. Like all Comprehend
10 * real-time APIs the action has no resource-level IAM, so the binding takes
11 * no arguments and grants the action on `*`.
12 *
13 * ### Batch Real-Time Analysis
14 * **Example:** DominantLanguage for a Batch of Documents
15 * ```typescript
16 * // init
17 * const batchDetectDominantLanguage = yield* AWS.Comprehend.BatchDetectDominantLanguage();
18 *
19 * // runtime
20 * const result = yield* batchDetectDominantLanguage({
21 * TextList: ["I love this product!", "The delivery was late."],
22 * });
23 * // result.ResultList[0].Languages[0].LanguageCode === "en"
24 * ```
25 *
26 * @binding
27 */
28export interface BatchDetectDominantLanguage extends Binding.Service<
29 BatchDetectDominantLanguage,
30 "AWS.Comprehend.BatchDetectDominantLanguage",
31 () => Effect.Effect<
32 (
33 request: comprehend.BatchDetectDominantLanguageRequest,
34 ) => Effect.Effect<
35 comprehend.BatchDetectDominantLanguageResponse,
36 comprehend.BatchDetectDominantLanguageError
37 >
38 >
39> {}
40export const BatchDetectDominantLanguage =
41 Binding.Service<BatchDetectDominantLanguage>(
42 "AWS.Comprehend.BatchDetectDominantLanguage",
43 );