@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 37 lines 1.16 KB
Raw
1 import type * as comprehend from "@distilled.cloud/aws/comprehend";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `comprehend:DetectSyntax` — tokenize the input text
7 * and label each token with its part of speech (noun, verb, adjective, …).
8 *
9 * The binding takes no arguments and grants the action on `*` (the action
10 * has no resource-level IAM).
11 *
12 * ### Real-Time Analysis
13 * **Example:** Parse Parts of Speech
14 * ```typescript
15 * // init
16 * const detectSyntax = yield* AWS.Comprehend.DetectSyntax();
17 *
18 * // runtime
19 * const result = yield* detectSyntax({
20 * Text: "The cat sat on the mat.",
21 * LanguageCode: "en",
22 * });
23 * // result.SyntaxTokens: [{ Text: "cat", PartOfSpeech: { Tag: "NOUN" } }, …]
24 * ```
25 *
26 * @binding
27 */
28 export interface DetectSyntax extends Binding.Service<
29 DetectSyntax,
30 "AWS.Comprehend.DetectSyntax",
31 () => Effect.Effect<
32 (
33 request: comprehend.DetectSyntaxRequest,
34 ) => Effect.Effect<comprehend.DetectSyntaxResponse, comprehend.DetectSyntaxError>
35 >
36 > {}
37 export const DetectSyntax = Binding.Service<DetectSyntax>("AWS.Comprehend.DetectSyntax");