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 text and returns an inference of the prevailing sentiment
(POSITIVE
, NEUTRAL
, MIXED
, or NEGATIVE
).
Synopsis
- data DetectSentiment = DetectSentiment' {}
- newDetectSentiment :: Text -> LanguageCode -> DetectSentiment
- detectSentiment_text :: Lens' DetectSentiment Text
- detectSentiment_languageCode :: Lens' DetectSentiment LanguageCode
- data DetectSentimentResponse = DetectSentimentResponse' {}
- newDetectSentimentResponse :: Int -> DetectSentimentResponse
- detectSentimentResponse_sentiment :: Lens' DetectSentimentResponse (Maybe SentimentType)
- detectSentimentResponse_sentimentScore :: Lens' DetectSentimentResponse (Maybe SentimentScore)
- detectSentimentResponse_httpStatus :: Lens' DetectSentimentResponse Int
Creating a Request
data DetectSentiment Source #
See: newDetectSentiment
smart constructor.
DetectSentiment' | |
|
Instances
:: Text | |
-> LanguageCode | |
-> DetectSentiment |
Create a value of DetectSentiment
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:text:DetectSentiment'
, detectSentiment_text
- A UTF-8 text string. Each string must contain fewer that 5,000 bytes of
UTF-8 encoded characters.
$sel:languageCode:DetectSentiment'
, detectSentiment_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
detectSentiment_text :: Lens' DetectSentiment Text Source #
A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded characters.
detectSentiment_languageCode :: Lens' DetectSentiment 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 DetectSentimentResponse Source #
See: newDetectSentimentResponse
smart constructor.
DetectSentimentResponse' | |
|
Instances
newDetectSentimentResponse Source #
Create a value of DetectSentimentResponse
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:sentiment:DetectSentimentResponse'
, detectSentimentResponse_sentiment
- The inferred sentiment that Amazon Comprehend has the highest level of
confidence in.
$sel:sentimentScore:DetectSentimentResponse'
, detectSentimentResponse_sentimentScore
- An object that lists the sentiments, and their corresponding confidence
levels.
$sel:httpStatus:DetectSentimentResponse'
, detectSentimentResponse_httpStatus
- The response's http status code.
Response Lenses
detectSentimentResponse_sentiment :: Lens' DetectSentimentResponse (Maybe SentimentType) Source #
The inferred sentiment that Amazon Comprehend has the highest level of confidence in.
detectSentimentResponse_sentimentScore :: Lens' DetectSentimentResponse (Maybe SentimentScore) Source #
An object that lists the sentiments, and their corresponding confidence levels.
detectSentimentResponse_httpStatus :: Lens' DetectSentimentResponse Int Source #
The response's http status code.