| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.Comprehend.BatchDetectDominantLanguage
Description
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.
Synopsis
- data BatchDetectDominantLanguage = BatchDetectDominantLanguage' {}
- newBatchDetectDominantLanguage :: NonEmpty Text -> BatchDetectDominantLanguage
- batchDetectDominantLanguage_textList :: Lens' BatchDetectDominantLanguage (NonEmpty Text)
- data BatchDetectDominantLanguageResponse = BatchDetectDominantLanguageResponse' {}
- newBatchDetectDominantLanguageResponse :: Int -> BatchDetectDominantLanguageResponse
- batchDetectDominantLanguageResponse_httpStatus :: Lens' BatchDetectDominantLanguageResponse Int
- batchDetectDominantLanguageResponse_resultList :: Lens' BatchDetectDominantLanguageResponse [BatchDetectDominantLanguageItemResult]
- batchDetectDominantLanguageResponse_errorList :: Lens' BatchDetectDominantLanguageResponse [BatchItemError]
Creating a Request
data BatchDetectDominantLanguage Source #
See: newBatchDetectDominantLanguage smart constructor.
Constructors
| BatchDetectDominantLanguage' | |
Instances
newBatchDetectDominantLanguage Source #
Create a value of BatchDetectDominantLanguage with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:textList:BatchDetectDominantLanguage', batchDetectDominantLanguage_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.
Request Lenses
batchDetectDominantLanguage_textList :: Lens' BatchDetectDominantLanguage (NonEmpty Text) Source #
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.
Destructuring the Response
data BatchDetectDominantLanguageResponse Source #
See: newBatchDetectDominantLanguageResponse smart constructor.
Constructors
| BatchDetectDominantLanguageResponse' | |
Fields
| |
Instances
newBatchDetectDominantLanguageResponse Source #
Arguments
| :: Int | |
| -> BatchDetectDominantLanguageResponse |
Create a value of BatchDetectDominantLanguageResponse with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:BatchDetectDominantLanguageResponse', batchDetectDominantLanguageResponse_httpStatus - The response's http status code.
$sel:resultList:BatchDetectDominantLanguageResponse', batchDetectDominantLanguageResponse_resultList - A list of objects containing the results of the operation. The results
are sorted in ascending order by the Index field and match the order
of the documents in the input list. If all of the documents contain an
error, the ResultList is empty.
$sel:errorList:BatchDetectDominantLanguageResponse', batchDetectDominantLanguageResponse_errorList - A list containing one object for each document that contained an error.
The results are sorted in ascending order by the Index field and match
the order of the documents in the input list. If there are no errors in
the batch, the ErrorList is empty.
Response Lenses
batchDetectDominantLanguageResponse_httpStatus :: Lens' BatchDetectDominantLanguageResponse Int Source #
The response's http status code.
batchDetectDominantLanguageResponse_resultList :: Lens' BatchDetectDominantLanguageResponse [BatchDetectDominantLanguageItemResult] Source #
A list of objects containing the results of the operation. The results
are sorted in ascending order by the Index field and match the order
of the documents in the input list. If all of the documents contain an
error, the ResultList is empty.
batchDetectDominantLanguageResponse_errorList :: Lens' BatchDetectDominantLanguageResponse [BatchItemError] Source #
A list containing one object for each document that contained an error.
The results are sorted in ascending order by the Index field and match
the order of the documents in the input list. If there are no errors in
the batch, the ErrorList is empty.