Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Inspects a batch of documents and returns an inference of the prevailing
sentiment, POSITIVE
, NEUTRAL
, MIXED
, or NEGATIVE
, in each one.
Synopsis
- data BatchDetectSentiment = BatchDetectSentiment' {}
- newBatchDetectSentiment :: LanguageCode -> BatchDetectSentiment
- batchDetectSentiment_textList :: Lens' BatchDetectSentiment [Text]
- batchDetectSentiment_languageCode :: Lens' BatchDetectSentiment LanguageCode
- data BatchDetectSentimentResponse = BatchDetectSentimentResponse' {}
- newBatchDetectSentimentResponse :: Int -> BatchDetectSentimentResponse
- batchDetectSentimentResponse_httpStatus :: Lens' BatchDetectSentimentResponse Int
- batchDetectSentimentResponse_resultList :: Lens' BatchDetectSentimentResponse [BatchDetectSentimentItemResult]
- batchDetectSentimentResponse_errorList :: Lens' BatchDetectSentimentResponse [BatchItemError]
Creating a Request
data BatchDetectSentiment Source #
See: newBatchDetectSentiment
smart constructor.
BatchDetectSentiment' | |
|
Instances
newBatchDetectSentiment Source #
Create a value of BatchDetectSentiment
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:BatchDetectSentiment'
, batchDetectSentiment_textList
- A list containing the text of the input documents. The list can contain
a maximum of 25 documents. Each document must contain fewer that 5,000
bytes of UTF-8 encoded characters.
$sel:languageCode:BatchDetectSentiment'
, batchDetectSentiment_languageCode
- The language of the input documents. You can specify any of the primary
languages supported by Amazon Comprehend. All documents must be in the
same language.
Request Lenses
batchDetectSentiment_textList :: Lens' BatchDetectSentiment [Text] Source #
A list containing the text of the input documents. The list can contain a maximum of 25 documents. Each document must contain fewer that 5,000 bytes of UTF-8 encoded characters.
batchDetectSentiment_languageCode :: Lens' BatchDetectSentiment LanguageCode Source #
The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
Destructuring the Response
data BatchDetectSentimentResponse Source #
See: newBatchDetectSentimentResponse
smart constructor.
BatchDetectSentimentResponse' | |
|
Instances
newBatchDetectSentimentResponse Source #
Create a value of BatchDetectSentimentResponse
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:BatchDetectSentimentResponse'
, batchDetectSentimentResponse_httpStatus
- The response's http status code.
$sel:resultList:BatchDetectSentimentResponse'
, batchDetectSentimentResponse_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:BatchDetectSentimentResponse'
, batchDetectSentimentResponse_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
batchDetectSentimentResponse_httpStatus :: Lens' BatchDetectSentimentResponse Int Source #
The response's http status code.
batchDetectSentimentResponse_resultList :: Lens' BatchDetectSentimentResponse [BatchDetectSentimentItemResult] 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.
batchDetectSentimentResponse_errorList :: Lens' BatchDetectSentimentResponse [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.