aws-sdk-comprehend 1.28.0 → 1.33.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/aws-sdk-comprehend.rb +7 -4
- data/lib/aws-sdk-comprehend/client.rb +112 -14
- data/lib/aws-sdk-comprehend/client_api.rb +18 -0
- data/lib/aws-sdk-comprehend/errors.rb +38 -16
- data/lib/aws-sdk-comprehend/resource.rb +1 -0
- data/lib/aws-sdk-comprehend/types.rb +104 -5
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ef829d94c34033ffcaffbabf3ba72e090c35f9e268271291e6365aa9ad643fc3
|
4
|
+
data.tar.gz: 03254c4bde64c0377d1cb24e8ac72873897be588748f4abde608063878396bcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e471f6b8b904748b6307fd822b1b86862c6eb4fcf00262d1aeb711e11695319aeb0776d37fd3e24536735ab43eb8b15e9ba15437aec121595fa2f5b5111ed1b2
|
7
|
+
data.tar.gz: 6c0ec55a782b518b0760b573e5d0dbe71d4795e558f37ec1d33845edf6d08510f5f56853515ded0308e4a121f0aa1f25ab3658159f52359544de865374cf2385
|
data/lib/aws-sdk-comprehend.rb
CHANGED
@@ -24,17 +24,20 @@ require_relative 'aws-sdk-comprehend/customizations'
|
|
24
24
|
# methods each accept a hash of request parameters and return a response
|
25
25
|
# structure.
|
26
26
|
#
|
27
|
+
# comprehend = Aws::Comprehend::Client.new
|
28
|
+
# resp = comprehend.batch_detect_dominant_language(params)
|
29
|
+
#
|
27
30
|
# See {Client} for more information.
|
28
31
|
#
|
29
32
|
# # Errors
|
30
33
|
#
|
31
|
-
# Errors returned from Amazon Comprehend
|
32
|
-
# extend {Errors::ServiceError}.
|
34
|
+
# Errors returned from Amazon Comprehend are defined in the
|
35
|
+
# {Errors} module and all extend {Errors::ServiceError}.
|
33
36
|
#
|
34
37
|
# begin
|
35
38
|
# # do stuff
|
36
39
|
# rescue Aws::Comprehend::Errors::ServiceError
|
37
|
-
# # rescues all
|
40
|
+
# # rescues all Amazon Comprehend API errors
|
38
41
|
# end
|
39
42
|
#
|
40
43
|
# See {Errors} for more information.
|
@@ -42,6 +45,6 @@ require_relative 'aws-sdk-comprehend/customizations'
|
|
42
45
|
# @service
|
43
46
|
module Aws::Comprehend
|
44
47
|
|
45
|
-
GEM_VERSION = '1.
|
48
|
+
GEM_VERSION = '1.33.1'
|
46
49
|
|
47
50
|
end
|
@@ -24,12 +24,25 @@ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
|
24
24
|
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
25
25
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
26
26
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
27
|
+
require 'aws-sdk-core/plugins/http_checksum.rb'
|
27
28
|
require 'aws-sdk-core/plugins/signature_v4.rb'
|
28
29
|
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
29
30
|
|
30
31
|
Aws::Plugins::GlobalConfiguration.add_identifier(:comprehend)
|
31
32
|
|
32
33
|
module Aws::Comprehend
|
34
|
+
# An API client for Comprehend. To construct a client, you need to configure a `:region` and `:credentials`.
|
35
|
+
#
|
36
|
+
# client = Aws::Comprehend::Client.new(
|
37
|
+
# region: region_name,
|
38
|
+
# credentials: credentials,
|
39
|
+
# # ...
|
40
|
+
# )
|
41
|
+
#
|
42
|
+
# For details on configuring region and credentials see
|
43
|
+
# the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
|
44
|
+
#
|
45
|
+
# See {#initialize} for a full list of supported configuration options.
|
33
46
|
class Client < Seahorse::Client::Base
|
34
47
|
|
35
48
|
include Aws::ClientStubs
|
@@ -57,6 +70,7 @@ module Aws::Comprehend
|
|
57
70
|
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
58
71
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
59
72
|
add_plugin(Aws::Plugins::TransferEncoding)
|
73
|
+
add_plugin(Aws::Plugins::HttpChecksum)
|
60
74
|
add_plugin(Aws::Plugins::SignatureV4)
|
61
75
|
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
62
76
|
|
@@ -93,7 +107,7 @@ module Aws::Comprehend
|
|
93
107
|
# @option options [required, String] :region
|
94
108
|
# The AWS region to connect to. The configured `:region` is
|
95
109
|
# used to determine the service `:endpoint`. When not passed,
|
96
|
-
# a default `:region` is
|
110
|
+
# a default `:region` is searched for in the following locations:
|
97
111
|
#
|
98
112
|
# * `Aws.config[:region]`
|
99
113
|
# * `ENV['AWS_REGION']`
|
@@ -108,6 +122,12 @@ module Aws::Comprehend
|
|
108
122
|
# When set to `true`, a thread polling for endpoints will be running in
|
109
123
|
# the background every 60 secs (default). Defaults to `false`.
|
110
124
|
#
|
125
|
+
# @option options [Boolean] :adaptive_retry_wait_to_fill (true)
|
126
|
+
# Used only in `adaptive` retry mode. When true, the request will sleep
|
127
|
+
# until there is sufficent client side capacity to retry the request.
|
128
|
+
# When false, the request will raise a `RetryCapacityNotAvailableError` and will
|
129
|
+
# not retry instead of sleeping.
|
130
|
+
#
|
111
131
|
# @option options [Boolean] :client_side_monitoring (false)
|
112
132
|
# When `true`, client-side metrics will be collected for all API requests from
|
113
133
|
# this client.
|
@@ -132,6 +152,10 @@ module Aws::Comprehend
|
|
132
152
|
# When `true`, an attempt is made to coerce request parameters into
|
133
153
|
# the required types.
|
134
154
|
#
|
155
|
+
# @option options [Boolean] :correct_clock_skew (true)
|
156
|
+
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
157
|
+
# a clock skew correction and retry requests with skewed client clocks.
|
158
|
+
#
|
135
159
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
136
160
|
# Set to true to disable SDK automatically adding host prefix
|
137
161
|
# to default service endpoint when available.
|
@@ -139,7 +163,7 @@ module Aws::Comprehend
|
|
139
163
|
# @option options [String] :endpoint
|
140
164
|
# The client endpoint is normally constructed from the `:region`
|
141
165
|
# option. You should only configure an `:endpoint` when connecting
|
142
|
-
# to test endpoints. This should be
|
166
|
+
# to test or custom endpoints. This should be a valid HTTP(S) URI.
|
143
167
|
#
|
144
168
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
145
169
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
@@ -154,7 +178,7 @@ module Aws::Comprehend
|
|
154
178
|
# requests fetching endpoints information. Defaults to 60 sec.
|
155
179
|
#
|
156
180
|
# @option options [Boolean] :endpoint_discovery (false)
|
157
|
-
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
181
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
158
182
|
#
|
159
183
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
160
184
|
# The log formatter.
|
@@ -166,15 +190,29 @@ module Aws::Comprehend
|
|
166
190
|
# The Logger instance to send log messages to. If this option
|
167
191
|
# is not set, logging will be disabled.
|
168
192
|
#
|
193
|
+
# @option options [Integer] :max_attempts (3)
|
194
|
+
# An integer representing the maximum number attempts that will be made for
|
195
|
+
# a single request, including the initial attempt. For example,
|
196
|
+
# setting this value to 5 will result in a request being retried up to
|
197
|
+
# 4 times. Used in `standard` and `adaptive` retry modes.
|
198
|
+
#
|
169
199
|
# @option options [String] :profile ("default")
|
170
200
|
# Used when loading credentials from the shared credentials file
|
171
201
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
172
202
|
#
|
203
|
+
# @option options [Proc] :retry_backoff
|
204
|
+
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
205
|
+
# This option is only used in the `legacy` retry mode.
|
206
|
+
#
|
173
207
|
# @option options [Float] :retry_base_delay (0.3)
|
174
|
-
# The base delay in seconds used by the default backoff function.
|
208
|
+
# The base delay in seconds used by the default backoff function. This option
|
209
|
+
# is only used in the `legacy` retry mode.
|
175
210
|
#
|
176
211
|
# @option options [Symbol] :retry_jitter (:none)
|
177
|
-
# A delay randomiser function used by the default backoff function.
|
212
|
+
# A delay randomiser function used by the default backoff function.
|
213
|
+
# Some predefined functions can be referenced by name - :none, :equal, :full,
|
214
|
+
# otherwise a Proc that takes and returns a number. This option is only used
|
215
|
+
# in the `legacy` retry mode.
|
178
216
|
#
|
179
217
|
# @see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
180
218
|
#
|
@@ -182,11 +220,30 @@ module Aws::Comprehend
|
|
182
220
|
# The maximum number of times to retry failed requests. Only
|
183
221
|
# ~ 500 level server errors and certain ~ 400 level client errors
|
184
222
|
# are retried. Generally, these are throttling errors, data
|
185
|
-
# checksum errors, networking errors, timeout errors
|
186
|
-
# errors from expired credentials.
|
223
|
+
# checksum errors, networking errors, timeout errors, auth errors,
|
224
|
+
# endpoint discovery, and errors from expired credentials.
|
225
|
+
# This option is only used in the `legacy` retry mode.
|
187
226
|
#
|
188
227
|
# @option options [Integer] :retry_max_delay (0)
|
189
|
-
# The maximum number of seconds to delay between retries (0 for no limit)
|
228
|
+
# The maximum number of seconds to delay between retries (0 for no limit)
|
229
|
+
# used by the default backoff function. This option is only used in the
|
230
|
+
# `legacy` retry mode.
|
231
|
+
#
|
232
|
+
# @option options [String] :retry_mode ("legacy")
|
233
|
+
# Specifies which retry algorithm to use. Values are:
|
234
|
+
#
|
235
|
+
# * `legacy` - The pre-existing retry behavior. This is default value if
|
236
|
+
# no retry mode is provided.
|
237
|
+
#
|
238
|
+
# * `standard` - A standardized set of retry rules across the AWS SDKs.
|
239
|
+
# This includes support for retry quotas, which limit the number of
|
240
|
+
# unsuccessful retries a client can make.
|
241
|
+
#
|
242
|
+
# * `adaptive` - An experimental retry mode that includes all the
|
243
|
+
# functionality of `standard` mode along with automatic client side
|
244
|
+
# throttling. This is a provisional mode that may change behavior
|
245
|
+
# in the future.
|
246
|
+
#
|
190
247
|
#
|
191
248
|
# @option options [String] :secret_access_key
|
192
249
|
#
|
@@ -219,16 +276,15 @@ module Aws::Comprehend
|
|
219
276
|
# requests through. Formatted like 'http://proxy.com:123'.
|
220
277
|
#
|
221
278
|
# @option options [Float] :http_open_timeout (15) The number of
|
222
|
-
# seconds to wait when opening a HTTP session before
|
279
|
+
# seconds to wait when opening a HTTP session before raising a
|
223
280
|
# `Timeout::Error`.
|
224
281
|
#
|
225
282
|
# @option options [Integer] :http_read_timeout (60) The default
|
226
283
|
# number of seconds to wait for response data. This value can
|
227
|
-
# safely be set
|
228
|
-
# per-request on the session yeidled by {#session_for}.
|
284
|
+
# safely be set per-request on the session.
|
229
285
|
#
|
230
286
|
# @option options [Float] :http_idle_timeout (5) The number of
|
231
|
-
# seconds a connection is allowed to sit
|
287
|
+
# seconds a connection is allowed to sit idle before it is
|
232
288
|
# considered stale. Stale connections are closed and removed
|
233
289
|
# from the pool before making a request.
|
234
290
|
#
|
@@ -237,7 +293,7 @@ module Aws::Comprehend
|
|
237
293
|
# request body. This option has no effect unless the request has
|
238
294
|
# "Expect" header set to "100-continue". Defaults to `nil` which
|
239
295
|
# disables this behaviour. This value can safely be set per
|
240
|
-
# request on the session
|
296
|
+
# request on the session.
|
241
297
|
#
|
242
298
|
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
243
299
|
# HTTP debug output will be sent to the `:logger`.
|
@@ -521,6 +577,7 @@ module Aws::Comprehend
|
|
521
577
|
# @return [Types::ClassifyDocumentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
522
578
|
#
|
523
579
|
# * {Types::ClassifyDocumentResponse#classes #classes} => Array<Types::DocumentClass>
|
580
|
+
# * {Types::ClassifyDocumentResponse#labels #labels} => Array<Types::DocumentLabel>
|
524
581
|
#
|
525
582
|
# @example Request syntax with placeholder values
|
526
583
|
#
|
@@ -534,6 +591,9 @@ module Aws::Comprehend
|
|
534
591
|
# resp.classes #=> Array
|
535
592
|
# resp.classes[0].name #=> String
|
536
593
|
# resp.classes[0].score #=> Float
|
594
|
+
# resp.labels #=> Array
|
595
|
+
# resp.labels[0].name #=> String
|
596
|
+
# resp.labels[0].score #=> Float
|
537
597
|
#
|
538
598
|
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ClassifyDocument AWS API Documentation
|
539
599
|
#
|
@@ -605,6 +665,14 @@ module Aws::Comprehend
|
|
605
665
|
#
|
606
666
|
# [1]: https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html
|
607
667
|
#
|
668
|
+
# @option params [String] :mode
|
669
|
+
# Indicates the mode in which the classifier will be trained. The
|
670
|
+
# classifier can be trained in multi-class mode, which identifies one
|
671
|
+
# and only one class for each document, or multi-label mode, which
|
672
|
+
# identifies one or more labels for each document. In multi-label mode,
|
673
|
+
# multiple labels for an individual document are separated by a
|
674
|
+
# delimiter. The default delimiter between labels is a pipe (\|).
|
675
|
+
#
|
608
676
|
# @return [Types::CreateDocumentClassifierResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
609
677
|
#
|
610
678
|
# * {Types::CreateDocumentClassifierResponse#document_classifier_arn #document_classifier_arn} => String
|
@@ -622,6 +690,7 @@ module Aws::Comprehend
|
|
622
690
|
# ],
|
623
691
|
# input_data_config: { # required
|
624
692
|
# s3_uri: "S3Uri", # required
|
693
|
+
# label_delimiter: "LabelDelimiter",
|
625
694
|
# },
|
626
695
|
# output_data_config: {
|
627
696
|
# s3_uri: "S3Uri",
|
@@ -634,6 +703,7 @@ module Aws::Comprehend
|
|
634
703
|
# security_group_ids: ["SecurityGroupId"], # required
|
635
704
|
# subnets: ["SubnetId"], # required
|
636
705
|
# },
|
706
|
+
# mode: "MULTI_CLASS", # accepts MULTI_CLASS, MULTI_LABEL
|
637
707
|
# })
|
638
708
|
#
|
639
709
|
# @example Response structure
|
@@ -981,6 +1051,7 @@ module Aws::Comprehend
|
|
981
1051
|
# resp.document_classifier_properties.training_start_time #=> Time
|
982
1052
|
# resp.document_classifier_properties.training_end_time #=> Time
|
983
1053
|
# resp.document_classifier_properties.input_data_config.s3_uri #=> String
|
1054
|
+
# resp.document_classifier_properties.input_data_config.label_delimiter #=> String
|
984
1055
|
# resp.document_classifier_properties.output_data_config.s3_uri #=> String
|
985
1056
|
# resp.document_classifier_properties.output_data_config.kms_key_id #=> String
|
986
1057
|
# resp.document_classifier_properties.classifier_metadata.number_of_labels #=> Integer
|
@@ -990,12 +1061,17 @@ module Aws::Comprehend
|
|
990
1061
|
# resp.document_classifier_properties.classifier_metadata.evaluation_metrics.precision #=> Float
|
991
1062
|
# resp.document_classifier_properties.classifier_metadata.evaluation_metrics.recall #=> Float
|
992
1063
|
# resp.document_classifier_properties.classifier_metadata.evaluation_metrics.f1_score #=> Float
|
1064
|
+
# resp.document_classifier_properties.classifier_metadata.evaluation_metrics.micro_precision #=> Float
|
1065
|
+
# resp.document_classifier_properties.classifier_metadata.evaluation_metrics.micro_recall #=> Float
|
1066
|
+
# resp.document_classifier_properties.classifier_metadata.evaluation_metrics.micro_f1_score #=> Float
|
1067
|
+
# resp.document_classifier_properties.classifier_metadata.evaluation_metrics.hamming_loss #=> Float
|
993
1068
|
# resp.document_classifier_properties.data_access_role_arn #=> String
|
994
1069
|
# resp.document_classifier_properties.volume_kms_key_id #=> String
|
995
1070
|
# resp.document_classifier_properties.vpc_config.security_group_ids #=> Array
|
996
1071
|
# resp.document_classifier_properties.vpc_config.security_group_ids[0] #=> String
|
997
1072
|
# resp.document_classifier_properties.vpc_config.subnets #=> Array
|
998
1073
|
# resp.document_classifier_properties.vpc_config.subnets[0] #=> String
|
1074
|
+
# resp.document_classifier_properties.mode #=> String, one of "MULTI_CLASS", "MULTI_LABEL"
|
999
1075
|
#
|
1000
1076
|
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDocumentClassifier AWS API Documentation
|
1001
1077
|
#
|
@@ -1551,6 +1627,8 @@ module Aws::Comprehend
|
|
1551
1627
|
# * {Types::ListDocumentClassificationJobsResponse#document_classification_job_properties_list #document_classification_job_properties_list} => Array<Types::DocumentClassificationJobProperties>
|
1552
1628
|
# * {Types::ListDocumentClassificationJobsResponse#next_token #next_token} => String
|
1553
1629
|
#
|
1630
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1631
|
+
#
|
1554
1632
|
# @example Request syntax with placeholder values
|
1555
1633
|
#
|
1556
1634
|
# resp = client.list_document_classification_jobs({
|
@@ -1614,6 +1692,8 @@ module Aws::Comprehend
|
|
1614
1692
|
# * {Types::ListDocumentClassifiersResponse#document_classifier_properties_list #document_classifier_properties_list} => Array<Types::DocumentClassifierProperties>
|
1615
1693
|
# * {Types::ListDocumentClassifiersResponse#next_token #next_token} => String
|
1616
1694
|
#
|
1695
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1696
|
+
#
|
1617
1697
|
# @example Request syntax with placeholder values
|
1618
1698
|
#
|
1619
1699
|
# resp = client.list_document_classifiers({
|
@@ -1638,6 +1718,7 @@ module Aws::Comprehend
|
|
1638
1718
|
# resp.document_classifier_properties_list[0].training_start_time #=> Time
|
1639
1719
|
# resp.document_classifier_properties_list[0].training_end_time #=> Time
|
1640
1720
|
# resp.document_classifier_properties_list[0].input_data_config.s3_uri #=> String
|
1721
|
+
# resp.document_classifier_properties_list[0].input_data_config.label_delimiter #=> String
|
1641
1722
|
# resp.document_classifier_properties_list[0].output_data_config.s3_uri #=> String
|
1642
1723
|
# resp.document_classifier_properties_list[0].output_data_config.kms_key_id #=> String
|
1643
1724
|
# resp.document_classifier_properties_list[0].classifier_metadata.number_of_labels #=> Integer
|
@@ -1647,12 +1728,17 @@ module Aws::Comprehend
|
|
1647
1728
|
# resp.document_classifier_properties_list[0].classifier_metadata.evaluation_metrics.precision #=> Float
|
1648
1729
|
# resp.document_classifier_properties_list[0].classifier_metadata.evaluation_metrics.recall #=> Float
|
1649
1730
|
# resp.document_classifier_properties_list[0].classifier_metadata.evaluation_metrics.f1_score #=> Float
|
1731
|
+
# resp.document_classifier_properties_list[0].classifier_metadata.evaluation_metrics.micro_precision #=> Float
|
1732
|
+
# resp.document_classifier_properties_list[0].classifier_metadata.evaluation_metrics.micro_recall #=> Float
|
1733
|
+
# resp.document_classifier_properties_list[0].classifier_metadata.evaluation_metrics.micro_f1_score #=> Float
|
1734
|
+
# resp.document_classifier_properties_list[0].classifier_metadata.evaluation_metrics.hamming_loss #=> Float
|
1650
1735
|
# resp.document_classifier_properties_list[0].data_access_role_arn #=> String
|
1651
1736
|
# resp.document_classifier_properties_list[0].volume_kms_key_id #=> String
|
1652
1737
|
# resp.document_classifier_properties_list[0].vpc_config.security_group_ids #=> Array
|
1653
1738
|
# resp.document_classifier_properties_list[0].vpc_config.security_group_ids[0] #=> String
|
1654
1739
|
# resp.document_classifier_properties_list[0].vpc_config.subnets #=> Array
|
1655
1740
|
# resp.document_classifier_properties_list[0].vpc_config.subnets[0] #=> String
|
1741
|
+
# resp.document_classifier_properties_list[0].mode #=> String, one of "MULTI_CLASS", "MULTI_LABEL"
|
1656
1742
|
# resp.next_token #=> String
|
1657
1743
|
#
|
1658
1744
|
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDocumentClassifiers AWS API Documentation
|
@@ -1684,6 +1770,8 @@ module Aws::Comprehend
|
|
1684
1770
|
# * {Types::ListDominantLanguageDetectionJobsResponse#dominant_language_detection_job_properties_list #dominant_language_detection_job_properties_list} => Array<Types::DominantLanguageDetectionJobProperties>
|
1685
1771
|
# * {Types::ListDominantLanguageDetectionJobsResponse#next_token #next_token} => String
|
1686
1772
|
#
|
1773
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1774
|
+
#
|
1687
1775
|
# @example Request syntax with placeholder values
|
1688
1776
|
#
|
1689
1777
|
# resp = client.list_dominant_language_detection_jobs({
|
@@ -1800,6 +1888,8 @@ module Aws::Comprehend
|
|
1800
1888
|
# * {Types::ListEntitiesDetectionJobsResponse#entities_detection_job_properties_list #entities_detection_job_properties_list} => Array<Types::EntitiesDetectionJobProperties>
|
1801
1889
|
# * {Types::ListEntitiesDetectionJobsResponse#next_token #next_token} => String
|
1802
1890
|
#
|
1891
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1892
|
+
#
|
1803
1893
|
# @example Request syntax with placeholder values
|
1804
1894
|
#
|
1805
1895
|
# resp = client.list_entities_detection_jobs({
|
@@ -1871,6 +1961,8 @@ module Aws::Comprehend
|
|
1871
1961
|
# * {Types::ListEntityRecognizersResponse#entity_recognizer_properties_list #entity_recognizer_properties_list} => Array<Types::EntityRecognizerProperties>
|
1872
1962
|
# * {Types::ListEntityRecognizersResponse#next_token #next_token} => String
|
1873
1963
|
#
|
1964
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1965
|
+
#
|
1874
1966
|
# @example Request syntax with placeholder values
|
1875
1967
|
#
|
1876
1968
|
# resp = client.list_entity_recognizers({
|
@@ -1946,6 +2038,8 @@ module Aws::Comprehend
|
|
1946
2038
|
# * {Types::ListKeyPhrasesDetectionJobsResponse#key_phrases_detection_job_properties_list #key_phrases_detection_job_properties_list} => Array<Types::KeyPhrasesDetectionJobProperties>
|
1947
2039
|
# * {Types::ListKeyPhrasesDetectionJobsResponse#next_token #next_token} => String
|
1948
2040
|
#
|
2041
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
2042
|
+
#
|
1949
2043
|
# @example Request syntax with placeholder values
|
1950
2044
|
#
|
1951
2045
|
# resp = client.list_key_phrases_detection_jobs({
|
@@ -2009,6 +2103,8 @@ module Aws::Comprehend
|
|
2009
2103
|
# * {Types::ListSentimentDetectionJobsResponse#sentiment_detection_job_properties_list #sentiment_detection_job_properties_list} => Array<Types::SentimentDetectionJobProperties>
|
2010
2104
|
# * {Types::ListSentimentDetectionJobsResponse#next_token #next_token} => String
|
2011
2105
|
#
|
2106
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
2107
|
+
#
|
2012
2108
|
# @example Request syntax with placeholder values
|
2013
2109
|
#
|
2014
2110
|
# resp = client.list_sentiment_detection_jobs({
|
@@ -2105,6 +2201,8 @@ module Aws::Comprehend
|
|
2105
2201
|
# * {Types::ListTopicsDetectionJobsResponse#topics_detection_job_properties_list #topics_detection_job_properties_list} => Array<Types::TopicsDetectionJobProperties>
|
2106
2202
|
# * {Types::ListTopicsDetectionJobsResponse#next_token #next_token} => String
|
2107
2203
|
#
|
2204
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
2205
|
+
#
|
2108
2206
|
# @example Request syntax with placeholder values
|
2109
2207
|
#
|
2110
2208
|
# resp = client.list_topics_detection_jobs({
|
@@ -3058,7 +3156,7 @@ module Aws::Comprehend
|
|
3058
3156
|
params: params,
|
3059
3157
|
config: config)
|
3060
3158
|
context[:gem_name] = 'aws-sdk-comprehend'
|
3061
|
-
context[:gem_version] = '1.
|
3159
|
+
context[:gem_version] = '1.33.1'
|
3062
3160
|
Seahorse::Client::Request.new(handlers, context)
|
3063
3161
|
end
|
3064
3162
|
|
@@ -89,9 +89,11 @@ module Aws::Comprehend
|
|
89
89
|
DocumentClassifierEndpointArn = Shapes::StringShape.new(name: 'DocumentClassifierEndpointArn')
|
90
90
|
DocumentClassifierFilter = Shapes::StructureShape.new(name: 'DocumentClassifierFilter')
|
91
91
|
DocumentClassifierInputDataConfig = Shapes::StructureShape.new(name: 'DocumentClassifierInputDataConfig')
|
92
|
+
DocumentClassifierMode = Shapes::StringShape.new(name: 'DocumentClassifierMode')
|
92
93
|
DocumentClassifierOutputDataConfig = Shapes::StructureShape.new(name: 'DocumentClassifierOutputDataConfig')
|
93
94
|
DocumentClassifierProperties = Shapes::StructureShape.new(name: 'DocumentClassifierProperties')
|
94
95
|
DocumentClassifierPropertiesList = Shapes::ListShape.new(name: 'DocumentClassifierPropertiesList')
|
96
|
+
DocumentLabel = Shapes::StructureShape.new(name: 'DocumentLabel')
|
95
97
|
DominantLanguage = Shapes::StructureShape.new(name: 'DominantLanguage')
|
96
98
|
DominantLanguageDetectionJobFilter = Shapes::StructureShape.new(name: 'DominantLanguageDetectionJobFilter')
|
97
99
|
DominantLanguageDetectionJobProperties = Shapes::StructureShape.new(name: 'DominantLanguageDetectionJobProperties')
|
@@ -141,6 +143,7 @@ module Aws::Comprehend
|
|
141
143
|
KeyPhrasesDetectionJobPropertiesList = Shapes::ListShape.new(name: 'KeyPhrasesDetectionJobPropertiesList')
|
142
144
|
KmsKeyId = Shapes::StringShape.new(name: 'KmsKeyId')
|
143
145
|
KmsKeyValidationException = Shapes::StructureShape.new(name: 'KmsKeyValidationException')
|
146
|
+
LabelDelimiter = Shapes::StringShape.new(name: 'LabelDelimiter')
|
144
147
|
LanguageCode = Shapes::StringShape.new(name: 'LanguageCode')
|
145
148
|
ListDocumentClassificationJobsRequest = Shapes::StructureShape.new(name: 'ListDocumentClassificationJobsRequest')
|
146
149
|
ListDocumentClassificationJobsResponse = Shapes::StructureShape.new(name: 'ListDocumentClassificationJobsResponse')
|
@@ -165,6 +168,7 @@ module Aws::Comprehend
|
|
165
168
|
ListOfDominantLanguages = Shapes::ListShape.new(name: 'ListOfDominantLanguages')
|
166
169
|
ListOfEntities = Shapes::ListShape.new(name: 'ListOfEntities')
|
167
170
|
ListOfKeyPhrases = Shapes::ListShape.new(name: 'ListOfKeyPhrases')
|
171
|
+
ListOfLabels = Shapes::ListShape.new(name: 'ListOfLabels')
|
168
172
|
ListOfSyntaxTokens = Shapes::ListShape.new(name: 'ListOfSyntaxTokens')
|
169
173
|
ListSentimentDetectionJobsRequest = Shapes::StructureShape.new(name: 'ListSentimentDetectionJobsRequest')
|
170
174
|
ListSentimentDetectionJobsResponse = Shapes::StructureShape.new(name: 'ListSentimentDetectionJobsResponse')
|
@@ -316,6 +320,10 @@ module Aws::Comprehend
|
|
316
320
|
ClassifierEvaluationMetrics.add_member(:precision, Shapes::ShapeRef.new(shape: Double, location_name: "Precision"))
|
317
321
|
ClassifierEvaluationMetrics.add_member(:recall, Shapes::ShapeRef.new(shape: Double, location_name: "Recall"))
|
318
322
|
ClassifierEvaluationMetrics.add_member(:f1_score, Shapes::ShapeRef.new(shape: Double, location_name: "F1Score"))
|
323
|
+
ClassifierEvaluationMetrics.add_member(:micro_precision, Shapes::ShapeRef.new(shape: Double, location_name: "MicroPrecision"))
|
324
|
+
ClassifierEvaluationMetrics.add_member(:micro_recall, Shapes::ShapeRef.new(shape: Double, location_name: "MicroRecall"))
|
325
|
+
ClassifierEvaluationMetrics.add_member(:micro_f1_score, Shapes::ShapeRef.new(shape: Double, location_name: "MicroF1Score"))
|
326
|
+
ClassifierEvaluationMetrics.add_member(:hamming_loss, Shapes::ShapeRef.new(shape: Double, location_name: "HammingLoss"))
|
319
327
|
ClassifierEvaluationMetrics.struct_class = Types::ClassifierEvaluationMetrics
|
320
328
|
|
321
329
|
ClassifierMetadata.add_member(:number_of_labels, Shapes::ShapeRef.new(shape: Integer, location_name: "NumberOfLabels"))
|
@@ -329,6 +337,7 @@ module Aws::Comprehend
|
|
329
337
|
ClassifyDocumentRequest.struct_class = Types::ClassifyDocumentRequest
|
330
338
|
|
331
339
|
ClassifyDocumentResponse.add_member(:classes, Shapes::ShapeRef.new(shape: ListOfClasses, location_name: "Classes"))
|
340
|
+
ClassifyDocumentResponse.add_member(:labels, Shapes::ShapeRef.new(shape: ListOfLabels, location_name: "Labels"))
|
332
341
|
ClassifyDocumentResponse.struct_class = Types::ClassifyDocumentResponse
|
333
342
|
|
334
343
|
ConcurrentModificationException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
@@ -343,6 +352,7 @@ module Aws::Comprehend
|
|
343
352
|
CreateDocumentClassifierRequest.add_member(:language_code, Shapes::ShapeRef.new(shape: LanguageCode, required: true, location_name: "LanguageCode"))
|
344
353
|
CreateDocumentClassifierRequest.add_member(:volume_kms_key_id, Shapes::ShapeRef.new(shape: KmsKeyId, location_name: "VolumeKmsKeyId"))
|
345
354
|
CreateDocumentClassifierRequest.add_member(:vpc_config, Shapes::ShapeRef.new(shape: VpcConfig, location_name: "VpcConfig"))
|
355
|
+
CreateDocumentClassifierRequest.add_member(:mode, Shapes::ShapeRef.new(shape: DocumentClassifierMode, location_name: "Mode"))
|
346
356
|
CreateDocumentClassifierRequest.struct_class = Types::CreateDocumentClassifierRequest
|
347
357
|
|
348
358
|
CreateDocumentClassifierResponse.add_member(:document_classifier_arn, Shapes::ShapeRef.new(shape: DocumentClassifierArn, location_name: "DocumentClassifierArn"))
|
@@ -507,6 +517,7 @@ module Aws::Comprehend
|
|
507
517
|
DocumentClassifierFilter.struct_class = Types::DocumentClassifierFilter
|
508
518
|
|
509
519
|
DocumentClassifierInputDataConfig.add_member(:s3_uri, Shapes::ShapeRef.new(shape: S3Uri, required: true, location_name: "S3Uri"))
|
520
|
+
DocumentClassifierInputDataConfig.add_member(:label_delimiter, Shapes::ShapeRef.new(shape: LabelDelimiter, location_name: "LabelDelimiter"))
|
510
521
|
DocumentClassifierInputDataConfig.struct_class = Types::DocumentClassifierInputDataConfig
|
511
522
|
|
512
523
|
DocumentClassifierOutputDataConfig.add_member(:s3_uri, Shapes::ShapeRef.new(shape: S3Uri, location_name: "S3Uri"))
|
@@ -527,10 +538,15 @@ module Aws::Comprehend
|
|
527
538
|
DocumentClassifierProperties.add_member(:data_access_role_arn, Shapes::ShapeRef.new(shape: IamRoleArn, location_name: "DataAccessRoleArn"))
|
528
539
|
DocumentClassifierProperties.add_member(:volume_kms_key_id, Shapes::ShapeRef.new(shape: KmsKeyId, location_name: "VolumeKmsKeyId"))
|
529
540
|
DocumentClassifierProperties.add_member(:vpc_config, Shapes::ShapeRef.new(shape: VpcConfig, location_name: "VpcConfig"))
|
541
|
+
DocumentClassifierProperties.add_member(:mode, Shapes::ShapeRef.new(shape: DocumentClassifierMode, location_name: "Mode"))
|
530
542
|
DocumentClassifierProperties.struct_class = Types::DocumentClassifierProperties
|
531
543
|
|
532
544
|
DocumentClassifierPropertiesList.member = Shapes::ShapeRef.new(shape: DocumentClassifierProperties)
|
533
545
|
|
546
|
+
DocumentLabel.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "Name"))
|
547
|
+
DocumentLabel.add_member(:score, Shapes::ShapeRef.new(shape: Float, location_name: "Score"))
|
548
|
+
DocumentLabel.struct_class = Types::DocumentLabel
|
549
|
+
|
534
550
|
DominantLanguage.add_member(:language_code, Shapes::ShapeRef.new(shape: String, location_name: "LanguageCode"))
|
535
551
|
DominantLanguage.add_member(:score, Shapes::ShapeRef.new(shape: Float, location_name: "Score"))
|
536
552
|
DominantLanguage.struct_class = Types::DominantLanguage
|
@@ -797,6 +813,8 @@ module Aws::Comprehend
|
|
797
813
|
|
798
814
|
ListOfKeyPhrases.member = Shapes::ShapeRef.new(shape: KeyPhrase)
|
799
815
|
|
816
|
+
ListOfLabels.member = Shapes::ShapeRef.new(shape: DocumentLabel)
|
817
|
+
|
800
818
|
ListOfSyntaxTokens.member = Shapes::ShapeRef.new(shape: SyntaxToken)
|
801
819
|
|
802
820
|
ListSentimentDetectionJobsRequest.add_member(:filter, Shapes::ShapeRef.new(shape: SentimentDetectionJobFilter, location_name: "Filter"))
|
@@ -6,6 +6,44 @@
|
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
8
|
module Aws::Comprehend
|
9
|
+
|
10
|
+
# When Comprehend returns an error response, the Ruby SDK constructs and raises an error.
|
11
|
+
# These errors all extend Aws::Comprehend::Errors::ServiceError < {Aws::Errors::ServiceError}
|
12
|
+
#
|
13
|
+
# You can rescue all Comprehend errors using ServiceError:
|
14
|
+
#
|
15
|
+
# begin
|
16
|
+
# # do stuff
|
17
|
+
# rescue Aws::Comprehend::Errors::ServiceError
|
18
|
+
# # rescues all Comprehend API errors
|
19
|
+
# end
|
20
|
+
#
|
21
|
+
#
|
22
|
+
# ## Request Context
|
23
|
+
# ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
|
24
|
+
# information about the request that generated the error.
|
25
|
+
# See {Seahorse::Client::RequestContext} for more information.
|
26
|
+
#
|
27
|
+
# ## Error Classes
|
28
|
+
# * {BatchSizeLimitExceededException}
|
29
|
+
# * {ConcurrentModificationException}
|
30
|
+
# * {InternalServerException}
|
31
|
+
# * {InvalidFilterException}
|
32
|
+
# * {InvalidRequestException}
|
33
|
+
# * {JobNotFoundException}
|
34
|
+
# * {KmsKeyValidationException}
|
35
|
+
# * {ResourceInUseException}
|
36
|
+
# * {ResourceLimitExceededException}
|
37
|
+
# * {ResourceNotFoundException}
|
38
|
+
# * {ResourceUnavailableException}
|
39
|
+
# * {TextSizeLimitExceededException}
|
40
|
+
# * {TooManyRequestsException}
|
41
|
+
# * {TooManyTagKeysException}
|
42
|
+
# * {TooManyTagsException}
|
43
|
+
# * {UnsupportedLanguageException}
|
44
|
+
#
|
45
|
+
# Additionally, error classes are dynamically generated for service errors based on the error code
|
46
|
+
# if they are not defined above.
|
9
47
|
module Errors
|
10
48
|
|
11
49
|
extend Aws::Errors::DynamicErrors
|
@@ -23,7 +61,6 @@ module Aws::Comprehend
|
|
23
61
|
def message
|
24
62
|
@message || @data[:message]
|
25
63
|
end
|
26
|
-
|
27
64
|
end
|
28
65
|
|
29
66
|
class ConcurrentModificationException < ServiceError
|
@@ -39,7 +76,6 @@ module Aws::Comprehend
|
|
39
76
|
def message
|
40
77
|
@message || @data[:message]
|
41
78
|
end
|
42
|
-
|
43
79
|
end
|
44
80
|
|
45
81
|
class InternalServerException < ServiceError
|
@@ -55,7 +91,6 @@ module Aws::Comprehend
|
|
55
91
|
def message
|
56
92
|
@message || @data[:message]
|
57
93
|
end
|
58
|
-
|
59
94
|
end
|
60
95
|
|
61
96
|
class InvalidFilterException < ServiceError
|
@@ -71,7 +106,6 @@ module Aws::Comprehend
|
|
71
106
|
def message
|
72
107
|
@message || @data[:message]
|
73
108
|
end
|
74
|
-
|
75
109
|
end
|
76
110
|
|
77
111
|
class InvalidRequestException < ServiceError
|
@@ -87,7 +121,6 @@ module Aws::Comprehend
|
|
87
121
|
def message
|
88
122
|
@message || @data[:message]
|
89
123
|
end
|
90
|
-
|
91
124
|
end
|
92
125
|
|
93
126
|
class JobNotFoundException < ServiceError
|
@@ -103,7 +136,6 @@ module Aws::Comprehend
|
|
103
136
|
def message
|
104
137
|
@message || @data[:message]
|
105
138
|
end
|
106
|
-
|
107
139
|
end
|
108
140
|
|
109
141
|
class KmsKeyValidationException < ServiceError
|
@@ -119,7 +151,6 @@ module Aws::Comprehend
|
|
119
151
|
def message
|
120
152
|
@message || @data[:message]
|
121
153
|
end
|
122
|
-
|
123
154
|
end
|
124
155
|
|
125
156
|
class ResourceInUseException < ServiceError
|
@@ -135,7 +166,6 @@ module Aws::Comprehend
|
|
135
166
|
def message
|
136
167
|
@message || @data[:message]
|
137
168
|
end
|
138
|
-
|
139
169
|
end
|
140
170
|
|
141
171
|
class ResourceLimitExceededException < ServiceError
|
@@ -151,7 +181,6 @@ module Aws::Comprehend
|
|
151
181
|
def message
|
152
182
|
@message || @data[:message]
|
153
183
|
end
|
154
|
-
|
155
184
|
end
|
156
185
|
|
157
186
|
class ResourceNotFoundException < ServiceError
|
@@ -167,7 +196,6 @@ module Aws::Comprehend
|
|
167
196
|
def message
|
168
197
|
@message || @data[:message]
|
169
198
|
end
|
170
|
-
|
171
199
|
end
|
172
200
|
|
173
201
|
class ResourceUnavailableException < ServiceError
|
@@ -183,7 +211,6 @@ module Aws::Comprehend
|
|
183
211
|
def message
|
184
212
|
@message || @data[:message]
|
185
213
|
end
|
186
|
-
|
187
214
|
end
|
188
215
|
|
189
216
|
class TextSizeLimitExceededException < ServiceError
|
@@ -199,7 +226,6 @@ module Aws::Comprehend
|
|
199
226
|
def message
|
200
227
|
@message || @data[:message]
|
201
228
|
end
|
202
|
-
|
203
229
|
end
|
204
230
|
|
205
231
|
class TooManyRequestsException < ServiceError
|
@@ -215,7 +241,6 @@ module Aws::Comprehend
|
|
215
241
|
def message
|
216
242
|
@message || @data[:message]
|
217
243
|
end
|
218
|
-
|
219
244
|
end
|
220
245
|
|
221
246
|
class TooManyTagKeysException < ServiceError
|
@@ -231,7 +256,6 @@ module Aws::Comprehend
|
|
231
256
|
def message
|
232
257
|
@message || @data[:message]
|
233
258
|
end
|
234
|
-
|
235
259
|
end
|
236
260
|
|
237
261
|
class TooManyTagsException < ServiceError
|
@@ -247,7 +271,6 @@ module Aws::Comprehend
|
|
247
271
|
def message
|
248
272
|
@message || @data[:message]
|
249
273
|
end
|
250
|
-
|
251
274
|
end
|
252
275
|
|
253
276
|
class UnsupportedLanguageException < ServiceError
|
@@ -263,7 +286,6 @@ module Aws::Comprehend
|
|
263
286
|
def message
|
264
287
|
@message || @data[:message]
|
265
288
|
end
|
266
|
-
|
267
289
|
end
|
268
290
|
|
269
291
|
end
|
@@ -425,13 +425,50 @@ module Aws::Comprehend
|
|
425
425
|
# score is 1, and the worst score is 0.
|
426
426
|
# @return [Float]
|
427
427
|
#
|
428
|
+
# @!attribute [rw] micro_precision
|
429
|
+
# A measure of the usefulness of the recognizer results in the test
|
430
|
+
# data. High precision means that the recognizer returned
|
431
|
+
# substantially more relevant results than irrelevant ones. Unlike the
|
432
|
+
# Precision metric which comes from averaging the precision of all
|
433
|
+
# available labels, this is based on the overall score of all
|
434
|
+
# precision scores added together.
|
435
|
+
# @return [Float]
|
436
|
+
#
|
437
|
+
# @!attribute [rw] micro_recall
|
438
|
+
# A measure of how complete the classifier results are for the test
|
439
|
+
# data. High recall means that the classifier returned most of the
|
440
|
+
# relevant results. Specifically, this indicates how many of the
|
441
|
+
# correct categories in the text that the model can predict. It is a
|
442
|
+
# percentage of correct categories in the text that can found. Instead
|
443
|
+
# of averaging the recall scores of all labels (as with Recall), micro
|
444
|
+
# Recall is based on the overall score of all recall scores added
|
445
|
+
# together.
|
446
|
+
# @return [Float]
|
447
|
+
#
|
448
|
+
# @!attribute [rw] micro_f1_score
|
449
|
+
# A measure of how accurate the classifier results are for the test
|
450
|
+
# data. It is a combination of the `Micro Precision` and `Micro
|
451
|
+
# Recall` values. The `Micro F1Score` is the harmonic mean of the two
|
452
|
+
# scores. The highest score is 1, and the worst score is 0.
|
453
|
+
# @return [Float]
|
454
|
+
#
|
455
|
+
# @!attribute [rw] hamming_loss
|
456
|
+
# Indicates the fraction of labels that are incorrectly predicted.
|
457
|
+
# Also seen as the fraction of wrong labels compared to the total
|
458
|
+
# number of labels. Scores closer to zero are better.
|
459
|
+
# @return [Float]
|
460
|
+
#
|
428
461
|
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ClassifierEvaluationMetrics AWS API Documentation
|
429
462
|
#
|
430
463
|
class ClassifierEvaluationMetrics < Struct.new(
|
431
464
|
:accuracy,
|
432
465
|
:precision,
|
433
466
|
:recall,
|
434
|
-
:f1_score
|
467
|
+
:f1_score,
|
468
|
+
:micro_precision,
|
469
|
+
:micro_recall,
|
470
|
+
:micro_f1_score,
|
471
|
+
:hamming_loss)
|
435
472
|
include Aws::Structure
|
436
473
|
end
|
437
474
|
|
@@ -500,10 +537,20 @@ module Aws::Comprehend
|
|
500
537
|
# not both at the same time.
|
501
538
|
# @return [Array<Types::DocumentClass>]
|
502
539
|
#
|
540
|
+
# @!attribute [rw] labels
|
541
|
+
# The labels used the document being analyzed. These are used for
|
542
|
+
# multi-label trained models. Individual labels represent different
|
543
|
+
# categories that are related in some manner and are not multually
|
544
|
+
# exclusive. For example, a movie can be just an action movie, or it
|
545
|
+
# can be an action movie, a science fiction movie, and a comedy, all
|
546
|
+
# at the same time.
|
547
|
+
# @return [Array<Types::DocumentLabel>]
|
548
|
+
#
|
503
549
|
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ClassifyDocumentResponse AWS API Documentation
|
504
550
|
#
|
505
551
|
class ClassifyDocumentResponse < Struct.new(
|
506
|
-
:classes
|
552
|
+
:classes,
|
553
|
+
:labels)
|
507
554
|
include Aws::Structure
|
508
555
|
end
|
509
556
|
|
@@ -534,6 +581,7 @@ module Aws::Comprehend
|
|
534
581
|
# ],
|
535
582
|
# input_data_config: { # required
|
536
583
|
# s3_uri: "S3Uri", # required
|
584
|
+
# label_delimiter: "LabelDelimiter",
|
537
585
|
# },
|
538
586
|
# output_data_config: {
|
539
587
|
# s3_uri: "S3Uri",
|
@@ -546,6 +594,7 @@ module Aws::Comprehend
|
|
546
594
|
# security_group_ids: ["SecurityGroupId"], # required
|
547
595
|
# subnets: ["SubnetId"], # required
|
548
596
|
# },
|
597
|
+
# mode: "MULTI_CLASS", # accepts MULTI_CLASS, MULTI_LABEL
|
549
598
|
# }
|
550
599
|
#
|
551
600
|
# @!attribute [rw] document_classifier_name
|
@@ -613,6 +662,15 @@ module Aws::Comprehend
|
|
613
662
|
# [1]: https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html
|
614
663
|
# @return [Types::VpcConfig]
|
615
664
|
#
|
665
|
+
# @!attribute [rw] mode
|
666
|
+
# Indicates the mode in which the classifier will be trained. The
|
667
|
+
# classifier can be trained in multi-class mode, which identifies one
|
668
|
+
# and only one class for each document, or multi-label mode, which
|
669
|
+
# identifies one or more labels for each document. In multi-label
|
670
|
+
# mode, multiple labels for an individual document are separated by a
|
671
|
+
# delimiter. The default delimiter between labels is a pipe (\|).
|
672
|
+
# @return [String]
|
673
|
+
#
|
616
674
|
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/CreateDocumentClassifierRequest AWS API Documentation
|
617
675
|
#
|
618
676
|
class CreateDocumentClassifierRequest < Struct.new(
|
@@ -624,7 +682,8 @@ module Aws::Comprehend
|
|
624
682
|
:client_request_token,
|
625
683
|
:language_code,
|
626
684
|
:volume_kms_key_id,
|
627
|
-
:vpc_config
|
685
|
+
:vpc_config,
|
686
|
+
:mode)
|
628
687
|
include Aws::Structure
|
629
688
|
end
|
630
689
|
|
@@ -1593,6 +1652,7 @@ module Aws::Comprehend
|
|
1593
1652
|
#
|
1594
1653
|
# {
|
1595
1654
|
# s3_uri: "S3Uri", # required
|
1655
|
+
# label_delimiter: "LabelDelimiter",
|
1596
1656
|
# }
|
1597
1657
|
#
|
1598
1658
|
# @!attribute [rw] s3_uri
|
@@ -1607,10 +1667,21 @@ module Aws::Comprehend
|
|
1607
1667
|
# all of them as input.
|
1608
1668
|
# @return [String]
|
1609
1669
|
#
|
1670
|
+
# @!attribute [rw] label_delimiter
|
1671
|
+
# Indicates the delimiter used to separate each label for training a
|
1672
|
+
# multi-label classifier. The default delimiter between labels is a
|
1673
|
+
# pipe (\|). You can use a different character as a delimiter (if
|
1674
|
+
# it's an allowed character) by specifying it under Delimiter for
|
1675
|
+
# labels. If the training documents use a delimiter other than the
|
1676
|
+
# default or the delimiter you specify, the labels on that line will
|
1677
|
+
# be combined to make a single unique label, such as LABELLABELLABEL.
|
1678
|
+
# @return [String]
|
1679
|
+
#
|
1610
1680
|
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DocumentClassifierInputDataConfig AWS API Documentation
|
1611
1681
|
#
|
1612
1682
|
class DocumentClassifierInputDataConfig < Struct.new(
|
1613
|
-
:s3_uri
|
1683
|
+
:s3_uri,
|
1684
|
+
:label_delimiter)
|
1614
1685
|
include Aws::Structure
|
1615
1686
|
end
|
1616
1687
|
|
@@ -1750,6 +1821,13 @@ module Aws::Comprehend
|
|
1750
1821
|
# [1]: https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html
|
1751
1822
|
# @return [Types::VpcConfig]
|
1752
1823
|
#
|
1824
|
+
# @!attribute [rw] mode
|
1825
|
+
# Indicates the mode in which the specific classifier was trained.
|
1826
|
+
# This also indicates the format of input documents and the format of
|
1827
|
+
# the confusion matrix. Each classifier can only be trained in one
|
1828
|
+
# mode and this cannot be changed once the classifier is trained.
|
1829
|
+
# @return [String]
|
1830
|
+
#
|
1753
1831
|
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DocumentClassifierProperties AWS API Documentation
|
1754
1832
|
#
|
1755
1833
|
class DocumentClassifierProperties < Struct.new(
|
@@ -1766,7 +1844,28 @@ module Aws::Comprehend
|
|
1766
1844
|
:classifier_metadata,
|
1767
1845
|
:data_access_role_arn,
|
1768
1846
|
:volume_kms_key_id,
|
1769
|
-
:vpc_config
|
1847
|
+
:vpc_config,
|
1848
|
+
:mode)
|
1849
|
+
include Aws::Structure
|
1850
|
+
end
|
1851
|
+
|
1852
|
+
# Specifies one of the label or labels that categorize the document
|
1853
|
+
# being analyzed.
|
1854
|
+
#
|
1855
|
+
# @!attribute [rw] name
|
1856
|
+
# The name of the label.
|
1857
|
+
# @return [String]
|
1858
|
+
#
|
1859
|
+
# @!attribute [rw] score
|
1860
|
+
# The confidence score that Amazon Comprehend has this label correctly
|
1861
|
+
# attributed.
|
1862
|
+
# @return [Float]
|
1863
|
+
#
|
1864
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DocumentLabel AWS API Documentation
|
1865
|
+
#
|
1866
|
+
class DocumentLabel < Struct.new(
|
1867
|
+
:name,
|
1868
|
+
:score)
|
1770
1869
|
include Aws::Structure
|
1771
1870
|
end
|
1772
1871
|
|
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.33.1
|
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:
|
11
|
+
date: 2020-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '3'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 3.
|
22
|
+
version: 3.99.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '3'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 3.
|
32
|
+
version: 3.99.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: aws-sigv4
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
81
|
version: '0'
|
82
82
|
requirements: []
|
83
83
|
rubyforge_project:
|
84
|
-
rubygems_version: 2.
|
84
|
+
rubygems_version: 2.7.6.2
|
85
85
|
signing_key:
|
86
86
|
specification_version: 4
|
87
87
|
summary: AWS SDK for Ruby - Amazon Comprehend
|