|
1 | 1 | /*
|
2 |
| - * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 2 | + * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License").
|
5 | 5 | * You may not use this file except in compliance with the License.
|
@@ -351,7 +351,7 @@ Future<BatchDetectSyntaxResult> batchDetectSyntaxAsync(
|
351 | 351 | * <p>
|
352 | 352 | * For more information about targeted sentiment, see <a href=
|
353 | 353 | * "https://docs.aws.amazon.com/comprehend/latest/dg/how-targeted-sentiment.html"
|
354 |
| - * >Targeted sentiment</a>. |
| 354 | + * >Targeted sentiment</a> in the <i>Amazon Comprehend Developer Guide</i>. |
355 | 355 | * </p>
|
356 | 356 | *
|
357 | 357 | * @param batchDetectTargetedSentimentRequest
|
@@ -383,7 +383,7 @@ Future<BatchDetectTargetedSentimentResult> batchDetectTargetedSentimentAsync(
|
383 | 383 | * <p>
|
384 | 384 | * For more information about targeted sentiment, see <a href=
|
385 | 385 | * "https://docs.aws.amazon.com/comprehend/latest/dg/how-targeted-sentiment.html"
|
386 |
| - * >Targeted sentiment</a>. |
| 386 | + * >Targeted sentiment</a> in the <i>Amazon Comprehend Developer Guide</i>. |
387 | 387 | * </p>
|
388 | 388 | *
|
389 | 389 | * @param batchDetectTargetedSentimentRequest
|
@@ -414,17 +414,37 @@ Future<BatchDetectTargetedSentimentResult> batchDetectTargetedSentimentAsync(
|
414 | 414 |
|
415 | 415 | /**
|
416 | 416 | * <p>
|
417 |
| - * Creates a new document classification request to analyze a single |
418 |
| - * document in real-time, using a previously created and trained custom |
419 |
| - * model and an endpoint. |
| 417 | + * Creates a classification request to analyze a single document in |
| 418 | + * real-time. <code>ClassifyDocument</code> supports the following model |
| 419 | + * types: |
420 | 420 | * </p>
|
| 421 | + * <ul> |
| 422 | + * <li> |
421 | 423 | * <p>
|
422 |
| - * You can input plain text or you can upload a single-page input document |
423 |
| - * (text, PDF, Word, or image). |
| 424 | + * Custom classifier - a custom model that you have created and trained. For |
| 425 | + * input, you can provide plain text, a single-page document (PDF, Word, or |
| 426 | + * image), or Amazon Textract API output. For more information, see <a href= |
| 427 | + * "https://docs.aws.amazon.com/comprehend/latest/dg/how-document-classification.html" |
| 428 | + * >Custom classification</a> in the <i>Amazon Comprehend Developer |
| 429 | + * Guide</i>. |
424 | 430 | * </p>
|
| 431 | + * </li> |
| 432 | + * <li> |
| 433 | + * <p> |
| 434 | + * Prompt safety classifier - Amazon Comprehend provides a pre-trained model |
| 435 | + * for classifying input prompts for generative AI applications. For input, |
| 436 | + * you provide English plain text input. For prompt safety classification, |
| 437 | + * the response includes only the <code>Classes</code> field. For more |
| 438 | + * information about prompt safety classifiers, see <a href= |
| 439 | + * "https://docs.aws.amazon.com/comprehend/latest/dg/trust-safety.html#prompt-classification" |
| 440 | + * >Prompt safety classification</a> in the <i>Amazon Comprehend Developer |
| 441 | + * Guide</i>. |
| 442 | + * </p> |
| 443 | + * </li> |
| 444 | + * </ul> |
425 | 445 | * <p>
|
426 | 446 | * If the system detects errors while processing a page in the input
|
427 |
| - * document, the API response includes an entry in <code>Errors</code> that |
| 447 | + * document, the API response includes an <code>Errors</code> field that |
428 | 448 | * describes the errors.
|
429 | 449 | * </p>
|
430 | 450 | * <p>
|
@@ -458,17 +478,37 @@ Future<ClassifyDocumentResult> classifyDocumentAsync(
|
458 | 478 |
|
459 | 479 | /**
|
460 | 480 | * <p>
|
461 |
| - * Creates a new document classification request to analyze a single |
462 |
| - * document in real-time, using a previously created and trained custom |
463 |
| - * model and an endpoint. |
| 481 | + * Creates a classification request to analyze a single document in |
| 482 | + * real-time. <code>ClassifyDocument</code> supports the following model |
| 483 | + * types: |
| 484 | + * </p> |
| 485 | + * <ul> |
| 486 | + * <li> |
| 487 | + * <p> |
| 488 | + * Custom classifier - a custom model that you have created and trained. For |
| 489 | + * input, you can provide plain text, a single-page document (PDF, Word, or |
| 490 | + * image), or Amazon Textract API output. For more information, see <a href= |
| 491 | + * "https://docs.aws.amazon.com/comprehend/latest/dg/how-document-classification.html" |
| 492 | + * >Custom classification</a> in the <i>Amazon Comprehend Developer |
| 493 | + * Guide</i>. |
464 | 494 | * </p>
|
| 495 | + * </li> |
| 496 | + * <li> |
465 | 497 | * <p>
|
466 |
| - * You can input plain text or you can upload a single-page input document |
467 |
| - * (text, PDF, Word, or image). |
| 498 | + * Prompt safety classifier - Amazon Comprehend provides a pre-trained model |
| 499 | + * for classifying input prompts for generative AI applications. For input, |
| 500 | + * you provide English plain text input. For prompt safety classification, |
| 501 | + * the response includes only the <code>Classes</code> field. For more |
| 502 | + * information about prompt safety classifiers, see <a href= |
| 503 | + * "https://docs.aws.amazon.com/comprehend/latest/dg/trust-safety.html#prompt-classification" |
| 504 | + * >Prompt safety classification</a> in the <i>Amazon Comprehend Developer |
| 505 | + * Guide</i>. |
468 | 506 | * </p>
|
| 507 | + * </li> |
| 508 | + * </ul> |
469 | 509 | * <p>
|
470 | 510 | * If the system detects errors while processing a page in the input
|
471 |
| - * document, the API response includes an entry in <code>Errors</code> that |
| 511 | + * document, the API response includes an <code>Errors</code> field that |
472 | 512 | * describes the errors.
|
473 | 513 | * </p>
|
474 | 514 | * <p>
|
@@ -2600,7 +2640,7 @@ Future<DetectSyntaxResult> detectSyntaxAsync(DetectSyntaxRequest detectSyntaxReq
|
2600 | 2640 | * <p>
|
2601 | 2641 | * For more information about targeted sentiment, see <a href=
|
2602 | 2642 | * "https://docs.aws.amazon.com/comprehend/latest/dg/how-targeted-sentiment.html"
|
2603 |
| - * >Targeted sentiment</a>. |
| 2643 | + * >Targeted sentiment</a> in the <i>Amazon Comprehend Developer Guide</i>. |
2604 | 2644 | * </p>
|
2605 | 2645 | *
|
2606 | 2646 | * @param detectTargetedSentimentRequest
|
@@ -2631,7 +2671,7 @@ Future<DetectTargetedSentimentResult> detectTargetedSentimentAsync(
|
2631 | 2671 | * <p>
|
2632 | 2672 | * For more information about targeted sentiment, see <a href=
|
2633 | 2673 | * "https://docs.aws.amazon.com/comprehend/latest/dg/how-targeted-sentiment.html"
|
2634 |
| - * >Targeted sentiment</a>. |
| 2674 | + * >Targeted sentiment</a> in the <i>Amazon Comprehend Developer Guide</i>. |
2635 | 2675 | * </p>
|
2636 | 2676 | *
|
2637 | 2677 | * @param detectTargetedSentimentRequest
|
@@ -2659,6 +2699,71 @@ Future<DetectTargetedSentimentResult> detectTargetedSentimentAsync(
|
2659 | 2699 | AsyncHandler<DetectTargetedSentimentRequest, DetectTargetedSentimentResult> asyncHandler)
|
2660 | 2700 | throws AmazonServiceException, AmazonClientException;
|
2661 | 2701 |
|
| 2702 | + /** |
| 2703 | + * <p> |
| 2704 | + * Performs toxicity analysis on the list of text strings that you provide |
| 2705 | + * as input. The API response contains a results list that matches the size |
| 2706 | + * of the input list. For more information about toxicity detection, see <a |
| 2707 | + * href= |
| 2708 | + * "https://docs.aws.amazon.com/comprehend/latest/dg/toxicity-detection.html" |
| 2709 | + * >Toxicity detection</a> in the <i>Amazon Comprehend Developer Guide</i>. |
| 2710 | + * </p> |
| 2711 | + * |
| 2712 | + * @param detectToxicContentRequest |
| 2713 | + * @return A Java Future object containing the response from the |
| 2714 | + * DetectToxicContent service method, as returned by Amazon |
| 2715 | + * Comprehend. |
| 2716 | + * @throws InvalidRequestException |
| 2717 | + * @throws TextSizeLimitExceededException |
| 2718 | + * @throws UnsupportedLanguageException |
| 2719 | + * @throws InternalServerException |
| 2720 | + * @throws AmazonClientException If any internal errors are encountered |
| 2721 | + * inside the client while attempting to make the request or |
| 2722 | + * handle the response. For example if a network connection is |
| 2723 | + * not available. |
| 2724 | + * @throws AmazonServiceException If an error response is returned by Amazon |
| 2725 | + * Comprehend indicating either a problem with the data in the |
| 2726 | + * request, or a server side issue. |
| 2727 | + */ |
| 2728 | + Future<DetectToxicContentResult> detectToxicContentAsync( |
| 2729 | + DetectToxicContentRequest detectToxicContentRequest) throws AmazonServiceException, |
| 2730 | + AmazonClientException; |
| 2731 | + |
| 2732 | + /** |
| 2733 | + * <p> |
| 2734 | + * Performs toxicity analysis on the list of text strings that you provide |
| 2735 | + * as input. The API response contains a results list that matches the size |
| 2736 | + * of the input list. For more information about toxicity detection, see <a |
| 2737 | + * href= |
| 2738 | + * "https://docs.aws.amazon.com/comprehend/latest/dg/toxicity-detection.html" |
| 2739 | + * >Toxicity detection</a> in the <i>Amazon Comprehend Developer Guide</i>. |
| 2740 | + * </p> |
| 2741 | + * |
| 2742 | + * @param detectToxicContentRequest |
| 2743 | + * @param asyncHandler Asynchronous callback handler for events in the |
| 2744 | + * life-cycle of the request. Users could provide the |
| 2745 | + * implementation of the four callback methods in this interface |
| 2746 | + * to process the operation result or handle the exception. |
| 2747 | + * @return A Java Future object containing the response from the |
| 2748 | + * DetectToxicContent service method, as returned by Amazon |
| 2749 | + * Comprehend. |
| 2750 | + * @throws InvalidRequestException |
| 2751 | + * @throws TextSizeLimitExceededException |
| 2752 | + * @throws UnsupportedLanguageException |
| 2753 | + * @throws InternalServerException |
| 2754 | + * @throws AmazonClientException If any internal errors are encountered |
| 2755 | + * inside the client while attempting to make the request or |
| 2756 | + * handle the response. For example if a network connection is |
| 2757 | + * not available. |
| 2758 | + * @throws AmazonServiceException If an error response is returned by Amazon |
| 2759 | + * Comprehend indicating either a problem with the data in the |
| 2760 | + * request, or a server side issue. |
| 2761 | + */ |
| 2762 | + Future<DetectToxicContentResult> detectToxicContentAsync( |
| 2763 | + DetectToxicContentRequest detectToxicContentRequest, |
| 2764 | + AsyncHandler<DetectToxicContentRequest, DetectToxicContentResult> asyncHandler) |
| 2765 | + throws AmazonServiceException, AmazonClientException; |
| 2766 | + |
2662 | 2767 | /**
|
2663 | 2768 | * <p>
|
2664 | 2769 | * Creates a new custom model that replicates a source custom model that you
|
@@ -3819,7 +3924,8 @@ Future<PutResourcePolicyResult> putResourcePolicyAsync(
|
3819 | 3924 |
|
3820 | 3925 | /**
|
3821 | 3926 | * <p>
|
3822 |
| - * Starts an asynchronous document classification job. Use the |
| 3927 | + * Starts an asynchronous document classification job using a custom |
| 3928 | + * classification model. Use the |
3823 | 3929 | * <code>DescribeDocumentClassificationJob</code> operation to track the
|
3824 | 3930 | * progress of the job.
|
3825 | 3931 | * </p>
|
@@ -3850,7 +3956,8 @@ Future<StartDocumentClassificationJobResult> startDocumentClassificationJobAsync
|
3850 | 3956 |
|
3851 | 3957 | /**
|
3852 | 3958 | * <p>
|
3853 |
| - * Starts an asynchronous document classification job. Use the |
| 3959 | + * Starts an asynchronous document classification job using a custom |
| 3960 | + * classification model. Use the |
3854 | 3961 | * <code>DescribeDocumentClassificationJob</code> operation to track the
|
3855 | 3962 | * progress of the job.
|
3856 | 3963 | * </p>
|
|
0 commit comments