aws-sdk-comprehend 1.77.0 → 1.78.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-comprehend/client.rb +36 -32
- data/lib/aws-sdk-comprehend/types.rb +56 -56
- data/lib/aws-sdk-comprehend.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa1350cfff0496cdba43da5b91bab9e8a5e0d5c5810811a70a7f34cafa679580
|
4
|
+
data.tar.gz: 7eebc85711802fa50f041ea2ed59c63e1fcf97feecbfafbdfd466c5f45506446
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26abd84ab8638cbcdea055b17c4306d6386c59229f991e41878294030ff62b4b7c9bcc040694529249f1caa991efb05d6147b737c24f593bf3b21d1ef3897984
|
7
|
+
data.tar.gz: 0cbbcd278db0493ec6b8ade065e68585ebee4ac990c6c52038d4c040cc23eaf7cd6019b32560c07acd245ce8f378c3fcd6031f57136f0ce43abd3cbcd53aafc6
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.78.0
|
@@ -728,19 +728,20 @@ module Aws::Comprehend
|
|
728
728
|
#
|
729
729
|
# * Custom classifier - a custom model that you have created and
|
730
730
|
# trained. For input, you can provide plain text, a single-page
|
731
|
-
# document (PDF, Word, or image), or Textract API output. For
|
732
|
-
# information, see [Custom classification][1] in the *Amazon
|
731
|
+
# document (PDF, Word, or image), or Amazon Textract API output. For
|
732
|
+
# more information, see [Custom classification][1] in the *Amazon
|
733
733
|
# Comprehend Developer Guide*.
|
734
734
|
#
|
735
|
-
# * Prompt classifier - Amazon Comprehend provides a
|
736
|
-
#
|
737
|
-
# input
|
738
|
-
# `Classes` field. For
|
739
|
-
#
|
735
|
+
# * Prompt safety classifier - Amazon Comprehend provides a pre-trained
|
736
|
+
# model for classifying input prompts for generative AI applications.
|
737
|
+
# For input, you provide English plain text input. For prompt safety
|
738
|
+
# classification, the response includes only the `Classes` field. For
|
739
|
+
# more information about prompt safety classifiers, see [Prompt safety
|
740
|
+
# classification][2] in the *Amazon Comprehend Developer Guide*.
|
740
741
|
#
|
741
742
|
# If the system detects errors while processing a page in the input
|
742
|
-
# document, the API response includes an
|
743
|
-
#
|
743
|
+
# document, the API response includes an `Errors` field that describes
|
744
|
+
# the errors.
|
744
745
|
#
|
745
746
|
# If the system detects a document-level error in your input document,
|
746
747
|
# the API returns an `InvalidRequestException` error response. For
|
@@ -750,7 +751,7 @@ module Aws::Comprehend
|
|
750
751
|
#
|
751
752
|
#
|
752
753
|
# [1]: https://docs.aws.amazon.com/comprehend/latest/dg/how-document-classification.html
|
753
|
-
# [2]: https://docs.aws.amazon.com/comprehend/latest/dg/prompt-classification
|
754
|
+
# [2]: https://docs.aws.amazon.com/comprehend/latest/dg/trust-safety.html#prompt-classification
|
754
755
|
# [3]: https://docs.aws.amazon.com/comprehend/latest/dg/idp-inputs-sync-err.html
|
755
756
|
#
|
756
757
|
# @option params [String] :text
|
@@ -760,16 +761,19 @@ module Aws::Comprehend
|
|
760
761
|
# @option params [required, String] :endpoint_arn
|
761
762
|
# The Amazon Resource Number (ARN) of the endpoint.
|
762
763
|
#
|
763
|
-
# For prompt classification, Amazon Comprehend provides the
|
764
|
-
# ARN
|
764
|
+
# For prompt safety classification, Amazon Comprehend provides the
|
765
|
+
# endpoint ARN. For more information about prompt safety classifiers,
|
766
|
+
# see [Prompt safety classification][1] in the *Amazon Comprehend
|
767
|
+
# Developer Guide*
|
765
768
|
#
|
766
769
|
# For custom classification, you create an endpoint for your custom
|
767
770
|
# model. For more information, see [Using Amazon Comprehend
|
768
|
-
# endpoints][
|
771
|
+
# endpoints][2].
|
769
772
|
#
|
770
773
|
#
|
771
774
|
#
|
772
|
-
# [1]: https://docs.aws.amazon.com/comprehend/latest/dg/
|
775
|
+
# [1]: https://docs.aws.amazon.com/comprehend/latest/dg/trust-safety.html#prompt-classification
|
776
|
+
# [2]: https://docs.aws.amazon.com/comprehend/latest/dg/using-endpoints.html
|
773
777
|
#
|
774
778
|
# @option params [String, StringIO, File] :bytes
|
775
779
|
# Use the `Bytes` parameter to input a text, PDF, Word or image file.
|
@@ -778,8 +782,8 @@ module Aws::Comprehend
|
|
778
782
|
# the `Bytes` parameter to input an Amazon Textract `DetectDocumentText`
|
779
783
|
# or `AnalyzeDocument` output file.
|
780
784
|
#
|
781
|
-
# To classify a document using the prompt classifier, use the
|
782
|
-
# parameter for input.
|
785
|
+
# To classify a document using the prompt safety classifier, use the
|
786
|
+
# `Text` parameter for input.
|
783
787
|
#
|
784
788
|
# Provide the input document as a sequence of base64-encoded bytes. If
|
785
789
|
# your code uses an Amazon Web Services SDK to classify documents, the
|
@@ -1063,11 +1067,12 @@ module Aws::Comprehend
|
|
1063
1067
|
#
|
1064
1068
|
# @option params [String] :mode
|
1065
1069
|
# Indicates the mode in which the classifier will be trained. The
|
1066
|
-
# classifier can be trained in multi-class mode
|
1067
|
-
#
|
1068
|
-
#
|
1069
|
-
#
|
1070
|
-
# delimiter. The default delimiter between labels is a
|
1070
|
+
# classifier can be trained in multi-class (single-label) mode or
|
1071
|
+
# multi-label mode. Multi-class mode identifies a single class label for
|
1072
|
+
# each document and multi-label mode identifies one or more class labels
|
1073
|
+
# for each document. Multiple labels for an individual document are
|
1074
|
+
# separated by a delimiter. The default delimiter between labels is a
|
1075
|
+
# pipe (\|).
|
1071
1076
|
#
|
1072
1077
|
# @option params [String] :model_kms_key_id
|
1073
1078
|
# ID for the KMS key that Amazon Comprehend uses to encrypt trained
|
@@ -2950,19 +2955,18 @@ module Aws::Comprehend
|
|
2950
2955
|
end
|
2951
2956
|
|
2952
2957
|
# Performs toxicity analysis on the list of text strings that you
|
2953
|
-
# provide as input. The
|
2954
|
-
#
|
2955
|
-
#
|
2956
|
-
#
|
2957
|
-
# in the *Amazon Comprehend Developer Guide*
|
2958
|
+
# provide as input. The API response contains a results list that
|
2959
|
+
# matches the size of the input list. For more information about
|
2960
|
+
# toxicity detection, see [Toxicity detection][1] in the *Amazon
|
2961
|
+
# Comprehend Developer Guide*.
|
2958
2962
|
#
|
2959
2963
|
#
|
2960
2964
|
#
|
2961
2965
|
# [1]: https://docs.aws.amazon.com/comprehend/latest/dg/toxicity-detection.html
|
2962
2966
|
#
|
2963
2967
|
# @option params [required, Array<Types::TextSegment>] :text_segments
|
2964
|
-
# A list of up to 10 text strings.
|
2965
|
-
# KB.
|
2968
|
+
# A list of up to 10 text strings. Each string has a maximum size of 1
|
2969
|
+
# KB, and the maximum size of the list is 10 KB.
|
2966
2970
|
#
|
2967
2971
|
# @option params [required, String] :language_code
|
2968
2972
|
# The language of the input text. Currently, English is the only
|
@@ -4340,9 +4344,9 @@ module Aws::Comprehend
|
|
4340
4344
|
req.send_request(options)
|
4341
4345
|
end
|
4342
4346
|
|
4343
|
-
# Starts an asynchronous document classification job
|
4344
|
-
#
|
4345
|
-
# the job.
|
4347
|
+
# Starts an asynchronous document classification job using a custom
|
4348
|
+
# classification model. Use the `DescribeDocumentClassificationJob`
|
4349
|
+
# operation to track the progress of the job.
|
4346
4350
|
#
|
4347
4351
|
# @option params [String] :job_name
|
4348
4352
|
# The identifier of the job.
|
@@ -5909,7 +5913,7 @@ module Aws::Comprehend
|
|
5909
5913
|
params: params,
|
5910
5914
|
config: config)
|
5911
5915
|
context[:gem_name] = 'aws-sdk-comprehend'
|
5912
|
-
context[:gem_version] = '1.
|
5916
|
+
context[:gem_version] = '1.78.0'
|
5913
5917
|
Seahorse::Client::Request.new(handlers, context)
|
5914
5918
|
end
|
5915
5919
|
|
@@ -780,16 +780,19 @@ module Aws::Comprehend
|
|
780
780
|
# @!attribute [rw] endpoint_arn
|
781
781
|
# The Amazon Resource Number (ARN) of the endpoint.
|
782
782
|
#
|
783
|
-
# For prompt classification, Amazon Comprehend provides the
|
784
|
-
# ARN
|
783
|
+
# For prompt safety classification, Amazon Comprehend provides the
|
784
|
+
# endpoint ARN. For more information about prompt safety classifiers,
|
785
|
+
# see [Prompt safety classification][1] in the *Amazon Comprehend
|
786
|
+
# Developer Guide*
|
785
787
|
#
|
786
788
|
# For custom classification, you create an endpoint for your custom
|
787
789
|
# model. For more information, see [Using Amazon Comprehend
|
788
|
-
# endpoints][
|
790
|
+
# endpoints][2].
|
789
791
|
#
|
790
792
|
#
|
791
793
|
#
|
792
|
-
# [1]: https://docs.aws.amazon.com/comprehend/latest/dg/
|
794
|
+
# [1]: https://docs.aws.amazon.com/comprehend/latest/dg/trust-safety.html#prompt-classification
|
795
|
+
# [2]: https://docs.aws.amazon.com/comprehend/latest/dg/using-endpoints.html
|
793
796
|
# @return [String]
|
794
797
|
#
|
795
798
|
# @!attribute [rw] bytes
|
@@ -799,8 +802,8 @@ module Aws::Comprehend
|
|
799
802
|
# the `Bytes` parameter to input an Amazon Textract
|
800
803
|
# `DetectDocumentText` or `AnalyzeDocument` output file.
|
801
804
|
#
|
802
|
-
# To classify a document using the prompt classifier, use the
|
803
|
-
# parameter for input.
|
805
|
+
# To classify a document using the prompt safety classifier, use the
|
806
|
+
# `Text` parameter for input.
|
804
807
|
#
|
805
808
|
# Provide the input document as a sequence of base64-encoded bytes. If
|
806
809
|
# your code uses an Amazon Web Services SDK to classify documents, the
|
@@ -835,19 +838,19 @@ module Aws::Comprehend
|
|
835
838
|
|
836
839
|
# @!attribute [rw] classes
|
837
840
|
# The classes used by the document being analyzed. These are used for
|
838
|
-
# multi-class
|
841
|
+
# models trained in multi-class mode. Individual classes are mutually
|
839
842
|
# exclusive and each document is expected to have only a single class
|
840
843
|
# assigned to it. For example, an animal can be a dog or a cat, but
|
841
844
|
# not both at the same time.
|
842
845
|
#
|
843
|
-
# For prompt classification, the response includes
|
844
|
-
# (
|
845
|
-
#
|
846
|
-
#
|
846
|
+
# For prompt safety classification, the response includes only two
|
847
|
+
# classes (SAFE\_PROMPT and UNSAFE\_PROMPT), along with a confidence
|
848
|
+
# score for each class. The value range of the score is zero to one,
|
849
|
+
# where one is the highest confidence.
|
847
850
|
# @return [Array<Types::DocumentClass>]
|
848
851
|
#
|
849
852
|
# @!attribute [rw] labels
|
850
|
-
# The labels used the document being analyzed. These are used for
|
853
|
+
# The labels used in the document being analyzed. These are used for
|
851
854
|
# multi-label trained models. Individual labels represent different
|
852
855
|
# categories that are related in some manner and are not mutually
|
853
856
|
# exclusive. For example, a movie can be just an action movie, or it
|
@@ -1074,11 +1077,12 @@ module Aws::Comprehend
|
|
1074
1077
|
#
|
1075
1078
|
# @!attribute [rw] mode
|
1076
1079
|
# Indicates the mode in which the classifier will be trained. The
|
1077
|
-
# classifier can be trained in multi-class mode
|
1078
|
-
#
|
1079
|
-
#
|
1080
|
-
#
|
1081
|
-
# delimiter. The default delimiter between labels
|
1080
|
+
# classifier can be trained in multi-class (single-label) mode or
|
1081
|
+
# multi-label mode. Multi-class mode identifies a single class label
|
1082
|
+
# for each document and multi-label mode identifies one or more class
|
1083
|
+
# labels for each document. Multiple labels for an individual document
|
1084
|
+
# are separated by a delimiter. The default delimiter between labels
|
1085
|
+
# is a pipe (\|).
|
1082
1086
|
# @return [String]
|
1083
1087
|
#
|
1084
1088
|
# @!attribute [rw] model_kms_key_id
|
@@ -2669,8 +2673,8 @@ module Aws::Comprehend
|
|
2669
2673
|
end
|
2670
2674
|
|
2671
2675
|
# @!attribute [rw] text_segments
|
2672
|
-
# A list of up to 10 text strings.
|
2673
|
-
# KB.
|
2676
|
+
# A list of up to 10 text strings. Each string has a maximum size of 1
|
2677
|
+
# KB, and the maximum size of the list is 10 KB.
|
2674
2678
|
# @return [Array<Types::TextSegment>]
|
2675
2679
|
#
|
2676
2680
|
# @!attribute [rw] language_code
|
@@ -3411,10 +3415,10 @@ module Aws::Comprehend
|
|
3411
3415
|
# chose `TEXTRACT_ANALYZE_DOCUMENT` as the read action, you must
|
3412
3416
|
# specify one or both of the following values:
|
3413
3417
|
#
|
3414
|
-
# * `TABLES` - Returns information about any tables that
|
3415
|
-
# in the input document.
|
3418
|
+
# * `TABLES` - Returns additional information about any tables that
|
3419
|
+
# are detected in the input document.
|
3416
3420
|
#
|
3417
|
-
# * `FORMS` - Returns information
|
3421
|
+
# * `FORMS` - Returns additional information about any forms that are
|
3418
3422
|
# detected in the input document.
|
3419
3423
|
# @return [Array<String>]
|
3420
3424
|
#
|
@@ -4470,8 +4474,8 @@ module Aws::Comprehend
|
|
4470
4474
|
#
|
4471
4475
|
# Entity types must not contain the following invalid characters: \\n
|
4472
4476
|
# (line break), \\\\n (escaped line break, \\r (carriage return),
|
4473
|
-
# \\\\r (escaped carriage return), \\t (tab), \\\\t (escaped tab),
|
4474
|
-
#
|
4477
|
+
# \\\\r (escaped carriage return), \\t (tab), \\\\t (escaped tab), and
|
4478
|
+
# , (comma).
|
4475
4479
|
# @return [String]
|
4476
4480
|
#
|
4477
4481
|
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/EntityTypesListItem AWS API Documentation
|
@@ -5094,23 +5098,32 @@ module Aws::Comprehend
|
|
5094
5098
|
include Aws::Structure
|
5095
5099
|
end
|
5096
5100
|
|
5097
|
-
# Provides additional detail about why the request failed
|
5101
|
+
# Provides additional detail about why the request failed.
|
5098
5102
|
#
|
5099
|
-
#
|
5100
|
-
#
|
5103
|
+
# @!attribute [rw] reason
|
5104
|
+
# Reason codes include the following values:
|
5101
5105
|
#
|
5102
|
-
#
|
5103
|
-
#
|
5106
|
+
# * DOCUMENT\_SIZE\_EXCEEDED - Document size is too large. Check the
|
5107
|
+
# size of your file and resubmit the request.
|
5104
5108
|
#
|
5105
|
-
#
|
5106
|
-
#
|
5109
|
+
# * UNSUPPORTED\_DOC\_TYPE - Document type is not supported. Check the
|
5110
|
+
# file type and resubmit the request.
|
5107
5111
|
#
|
5108
|
-
#
|
5109
|
-
#
|
5110
|
-
# request.
|
5112
|
+
# * PAGE\_LIMIT\_EXCEEDED - Too many pages in the document. Check the
|
5113
|
+
# number of pages in your file and resubmit the request.
|
5111
5114
|
#
|
5112
|
-
#
|
5113
|
-
#
|
5115
|
+
# * TEXTRACT\_ACCESS\_DENIED - Access denied to Amazon Textract.
|
5116
|
+
# Verify that your account has permission to use Amazon Textract API
|
5117
|
+
# operations and resubmit the request.
|
5118
|
+
#
|
5119
|
+
# * NOT\_TEXTRACT\_JSON - Document is not Amazon Textract JSON format.
|
5120
|
+
# Verify the format and resubmit the request.
|
5121
|
+
#
|
5122
|
+
# * MISMATCHED\_TOTAL\_PAGE\_COUNT - Check the number of pages in your
|
5123
|
+
# file and resubmit the request.
|
5124
|
+
#
|
5125
|
+
# * INVALID\_DOCUMENT - Invalid document. Check the file and resubmit
|
5126
|
+
# the request.
|
5114
5127
|
# @return [String]
|
5115
5128
|
#
|
5116
5129
|
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/InvalidRequestDetail AWS API Documentation
|
@@ -5130,20 +5143,7 @@ module Aws::Comprehend
|
|
5130
5143
|
# @return [String]
|
5131
5144
|
#
|
5132
5145
|
# @!attribute [rw] detail
|
5133
|
-
# Provides additional detail about why the request failed
|
5134
|
-
#
|
5135
|
-
# * Document size is too large - Check the size of your file and
|
5136
|
-
# resubmit the request.
|
5137
|
-
#
|
5138
|
-
# * Document type is not supported - Check the file type and resubmit
|
5139
|
-
# the request.
|
5140
|
-
#
|
5141
|
-
# * Too many pages in the document - Check the number of pages in your
|
5142
|
-
# file and resubmit the request.
|
5143
|
-
#
|
5144
|
-
# * Access denied to Amazon Textract - Verify that your account has
|
5145
|
-
# permission to use Amazon Textract API operations and resubmit the
|
5146
|
-
# request.
|
5146
|
+
# Provides additional detail about why the request failed.
|
5147
5147
|
# @return [Types::InvalidRequestDetail]
|
5148
5148
|
#
|
5149
5149
|
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/InvalidRequestException AWS API Documentation
|
@@ -8694,7 +8694,7 @@ module Aws::Comprehend
|
|
8694
8694
|
|
8695
8695
|
# Toxicity analysis result for one string. For more information about
|
8696
8696
|
# toxicity detection, see [Toxicity detection][1] in the *Amazon
|
8697
|
-
# Comprehend Developer Guide
|
8697
|
+
# Comprehend Developer Guide*.
|
8698
8698
|
#
|
8699
8699
|
#
|
8700
8700
|
#
|
@@ -8705,7 +8705,8 @@ module Aws::Comprehend
|
|
8705
8705
|
# @return [Array<Types::ToxicContent>]
|
8706
8706
|
#
|
8707
8707
|
# @!attribute [rw] toxicity
|
8708
|
-
# Overall toxicity score for the string.
|
8708
|
+
# Overall toxicity score for the string. Value range is zero to one,
|
8709
|
+
# where one is the highest confidence.
|
8709
8710
|
# @return [Float]
|
8710
8711
|
#
|
8711
8712
|
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ToxicLabels AWS API Documentation
|
@@ -8717,10 +8718,9 @@ module Aws::Comprehend
|
|
8717
8718
|
include Aws::Structure
|
8718
8719
|
end
|
8719
8720
|
|
8720
|
-
# Amazon Comprehend can't process the language of the input text. For
|
8721
|
-
#
|
8722
|
-
#
|
8723
|
-
# languages, [Supported languages][1] in the Comprehend Developer Guide.
|
8721
|
+
# Amazon Comprehend can't process the language of the input text. For a
|
8722
|
+
# list of supported languages, [Supported languages][1] in the
|
8723
|
+
# Comprehend Developer Guide.
|
8724
8724
|
#
|
8725
8725
|
#
|
8726
8726
|
#
|
data/lib/aws-sdk-comprehend.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-comprehend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.78.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|