@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, AwsServiceException, 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.AwsServiceException
default BatchDetectDominantLanguageResponse batchDetectDominantLanguage(Consumer<BatchDetectDominantLanguageRequest.Builder> batchDetectDominantLanguageRequest) throws InvalidRequestException, TextSizeLimitExceededException, BatchSizeLimitExceededException, InternalServerException, AwsServiceException, 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.
This is a convenience which creates an instance of the BatchDetectDominantLanguageRequest.Builder
avoiding the need to create one manually via BatchDetectDominantLanguageRequest.builder()
batchDetectDominantLanguageRequest
- A Consumer
that will call methods on BatchDetectDominantLanguageRequest.Builder
to create
a request.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.AwsServiceException
default BatchDetectEntitiesResponse batchDetectEntities(BatchDetectEntitiesRequest batchDetectEntitiesRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, BatchSizeLimitExceededException, InternalServerException, AwsServiceException, 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.AwsServiceException
default BatchDetectEntitiesResponse batchDetectEntities(Consumer<BatchDetectEntitiesRequest.Builder> batchDetectEntitiesRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, BatchSizeLimitExceededException, InternalServerException, AwsServiceException, SdkClientException, ComprehendException
Inspects the text of a batch of documents and returns information about them. For more information about entities, see how-entities
This is a convenience which creates an instance of the BatchDetectEntitiesRequest.Builder
avoiding the
need to create one manually via BatchDetectEntitiesRequest.builder()
batchDetectEntitiesRequest
- A Consumer
that will call methods on BatchDetectEntitiesRequest.Builder
to create a
request.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.AwsServiceException
default BatchDetectKeyPhrasesResponse batchDetectKeyPhrases(BatchDetectKeyPhrasesRequest batchDetectKeyPhrasesRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, BatchSizeLimitExceededException, InternalServerException, AwsServiceException, 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.AwsServiceException
default BatchDetectKeyPhrasesResponse batchDetectKeyPhrases(Consumer<BatchDetectKeyPhrasesRequest.Builder> batchDetectKeyPhrasesRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, BatchSizeLimitExceededException, InternalServerException, AwsServiceException, SdkClientException, ComprehendException
Detects the key noun phrases found in a batch of documents.
This is a convenience which creates an instance of the BatchDetectKeyPhrasesRequest.Builder
avoiding the
need to create one manually via BatchDetectKeyPhrasesRequest.builder()
batchDetectKeyPhrasesRequest
- A Consumer
that will call methods on BatchDetectKeyPhrasesRequest.Builder
to create a
request.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.AwsServiceException
default BatchDetectSentimentResponse batchDetectSentiment(BatchDetectSentimentRequest batchDetectSentimentRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, BatchSizeLimitExceededException, InternalServerException, AwsServiceException, 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.AwsServiceException
default BatchDetectSentimentResponse batchDetectSentiment(Consumer<BatchDetectSentimentRequest.Builder> batchDetectSentimentRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, BatchSizeLimitExceededException, InternalServerException, AwsServiceException, SdkClientException, ComprehendException
Inspects a batch of documents and returns an inference of the prevailing sentiment, POSITIVE
,
NEUTRAL
, MIXED
, or NEGATIVE
, in each one.
This is a convenience which creates an instance of the BatchDetectSentimentRequest.Builder
avoiding the
need to create one manually via BatchDetectSentimentRequest.builder()
batchDetectSentimentRequest
- A Consumer
that will call methods on BatchDetectSentimentRequest.Builder
to create a
request.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.AwsServiceException
default DescribeTopicsDetectionJobResponse describeTopicsDetectionJob(DescribeTopicsDetectionJobRequest describeTopicsDetectionJobRequest) throws InvalidRequestException, JobNotFoundException, TooManyRequestsException, InternalServerException, AwsServiceException, 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.AwsServiceException
default DescribeTopicsDetectionJobResponse describeTopicsDetectionJob(Consumer<DescribeTopicsDetectionJobRequest.Builder> describeTopicsDetectionJobRequest) throws InvalidRequestException, JobNotFoundException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, ComprehendException
Gets the properties associated with a topic detection job. Use this operation to get the status of a detection job.
This is a convenience which creates an instance of the DescribeTopicsDetectionJobRequest.Builder
avoiding
the need to create one manually via DescribeTopicsDetectionJobRequest.builder()
describeTopicsDetectionJobRequest
- A Consumer
that will call methods on DescribeTopicsDetectionJobRequest.Builder
to create a
request.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.AwsServiceException
default DetectDominantLanguageResponse detectDominantLanguage(DetectDominantLanguageRequest detectDominantLanguageRequest) throws InvalidRequestException, TextSizeLimitExceededException, InternalServerException, AwsServiceException, 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.AwsServiceException
default DetectDominantLanguageResponse detectDominantLanguage(Consumer<DetectDominantLanguageRequest.Builder> detectDominantLanguageRequest) throws InvalidRequestException, TextSizeLimitExceededException, InternalServerException, AwsServiceException, 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.
This is a convenience which creates an instance of the DetectDominantLanguageRequest.Builder
avoiding the
need to create one manually via DetectDominantLanguageRequest.builder()
detectDominantLanguageRequest
- A Consumer
that will call methods on DetectDominantLanguageRequest.Builder
to create a
request.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.AwsServiceException
default DetectEntitiesResponse detectEntities(DetectEntitiesRequest detectEntitiesRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, InternalServerException, AwsServiceException, 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.AwsServiceException
default DetectEntitiesResponse detectEntities(Consumer<DetectEntitiesRequest.Builder> detectEntitiesRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, InternalServerException, AwsServiceException, SdkClientException, ComprehendException
Inspects text for entities, and returns information about them. For more information, about entities, see how-entities.
This is a convenience which creates an instance of the DetectEntitiesRequest.Builder
avoiding the need to
create one manually via DetectEntitiesRequest.builder()
detectEntitiesRequest
- A Consumer
that will call methods on DetectEntitiesRequest.Builder
to create a request.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.AwsServiceException
default DetectKeyPhrasesResponse detectKeyPhrases(DetectKeyPhrasesRequest detectKeyPhrasesRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, InternalServerException, AwsServiceException, 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.AwsServiceException
default DetectKeyPhrasesResponse detectKeyPhrases(Consumer<DetectKeyPhrasesRequest.Builder> detectKeyPhrasesRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, InternalServerException, AwsServiceException, SdkClientException, ComprehendException
Detects the key noun phrases found in the text.
This is a convenience which creates an instance of the DetectKeyPhrasesRequest.Builder
avoiding the need
to create one manually via DetectKeyPhrasesRequest.builder()
detectKeyPhrasesRequest
- A Consumer
that will call methods on DetectKeyPhrasesRequest.Builder
to create a request.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.AwsServiceException
default DetectSentimentResponse detectSentiment(DetectSentimentRequest detectSentimentRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, InternalServerException, AwsServiceException, 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.AwsServiceException
default DetectSentimentResponse detectSentiment(Consumer<DetectSentimentRequest.Builder> detectSentimentRequest) throws InvalidRequestException, TextSizeLimitExceededException, UnsupportedLanguageException, InternalServerException, AwsServiceException, SdkClientException, ComprehendException
Inspects text and returns an inference of the prevailing sentiment (POSITIVE
, NEUTRAL
,
MIXED
, or NEGATIVE
).
This is a convenience which creates an instance of the DetectSentimentRequest.Builder
avoiding the need
to create one manually via DetectSentimentRequest.builder()
detectSentimentRequest
- A Consumer
that will call methods on DetectSentimentRequest.Builder
to create a request.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.AwsServiceException
default ListTopicsDetectionJobsResponse listTopicsDetectionJobs() throws InvalidRequestException, TooManyRequestsException, InvalidFilterException, InternalServerException, AwsServiceException, 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.AwsServiceException
listTopicsDetectionJobs(ListTopicsDetectionJobsRequest)
,
AWS API Documentationdefault ListTopicsDetectionJobsResponse listTopicsDetectionJobs(ListTopicsDetectionJobsRequest listTopicsDetectionJobsRequest) throws InvalidRequestException, TooManyRequestsException, InvalidFilterException, InternalServerException, AwsServiceException, 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.AwsServiceException
default ListTopicsDetectionJobsResponse listTopicsDetectionJobs(Consumer<ListTopicsDetectionJobsRequest.Builder> listTopicsDetectionJobsRequest) throws InvalidRequestException, TooManyRequestsException, InvalidFilterException, InternalServerException, AwsServiceException, SdkClientException, ComprehendException
Gets a list of the topic detection jobs that you have submitted.
This is a convenience which creates an instance of the ListTopicsDetectionJobsRequest.Builder
avoiding
the need to create one manually via ListTopicsDetectionJobsRequest.builder()
listTopicsDetectionJobsRequest
- A Consumer
that will call methods on ListTopicsDetectionJobsRequest.Builder
to create a
request.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.AwsServiceException
default ListTopicsDetectionJobsIterable listTopicsDetectionJobsPaginator(ListTopicsDetectionJobsRequest listTopicsDetectionJobsRequest) throws InvalidRequestException, TooManyRequestsException, InvalidFilterException, InternalServerException, AwsServiceException, 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.AwsServiceException
default ListTopicsDetectionJobsIterable listTopicsDetectionJobsPaginator() throws InvalidRequestException, TooManyRequestsException, InvalidFilterException, InternalServerException, AwsServiceException, 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.AwsServiceException
listTopicsDetectionJobsPaginator(ListTopicsDetectionJobsRequest)
,
AWS API Documentationdefault StartTopicsDetectionJobResponse startTopicsDetectionJob(StartTopicsDetectionJobRequest startTopicsDetectionJobRequest) throws InvalidRequestException, TooManyRequestsException, InternalServerException, AwsServiceException, 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.AwsServiceException
default StartTopicsDetectionJobResponse startTopicsDetectionJob(Consumer<StartTopicsDetectionJobRequest.Builder> startTopicsDetectionJobRequest) throws InvalidRequestException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, ComprehendException
Starts an asynchronous topic detection job. Use the DescribeTopicDetectionJob
operation to track the
status of a job.
This is a convenience which creates an instance of the StartTopicsDetectionJobRequest.Builder
avoiding
the need to create one manually via StartTopicsDetectionJobRequest.builder()
startTopicsDetectionJobRequest
- A Consumer
that will call methods on StartTopicsDetectionJobRequest.Builder
to create a
request.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.AwsServiceException
static ServiceMetadata serviceMetadata()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.