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.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 [Sensitive Text]

    A list containing the text of the input documents. The list can contain a maximum of 25 documents. Each document 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 BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

Show BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

Generic BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

Associated Types

type Rep BatchDetectSentiment :: Type -> Type #

NFData BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

Methods

rnf :: BatchDetectSentiment -> () #

Hashable BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

ToJSON BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

AWSRequest BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

Associated Types

type AWSResponse 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

type Rep BatchDetectSentiment Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

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

Defined in Amazonka.Comprehend.BatchDetectSentiment

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 text of the input documents. The list can contain a maximum of 25 documents. Each document must contain fewer that 5,000 bytes of UTF-8 encoded characters.

$sel:languageCode: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 [Text] Source #

A list containing the text of the input documents. The list can contain a maximum of 25 documents. Each document must contain fewer that 5,000 bytes of UTF-8 encoded characters.

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
Eq BatchDetectSentimentResponse Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

Show BatchDetectSentimentResponse Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

Generic BatchDetectSentimentResponse Source # 
Instance details

Defined in Amazonka.Comprehend.BatchDetectSentiment

Associated Types

type Rep BatchDetectSentimentResponse :: Type -> Type #

NFData 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" "libZSservicesZSamazonka-comprehendZSamazonka-comprehend" '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.