Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Comprehend

import { Comprehend } from "https://aws-api.deno.dev/v0.4/services/comprehend.ts?docs=full";
class Comprehend {
constructor(apiFactory: client.ApiFactory);
async batchDetectDominantLanguage(params: BatchDetectDominantLanguageRequest, opts?: client.RequestOptions): Promise<BatchDetectDominantLanguageResponse>;
async batchDetectEntities(params: BatchDetectEntitiesRequest, opts?: client.RequestOptions): Promise<BatchDetectEntitiesResponse>;
async batchDetectKeyPhrases(params: BatchDetectKeyPhrasesRequest, opts?: client.RequestOptions): Promise<BatchDetectKeyPhrasesResponse>;
async batchDetectSentiment(params: BatchDetectSentimentRequest, opts?: client.RequestOptions): Promise<BatchDetectSentimentResponse>;
async batchDetectSyntax(params: BatchDetectSyntaxRequest, opts?: client.RequestOptions): Promise<BatchDetectSyntaxResponse>;
async batchDetectTargetedSentiment(params: BatchDetectTargetedSentimentRequest, opts?: client.RequestOptions): Promise<BatchDetectTargetedSentimentResponse>;
async classifyDocument(params: ClassifyDocumentRequest, opts?: client.RequestOptions): Promise<ClassifyDocumentResponse>;
async containsPiiEntities(params: ContainsPiiEntitiesRequest, opts?: client.RequestOptions): Promise<ContainsPiiEntitiesResponse>;
async createDocumentClassifier(params: CreateDocumentClassifierRequest, opts?: client.RequestOptions): Promise<CreateDocumentClassifierResponse>;
async createEndpoint(params: CreateEndpointRequest, opts?: client.RequestOptions): Promise<CreateEndpointResponse>;
async createEntityRecognizer(params: CreateEntityRecognizerRequest, opts?: client.RequestOptions): Promise<CreateEntityRecognizerResponse>;
async deleteDocumentClassifier(params: DeleteDocumentClassifierRequest, opts?: client.RequestOptions): Promise<void>;
async deleteEndpoint(params: DeleteEndpointRequest, opts?: client.RequestOptions): Promise<void>;
async deleteEntityRecognizer(params: DeleteEntityRecognizerRequest, opts?: client.RequestOptions): Promise<void>;
async deleteResourcePolicy(params: DeleteResourcePolicyRequest, opts?: client.RequestOptions): Promise<void>;
async describeDocumentClassificationJob(params: DescribeDocumentClassificationJobRequest, opts?: client.RequestOptions): Promise<DescribeDocumentClassificationJobResponse>;
async describeDocumentClassifier(params: DescribeDocumentClassifierRequest, opts?: client.RequestOptions): Promise<DescribeDocumentClassifierResponse>;
async describeDominantLanguageDetectionJob(params: DescribeDominantLanguageDetectionJobRequest, opts?: client.RequestOptions): Promise<DescribeDominantLanguageDetectionJobResponse>;
async describeEndpoint(params: DescribeEndpointRequest, opts?: client.RequestOptions): Promise<DescribeEndpointResponse>;
async describeEntitiesDetectionJob(params: DescribeEntitiesDetectionJobRequest, opts?: client.RequestOptions): Promise<DescribeEntitiesDetectionJobResponse>;
async describeEntityRecognizer(params: DescribeEntityRecognizerRequest, opts?: client.RequestOptions): Promise<DescribeEntityRecognizerResponse>;
async describeEventsDetectionJob(params: DescribeEventsDetectionJobRequest, opts?: client.RequestOptions): Promise<DescribeEventsDetectionJobResponse>;
async describeKeyPhrasesDetectionJob(params: DescribeKeyPhrasesDetectionJobRequest, opts?: client.RequestOptions): Promise<DescribeKeyPhrasesDetectionJobResponse>;
async describePiiEntitiesDetectionJob(params: DescribePiiEntitiesDetectionJobRequest, opts?: client.RequestOptions): Promise<DescribePiiEntitiesDetectionJobResponse>;
async describeResourcePolicy(params: DescribeResourcePolicyRequest, opts?: client.RequestOptions): Promise<DescribeResourcePolicyResponse>;
async describeSentimentDetectionJob(params: DescribeSentimentDetectionJobRequest, opts?: client.RequestOptions): Promise<DescribeSentimentDetectionJobResponse>;
async describeTargetedSentimentDetectionJob(params: DescribeTargetedSentimentDetectionJobRequest, opts?: client.RequestOptions): Promise<DescribeTargetedSentimentDetectionJobResponse>;
async describeTopicsDetectionJob(params: DescribeTopicsDetectionJobRequest, opts?: client.RequestOptions): Promise<DescribeTopicsDetectionJobResponse>;
async detectDominantLanguage(params: DetectDominantLanguageRequest, opts?: client.RequestOptions): Promise<DetectDominantLanguageResponse>;
async detectEntities(params?: DetectEntitiesRequest, opts?: client.RequestOptions): Promise<DetectEntitiesResponse>;
async detectKeyPhrases(params: DetectKeyPhrasesRequest, opts?: client.RequestOptions): Promise<DetectKeyPhrasesResponse>;
async detectPiiEntities(params: DetectPiiEntitiesRequest, opts?: client.RequestOptions): Promise<DetectPiiEntitiesResponse>;
async detectSentiment(params: DetectSentimentRequest, opts?: client.RequestOptions): Promise<DetectSentimentResponse>;
async detectSyntax(params: DetectSyntaxRequest, opts?: client.RequestOptions): Promise<DetectSyntaxResponse>;
async detectTargetedSentiment(params: DetectTargetedSentimentRequest, opts?: client.RequestOptions): Promise<DetectTargetedSentimentResponse>;
async importModel(params: ImportModelRequest, opts?: client.RequestOptions): Promise<ImportModelResponse>;
async listDocumentClassificationJobs(params?: ListDocumentClassificationJobsRequest, opts?: client.RequestOptions): Promise<ListDocumentClassificationJobsResponse>;
async listDocumentClassifiers(params?: ListDocumentClassifiersRequest, opts?: client.RequestOptions): Promise<ListDocumentClassifiersResponse>;
async listDocumentClassifierSummaries(params?: ListDocumentClassifierSummariesRequest, opts?: client.RequestOptions): Promise<ListDocumentClassifierSummariesResponse>;
async listDominantLanguageDetectionJobs(params?: ListDominantLanguageDetectionJobsRequest, opts?: client.RequestOptions): Promise<ListDominantLanguageDetectionJobsResponse>;
async listEndpoints(params?: ListEndpointsRequest, opts?: client.RequestOptions): Promise<ListEndpointsResponse>;
async listEntitiesDetectionJobs(params?: ListEntitiesDetectionJobsRequest, opts?: client.RequestOptions): Promise<ListEntitiesDetectionJobsResponse>;
async listEntityRecognizers(params?: ListEntityRecognizersRequest, opts?: client.RequestOptions): Promise<ListEntityRecognizersResponse>;
async listEntityRecognizerSummaries(params?: ListEntityRecognizerSummariesRequest, opts?: client.RequestOptions): Promise<ListEntityRecognizerSummariesResponse>;
async listEventsDetectionJobs(params?: ListEventsDetectionJobsRequest, opts?: client.RequestOptions): Promise<ListEventsDetectionJobsResponse>;
async listKeyPhrasesDetectionJobs(params?: ListKeyPhrasesDetectionJobsRequest, opts?: client.RequestOptions): Promise<ListKeyPhrasesDetectionJobsResponse>;
async listPiiEntitiesDetectionJobs(params?: ListPiiEntitiesDetectionJobsRequest, opts?: client.RequestOptions): Promise<ListPiiEntitiesDetectionJobsResponse>;
async listSentimentDetectionJobs(params?: ListSentimentDetectionJobsRequest, opts?: client.RequestOptions): Promise<ListSentimentDetectionJobsResponse>;
async listTagsForResource(params: ListTagsForResourceRequest, opts?: client.RequestOptions): Promise<ListTagsForResourceResponse>;
async listTargetedSentimentDetectionJobs(params?: ListTargetedSentimentDetectionJobsRequest, opts?: client.RequestOptions): Promise<ListTargetedSentimentDetectionJobsResponse>;
async listTopicsDetectionJobs(params?: ListTopicsDetectionJobsRequest, opts?: client.RequestOptions): Promise<ListTopicsDetectionJobsResponse>;
async putResourcePolicy(params: PutResourcePolicyRequest, opts?: client.RequestOptions): Promise<PutResourcePolicyResponse>;
async startDocumentClassificationJob(params: StartDocumentClassificationJobRequest, opts?: client.RequestOptions): Promise<StartDocumentClassificationJobResponse>;
async startDominantLanguageDetectionJob(params: StartDominantLanguageDetectionJobRequest, opts?: client.RequestOptions): Promise<StartDominantLanguageDetectionJobResponse>;
async startEntitiesDetectionJob(params: StartEntitiesDetectionJobRequest, opts?: client.RequestOptions): Promise<StartEntitiesDetectionJobResponse>;
async startEventsDetectionJob(params: StartEventsDetectionJobRequest, opts?: client.RequestOptions): Promise<StartEventsDetectionJobResponse>;
async startKeyPhrasesDetectionJob(params: StartKeyPhrasesDetectionJobRequest, opts?: client.RequestOptions): Promise<StartKeyPhrasesDetectionJobResponse>;
async startPiiEntitiesDetectionJob(params: StartPiiEntitiesDetectionJobRequest, opts?: client.RequestOptions): Promise<StartPiiEntitiesDetectionJobResponse>;
async startSentimentDetectionJob(params: StartSentimentDetectionJobRequest, opts?: client.RequestOptions): Promise<StartSentimentDetectionJobResponse>;
async startTargetedSentimentDetectionJob(params: StartTargetedSentimentDetectionJobRequest, opts?: client.RequestOptions): Promise<StartTargetedSentimentDetectionJobResponse>;
async startTopicsDetectionJob(params: StartTopicsDetectionJobRequest, opts?: client.RequestOptions): Promise<StartTopicsDetectionJobResponse>;
async stopDominantLanguageDetectionJob(params: StopDominantLanguageDetectionJobRequest, opts?: client.RequestOptions): Promise<StopDominantLanguageDetectionJobResponse>;
async stopEntitiesDetectionJob(params: StopEntitiesDetectionJobRequest, opts?: client.RequestOptions): Promise<StopEntitiesDetectionJobResponse>;
async stopEventsDetectionJob(params: StopEventsDetectionJobRequest, opts?: client.RequestOptions): Promise<StopEventsDetectionJobResponse>;
async stopKeyPhrasesDetectionJob(params: StopKeyPhrasesDetectionJobRequest, opts?: client.RequestOptions): Promise<StopKeyPhrasesDetectionJobResponse>;
async stopPiiEntitiesDetectionJob(params: StopPiiEntitiesDetectionJobRequest, opts?: client.RequestOptions): Promise<StopPiiEntitiesDetectionJobResponse>;
async stopSentimentDetectionJob(params: StopSentimentDetectionJobRequest, opts?: client.RequestOptions): Promise<StopSentimentDetectionJobResponse>;
async stopTargetedSentimentDetectionJob(params: StopTargetedSentimentDetectionJobRequest, opts?: client.RequestOptions): Promise<StopTargetedSentimentDetectionJobResponse>;
async stopTrainingDocumentClassifier(params: StopTrainingDocumentClassifierRequest, opts?: client.RequestOptions): Promise<void>;
async stopTrainingEntityRecognizer(params: StopTrainingEntityRecognizerRequest, opts?: client.RequestOptions): Promise<void>;
async tagResource(params: TagResourceRequest, opts?: client.RequestOptions): Promise<void>;
async untagResource(params: UntagResourceRequest, opts?: client.RequestOptions): Promise<void>;
async updateEndpoint(params: UpdateEndpointRequest, opts?: client.RequestOptions): Promise<void>;
 
static ApiMetadata: client.ApiMetadata;
}

