libZSservicesZSamazonka-comprehendZSamazonka-comprehend
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Comprehend.DetectSentiment

Description

Inspects text and returns an inference of the prevailing sentiment (POSITIVE, NEUTRAL, MIXED, or NEGATIVE).

Synopsis

Creating a Request

data DetectSentiment Source #

See: newDetectSentiment smart constructor.

Constructors

DetectSentiment' 

Fields

  • text :: Sensitive Text

    A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded characters.

  • languageCode :: 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.

Instances

Instances details
Eq DetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.DetectSentiment

Show DetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.DetectSentiment

Generic DetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.DetectSentiment

Associated Types

type Rep DetectSentiment :: Type -> Type #

NFData DetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.DetectSentiment

Methods

rnf :: DetectSentiment -> () #

Hashable DetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.DetectSentiment

ToJSON DetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.DetectSentiment

AWSRequest DetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.DetectSentiment

Associated Types

type AWSResponse DetectSentiment #

ToHeaders DetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.DetectSentiment

ToPath DetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.DetectSentiment

ToQuery DetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.DetectSentiment

type Rep DetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.DetectSentiment

type Rep DetectSentiment = D1 ('MetaData "DetectSentiment" "Amazonka.Comprehend.DetectSentiment" "libZSservicesZSamazonka-comprehendZSamazonka-comprehend" 'False) (C1 ('MetaCons "DetectSentiment'" 'PrefixI 'True) (S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Sensitive Text)) :*: S1 ('MetaSel ('Just "languageCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LanguageCode)))
type AWSResponse DetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.DetectSentiment

newDetectSentiment Source #

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.

Constructors

DetectSentimentResponse' 

Fields

Instances

Instances details
Eq DetectSentimentResponse Source # 
Instance details

Defined in Amazonka.Comprehend.DetectSentiment

Show DetectSentimentResponse Source # 
Instance details

Defined in Amazonka.Comprehend.DetectSentiment

Generic DetectSentimentResponse Source # 
Instance details

Defined in Amazonka.Comprehend.DetectSentiment

Associated Types

type Rep DetectSentimentResponse :: Type -> Type #

NFData DetectSentimentResponse Source # 
Instance details

Defined in Amazonka.Comprehend.DetectSentiment

Methods

rnf :: DetectSentimentResponse -> () #

type Rep DetectSentimentResponse Source # 
Instance details

Defined in Amazonka.Comprehend.DetectSentiment

type Rep DetectSentimentResponse = D1 ('MetaData "DetectSentimentResponse" "Amazonka.Comprehend.DetectSentiment" "libZSservicesZSamazonka-comprehendZSamazonka-comprehend" 'False) (C1 ('MetaCons "DetectSentimentResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "sentiment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SentimentType)) :*: (S1 ('MetaSel ('Just "sentimentScore") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SentimentScore)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

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.