简体   繁体   中英

Can I load data directly from a S3 Bucket for detecting key phrases in the AWS SDK for Java?

I want to perform Key Phrase detection using AWS Comprehend.

Is there any way to load data directly from an S3 URI instead of manually loading data from S3 and passing it to the SDK?

Yes.

For Amazon Comprehend, there are usually 3 ways to do the same action:

  1. Synchronous action for one document eg DetectKeyPhrases
  2. Synchronous action for multiple documents eg BatchDetectKeyPhrases
  3. Asynchronous action for multiple documents eg StartKeyPhrasesDetectionJob

Most, if not all, of the time the synchronous actions take in Text or TextList directly & the asynchronous operations allow you to specific an S3 URI.

For detecting key phrases, this would be the StartKeyPhrasesDetectionJob , which takes in S3Uri for input data as well as output data .

All of these operations are available in the AWS SDK for Java v2 so feel free to refer to the SDK documentation for getting started.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM