Skip to content

Adapter - Amazon Comprehend

This page describes version 2.0.12 of the adapter.

Overview

This adapter uses the Amazon Web Service Comprehend API to provide natural language processing.

Configuration

All of the Amazon adapters, require a region, accessKey and secretKey. The regions list can be in Amazon's documentation. The accessKey and secretKey are accessed by logging in to your amazon account.

Accessing Secret Key

The secretKey can only be accessed once, directly after the accessKey and secretKey are generated.



Properties

Name Display Is Required Comments Type Default Value Maximum Value Minimum Value Maximum Length Minimum Length
region Region True The Amazon (AWS) region to run the commands on. string us-west-1 1024 1
accessKey Access Key True The Amazon account's Access Key. password 1024 1
secretKey Secret Key True The Amazon account's Secret Key. password 1024 1
roleArn Role ARN False The optional role ARN to assume. string 2048 1
externalId External ID False The external id to pass if assuming a role. password 1024 1



Commands

Batch Detect Dominant Language (batchDetectDominantLanguage)

Batch Run Detect Dominant Language with up to 25 comma delimited inputs.

Request Properties

Name Display Description Is Required Type
textList Text List A comma delimited list of text to use to batch run Detect Dominant Languages. True string

Response Properties

Name Description Type
status The general status of the executed command. Typically a success or failure message. string
errors An array of Errors returned from Amazon for this batch command. array
errors.code The error code return from Amazon for this batch command. string
errors.message The error message returned from Amazon for this batch command. string
errors.index The index of the error item in the original input list. string
results An array of results returned from Amazon for this batch command. array
results.index The index of the result item in the original input list. string
results.detectedLanguages An array of detected languages. array
results.detectedLanguages.languageCode The language code of the detected language. string
results.detectedLanguages.score The score of the detected language. string

Batch Detect Entities (batchDetectEntities)

Batch Run Detect Entities with up to 25 comma delimited inputs.

Request Properties

Name Display Description Is Required Type
textList Text List A comma delimited list of text to use to batch run Detect Entities. True string
languageCode Language Code The language code of the input Text List. True string

Response Properties

Name Description Type
status The general status of the executed command. Typically a success or failure message. string
errors An array of Errors returned from Amazon for this batch command. array
errors.code The error code returned from Amazon for this batch command. string
errors.message The error message returned from Amazon for this batch command. string
errors.index The index of the error item in the original input list. string
results An array of results returned from Amazon for this batch command. array
results.index The index of the result item in the original input list. string
results.detectedEntities An array of Detected Entities returned from Amazon. array
results.detectedEntities.beginOffset The begin index of the input string where the entity was detected. string
results.detectedEntities.endOffset The end index of the input string where the entity was detected. string
results.detectedEntities.score The score or confidence level of the detected entity. string
results.detectedEntities.text The text of the detected entity. string
results.detectedEntities.type The type of the detected entity. string

Batch Detect Key Phrases (batchDetectKeyPhrases)

Batch Run Detect Key Phrases with up to 25 different inputs.

Request Properties

Name Display Description Is Required Type
textList Text List A comma delimited list of text to use to batch run detect key phrases. True string
languageCode Language Code The language code of the input text list. True string

Response Properties

Name Description Type
status The general status of the executed command. Typically a success or failure message. string
errors An array of Errors returned from Amazon for this batch command. array
errors.code The error code returned from Amazon for this batch command. string
errors.message The error message returned from Amazon for this batch command. string
errors.index The index of the error item in the original input list. string
results An array of results returned from Amazon for this batch command. array
results.index The index of the result item in the original input list. string
results.detectedKeyPhrases An array of detected key phrases returned from Amazon. array
results.detectedKeyPhrases.beginOffset The begin offset of the detected key phrase in the input string. string
results.detectedKeyPhrases.endOffset The end offset of the detected key phrase in the input string. string
results.detectedKeyPhrases.score The score or confidence level of the detected key phrase. string
results.detectedKeyPhrases.text The text of the detected key phrase. string

Batch Detect Sentiment (batchDetectSentiment)

Batch Run Detect Sentiment with up to 25 different inputs.

Request Properties

Name Display Description Is Required Type
textList Text List A comma delimited list of text to use to batch run Detect Sentiment. True string
languageCode Language Code The language code of the input text. True string

Response Properties

Name Description Type
status The general status of the executed command. Typically a success or failure message. string
errors An array of Errors returned from Amazon for this batch command. array
errors.code The error code returned from Amazon for this batch command. string
errors.message The error message returned from Amazon for this batch command. string
errors.index The index of the error item in the original input list. string
results An array of results returned from Amazon for this batch command. array
results.index The index of the result item in the original input list. string
results.detectedSentiment.sentiment The sentiment detected by Amazon. string
results.detectedSentiment.mixed The level of confidence that a mixed sentiment was detected. string
results.detectedSentiment.negative The level of confidence that a negative sentiment was detected. string
results.detectedSentiment.neutral The level of confidence that a neutral sentiment was detected. string
results.detectedSentiment.positive The level of confidence that a positive sentiment was detected. string

Detect Dominant Language (detectDominantLanguage)

Detect Dominant Language with a text input.

Request Properties

Name Display Description Is Required Type
text Text The input text to use to detect the dominant language True string

Response Properties

Name Description Type
status The general status of the executed command. Typically a success or failure message. string
languages An array of detected languages. array
languages.languageCode The language code of a detected language string
languages.score The score or confidence level of the text matching the language code. string

Detect Entities (detectEntities)

Detect Entities with a text input.

Request Properties

Name Display Description Is Required Type
text Text The input text to detect entities with. True string
languageCode Language Code The language code of the input text. True string