§Constructors

§
new Comprehend(apiFactory: client.ApiFactory)
[src]

§Methods

§

Determines the dominant language of the input text for a batch of documents. For a list of languages that Amazon Comprehend can detect, see Amazon Comprehend Supported Languages.

§

Inspects the text of a batch of documents for named entities and returns information about them. For more information about named entities, see Entities in the Comprehend Developer Guide.

§

Detects the key noun phrases found in a batch of documents.

§

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

§

Inspects the text of a batch of documents for the syntax and part of speech of the words in the document and returns information about them. For more information, see Syntax in the Comprehend Developer Guide.

§

Inspects a batch of documents and returns a sentiment analysis for each entity identified in the documents.

For more information about targeted sentiment, see Targeted sentiment.

§

Creates a new document classification request to analyze a single document in real-time, using a previously created and trained custom model and an endpoint.

You can input plain text or you can upload a single-page input document (text, PDF, Word, or image).

If the system detects errors while processing a page in the input document, the API response includes an entry in Errors that describes the errors.

If the system detects a document-level error in your input document, the API returns an InvalidRequestException error response. For details about this exception, see Errors in semi-structured documents in the Comprehend Developer Guide.

§

Analyzes input text for the presence of personally identifiable information (PII) and returns the labels of identified PII entity types such as name, address, bank account number, or phone number.

