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 a sentiment analysis for each entity identified in the documents.
For more information about targeted sentiment, see Targeted sentiment.
Synopsis
- data BatchDetectTargetedSentiment = BatchDetectTargetedSentiment' {}
- newBatchDetectTargetedSentiment :: NonEmpty Text -> LanguageCode -> BatchDetectTargetedSentiment
- batchDetectTargetedSentiment_textList :: Lens' BatchDetectTargetedSentiment (NonEmpty Text)
- batchDetectTargetedSentiment_languageCode :: Lens' BatchDetectTargetedSentiment LanguageCode
- data BatchDetectTargetedSentimentResponse = BatchDetectTargetedSentimentResponse' {}
- newBatchDetectTargetedSentimentResponse :: Int -> BatchDetectTargetedSentimentResponse
- batchDetectTargetedSentimentResponse_httpStatus :: Lens' BatchDetectTargetedSentimentResponse Int
- batchDetectTargetedSentimentResponse_resultList :: Lens' BatchDetectTargetedSentimentResponse [BatchDetectTargetedSentimentItemResult]
- batchDetectTargetedSentimentResponse_errorList :: Lens' BatchDetectTargetedSentimentResponse [BatchItemError]
Creating a Request
data BatchDetectTargetedSentiment Source #
See: newBatchDetectTargetedSentiment
smart constructor.
BatchDetectTargetedSentiment' | |
|
Instances
newBatchDetectTargetedSentiment Source #
Create a value of BatchDetectTargetedSentiment
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:BatchDetectTargetedSentiment'
, batchDetectTargetedSentiment_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.
BatchDetectTargetedSentiment
, batchDetectTargetedSentiment_languageCode
- The language of the input documents. Currently, English is the only
supported language.
Request Lenses
batchDetectTargetedSentiment_textList :: Lens' BatchDetectTargetedSentiment (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.
batchDetectTargetedSentiment_languageCode :: Lens' BatchDetectTargetedSentiment LanguageCode Source #
The language of the input documents. Currently, English is the only supported language.
Destructuring the Response
data BatchDetectTargetedSentimentResponse Source #
See: newBatchDetectTargetedSentimentResponse
smart constructor.
BatchDetectTargetedSentimentResponse' | |
|
Instances
newBatchDetectTargetedSentimentResponse Source #
Create a value of BatchDetectTargetedSentimentResponse
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:BatchDetectTargetedSentimentResponse'
, batchDetectTargetedSentimentResponse_httpStatus
- The response's http status code.
$sel:resultList:BatchDetectTargetedSentimentResponse'
, batchDetectTargetedSentimentResponse_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:BatchDetectTargetedSentimentResponse'
, batchDetectTargetedSentimentResponse_errorList
- List of errors that the operation can return.
Response Lenses
batchDetectTargetedSentimentResponse_httpStatus :: Lens' BatchDetectTargetedSentimentResponse Int Source #
The response's http status code.
batchDetectTargetedSentimentResponse_resultList :: Lens' BatchDetectTargetedSentimentResponse [BatchDetectTargetedSentimentItemResult] 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.
batchDetectTargetedSentimentResponse_errorList :: Lens' BatchDetectTargetedSentimentResponse [BatchItemError] Source #
List of errors that the operation can return.