DataFire integration for Amazon Comprehend
npm install @datafire/amazonaws_comprehendClient library for Amazon Comprehend
bash
npm install --save @datafire/amazonaws_comprehend
`
`js
let amazonaws_comprehend = require('@datafire/amazonaws_comprehend').create({
accessKeyId: "",
secretAccessKey: "",
region: ""
});amazonaws_comprehend.BatchDetectDominantLanguage({
"TextList": []
}).then(data => {
console.log(data);
});
`Description
Amazon Comprehend is an AWS service for gaining insight into the content of documents. Use these actions to determine the topics contained in your documents, the topics they discuss, the predominant sentiment expressed in them, the predominant language used, and more.
Actions
$3
`js
amazonaws_comprehend.BatchDetectDominantLanguage({
"TextList": []
}, context)
`#### Input
* input
object
* TextList required StringList#### Output
* output BatchDetectDominantLanguageResponse
$3
`js
amazonaws_comprehend.BatchDetectEntities({
"TextList": [],
"LanguageCode": ""
}, context)
`#### Input
* input
object
* LanguageCode required String
* TextList required StringList#### Output
* output BatchDetectEntitiesResponse
$3
`js
amazonaws_comprehend.BatchDetectKeyPhrases({
"TextList": [],
"LanguageCode": ""
}, context)
`#### Input
* input
object
* LanguageCode required String
* TextList required StringList#### Output
* output BatchDetectKeyPhrasesResponse
$3
`js
amazonaws_comprehend.BatchDetectSentiment({
"TextList": [],
"LanguageCode": ""
}, context)
`#### Input
* input
object
* LanguageCode required String
* TextList required StringList#### Output
* output BatchDetectSentimentResponse
$3
`js
amazonaws_comprehend.DescribeTopicsDetectionJob({
"JobId": ""
}, context)
`#### Input
* input
object
* JobId required JobId#### Output
* output DescribeTopicsDetectionJobResponse
$3
`js
amazonaws_comprehend.DetectDominantLanguage({
"Text": ""
}, context)
`#### Input
* input
object
* Text required String#### Output
* output DetectDominantLanguageResponse
$3
`js
amazonaws_comprehend.DetectEntities({
"Text": "",
"LanguageCode": ""
}, context)
`#### Input
* input
object
* LanguageCode required LanguageCode
* Text required String#### Output
* output DetectEntitiesResponse
$3
`js
amazonaws_comprehend.DetectKeyPhrases({
"Text": "",
"LanguageCode": ""
}, context)
`#### Input
* input
object
* LanguageCode required LanguageCode
* Text required String#### Output
* output DetectKeyPhrasesResponse
$3
`js
amazonaws_comprehend.DetectSentiment({
"Text": "",
"LanguageCode": ""
}, context)
`#### Input
* input
object
* LanguageCode required LanguageCode
* Text required String#### Output
* output DetectSentimentResponse
$3
`js
amazonaws_comprehend.ListTopicsDetectionJobs({}, context)
`#### Input
* input
object
* MaxResults string
* NextToken string
* Filter TopicsDetectionJobFilter
* MaxResults MaxResultsInteger
* NextToken String#### Output
* output ListTopicsDetectionJobsResponse
$3
`js
amazonaws_comprehend.StartTopicsDetectionJob({
"InputDataConfig": {
"S3Uri": ""
},
"OutputDataConfig": {
"S3Uri": ""
},
"DataAccessRoleArn": ""
}, context)
`#### Input
* input
object
* ClientRequestToken ClientRequestTokenString
* DataAccessRoleArn required IamRoleArn
* InputDataConfig required InputDataConfig
* JobName JobName
* NumberOfTopics NumberOfTopicsInteger
* OutputDataConfig required OutputDataConfig#### Output
* output StartTopicsDetectionJobResponse
Definitions
$3
* AnyLengthString string$3
* BatchDetectDominantLanguageItemResult object: The result of calling the operation. The operation returns one object for each document that is successfully processed by the operation.
* Index Integer
* Languages ListOfDominantLanguages$3
* BatchDetectDominantLanguageRequest object
* TextList required StringList$3
* BatchDetectDominantLanguageResponse object
* ErrorList required BatchItemErrorList
* ResultList required ListOfDetectDominantLanguageResult$3
* BatchDetectEntitiesItemResult object: The result of calling the operation. The operation returns one object for each document that is successfully processed by the operation.
* Entities ListOfEntities
* Index Integer$3
* BatchDetectEntitiesRequest object
* LanguageCode required String
* TextList required StringList$3
* BatchDetectEntitiesResponse object
* ErrorList required BatchItemErrorList
* ResultList required ListOfDetectEntitiesResult$3
* BatchDetectKeyPhrasesItemResult object: The result of calling the operation. The operation returns one object for each document that is successfully processed by the operation.
* Index Integer
* KeyPhrases ListOfKeyPhrases$3
* BatchDetectKeyPhrasesRequest object
* LanguageCode required String
* TextList required StringList$3
* BatchDetectKeyPhrasesResponse object
* ErrorList required BatchItemErrorList
* ResultList required ListOfDetectKeyPhrasesResult$3
* BatchDetectSentimentItemResult object: The result of calling the operation. The operation returns one object for each document that is successfully processed by the operation.
* Index Integer
* Sentiment SentimentType
* SentimentScore SentimentScore$3
* BatchDetectSentimentRequest object
* LanguageCode required String
* TextList required StringList$3
* BatchDetectSentimentResponse object
* ErrorList required BatchItemErrorList
* ResultList required ListOfDetectSentimentResult$3
* BatchItemError object: Describes an error that occurred while processing a document in a batch. The operation returns on BatchItemError object for each document that contained an error.
* ErrorCode String
* ErrorMessage String
* Index Integer$3
* BatchItemErrorList array
* items BatchItemError$3
* BatchSizeLimitExceededException object: The number of documents in the request exceeds the limit of 25. Try your request again with fewer documents.
* Message String$3
* ClientRequestTokenString string$3
* DescribeTopicsDetectionJobRequest object
* JobId required JobId$3
* DescribeTopicsDetectionJobResponse object
* TopicsDetectionJobProperties TopicsDetectionJobProperties$3
* DetectDominantLanguageRequest object
* Text required String$3
* DetectDominantLanguageResponse object
* Languages ListOfDominantLanguages$3
* DetectEntitiesRequest object
* LanguageCode required LanguageCode
* Text required String$3
* DetectEntitiesResponse object
* Entities ListOfEntities$3
* DetectKeyPhrasesRequest object
* LanguageCode required LanguageCode
* Text required String$3
* DetectKeyPhrasesResponse object
* KeyPhrases ListOfKeyPhrases$3
* DetectSentimentRequest object
* LanguageCode required LanguageCode
* Text required String$3
* DetectSentimentResponse object
* Sentiment SentimentType
* SentimentScore SentimentScore$3
* DominantLanguage object: Returns the code for the dominant language in the input text and the level of confidence that Amazon Comprehend has in the accuracy of the detection.
* LanguageCode String
* Score Float$3
* Entity object: Provides information about an entity.
* BeginOffset Integer
* EndOffset Integer
* Score Float
* Text String
* Type EntityType$3
* EntityType string (values: PERSON, LOCATION, ORGANIZATION, COMMERCIAL_ITEM, EVENT, DATE, QUANTITY, TITLE, OTHER)$3
* Float number$3
* IamRoleArn string$3
* InputDataConfig object: The input properties for a topic detection job.
* InputFormat InputFormat
* S3Uri required S3Uri$3
* InputFormat string (values: ONE_DOC_PER_FILE, ONE_DOC_PER_LINE)$3
* Integer integer$3
* InternalServerException object: An internal server error occurred. Retry your request.
* Message String$3
* InvalidFilterException object: The filter specified for the ListTopicDetectionJobs operation is invalid. Specify a different filter.
* Message String$3
* InvalidRequestException object: The request is invalid.
* Message String$3
* JobId string$3
* JobName string$3
* JobNotFoundException object: The specified job was not found. Check the job ID and try again.
* Message String$3
* JobStatus string (values: SUBMITTED, IN_PROGRESS, COMPLETED, FAILED)$3
* KeyPhrase object: Describes a key noun phrase.
* BeginOffset Integer
* EndOffset Integer
* Score Float
* Text String$3
* LanguageCode string (values: en, es)$3
* ListOfDetectDominantLanguageResult array
* items BatchDetectDominantLanguageItemResult$3
* ListOfDetectEntitiesResult array
* items BatchDetectEntitiesItemResult$3
* ListOfDetectKeyPhrasesResult array
* items BatchDetectKeyPhrasesItemResult$3
* ListOfDetectSentimentResult array
* items BatchDetectSentimentItemResult$3
* ListOfDominantLanguages array
* items DominantLanguage$3
* ListOfEntities array
* items Entity$3
* ListOfKeyPhrases array
* items KeyPhrase$3
* ListTopicsDetectionJobsRequest object
* Filter TopicsDetectionJobFilter
* MaxResults MaxResultsInteger
* NextToken String$3
* ListTopicsDetectionJobsResponse object
* NextToken String
* TopicsDetectionJobPropertiesList TopicsDetectionJobPropertiesList$3
* MaxResultsInteger integer$3
* NumberOfTopicsInteger integer$3
* OutputDataConfig object: Provides configuration parameters for the output of topic detection jobs.
* S3Uri required S3Uri$3
* S3Uri string$3
* SentimentScore object: Describes the level of confidence that Amazon Comprehend has in the accuracy of its detection of sentiments.
* Mixed Float
* Negative Float
* Neutral Float
* Positive Float$3
* SentimentType string (values: POSITIVE, NEGATIVE, NEUTRAL, MIXED)$3
* StartTopicsDetectionJobRequest object
* ClientRequestToken ClientRequestTokenString
* DataAccessRoleArn required IamRoleArn
* InputDataConfig required InputDataConfig
* JobName JobName
* NumberOfTopics NumberOfTopicsInteger
* OutputDataConfig required OutputDataConfig$3
* StartTopicsDetectionJobResponse object
* JobId JobId
* JobStatus JobStatus$3
* String string$3
* StringList array
* items String$3
* TextSizeLimitExceededException object: The size of the input text exceeds the limit. Use a smaller document.
* Message String$3
* Timestamp string$3
* TooManyRequestsException object: The number of requests exceeds the limit. Resubmit your request later.
* Message String$3
* TopicsDetectionJobFilter object: Provides information for filtering topic detection jobs. For more information, see .
* JobName JobName
* JobStatus JobStatus
* SubmitTimeAfter Timestamp
* SubmitTimeBefore Timestamp$3
* TopicsDetectionJobProperties object: Provides information about a topic detection job.
* EndTime Timestamp
* InputDataConfig InputDataConfig
* JobId JobId
* JobName JobName
* JobStatus JobStatus
* Message AnyLengthString
* NumberOfTopics Integer
* OutputDataConfig OutputDataConfig
* SubmitTime Timestamp$3
* TopicsDetectionJobPropertiesList array
* items TopicsDetectionJobProperties$3
* UnsupportedLanguageException object`: Amazon Comprehend can't process the language of the input text. For all APIs except DetectDominantLanguage, Amazon Comprehend accepts only English or Spanish text. For the DetectDominantLanguage API, Amazon Comprehend detects 100 languages. For a list of languages, see how-languages