ClassifyDocument
Source:
src/AWS/Comprehend/ClassifyDocument.ts
Runtime binding for comprehend:ClassifyDocument — classify a single
document in real time against a custom classifier endpoint or a
Comprehend prebuilt model ARN (EndpointArn).
The binding takes no arguments and grants the action on * — endpoints
are addressed per-request via EndpointArn, so the grant cannot be
scoped tighter at deploy time.
Real-Time Analysis
Section titled “Real-Time Analysis”// initconst classifyDocument = yield* AWS.Comprehend.ClassifyDocument();
// runtimeconst result = yield* classifyDocument({ Text: "Subject: your invoice for March is attached", EndpointArn: endpointArn,});// result.Classes: [{ Name: "INVOICE", Score: 0.98 }, …]