DetectDominantLanguage
Source:
src/AWS/Comprehend/DetectDominantLanguage.ts
Runtime binding for comprehend:DetectDominantLanguage — determine the
dominant language of the input text (returns RFC 5646 language codes with
confidence scores).
Comprehend’s synchronous detect APIs are pure pay-per-call with no
resource to manage: the binding takes no arguments and grants the action
on * (it has no resource-level IAM).
Real-Time Analysis
Section titled “Real-Time Analysis”// initconst detectDominantLanguage = yield* AWS.Comprehend.DetectDominantLanguage();
// runtimeconst result = yield* detectDominantLanguage({ Text: "Bob ordered two sandwiches yesterday.",});// result.Languages[0].LanguageCode === "en"