amazonka-comprehend-1.6.1: Amazon Comprehend SDK.

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

Network.AWS.Comprehend.DetectSentiment

Contents

Description

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

Synopsis

Creating a Request

detectSentiment Source #

Creates a value of DetectSentiment with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • dsText - A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded characters.
  • dsLanguageCode - The RFC 5646 language code for the input text. If you don't specify a language code, Amazon Comprehend detects the dominant language. If you specify the code for a language that Amazon Comprehend does not support, it returns and UnsupportedLanguageException . For more information about RFC 5646, see Tags for Identifying Languages on the IETF Tools web site.

data DetectSentiment Source #

See: detectSentiment smart constructor.

Instances
Eq DetectSentiment Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

Data DetectSentiment Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DetectSentiment -> c DetectSentiment #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DetectSentiment #

toConstr :: DetectSentiment -> Constr #

dataTypeOf :: DetectSentiment -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DetectSentiment) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DetectSentiment) #

gmapT :: (forall b. Data b => b -> b) -> DetectSentiment -> DetectSentiment #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DetectSentiment -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DetectSentiment -> r #

gmapQ :: (forall d. Data d => d -> u) -> DetectSentiment -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DetectSentiment -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DetectSentiment -> m DetectSentiment #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DetectSentiment -> m DetectSentiment #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DetectSentiment -> m DetectSentiment #

Read DetectSentiment Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

Show DetectSentiment Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

Generic DetectSentiment Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

Associated Types

type Rep DetectSentiment :: Type -> Type #

Hashable DetectSentiment Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

ToJSON DetectSentiment Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

AWSRequest DetectSentiment Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

Associated Types

type Rs DetectSentiment :: Type #

ToHeaders DetectSentiment Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

ToPath DetectSentiment Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

ToQuery DetectSentiment Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

NFData DetectSentiment Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

Methods

rnf :: DetectSentiment -> () #

type Rep DetectSentiment Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

type Rep DetectSentiment = D1 (MetaData "DetectSentiment" "Network.AWS.Comprehend.DetectSentiment" "amazonka-comprehend-1.6.1-JmZRhcK5vJN1rBy4HW0MWx" False) (C1 (MetaCons "DetectSentiment'" PrefixI True) (S1 (MetaSel (Just "_dsText") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_dsLanguageCode") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 LanguageCode)))
type Rs DetectSentiment Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

Request Lenses

dsText :: Lens' DetectSentiment Text Source #

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

dsLanguageCode :: Lens' DetectSentiment LanguageCode Source #

The RFC 5646 language code for the input text. If you don't specify a language code, Amazon Comprehend detects the dominant language. If you specify the code for a language that Amazon Comprehend does not support, it returns and UnsupportedLanguageException . For more information about RFC 5646, see Tags for Identifying Languages on the IETF Tools web site.

Destructuring the Response

detectSentimentResponse Source #

Creates a value of DetectSentimentResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • dsrsSentiment - The inferred sentiment that Amazon Comprehend has the highest level of confidence in.
  • dsrsSentimentScore - An object that lists the sentiments, and their corresponding confidence levels.
  • dsrsResponseStatus - -- | The response status code.

data DetectSentimentResponse Source #

See: detectSentimentResponse smart constructor.

Instances
Eq DetectSentimentResponse Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

Data DetectSentimentResponse Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DetectSentimentResponse -> c DetectSentimentResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DetectSentimentResponse #

toConstr :: DetectSentimentResponse -> Constr #

dataTypeOf :: DetectSentimentResponse -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DetectSentimentResponse) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DetectSentimentResponse) #

gmapT :: (forall b. Data b => b -> b) -> DetectSentimentResponse -> DetectSentimentResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DetectSentimentResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DetectSentimentResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> DetectSentimentResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DetectSentimentResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DetectSentimentResponse -> m DetectSentimentResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DetectSentimentResponse -> m DetectSentimentResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DetectSentimentResponse -> m DetectSentimentResponse #

Read DetectSentimentResponse Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

Show DetectSentimentResponse Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

Generic DetectSentimentResponse Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

Associated Types

type Rep DetectSentimentResponse :: Type -> Type #

NFData DetectSentimentResponse Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

Methods

rnf :: DetectSentimentResponse -> () #

type Rep DetectSentimentResponse Source # 
Instance details

Defined in Network.AWS.Comprehend.DetectSentiment

type Rep DetectSentimentResponse = D1 (MetaData "DetectSentimentResponse" "Network.AWS.Comprehend.DetectSentiment" "amazonka-comprehend-1.6.1-JmZRhcK5vJN1rBy4HW0MWx" False) (C1 (MetaCons "DetectSentimentResponse'" PrefixI True) (S1 (MetaSel (Just "_dsrsSentiment") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe SentimentType)) :*: (S1 (MetaSel (Just "_dsrsSentimentScore") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe SentimentScore)) :*: S1 (MetaSel (Just "_dsrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))))

Response Lenses

dsrsSentiment :: Lens' DetectSentimentResponse (Maybe SentimentType) Source #

The inferred sentiment that Amazon Comprehend has the highest level of confidence in.

dsrsSentimentScore :: Lens' DetectSentimentResponse (Maybe SentimentScore) Source #

An object that lists the sentiments, and their corresponding confidence levels.