Amazon Comprehend 2017-11-27
- Client: Aws\Comprehend\ComprehendClient
- Service ID: comprehend
- Version: 2017-11-27
This page describes the parameters and results for the operations of the Amazon Comprehend (2017-11-27), and shows how to use the Aws\Comprehend\ComprehendClient object to call the described operations. This documentation is specific to the 2017-11-27 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName'), where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */).
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */).
- BatchDetectDominantLanguage ( array $params = [] )
- Determines the dominant language of the input text for a batch of documents.
- BatchDetectEntities ( array $params = [] )
- Inspects the text of a batch of documents for named entities and returns information about them.
- BatchDetectKeyPhrases ( array $params = [] )
- Detects the key noun phrases found in a batch of documents.
- BatchDetectSentiment ( array $params = [] )
- Inspects a batch of documents and returns an inference of the prevailing sentiment, POSITIVE, NEUTRAL, MIXED, or NEGATIVE, in each one.
- BatchDetectSyntax ( array $params = [] )
- 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.
- BatchDetectTargetedSentiment ( array $params = [] )
- Inspects a batch of documents and returns a sentiment analysis for each entity identified in the documents.
- ClassifyDocument ( array $params = [] )
- Creates a classification request to analyze a single document in real-time.
- ContainsPiiEntities ( array $params = [] )
- 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.
- CreateDataset ( array $params = [] )
- Creates a dataset to upload training or test data for a model associated with a flywheel.
- CreateDocumentClassifier ( array $params = [] )
- Creates a new document classifier that you can use to categorize documents.
- CreateEndpoint ( array $params = [] )
- Creates a model-specific endpoint for synchronous inference for a previously trained custom model For information about endpoints, see Managing endpoints.
- CreateEntityRecognizer ( array $params = [] )
- Creates an entity recognizer using submitted files.
- CreateFlywheel ( array $params = [] )
- A flywheel is an Amazon Web Services resource that orchestrates the ongoing training of a model for custom classification or custom entity recognition.
- DeleteDocumentClassifier ( array $params = [] )
- Deletes a previously created document classifier Only those classifiers that are in terminated states (IN_ERROR, TRAINED) will be deleted.
- DeleteEndpoint ( array $params = [] )
- Deletes a model-specific endpoint for a previously-trained custom model.
- DeleteEntityRecognizer ( array $params = [] )
- Deletes an entity recognizer.
- DeleteFlywheel ( array $params = [] )
- Deletes a flywheel.
- DeleteResourcePolicy ( array $params = [] )
- Deletes a resource-based policy that is attached to a custom model.
- DescribeDataset ( array $params = [] )
- Returns information about the dataset that you specify.
- DescribeDocumentClassificationJob ( array $params = [] )
- Gets the properties associated with a document classification job.
- DescribeDocumentClassifier ( array $params = [] )
- Gets the properties associated with a document classifier.
- DescribeDominantLanguageDetectionJob ( array $params = [] )
- Gets the properties associated with a dominant language detection job.
- DescribeEndpoint ( array $params = [] )
- Gets the properties associated with a specific endpoint.
- DescribeEntitiesDetectionJob ( array $params = [] )
- Gets the properties associated with an entities detection job.
- DescribeEntityRecognizer ( array $params = [] )
- Provides details about an entity recognizer including status, S3 buckets containing training data, recognizer metadata, metrics, and so on.
- DescribeEventsDetectionJob ( array $params = [] )
- Gets the status and details of an events detection job.
- DescribeFlywheel ( array $params = [] )
- Provides configuration information about the flywheel.
- DescribeFlywheelIteration ( array $params = [] )
- Retrieve the configuration properties of a flywheel iteration.
- DescribeKeyPhrasesDetectionJob ( array $params = [] )
- Gets the properties associated with a key phrases detection job.
- DescribePiiEntitiesDetectionJob ( array $params = [] )
- Gets the properties associated with a PII entities detection job.
- DescribeResourcePolicy ( array $params = [] )
- Gets the details of a resource-based policy that is attached to a custom model, including the JSON body of the policy.
- DescribeSentimentDetectionJob ( array $params = [] )
- Gets the properties associated with a sentiment detection job.
- DescribeTargetedSentimentDetectionJob ( array $params = [] )
- Gets the properties associated with a targeted sentiment detection job.
- DescribeTopicsDetectionJob ( array $params = [] )
- Gets the properties associated with a topic detection job.
- DetectDominantLanguage ( array $params = [] )
- Determines the dominant language of the input text.
- DetectEntities ( array $params = [] )
- Detects named entities in input text when you use the pre-trained model.
- DetectKeyPhrases ( array $params = [] )
- Detects the key noun phrases found in the text.
- DetectPiiEntities ( array $params = [] )
- Inspects the input text for entities that contain personally identifiable information (PII) and returns information about them.
- DetectSentiment ( array $params = [] )
- Inspects text and returns an inference of the prevailing sentiment (POSITIVE, NEUTRAL, MIXED, or NEGATIVE).
- DetectSyntax ( array $params = [] )
- Inspects text for syntax and the part of speech of words in the document.
- DetectTargetedSentiment ( array $params = [] )
- Inspects the input text and returns a sentiment analysis for each entity identified in the text.
- DetectToxicContent ( array $params = [] )
- Performs toxicity analysis on the list of text strings that you provide as input.
- ImportModel ( array $params = [] )
- Creates a new custom model that replicates a source custom model that you import.
- ListDatasets ( array $params = [] )
- List the datasets that you have configured in this Region.
- ListDocumentClassificationJobs ( array $params = [] )
- Gets a list of the documentation classification jobs that you have submitted.
- ListDocumentClassifierSummaries ( array $params = [] )
- Gets a list of summaries of the document classifiers that you have created
- ListDocumentClassifiers ( array $params = [] )
- Gets a list of the document classifiers that you have created.
- ListDominantLanguageDetectionJobs ( array $params = [] )
- Gets a list of the dominant language detection jobs that you have submitted.
- ListEndpoints ( array $params = [] )
- Gets a list of all existing endpoints that you've created.
- ListEntitiesDetectionJobs ( array $params = [] )
- Gets a list of the entity detection jobs that you have submitted.
- ListEntityRecognizerSummaries ( array $params = [] )
- Gets a list of summaries for the entity recognizers that you have created.
- ListEntityRecognizers ( array $params = [] )
- Gets a list of the properties of all entity recognizers that you created, including recognizers currently in training.
- ListEventsDetectionJobs ( array $params = [] )
- Gets a list of the events detection jobs that you have submitted.
- ListFlywheelIterationHistory ( array $params = [] )
- Information about the history of a flywheel iteration.
- ListFlywheels ( array $params = [] )
- Gets a list of the flywheels that you have created.
- ListKeyPhrasesDetectionJobs ( array $params = [] )
- Get a list of key phrase detection jobs that you have submitted.
- ListPiiEntitiesDetectionJobs ( array $params = [] )
- Gets a list of the PII entity detection jobs that you have submitted.
- ListSentimentDetectionJobs ( array $params = [] )
- Gets a list of sentiment detection jobs that you have submitted.
- ListTagsForResource ( array $params = [] )
- Lists all tags associated with a given Amazon Comprehend resource.
- ListTargetedSentimentDetectionJobs ( array $params = [] )
- Gets a list of targeted sentiment detection jobs that you have submitted.
- ListTopicsDetectionJobs ( array $params = [] )
- Gets a list of the topic detection jobs that you have submitted.
- PutResourcePolicy ( array $params = [] )
- Attaches a resource-based policy to a custom model.
- StartDocumentClassificationJob ( array $params = [] )
- Starts an asynchronous document classification job using a custom classification model.
- StartDominantLanguageDetectionJob ( array $params = [] )
- Starts an asynchronous dominant language detection job for a collection of documents.
- StartEntitiesDetectionJob ( array $params = [] )
- Starts an asynchronous entity detection job for a collection of documents.
- StartEventsDetectionJob ( array $params = [] )
- Starts an asynchronous event detection job for a collection of documents.
- StartFlywheelIteration ( array $params = [] )
- Start the flywheel iteration.
- StartKeyPhrasesDetectionJob ( array $params = [] )
- Starts an asynchronous key phrase detection job for a collection of documents.
- StartPiiEntitiesDetectionJob ( array $params = [] )
- Starts an asynchronous PII entity detection job for a collection of documents.
- StartSentimentDetectionJob ( array $params = [] )
- Starts an asynchronous sentiment detection job for a collection of documents.
- StartTargetedSentimentDetectionJob ( array $params = [] )
- Starts an asynchronous targeted sentiment detection job for a collection of documents.
- StartTopicsDetectionJob ( array $params = [] )
- Starts an asynchronous topic detection job.
- StopDominantLanguageDetectionJob ( array $params = [] )
- Stops a dominant language detection job in progress.
- StopEntitiesDetectionJob ( array $params = [] )
- Stops an entities detection job in progress.
- StopEventsDetectionJob ( array $params = [] )
- Stops an events detection job in progress.
- StopKeyPhrasesDetectionJob ( array $params = [] )
- Stops a key phrases detection job in progress.
- StopPiiEntitiesDetectionJob ( array $params = [] )
- Stops a PII entities detection job in progress.
- StopSentimentDetectionJob ( array $params = [] )
- Stops a sentiment detection job in progress.
- StopTargetedSentimentDetectionJob ( array $params = [] )
- Stops a targeted sentiment detection job in progress.
- StopTrainingDocumentClassifier ( array $params = [] )
- Stops a document classifier training job while in progress.
- StopTrainingEntityRecognizer ( array $params = [] )
- Stops an entity recognizer training job while in progress.
- TagResource ( array $params = [] )
- Associates a specific tag with an Amazon Comprehend resource.
- UntagResource ( array $params = [] )
- Removes a specific tag associated with an Amazon Comprehend resource.
- UpdateEndpoint ( array $params = [] )
- Updates information about the specified endpoint.
- UpdateFlywheel ( array $params = [] )
- Update the configuration information for an existing flywheel.
Paginators
Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:
- ListDatasets
- ListDocumentClassificationJobs
- ListDocumentClassifierSummaries
- ListDocumentClassifiers
- ListDominantLanguageDetectionJobs
- ListEndpoints
- ListEntitiesDetectionJobs
- ListEntityRecognizerSummaries
- ListEntityRecognizers
- ListEventsDetectionJobs
- ListFlywheelIterationHistory
- ListFlywheels
- ListKeyPhrasesDetectionJobs
- ListPiiEntitiesDetectionJobs
- ListSentimentDetectionJobs
- ListTargetedSentimentDetectionJobs
- ListTopicsDetectionJobs
Operations
BatchDetectDominantLanguage
$result = $client->batchDetectDominantLanguage([/* ... */]); $promise = $client->batchDetectDominantLanguageAsync([/* ... */]);
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.
Parameter Syntax
$result = $client->batchDetectDominantLanguage([
'TextList' => ['<string>', ...], // REQUIRED
]);
Parameter Details
Members
- TextList
-
- Required: Yes
- Type: Array of strings
A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. Each document should contain at least 20 characters. The maximum size of each document is 5 KB.
Result Syntax
[
'ErrorList' => [
[
'ErrorCode' => '<string>',
'ErrorMessage' => '<string>',
'Index' => <integer>,
],
// ...
],
'ResultList' => [
[
'Index' => <integer>,
'Languages' => [
[
'LanguageCode' => '<string>',
'Score' => <float>,
],
// ...
],
],
// ...
],
]
Result Details
Members
- ErrorList
-
- Required: Yes
- Type: Array of BatchItemError structures
A list containing one object for each document that contained an error. The results are sorted in ascending order by the
Indexfield and match the order of the documents in the input list. If there are no errors in the batch, theErrorListis empty. - ResultList
-
- Required: Yes
- Type: Array of BatchDetectDominantLanguageItemResult structures
A list of objects containing the results of the operation. The results are sorted in ascending order by the
Indexfield and match the order of the documents in the input list. If all of the documents contain an error, theResultListis empty.
Errors
- InvalidRequestException:
The request is invalid.
- TextSizeLimitExceededException:
The size of the input text exceeds the limit. Use a smaller document.
- BatchSizeLimitExceededException:
The number of documents in the request exceeds the limit of 25. Try your request again with fewer documents.
- InternalServerException:
An internal server error occurred. Retry your request.