§

Creates a new document classifier that you can use to categorize documents. To create a classifier, you provide a set of training documents that labeled with the categories that you want to use. After the classifier is trained you can use it to categorize a set of labeled documents into the categories. For more information, see Document Classification in the Comprehend Developer Guide.

§

Creates a model-specific endpoint for synchronous inference for a previously trained custom model For information about endpoints, see Managing endpoints.

§

Creates an entity recognizer using submitted files. After your CreateEntityRecognizer request is submitted, you can check job status using the API.

§
deleteDocumentClassifier(params: DeleteDocumentClassifierRequest, opts?: client.RequestOptions): Promise<void>
[src]

Deletes a previously created document classifier

Only those classifiers that are in terminated states (IN_ERROR, TRAINED) will be deleted. If an active inference job is using the model, a ResourceInUseException will be returned.

This is an asynchronous action that puts the classifier into a DELETING state, and it is then removed by a background job. Once removed, the classifier disappears from your account and is no longer available for use.

§
deleteEndpoint(params: DeleteEndpointRequest, opts?: client.RequestOptions): Promise<void>
[src]

Deletes a model-specific endpoint for a previously-trained custom model. All endpoints must be deleted in order for the model to be deleted. For information about endpoints, see Managing endpoints.

§
deleteEntityRecognizer(params: DeleteEntityRecognizerRequest, opts?: client.RequestOptions): Promise<void>
[src]

Deletes an entity recognizer.

Only those recognizers that are in terminated states (IN_ERROR, TRAINED) will be deleted. If an active inference job is using the model, a ResourceInUseException will be returned.

This is an asynchronous action that puts the recognizer into a DELETING state, and it is then removed by a background job. Once removed, the recognizer disappears from your account and is no longer available for use.

§
deleteResourcePolicy(params: DeleteResourcePolicyRequest, opts?: client.RequestOptions): Promise<void>
[src]

Deletes a resource-based policy that is attached to a custom model.

§

Gets the properties associated with a document classification job. Use this operation to get the status of a classification job.

§

Gets the properties associated with a document classifier.

§

Gets the properties associated with a dominant language detection job. Use this operation to get the status of a detection job.

§

Gets the properties associated with a specific endpoint. Use this operation to get the status of an endpoint. For information about endpoints, see Managing endpoints.

§

Gets the properties associated with an entities detection job. Use this operation to get the status of a detection job.

§

Provides details about an entity recognizer including status, S3 buckets containing training data, recognizer metadata, metrics, and so on.

§

Gets the status and details of an events detection job.

§

Gets the properties associated with a key phrases detection job. Use this operation to get the status of a detection job.

§

Gets the properties associated with a PII entities detection job. For example, you can use this operation to get the job status.

§

Gets the details of a resource-based policy that is attached to a custom model, including the JSON body of the policy.

§

Gets the properties associated with a sentiment detection job. Use this operation to get the status of a detection job.

§

Gets the properties associated with a targeted sentiment detection job. Use this operation to get the status of the job.

§

Gets the properties associated with a topic detection job. Use this operation to get the status of a detection job.

§

Determines the dominant language of the input text. For a list of languages that Amazon Comprehend can detect, see Amazon Comprehend Supported Languages.

§

Detects named entities in input text when you use the pre-trained model. Detects custom entities if you have a custom entity recognition model.

When detecting named entities using the pre-trained model, use plain text as the input. For more information about named entities, see Entities in the Comprehend Developer Guide.

When you use a custom entity recognition model, you can input plain text or you can upload a single-page input document (text, PDF, Word, or image).

If the system detects errors while processing a page in the input document, the API response includes an entry in Errors for each error.

If the system detects a document-level error in your input document, the API returns an InvalidRequestException error response. For details about this exception, see Errors in semi-structured documents in the Comprehend Developer Guide.

§

Detects the key noun phrases found in the text.

§

Inspects the input text for entities that contain personally identifiable information (PII) and returns information about them.

§

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

§

Inspects text for syntax and the part of speech of words in the document. For more information, see Syntax in the Comprehend Developer Guide.

§

Inspects the input text and returns a sentiment analysis for each entity identified in the text.

For more information about targeted sentiment, see Targeted sentiment.

§

Creates a new custom model that replicates a source custom model that you import. The source model can be in your AWS account or another one.

If the source model is in another AWS account, then it must have a resource-based policy that authorizes you to import it.

The source model must be in the same AWS region that you're using when you import. You can't import a model that's in a different region.

§

Gets a list of the documentation classification jobs that you have submitted.

§

Gets a list of the document classifiers that you have created.

§

Gets a list of summaries of the document classifiers that you have created

§

Gets a list of the dominant language detection jobs that you have submitted.

§

Gets a list of all existing endpoints that you've created. For information about endpoints, see Managing endpoints.

§

Gets a list of the entity detection jobs that you have submitted.

§

Gets a list of the properties of all entity recognizers that you created, including recognizers currently in training. Allows you to filter the list of recognizers based on criteria such as status and submission time. This call returns up to 500 entity recognizers in the list, with a default number of 100 recognizers in the list.

The results of this list are not in any particular order. Please get the list and sort locally if needed.

§

Gets a list of summaries for the entity recognizers that you have created.

§

Gets a list of the events detection jobs that you have submitted.

§

Get a list of key phrase detection jobs that you have submitted.

§

Gets a list of the PII entity detection jobs that you have submitted.

§

Gets a list of sentiment detection jobs that you have submitted.

§

Lists all tags associated with a given Amazon Comprehend resource.

§

Gets a list of targeted sentiment detection jobs that you have submitted.

§

Gets a list of the topic detection jobs that you have submitted.

§

Attaches a resource-based policy to a custom model. You can use this policy to authorize an entity in another AWS account to import the custom model, which replicates it in Amazon Comprehend in their account.

§

Starts an asynchronous document classification job. Use the operation to track the progress of the job.

§