Response Properties

Name Description Type
status The general status of the executed command. Typically a success or failure message. string
entities An array of detected entities. array
entities.beginOffset The begin offset of the input text where the entity was detected. string
entities.endOffset The end offset of the input text where the entity was detected. string
entities.score The score, or confidence level that the entity was detected. string
entities.text The text of the detected entity. string
entities.type The type of the detected entity. string

Detect Key Phrases (detectKeyPhrases)

Detect Key Phrases with a text input.

Request Properties

Name Display Description Is Required Type
text Text The input text to use to detect key phrases. True string
languageCode Language Code The language code of the input text. True string

Response Properties

Name Description Type
status The general status of the executed command. Typically a success or failure message. string
keyPhrases An array of key phrases detected in the input text. array
keyPhrases.beginOffset The begin offset of the input text where the key phrase was detected. string
keyPhrases.endOffset The end offset of the input text where the key phrase was detected. string
keyPhrases.score The score, or confidence level of the detected key phrase. string
keyPhrases.text The Text of the key phrase. string

Detect Sentiment (detectSentiment)

Detect Sentiment with a text input.

Request Properties

Name Display Description Is Required Type
text Text The input text to use to detect sentiment. True string
languageCode Language Code The language code of the input text. True string

Response Properties

Name Description Type
status The general status of the executed command. Typically a success or failure message. string
sentiment The dominant sentiment detected. Possible values are Mixed, Negative, Neutral and Positive. string
mixed The score or confidence level of the mixed sentiment detected in the input text. string
negative The score or confidence level of the negative sentiment detected in the input text. string
neutral The score or confidence level of the neutral sentiment detected in the input text. string
positive The score or confidence level of the positive sentiment detected in the input text. string

Start Topics Detection Job (startTopicsDetectionJob)

Start a Topics detection job, returns a jobId to check progress of job.

Request Properties

Name Display Description Is Required Type
clientRequestToken Client Request Token A unique identifier for the request. If not set, Amazon will generate one. False string
dataAccessRoleArn Data Access Role Arn The Amazon Resource Name (ARN) of the AWS identity and Access Management (IAM) role that allows access to the input data. True string
inputFormat Input Format The input format of the contents of the input S3 uri. Possible Values: ONE_DOC_PER_FILE and ONE_DOC_PER_LINE. False string
inputS3Uri Input S3 Uri The S3 bucket uri that contains the input for this command. True string
jobName Job Name The name of the job. This is an identifying string. False string
numberOfTopics Number Of Topics The number of topics to detect. False string
outputS3Uri Output S3 Uri The S3 bucket uri for Amazon to write the output to. True string

Response Properties

Name Description Type
status The general status of the executed command. Typically a success or failure message. string
jobId A unique identifier that can be used to check the status of the job. string
jobStatus The status of the job. Possible values: SUBMITTED, IN_PROGRESS, COMPLETED, and FAILED. string

Describe Topics Detection Job (describeTopicsDetectionJob)

Describe an existing Topics detection job, returns all the properties about the job.

Request Properties

Name Display Description Is Required Type
jobId Job Id A unique identifier for the job. True string

Response Properties

Name Description Type
status The general status of the executed command. Typically a success or failure message. string
jobId A unique identifier for the job. string
jobName The name of the job. string
jobStatus The status of the job. Possible values: SUBMITTED, IN_PROGRESS, COMPLETED, FAILED, STOP_REQUESTED and STOPPED. string
message A description for the status of a job. string
numberOfTopics The number of topics to detect. string
submitTime The date and time the job was submitted. string
endTime The date and time the job finished. string
inputFormat The input format of the S3 bucket. Possible values: ONE_DOC_PER_FILE and ONE_DOC_PER_LINE string
inputS3Uri The S3 bucket uri for Amazon to use to access to input. string
outputS3Uri The S3 bucket uri for Amazon to write the results to. string

List Topics Detection Job (listTopicsDetectionJobs)

List all of the Topics detection job that meets the input filters.

Request Properties

Name Display Description Is Required Type
jobName Job Name The name of the job(s) to search for. False string
jobStatus Job Status The job status of the job(s) to search for. False string
submitTimeBefore Submit Time Before The job's submit time must be before this value to appear in the output list. False string
submitTimeAfter Submit Time After The job's submit time must be after this value to appear in the output list. False string
maxResults Max Results The maximum results to return. False string
nextToken Next Token A token that identifies the next page of results to return. False string

Response Properties

Name Description Type
status The general status of the executed command. Typically a success or failure message. string
nextToken A token that identifies the next page of results to return. string
topics An array of Topics detected. array
topics.jobId The job id of the topic detected. string
topics.jobName The job name of the topic detected. string
topics.jobStatus The job status of the topic detected. string
topics.message A description of the status of a job. string
topics.numberOfTopics Number of topics detected in the job. string
topics.submitTime The time this job was submitted. string
topics.endTime The time this job finished processing inputs. string
topics.inputFormat The input format of the S3 bucket, possible values: ONE_DOC_PER_FILE and ONE_DOC_PER_LINE string
topics.inputS3Uri The S3 bucket uri for Amazon to use to access to input. string
topics.outputS3Uri The S3 bucket uri for Amazon to write the results to. string

Release History

Version Type Description Tracking # Date
2.0.1 Initial First release in the Adapter Type store.
2.0.10 Maintenance Updated third-party components and improved maintainability. NAP-11518
2.0.11 Maintenance Updated third-party components and improved maintainability. NAP-23945 2022-11-30
2.0.12 Bug Fix Fixed bug in amazon-polly NAP-24722 2023-02-02

Categories