@Generated(value="software.amazon.awssdk:codegen") public interface ComprehendAsyncClient 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 CompletableFuture<BatchDetectDominantLanguageResponse> |
batchDetectDominantLanguage(BatchDetectDominantLanguageRequest batchDetectDominantLanguageRequest)
Determines the dominant language of the input text for a batch of documents.
|
default CompletableFuture<BatchDetectDominantLanguageResponse> |
batchDetectDominantLanguage(Consumer<BatchDetectDominantLanguageRequest.Builder> batchDetectDominantLanguageRequest)
Determines the dominant language of the input text for a batch of documents.
|
default CompletableFuture<BatchDetectEntitiesResponse> |
batchDetectEntities(BatchDetectEntitiesRequest batchDetectEntitiesRequest)
Inspects the text of a batch of documents and returns information about them.
|
default CompletableFuture<BatchDetectEntitiesResponse> |
batchDetectEntities(Consumer<BatchDetectEntitiesRequest.Builder> batchDetectEntitiesRequest)
Inspects the text of a batch of documents and returns information about them.
|
default CompletableFuture<BatchDetectKeyPhrasesResponse> |
batchDetectKeyPhrases(BatchDetectKeyPhrasesRequest batchDetectKeyPhrasesRequest)
Detects the key noun phrases found in a batch of documents.
|
default CompletableFuture<BatchDetectKeyPhrasesResponse> |
batchDetectKeyPhrases(Consumer<BatchDetectKeyPhrasesRequest.Builder> batchDetectKeyPhrasesRequest)
Detects the key noun phrases found in a batch of documents.
|
default CompletableFuture<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 CompletableFuture<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 ComprehendAsyncClientBuilder |
builder()
Create a builder that can be used to configure and create a
ComprehendAsyncClient . |
static ComprehendAsyncClient |
create()
Create a
ComprehendAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider . |
default CompletableFuture<DescribeTopicsDetectionJobResponse> |
describeTopicsDetectionJob(Consumer<DescribeTopicsDetectionJobRequest.Builder> describeTopicsDetectionJobRequest)
Gets the properties associated with a topic detection job.
|
default CompletableFuture<DescribeTopicsDetectionJobResponse> |
describeTopicsDetectionJob(DescribeTopicsDetectionJobRequest describeTopicsDetectionJobRequest)
Gets the properties associated with a topic detection job.
|
default CompletableFuture<DetectDominantLanguageResponse> |
detectDominantLanguage(Consumer<DetectDominantLanguageRequest.Builder> detectDominantLanguageRequest)
Determines the dominant language of the input text.
|
default CompletableFuture<DetectDominantLanguageResponse> |
detectDominantLanguage(DetectDominantLanguageRequest detectDominantLanguageRequest)
Determines the dominant language of the input text.
|
default CompletableFuture<DetectEntitiesResponse> |
detectEntities(Consumer<DetectEntitiesRequest.Builder> detectEntitiesRequest)
Inspects text for entities, and returns information about them.
|
default CompletableFuture<DetectEntitiesResponse> |
detectEntities(DetectEntitiesRequest detectEntitiesRequest)
Inspects text for entities, and returns information about them.
|
default CompletableFuture<DetectKeyPhrasesResponse> |
detectKeyPhrases(Consumer<DetectKeyPhrasesRequest.Builder> detectKeyPhrasesRequest)
Detects the key noun phrases found in the text.
|
default CompletableFuture<DetectKeyPhrasesResponse> |
detectKeyPhrases(DetectKeyPhrasesRequest detectKeyPhrasesRequest)
Detects the key noun phrases found in the text.
|
default CompletableFuture<DetectSentimentResponse> |
detectSentiment(Consumer<DetectSentimentRequest.Builder> detectSentimentRequest)
Inspects text and returns an inference of the prevailing sentiment (
POSITIVE , NEUTRAL ,
MIXED , or NEGATIVE ). |
default CompletableFuture<DetectSentimentResponse> |
detectSentiment(DetectSentimentRequest detectSentimentRequest)
Inspects text and returns an inference of the prevailing sentiment (
POSITIVE , NEUTRAL ,
MIXED , or NEGATIVE ). |
default CompletableFuture<ListTopicsDetectionJobsResponse> |
listTopicsDetectionJobs()
Gets a list of the topic detection jobs that you have submitted.
|
default CompletableFuture<ListTopicsDetectionJobsResponse> |
listTopicsDetectionJobs(Consumer<ListTopicsDetectionJobsRequest.Builder> listTopicsDetectionJobsRequest)
Gets a list of the topic detection jobs that you have submitted.
|
default CompletableFuture<ListTopicsDetectionJobsResponse> |
listTopicsDetectionJobs(ListTopicsDetectionJobsRequest listTopicsDetectionJobsRequest)
Gets a list of the topic detection jobs that you have submitted.
|
default ListTopicsDetectionJobsPublisher |
listTopicsDetectionJobsPaginator()
Gets a list of the topic detection jobs that you have submitted.
|
default ListTopicsDetectionJobsPublisher |
listTopicsDetectionJobsPaginator(ListTopicsDetectionJobsRequest listTopicsDetectionJobsRequest)
Gets a list of the topic detection jobs that you have submitted.
|
default CompletableFuture<StartTopicsDetectionJobResponse> |
startTopicsDetectionJob(Consumer<StartTopicsDetectionJobRequest.Builder> startTopicsDetectionJobRequest)
Starts an asynchronous topic detection job.
|
default CompletableFuture<StartTopicsDetectionJobResponse> |
startTopicsDetectionJob(StartTopicsDetectionJobRequest startTopicsDetectionJobRequest)
Starts an asynchronous topic detection job.
|
serviceName
close
static final String SERVICE_NAME
static ComprehendAsyncClient create()
ComprehendAsyncClient
with the region loaded from the
DefaultAwsRegionProviderChain
and credentials loaded from the
DefaultCredentialsProvider
.static ComprehendAsyncClientBuilder builder()
ComprehendAsyncClient
.default CompletableFuture<BatchDetectDominantLanguageResponse> batchDetectDominantLanguage(BatchDetectDominantLanguageRequest batchDetectDominantLanguageRequest)
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
- default CompletableFuture<BatchDetectDominantLanguageResponse> batchDetectDominantLanguage(Consumer<BatchDetectDominantLanguageRequest.Builder> batchDetectDominantLanguageRequest)
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.default CompletableFuture<BatchDetectEntitiesResponse> batchDetectEntities(BatchDetectEntitiesRequest batchDetectEntitiesRequest)
Inspects the text of a batch of documents and returns information about them. For more information about entities, see how-entities
batchDetectEntitiesRequest
- 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-languagesdefault CompletableFuture<BatchDetectEntitiesResponse> batchDetectEntities(Consumer<BatchDetectEntitiesRequest.Builder> batchDetectEntitiesRequest)
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.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-languagesdefault CompletableFuture<BatchDetectKeyPhrasesResponse> batchDetectKeyPhrases(BatchDetectKeyPhrasesRequest batchDetectKeyPhrasesRequest)
Detects the key noun phrases found in a batch of documents.
batchDetectKeyPhrasesRequest
- 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-languagesdefault CompletableFuture<BatchDetectKeyPhrasesResponse> batchDetectKeyPhrases(Consumer<BatchDetectKeyPhrasesRequest.Builder> batchDetectKeyPhrasesRequest)
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.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-languagesdefault CompletableFuture<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.
batchDetectSentimentRequest
- 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-languagesdefault CompletableFuture<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.
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.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-languagesdefault CompletableFuture<DescribeTopicsDetectionJobResponse> describeTopicsDetectionJob(DescribeTopicsDetectionJobRequest describeTopicsDetectionJobRequest)
Gets the properties associated with a topic detection job. Use this operation to get the status of a detection job.
describeTopicsDetectionJobRequest
- default CompletableFuture<DescribeTopicsDetectionJobResponse> describeTopicsDetectionJob(Consumer<DescribeTopicsDetectionJobRequest.Builder> describeTopicsDetectionJobRequest)
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.default CompletableFuture<DetectDominantLanguageResponse> detectDominantLanguage(DetectDominantLanguageRequest detectDominantLanguageRequest)
Determines the dominant language of the input text. For a list of languages that Amazon Comprehend can detect, see Amazon Comprehend Supported Languages.
detectDominantLanguageRequest
- default CompletableFuture<DetectDominantLanguageResponse> detectDominantLanguage(Consumer<DetectDominantLanguageRequest.Builder> detectDominantLanguageRequest)
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.default CompletableFuture<DetectEntitiesResponse> detectEntities(DetectEntitiesRequest detectEntitiesRequest)
Inspects text for entities, and returns information about them. For more information, about entities, see how-entities.
detectEntitiesRequest
- 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-languagesdefault CompletableFuture<DetectEntitiesResponse> detectEntities(Consumer<DetectEntitiesRequest.Builder> detectEntitiesRequest)
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.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-languagesdefault CompletableFuture<DetectKeyPhrasesResponse> detectKeyPhrases(DetectKeyPhrasesRequest detectKeyPhrasesRequest)
Detects the key noun phrases found in the text.
detectKeyPhrasesRequest
- 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-languagesdefault CompletableFuture<DetectKeyPhrasesResponse> detectKeyPhrases(Consumer<DetectKeyPhrasesRequest.Builder> detectKeyPhrasesRequest)
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.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-languagesdefault CompletableFuture<DetectSentimentResponse> detectSentiment(DetectSentimentRequest detectSentimentRequest)
Inspects text and returns an inference of the prevailing sentiment (POSITIVE
, NEUTRAL
,
MIXED
, or NEGATIVE
).
detectSentimentRequest
- 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-languagesdefault CompletableFuture<DetectSentimentResponse> detectSentiment(Consumer<DetectSentimentRequest.Builder> detectSentimentRequest)
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.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-languagesdefault CompletableFuture<ListTopicsDetectionJobsResponse> listTopicsDetectionJobs(ListTopicsDetectionJobsRequest listTopicsDetectionJobsRequest)
Gets a list of the topic detection jobs that you have submitted.
listTopicsDetectionJobsRequest
- ListTopicDetectionJobs
operation is
invalid. Specify a different filter.default CompletableFuture<ListTopicsDetectionJobsResponse> listTopicsDetectionJobs(Consumer<ListTopicsDetectionJobsRequest.Builder> listTopicsDetectionJobsRequest)
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.ListTopicDetectionJobs
operation is
invalid. Specify a different filter.default CompletableFuture<ListTopicsDetectionJobsResponse> listTopicsDetectionJobs()
Gets a list of the topic detection jobs that you have submitted.
ListTopicDetectionJobs
operation is
invalid. Specify a different filter.default ListTopicsDetectionJobsPublisher listTopicsDetectionJobsPaginator(ListTopicsDetectionJobsRequest listTopicsDetectionJobsRequest)
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 publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the forEach helper method
software.amazon.awssdk.services.comprehend.paginators.ListTopicsDetectionJobsPublisher publisher = client.listTopicsDetectionJobsPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.comprehend.paginators.ListTopicsDetectionJobsPublisher publisher = client.listTopicsDetectionJobsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.comprehend.model.ListTopicsDetectionJobsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.comprehend.model.ListTopicsDetectionJobsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
listTopicsDetectionJobs(software.amazon.awssdk.services.comprehend.model.ListTopicsDetectionJobsRequest)
operation.
listTopicsDetectionJobsRequest
- ListTopicDetectionJobs
operation is
invalid. Specify a different filter.default ListTopicsDetectionJobsPublisher listTopicsDetectionJobsPaginator()
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 publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the forEach helper method
software.amazon.awssdk.services.comprehend.paginators.ListTopicsDetectionJobsPublisher publisher = client.listTopicsDetectionJobsPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.comprehend.paginators.ListTopicsDetectionJobsPublisher publisher = client.listTopicsDetectionJobsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.comprehend.model.ListTopicsDetectionJobsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.comprehend.model.ListTopicsDetectionJobsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
listTopicsDetectionJobs(software.amazon.awssdk.services.comprehend.model.ListTopicsDetectionJobsRequest)
operation.
ListTopicDetectionJobs
operation is
invalid. Specify a different filter.default CompletableFuture<StartTopicsDetectionJobResponse> startTopicsDetectionJob(StartTopicsDetectionJobRequest startTopicsDetectionJobRequest)
Starts an asynchronous topic detection job. Use the DescribeTopicDetectionJob
operation to track the
status of a job.
startTopicsDetectionJobRequest
- default CompletableFuture<StartTopicsDetectionJobResponse> startTopicsDetectionJob(Consumer<StartTopicsDetectionJobRequest.Builder> startTopicsDetectionJobRequest)
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.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.