Starts an asynchronous dominant language detection job for a collection of documents. Use the operation to track the status of a job.

§

Starts an asynchronous entity detection job for a collection of documents. Use the operation to track the status of a job.

This API can be used for either standard entity detection or custom entity recognition. In order to be used for custom entity recognition, the optional EntityRecognizerArn must be used in order to provide access to the recognizer being used to detect the custom entity.

§

Starts an asynchronous event detection job for a collection of documents.

§

Starts an asynchronous key phrase detection job for a collection of documents. Use the operation to track the status of a job.

§

Starts an asynchronous PII entity detection job for a collection of documents.

§

Starts an asynchronous sentiment detection job for a collection of documents. Use the operation to track the status of a job.

§

Starts an asynchronous targeted sentiment detection job for a collection of documents. Use the operation to track the status of a job.

§

Starts an asynchronous topic detection job. Use the DescribeTopicDetectionJob operation to track the status of a job.

§

Stops a dominant language detection job in progress.

If the job state is IN_PROGRESS the job is marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state; otherwise the job is stopped and put into the STOPPED state.

If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob operation, the operation returns a 400 Internal Request Exception.

When a job is stopped, any documents already processed are written to the output location.

§

Stops an entities detection job in progress.

If the job state is IN_PROGRESS the job is marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state; otherwise the job is stopped and put into the STOPPED state.

If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob operation, the operation returns a 400 Internal Request Exception.

When a job is stopped, any documents already processed are written to the output location.

§

Stops an events detection job in progress.

§

Stops a key phrases detection job in progress.

If the job state is IN_PROGRESS the job is marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state; otherwise the job is stopped and put into the STOPPED state.

If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob operation, the operation returns a 400 Internal Request Exception.

When a job is stopped, any documents already processed are written to the output location.

§

Stops a PII entities detection job in progress.

§

Stops a sentiment detection job in progress.

If the job state is IN_PROGRESS, the job is marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state; otherwise the job is be stopped and put into the STOPPED state.

If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob operation, the operation returns a 400 Internal Request Exception.

When a job is stopped, any documents already processed are written to the output location.

§

Stops a targeted sentiment detection job in progress.

If the job state is IN_PROGRESS, the job is marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state; otherwise the job is be stopped and put into the STOPPED state.

If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob operation, the operation returns a 400 Internal Request Exception.

When a job is stopped, any documents already processed are written to the output location.

§
stopTrainingDocumentClassifier(params: StopTrainingDocumentClassifierRequest, opts?: client.RequestOptions): Promise<void>
[src]

Stops a document classifier training job while in progress.

If the training job state is TRAINING, the job is marked for termination and put into the STOP_REQUESTED state. If the training job completes before it can be stopped, it is put into the TRAINED; otherwise the training job is stopped and put into the STOPPED state and the service sends back an HTTP 200 response with an empty HTTP body.

§
stopTrainingEntityRecognizer(params: StopTrainingEntityRecognizerRequest, opts?: client.RequestOptions): Promise<void>
[src]

Stops an entity recognizer training job while in progress.

If the training job state is TRAINING, the job is marked for termination and put into the STOP_REQUESTED state. If the training job completes before it can be stopped, it is put into the TRAINED; otherwise the training job is stopped and putted into the STOPPED state and the service sends back an HTTP 200 response with an empty HTTP body.

§
tagResource(params: TagResourceRequest, opts?: client.RequestOptions): Promise<void>
[src]

Associates a specific tag with an Amazon Comprehend resource. A tag is a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.

§
untagResource(params: UntagResourceRequest, opts?: client.RequestOptions): Promise<void>
[src]

Removes a specific tag associated with an Amazon Comprehend resource.

§
updateEndpoint(params: UpdateEndpointRequest, opts?: client.RequestOptions): Promise<void>
[src]

Updates information about the specified endpoint. For information about endpoints, see Managing endpoints.

§Static Properties