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 |
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 :: NonEmpty Text -> LanguageCode -> BatchDetectSentiment
- batchDetectSentiment_textList :: Lens' BatchDetectSentiment (NonEmpty 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 UTF-8 encoded text of the input documents. The
list can contain a maximum of 25 documents. The maximum size of each
document is 5 KB.
Amazon Comprehend performs real-time sentiment analysis on the first 500 characters of the input text and ignores any additional text in the input.
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 (NonEmpty Text) Source #
A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. The maximum size of each document is 5 KB.
Amazon Comprehend performs real-time sentiment analysis on the first 500 characters of the input text and ignores any additional text in the input.
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.