amazonka-comprehend-2.0: Amazon Comprehend SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Comprehend.BatchDetectSentiment

Description

Inspects a batch of documents and returns an inference of the prevailing sentiment, POSITIVE, NEUTRAL, MIXED, or NEGATIVE, in each one.

Synopsis

Creating a Request

data BatchDetectSentiment Source #

See: newBatchDetectSentiment smart constructor.

Constructors

BatchDetectSentiment' 

Fields

  • textList :: Sensitive (NonEmpty (Sensitive Text))

    A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. The maximum size of each document is 5 KB.

    Amazon Comprehend performs real-time sentiment analysis on the first 500 characters of the input text and ignores any additional text in the input.

  • 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
ToJSON BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

ToHeaders BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

ToPath BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

ToQuery BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

AWSRequest BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

Associated Types

type AWSResponse BatchDetectSentiment #

Generic BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

Associated Types

type Rep BatchDetectSentiment :: Type -> Type #

Show BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

NFData BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

Methods

rnf :: BatchDetectSentiment -> () #

Eq BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

Hashable BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

type AWSResponse BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

type Rep BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

type Rep BatchDetectSentiment = D1 ('MetaData "BatchDetectSentiment" "Amazonka.Comprehend.BatchDetectSentiment" "amazonka-comprehend-2.0-Ko6GCjAQF2RARapSdPn69F" 'False) (C1 ('MetaCons "BatchDetectSentiment'" 'PrefixI 'True) (S1 ('MetaSel ('Just "textList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Sensitive (NonEmpty (Sensitive Text)))) :*: S1 ('MetaSel ('Just "languageCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LanguageCode)))

newBatchDetectSentiment Source #

Create a value of BatchDetectSentiment 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:textList:BatchDetectSentiment', batchDetectSentiment_textList - A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. The maximum size of each document is 5 KB.

Amazon Comprehend performs real-time sentiment analysis on the first 500 characters of the input text and ignores any additional text in the input.

BatchDetectSentiment, batchDetectSentiment_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

batchDetectSentiment_textList :: Lens' BatchDetectSentiment (NonEmpty Text) Source #

A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. The maximum size of each document is 5 KB.

Amazon Comprehend performs real-time sentiment analysis on the first 500 characters of the input text and ignores any additional text in the input.

batchDetectSentiment_languageCode :: Lens' BatchDetectSentiment 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 BatchDetectSentimentResponse Source #

See: newBatchDetectSentimentResponse smart constructor.

Constructors

BatchDetectSentimentResponse' 

Fields

  • httpStatus :: Int

    The response's http status code.

  • resultList :: [BatchDetectSentimentItemResult]

    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.

  • errorList :: [BatchItemError]

    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.

Instances

Instances details
Generic BatchDetectSentimentResponse Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

Associated Types

type Rep BatchDetectSentimentResponse :: Type -> Type #

Show BatchDetectSentimentResponse Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

NFData BatchDetectSentimentResponse Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

Eq BatchDetectSentimentResponse Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

type Rep BatchDetectSentimentResponse Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

type Rep BatchDetectSentimentResponse = D1 ('MetaData "BatchDetectSentimentResponse" "Amazonka.Comprehend.BatchDetectSentiment" "amazonka-comprehend-2.0-Ko6GCjAQF2RARapSdPn69F" 'False) (C1 ('MetaCons "BatchDetectSentimentResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: (S1 ('MetaSel ('Just "resultList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [BatchDetectSentimentItemResult]) :*: S1 ('MetaSel ('Just "errorList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [BatchItemError]))))

newBatchDetectSentimentResponse Source #

Create a value of BatchDetectSentimentResponse 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:httpStatus:BatchDetectSentimentResponse', batchDetectSentimentResponse_httpStatus - The response's http status code.

$sel:resultList:BatchDetectSentimentResponse', batchDetectSentimentResponse_resultList - 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.

$sel:errorList:BatchDetectSentimentResponse', batchDetectSentimentResponse_errorList - 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.

Response Lenses

batchDetectSentimentResponse_resultList :: 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.

batchDetectSentimentResponse_errorList :: 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.