@Generated(value="software.amazon.awssdk:codegen") public interface ComprehendClient extends SdkClient, SdkAutoCloseable
builder()
method.
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.
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_NAME |
Modifier and Type | Method and Description |
---|---|
default BatchDetectDominantLanguageResponse |
batchDetectDominantLanguage(BatchDetectDominantLanguageRequest batchDetectDominantLanguageRequest)
Determines the dominant language of the input text for a batch of documents.
|
default BatchDetectDominantLanguageResponse |
batchDetectDominantLanguage(Consumer<BatchDetectDominantLanguageRequest.Builder> batchDetectDominantLanguageRequest)
Determines the dominant language of the input text for a batch of documents.
|
default BatchDetectEntitiesResponse |
batchDetectEntities(BatchDetectEntitiesRequest batchDetectEntitiesRequest)
Inspects the text of a batch of documents and returns information about them.
|
default BatchDetectEntitiesResponse |
batchDetectEntities(Consumer<BatchDetectEntitiesRequest.Builder> batchDetectEntitiesRequest)
Inspects the text of a batch of documents and returns information about them.
|
default BatchDetectKeyPhrasesResponse |
batchDetectKeyPhrases(BatchDetectKeyPhrasesRequest batchDetectKeyPhrasesRequest)
Detects the key noun phrases found in a batch of documents.
|
default BatchDetectKeyPhrasesResponse |
batchDetectKeyPhrases(Consumer<BatchDetectKeyPhrasesRequest.Builder> batchDetectKeyPhrasesRequest)
Detects the key noun phrases found in a batch of documents.
|
default BatchDetectSentimentResponse |
batchDetectSentiment(BatchDetectSentimentRequest batchDetectSentimentRequest)
Inspects a batch of documents and returns an inference of the prevailing sentiment,
POSITIVE ,
NEUTRAL , MIXED , or NEGATIVE , in each one. |
default BatchDetectSentimentResponse |
batchDetectSentiment(Consumer<BatchDetectSentimentRequest.Builder> batchDetectSentimentRequest)
Inspects a batch of documents and returns an inference of the prevailing sentiment,
POSITIVE ,
NEUTRAL , MIXED , or NEGATIVE , in each one. |
static ComprehendClientBuilder |
builder()
Create a builder that can be used to configure and create a
ComprehendClient . |
static ComprehendClient |
create()
Create a
ComprehendClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from
the DefaultCredentialsProvider . |
default DescribeTopicsDetectionJobResponse |
describeTopicsDetectionJob(Consumer<DescribeTopicsDetectionJobRequest.Builder> describeTopicsDetectionJobRequest)
Gets the properties associated with a topic detection job.
|
default DescribeTopicsDetectionJobResponse |
describeTopicsDetectionJob(DescribeTopicsDetectionJobRequest describeTopicsDetectionJobRequest)
Gets the properties associated with a topic detection job.
|
default DetectDominantLanguageResponse |
detectDominantLanguage(Consumer<DetectDominantLanguageRequest.Builder> detectDominantLanguageRequest)
Determines the dominant language of the input text.
|
default DetectDominantLanguageResponse |
detectDominantLanguage(DetectDominantLanguageRequest detectDominantLanguageRequest)
Determines the dominant language of the input text.
|
default DetectEntitiesResponse |
detectEntities(Consumer<DetectEntitiesRequest.Builder> detectEntitiesRequest)
Inspects text for entities, and returns information about them.
|
default DetectEntitiesResponse |
detectEntities(DetectEntitiesRequest detectEntitiesRequest)
Inspects text for entities, and returns information about them.
|
default DetectKeyPhrasesResponse |
detectKeyPhrases(Consumer<DetectKeyPhrasesRequest.Builder> detectKeyPhrasesRequest)
Detects the key noun phrases found in the text.
|
default DetectKeyPhrasesResponse |
detectKeyPhrases(DetectKeyPhrasesRequest detectKeyPhrasesRequest)
Detects the key noun phrases found in the text.
|
default DetectSentimentResponse |
detectSentiment(Consumer<DetectSentimentRequest.Builder> detectSentimentRequest)
Inspects text and returns an inference of the prevailing sentiment (
POSITIVE , NEUTRAL ,
MIXED , or NEGATIVE ). |
default DetectSentimentResponse |
detectSentiment(DetectSentimentRequest detectSentimentRequest)
Inspects text and returns an inference of the prevailing sentiment (
POSITIVE , NEUTRAL ,
MIXED , or NEGATIVE ). |
default ListTopicsDetectionJobsResponse |
listTopicsDetectionJobs()
Gets a list of the topic detection jobs that you have submitted.
|
default ListTopicsDetectionJobsResponse |
listTopicsDetectionJobs(Consumer<ListTopicsDetectionJobsRequest.Builder> listTopicsDetectionJobsRequest)
Gets a list of the topic detection jobs that you have submitted.
|
default ListTopicsDetectionJobsResponse |
listTopicsDetectionJobs(ListTopicsDetectionJobsRequest listTopicsDetectionJobsRequest)
Gets a list of the topic detection jobs that you have submitted.
|
default ListTopicsDetectionJobsIterable |
listTopicsDetectionJobsPaginator()
Gets a list of the topic detection jobs that you have submitted.
|
default ListTopicsDetectionJobsIterable |
listTopicsDetectionJobsPaginator(ListTopicsDetectionJobsRequest listTopicsDetectionJobsRequest)
Gets a list of the topic detection jobs that you have submitted.
|
static ServiceMetadata |
serviceMetadata() |
default StartTopicsDetectionJobResponse |
startTopicsDetectionJob(Consumer<StartTopicsDetectionJobRequest.Builder> startTopicsDetectionJobRequest)
Starts an asynchronous topic detection job.
|
default StartTopicsDetectionJobResponse |
startTopicsDetectionJob(StartTopicsDetectionJobRequest startTopicsDetectionJobRequest)
Starts an asynchronous topic detection job.
|
serviceName
close
static final String SERVICE_NAME
static ComprehendClient create()
ComprehendClient
with the region loaded from the
DefaultAwsRegionProviderChain
and credentials loaded from
the DefaultCredentialsProvider
.static ComprehendClientBuilder builder()
ComprehendClient
.default BatchDetectDominantLanguageResponse batchDetectDominantLanguage(BatchDetectDominantLanguageRequest batchDetectDominantLanguageRequest) throws InvalidRequestException, TextSizeLimitExceededException, BatchSizeLimitExceededException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
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.
batchDetectDominantLanguageRequest
- 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.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default BatchDetectDominantLanguageResponse batchDetectDominantLanguage(Consumer<BatchDetectDominantLanguageRequest.Builder> batchDetectDominantLanguageRequest) throws InvalidRequestException, TextSizeLimitExceededException, BatchSizeLimitExceededException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
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.
batchDetectDominantLanguageRequest
- 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.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default BatchDetectEntitiesResponse batchDetectEntities(BatchDetectEntitiesRequest batchDetectEntitiesRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, BatchSizeLimitExceededException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Inspects the text of a batch of documents and returns information about them. For more information about entities, see how-entities
batchDetectEntitiesRequest
- InvalidRequestException
- The request is invalid.TextSizeLimitExceededException
- The size of the input text exceeds the limit. Use a smaller document.UnsupportedLanguageException
- 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-languagesBatchSizeLimitExceededException
- 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.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default BatchDetectEntitiesResponse batchDetectEntities(Consumer<BatchDetectEntitiesRequest.Builder> batchDetectEntitiesRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, BatchSizeLimitExceededException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Inspects the text of a batch of documents and returns information about them. For more information about entities, see how-entities
batchDetectEntitiesRequest
- InvalidRequestException
- The request is invalid.TextSizeLimitExceededException
- The size of the input text exceeds the limit. Use a smaller document.UnsupportedLanguageException
- 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-languagesBatchSizeLimitExceededException
- 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.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default BatchDetectKeyPhrasesResponse batchDetectKeyPhrases(BatchDetectKeyPhrasesRequest batchDetectKeyPhrasesRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, BatchSizeLimitExceededException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Detects the key noun phrases found in a batch of documents.
batchDetectKeyPhrasesRequest
- InvalidRequestException
- The request is invalid.TextSizeLimitExceededException
- The size of the input text exceeds the limit. Use a smaller document.UnsupportedLanguageException
- 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-languagesBatchSizeLimitExceededException
- 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.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default BatchDetectKeyPhrasesResponse batchDetectKeyPhrases(Consumer<BatchDetectKeyPhrasesRequest.Builder> batchDetectKeyPhrasesRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, BatchSizeLimitExceededException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Detects the key noun phrases found in a batch of documents.
batchDetectKeyPhrasesRequest
- InvalidRequestException
- The request is invalid.TextSizeLimitExceededException
- The size of the input text exceeds the limit. Use a smaller document.UnsupportedLanguageException
- 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-languagesBatchSizeLimitExceededException
- 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.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default BatchDetectSentimentResponse batchDetectSentiment(BatchDetectSentimentRequest batchDetectSentimentRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, BatchSizeLimitExceededException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Inspects a batch of documents and returns an inference of the prevailing sentiment, POSITIVE
,
NEUTRAL
, MIXED
, or NEGATIVE
, in each one.
batchDetectSentimentRequest
- InvalidRequestException
- The request is invalid.TextSizeLimitExceededException
- The size of the input text exceeds the limit. Use a smaller document.UnsupportedLanguageException
- 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-languagesBatchSizeLimitExceededException
- 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.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default BatchDetectSentimentResponse batchDetectSentiment(Consumer<BatchDetectSentimentRequest.Builder> batchDetectSentimentRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, BatchSizeLimitExceededException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Inspects a batch of documents and returns an inference of the prevailing sentiment, POSITIVE
,
NEUTRAL
, MIXED
, or NEGATIVE
, in each one.
batchDetectSentimentRequest
- InvalidRequestException
- The request is invalid.TextSizeLimitExceededException
- The size of the input text exceeds the limit. Use a smaller document.UnsupportedLanguageException
- 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-languagesBatchSizeLimitExceededException
- 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.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default DescribeTopicsDetectionJobResponse describeTopicsDetectionJob(DescribeTopicsDetectionJobRequest describeTopicsDetectionJobRequest) throws InvalidRequestException, JobNotFoundException, TooManyRequestsException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Gets the properties associated with a topic detection job. Use this operation to get the status of a detection job.
describeTopicsDetectionJobRequest
- InvalidRequestException
- The request is invalid.JobNotFoundException
- The specified job was not found. Check the job ID and try again.TooManyRequestsException
- The number of requests exceeds the limit. Resubmit your request later.InternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default DescribeTopicsDetectionJobResponse describeTopicsDetectionJob(Consumer<DescribeTopicsDetectionJobRequest.Builder> describeTopicsDetectionJobRequest) throws InvalidRequestException, JobNotFoundException, TooManyRequestsException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Gets the properties associated with a topic detection job. Use this operation to get the status of a detection job.
describeTopicsDetectionJobRequest
- InvalidRequestException
- The request is invalid.JobNotFoundException
- The specified job was not found. Check the job ID and try again.TooManyRequestsException
- The number of requests exceeds the limit. Resubmit your request later.InternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default DetectDominantLanguageResponse detectDominantLanguage(DetectDominantLanguageRequest detectDominantLanguageRequest) throws InvalidRequestException, TextSizeLimitExceededException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Determines the dominant language of the input text. For a list of languages that Amazon Comprehend can detect, see Amazon Comprehend Supported Languages.
detectDominantLanguageRequest
- InvalidRequestException
- The request is invalid.TextSizeLimitExceededException
- The size of the input text exceeds the limit. Use a smaller document.InternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default DetectDominantLanguageResponse detectDominantLanguage(Consumer<DetectDominantLanguageRequest.Builder> detectDominantLanguageRequest) throws InvalidRequestException, TextSizeLimitExceededException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Determines the dominant language of the input text. For a list of languages that Amazon Comprehend can detect, see Amazon Comprehend Supported Languages.
detectDominantLanguageRequest
- InvalidRequestException
- The request is invalid.TextSizeLimitExceededException
- The size of the input text exceeds the limit. Use a smaller document.InternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default DetectEntitiesResponse detectEntities(DetectEntitiesRequest detectEntitiesRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Inspects text for entities, and returns information about them. For more information, about entities, see how-entities.
detectEntitiesRequest
- InvalidRequestException
- The request is invalid.TextSizeLimitExceededException
- The size of the input text exceeds the limit. Use a smaller document.UnsupportedLanguageException
- 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-languagesInternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default DetectEntitiesResponse detectEntities(Consumer<DetectEntitiesRequest.Builder> detectEntitiesRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Inspects text for entities, and returns information about them. For more information, about entities, see how-entities.
detectEntitiesRequest
- InvalidRequestException
- The request is invalid.TextSizeLimitExceededException
- The size of the input text exceeds the limit. Use a smaller document.UnsupportedLanguageException
- 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-languagesInternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default DetectKeyPhrasesResponse detectKeyPhrases(DetectKeyPhrasesRequest detectKeyPhrasesRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Detects the key noun phrases found in the text.
detectKeyPhrasesRequest
- InvalidRequestException
- The request is invalid.TextSizeLimitExceededException
- The size of the input text exceeds the limit. Use a smaller document.UnsupportedLanguageException
- 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-languagesInternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default DetectKeyPhrasesResponse detectKeyPhrases(Consumer<DetectKeyPhrasesRequest.Builder> detectKeyPhrasesRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Detects the key noun phrases found in the text.
detectKeyPhrasesRequest
- InvalidRequestException
- The request is invalid.TextSizeLimitExceededException
- The size of the input text exceeds the limit. Use a smaller document.UnsupportedLanguageException
- 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-languagesInternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default DetectSentimentResponse detectSentiment(DetectSentimentRequest detectSentimentRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Inspects text and returns an inference of the prevailing sentiment (POSITIVE
, NEUTRAL
,
MIXED
, or NEGATIVE
).
detectSentimentRequest
- InvalidRequestException
- The request is invalid.TextSizeLimitExceededException
- The size of the input text exceeds the limit. Use a smaller document.UnsupportedLanguageException
- 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-languagesInternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default DetectSentimentResponse detectSentiment(Consumer<DetectSentimentRequest.Builder> detectSentimentRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Inspects text and returns an inference of the prevailing sentiment (POSITIVE
, NEUTRAL
,
MIXED
, or NEGATIVE
).
detectSentimentRequest
- InvalidRequestException
- The request is invalid.TextSizeLimitExceededException
- The size of the input text exceeds the limit. Use a smaller document.UnsupportedLanguageException
- 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-languagesInternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default ListTopicsDetectionJobsResponse listTopicsDetectionJobs() throws InvalidRequestException, TooManyRequestsException, InvalidFilterException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Gets a list of the topic detection jobs that you have submitted.
InvalidRequestException
- The request is invalid.TooManyRequestsException
- The number of requests exceeds the limit. Resubmit your request later.InvalidFilterException
- The filter specified for the ListTopicDetectionJobs
operation is invalid. Specify a
different filter.InternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
listTopicsDetectionJobs(ListTopicsDetectionJobsRequest)
,
AWS API Documentationdefault ListTopicsDetectionJobsResponse listTopicsDetectionJobs(ListTopicsDetectionJobsRequest listTopicsDetectionJobsRequest) throws InvalidRequestException, TooManyRequestsException, InvalidFilterException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Gets a list of the topic detection jobs that you have submitted.
listTopicsDetectionJobsRequest
- InvalidRequestException
- The request is invalid.TooManyRequestsException
- The number of requests exceeds the limit. Resubmit your request later.InvalidFilterException
- The filter specified for the ListTopicDetectionJobs
operation is invalid. Specify a
different filter.InternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default ListTopicsDetectionJobsResponse listTopicsDetectionJobs(Consumer<ListTopicsDetectionJobsRequest.Builder> listTopicsDetectionJobsRequest) throws InvalidRequestException, TooManyRequestsException, InvalidFilterException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Gets a list of the topic detection jobs that you have submitted.
listTopicsDetectionJobsRequest
- InvalidRequestException
- The request is invalid.TooManyRequestsException
- The number of requests exceeds the limit. Resubmit your request later.InvalidFilterException
- The filter specified for the ListTopicDetectionJobs
operation is invalid. Specify a
different filter.InternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default ListTopicsDetectionJobsIterable listTopicsDetectionJobsPaginator() throws InvalidRequestException, TooManyRequestsException, InvalidFilterException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Gets a list of the topic detection jobs that you have submitted.
This is a variant of
listTopicsDetectionJobs(software.amazon.awssdk.services.comprehend.model.ListTopicsDetectionJobsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.comprehend.paginators.ListTopicsDetectionJobsIterable responses = client.listTopicsDetectionJobsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{ @code software.amazon.awssdk.services.comprehend.paginators.ListTopicsDetectionJobsIterable responses = client .listTopicsDetectionJobsPaginator(request); for (software.amazon.awssdk.services.comprehend.model.ListTopicsDetectionJobsResponse response : responses) { // do something; } }3) Use iterator directly
software.amazon.awssdk.services.comprehend.paginators.ListTopicsDetectionJobsIterable responses = client.listTopicsDetectionJobsPaginator(request);
responses.iterator().forEachRemaining(....);
Note: If you prefer to have control on service calls, use the
listTopicsDetectionJobs(software.amazon.awssdk.services.comprehend.model.ListTopicsDetectionJobsRequest)
operation.
InvalidRequestException
- The request is invalid.TooManyRequestsException
- The number of requests exceeds the limit. Resubmit your request later.InvalidFilterException
- The filter specified for the ListTopicDetectionJobs
operation is invalid. Specify a
different filter.InternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
listTopicsDetectionJobsPaginator(ListTopicsDetectionJobsRequest)
,
AWS API Documentationdefault ListTopicsDetectionJobsIterable listTopicsDetectionJobsPaginator(ListTopicsDetectionJobsRequest listTopicsDetectionJobsRequest) throws InvalidRequestException, TooManyRequestsException, InvalidFilterException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Gets a list of the topic detection jobs that you have submitted.
This is a variant of
listTopicsDetectionJobs(software.amazon.awssdk.services.comprehend.model.ListTopicsDetectionJobsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.comprehend.paginators.ListTopicsDetectionJobsIterable responses = client.listTopicsDetectionJobsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{ @code software.amazon.awssdk.services.comprehend.paginators.ListTopicsDetectionJobsIterable responses = client .listTopicsDetectionJobsPaginator(request); for (software.amazon.awssdk.services.comprehend.model.ListTopicsDetectionJobsResponse response : responses) { // do something; } }3) Use iterator directly
software.amazon.awssdk.services.comprehend.paginators.ListTopicsDetectionJobsIterable responses = client.listTopicsDetectionJobsPaginator(request);
responses.iterator().forEachRemaining(....);
Note: If you prefer to have control on service calls, use the
listTopicsDetectionJobs(software.amazon.awssdk.services.comprehend.model.ListTopicsDetectionJobsRequest)
operation.
listTopicsDetectionJobsRequest
- InvalidRequestException
- The request is invalid.TooManyRequestsException
- The number of requests exceeds the limit. Resubmit your request later.InvalidFilterException
- The filter specified for the ListTopicDetectionJobs
operation is invalid. Specify a
different filter.InternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default StartTopicsDetectionJobResponse startTopicsDetectionJob(StartTopicsDetectionJobRequest startTopicsDetectionJobRequest) throws InvalidRequestException, TooManyRequestsException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Starts an asynchronous topic detection job. Use the DescribeTopicDetectionJob
operation to track the
status of a job.
startTopicsDetectionJobRequest
- InvalidRequestException
- The request is invalid.TooManyRequestsException
- The number of requests exceeds the limit. Resubmit your request later.InternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
default StartTopicsDetectionJobResponse startTopicsDetectionJob(Consumer<StartTopicsDetectionJobRequest.Builder> startTopicsDetectionJobRequest) throws InvalidRequestException, TooManyRequestsException, InternalServerException, SdkServiceException, SdkClientException, ComprehendException
Starts an asynchronous topic detection job. Use the DescribeTopicDetectionJob
operation to track the
status of a job.
startTopicsDetectionJobRequest
- InvalidRequestException
- The request is invalid.TooManyRequestsException
- The number of requests exceeds the limit. Resubmit your request later.InternalServerException
- An internal server error occurred. Retry your request.SdkException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc.ComprehendException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.SdkServiceException
static ServiceMetadata serviceMetadata()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.