| Copyright | (c) 2013-2018 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 |
| Language | Haskell2010 |
Network.AWS.Comprehend.BatchDetectSentiment
Description
Inspects a batch of documents and returns an inference of the prevailing sentiment, POSITIVE , NEUTRAL , MIXED , or NEGATIVE , in each one.
- batchDetectSentiment :: Text -> BatchDetectSentiment
- data BatchDetectSentiment
- bdsTextList :: Lens' BatchDetectSentiment [Text]
- bdsLanguageCode :: Lens' BatchDetectSentiment Text
- batchDetectSentimentResponse :: Int -> BatchDetectSentimentResponse
- data BatchDetectSentimentResponse
- bdsrsResponseStatus :: Lens' BatchDetectSentimentResponse Int
- bdsrsResultList :: Lens' BatchDetectSentimentResponse [BatchDetectSentimentItemResult]
- bdsrsErrorList :: Lens' BatchDetectSentimentResponse [BatchItemError]
Creating a Request
Arguments
| :: Text | |
| -> BatchDetectSentiment |
Creates a value of BatchDetectSentiment with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
bdsTextList- 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.bdsLanguageCode- The language of the input documents. All documents must be in the same language.
data BatchDetectSentiment Source #
See: batchDetectSentiment smart constructor.
Instances
Request Lenses
bdsTextList :: 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.
bdsLanguageCode :: Lens' BatchDetectSentiment Text Source #
The language of the input documents. All documents must be in the same language.
Destructuring the Response
batchDetectSentimentResponse Source #
Arguments
| :: Int | |
| -> BatchDetectSentimentResponse |
Creates a value of BatchDetectSentimentResponse with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
bdsrsResponseStatus- -- | The response status code.bdsrsResultList- A list of objects containing the results of the operation. The results are sorted in ascending order by theIndexfield and match the order of the documents in the input list. If all of the documents contain an error, theResultListis empty.bdsrsErrorList- A list containing one object for each document that contained an error. The results are sorted in ascending order by theIndexfield and match the order of the documents in the input list. If there are no errors in the batch, theErrorListis empty.
data BatchDetectSentimentResponse Source #
See: batchDetectSentimentResponse smart constructor.
Instances
Response Lenses
bdsrsResponseStatus :: Lens' BatchDetectSentimentResponse Int Source #
- - | The response status code.
bdsrsResultList :: 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.
bdsrsErrorList :: 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.