| 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 |
Amazonka.Comprehend.DetectTargetedSentiment
Description
Inspects the input text and returns a sentiment analysis for each entity identified in the text.
For more information about targeted sentiment, see Targeted sentiment.
Synopsis
- data DetectTargetedSentiment = DetectTargetedSentiment' {}
- newDetectTargetedSentiment :: Text -> LanguageCode -> DetectTargetedSentiment
- detectTargetedSentiment_text :: Lens' DetectTargetedSentiment Text
- detectTargetedSentiment_languageCode :: Lens' DetectTargetedSentiment LanguageCode
- data DetectTargetedSentimentResponse = DetectTargetedSentimentResponse' {}
- newDetectTargetedSentimentResponse :: Int -> DetectTargetedSentimentResponse
- detectTargetedSentimentResponse_entities :: Lens' DetectTargetedSentimentResponse (Maybe [TargetedSentimentEntity])
- detectTargetedSentimentResponse_httpStatus :: Lens' DetectTargetedSentimentResponse Int
Creating a Request
data DetectTargetedSentiment Source #
See: newDetectTargetedSentiment smart constructor.
Constructors
| DetectTargetedSentiment' | |
Fields
| |
Instances
newDetectTargetedSentiment Source #
Arguments
| :: Text | |
| -> LanguageCode | |
| -> DetectTargetedSentiment |
Create a value of DetectTargetedSentiment 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:
DetectTargetedSentiment, detectTargetedSentiment_text - A UTF-8 text string. The maximum string length is 5 KB.
DetectTargetedSentiment, detectTargetedSentiment_languageCode - The language of the input documents. Currently, English is the only
supported language.
Request Lenses
detectTargetedSentiment_text :: Lens' DetectTargetedSentiment Text Source #
A UTF-8 text string. The maximum string length is 5 KB.
detectTargetedSentiment_languageCode :: Lens' DetectTargetedSentiment LanguageCode Source #
The language of the input documents. Currently, English is the only supported language.
Destructuring the Response
data DetectTargetedSentimentResponse Source #
See: newDetectTargetedSentimentResponse smart constructor.
Constructors
| DetectTargetedSentimentResponse' | |
Fields
| |
Instances
newDetectTargetedSentimentResponse Source #
Create a value of DetectTargetedSentimentResponse 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:
DetectTargetedSentimentResponse, detectTargetedSentimentResponse_entities - Targeted sentiment analysis for each of the entities identified in the
input text.
$sel:httpStatus:DetectTargetedSentimentResponse', detectTargetedSentimentResponse_httpStatus - The response's http status code.
Response Lenses
detectTargetedSentimentResponse_entities :: Lens' DetectTargetedSentimentResponse (Maybe [TargetedSentimentEntity]) Source #
Targeted sentiment analysis for each of the entities identified in the input text.
detectTargetedSentimentResponse_httpStatus :: Lens' DetectTargetedSentimentResponse Int Source #
The response's http status code.