batchDetectDominantLanguage method
Determines the dominant language of the input text for a batch of documents. For a list of languages that Amazon Comprehend can detect, see Amazon Comprehend Supported Languages.
May throw BatchSizeLimitExceededException.
May throw InternalServerException.
May throw InvalidRequestException.
May throw TextSizeLimitExceededException.
Parameter textList :
A list containing the UTF-8 encoded text of the input documents. The list
can contain a maximum of 25 documents. Each document should contain at
least 20 characters. The maximum size of each document is 5 KB.
Implementation
Future<BatchDetectDominantLanguageResponse> batchDetectDominantLanguage({
required List<String> textList,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Comprehend_20171127.BatchDetectDominantLanguage'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'TextList': textList,
},
);
return BatchDetectDominantLanguageResponse.fromJson(jsonResponse.body);
}