aws-sdk-comprehend 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/aws-sdk-comprehend.rb +47 -0
- data/lib/aws-sdk-comprehend/client.rb +715 -0
- data/lib/aws-sdk-comprehend/client_api.rb +417 -0
- data/lib/aws-sdk-comprehend/customizations.rb +0 -0
- data/lib/aws-sdk-comprehend/errors.rb +14 -0
- data/lib/aws-sdk-comprehend/resource.rb +23 -0
- data/lib/aws-sdk-comprehend/types.rb +978 -0
- metadata +82 -0
@@ -0,0 +1,978 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::Comprehend
|
9
|
+
module Types
|
10
|
+
|
11
|
+
# The result of calling the operation. The operation returns one object
|
12
|
+
# for each document that is successfully processed by the operation.
|
13
|
+
#
|
14
|
+
# @!attribute [rw] index
|
15
|
+
# The zero-based index of the document in the input list.
|
16
|
+
# @return [Integer]
|
17
|
+
#
|
18
|
+
# @!attribute [rw] languages
|
19
|
+
# One or more DominantLanguage objects describing the dominant
|
20
|
+
# languages in the document.
|
21
|
+
# @return [Array<Types::DominantLanguage>]
|
22
|
+
#
|
23
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectDominantLanguageItemResult AWS API Documentation
|
24
|
+
#
|
25
|
+
class BatchDetectDominantLanguageItemResult < Struct.new(
|
26
|
+
:index,
|
27
|
+
:languages)
|
28
|
+
include Aws::Structure
|
29
|
+
end
|
30
|
+
|
31
|
+
# @note When making an API call, you may pass BatchDetectDominantLanguageRequest
|
32
|
+
# data as a hash:
|
33
|
+
#
|
34
|
+
# {
|
35
|
+
# text_list: ["String"], # required
|
36
|
+
# }
|
37
|
+
#
|
38
|
+
# @!attribute [rw] text_list
|
39
|
+
# A list containing the text of the input documents. The list can
|
40
|
+
# contain a maximum of 25 documents. Each document should contain at
|
41
|
+
# least 20 characters and must contain fewer than 5,000 bytes of UTF-8
|
42
|
+
# encoded characters.
|
43
|
+
# @return [Array<String>]
|
44
|
+
#
|
45
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectDominantLanguageRequest AWS API Documentation
|
46
|
+
#
|
47
|
+
class BatchDetectDominantLanguageRequest < Struct.new(
|
48
|
+
:text_list)
|
49
|
+
include Aws::Structure
|
50
|
+
end
|
51
|
+
|
52
|
+
# @!attribute [rw] result_list
|
53
|
+
# A list of objects containing the results of the operation. The
|
54
|
+
# results are sorted in ascending order by the `Index` field and match
|
55
|
+
# the order of the documents in the input list. If all of the
|
56
|
+
# documents contain an error, the `ResultList` is empty.
|
57
|
+
# @return [Array<Types::BatchDetectDominantLanguageItemResult>]
|
58
|
+
#
|
59
|
+
# @!attribute [rw] error_list
|
60
|
+
# A list containing one object for each document that contained an
|
61
|
+
# error. The results are sorted in ascending order by the `Index`
|
62
|
+
# field and match the order of the documents in the input list. If
|
63
|
+
# there are no errors in the batch, the `ErrorList` is empty.
|
64
|
+
# @return [Array<Types::BatchItemError>]
|
65
|
+
#
|
66
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectDominantLanguageResponse AWS API Documentation
|
67
|
+
#
|
68
|
+
class BatchDetectDominantLanguageResponse < Struct.new(
|
69
|
+
:result_list,
|
70
|
+
:error_list)
|
71
|
+
include Aws::Structure
|
72
|
+
end
|
73
|
+
|
74
|
+
# The result of calling the operation. The operation returns one object
|
75
|
+
# for each document that is successfully processed by the operation.
|
76
|
+
#
|
77
|
+
# @!attribute [rw] index
|
78
|
+
# The zero-based index of the document in the input list.
|
79
|
+
# @return [Integer]
|
80
|
+
#
|
81
|
+
# @!attribute [rw] entities
|
82
|
+
# One or more Entity objects, one for each entity detected in the
|
83
|
+
# document.
|
84
|
+
# @return [Array<Types::Entity>]
|
85
|
+
#
|
86
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectEntitiesItemResult AWS API Documentation
|
87
|
+
#
|
88
|
+
class BatchDetectEntitiesItemResult < Struct.new(
|
89
|
+
:index,
|
90
|
+
:entities)
|
91
|
+
include Aws::Structure
|
92
|
+
end
|
93
|
+
|
94
|
+
# @note When making an API call, you may pass BatchDetectEntitiesRequest
|
95
|
+
# data as a hash:
|
96
|
+
#
|
97
|
+
# {
|
98
|
+
# text_list: ["String"], # required
|
99
|
+
# language_code: "String", # required
|
100
|
+
# }
|
101
|
+
#
|
102
|
+
# @!attribute [rw] text_list
|
103
|
+
# A list containing the text of the input documents. The list can
|
104
|
+
# contain a maximum of 25 documents. Each document must contain fewer
|
105
|
+
# than 5,000 bytes of UTF-8 encoded characters.
|
106
|
+
# @return [Array<String>]
|
107
|
+
#
|
108
|
+
# @!attribute [rw] language_code
|
109
|
+
# The language of the input documents. All documents must be in the
|
110
|
+
# same language.
|
111
|
+
# @return [String]
|
112
|
+
#
|
113
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectEntitiesRequest AWS API Documentation
|
114
|
+
#
|
115
|
+
class BatchDetectEntitiesRequest < Struct.new(
|
116
|
+
:text_list,
|
117
|
+
:language_code)
|
118
|
+
include Aws::Structure
|
119
|
+
end
|
120
|
+
|
121
|
+
# @!attribute [rw] result_list
|
122
|
+
# A list of objects containing the results of the operation. The
|
123
|
+
# results are sorted in ascending order by the `Index` field and match
|
124
|
+
# the order of the documents in the input list. If all of the
|
125
|
+
# documents contain an error, the `ResultList` is empty.
|
126
|
+
# @return [Array<Types::BatchDetectEntitiesItemResult>]
|
127
|
+
#
|
128
|
+
# @!attribute [rw] error_list
|
129
|
+
# A list containing one object for each document that contained an
|
130
|
+
# error. The results are sorted in ascending order by the `Index`
|
131
|
+
# field and match the order of the documents in the input list. If
|
132
|
+
# there are no errors in the batch, the `ErrorList` is empty.
|
133
|
+
# @return [Array<Types::BatchItemError>]
|
134
|
+
#
|
135
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectEntitiesResponse AWS API Documentation
|
136
|
+
#
|
137
|
+
class BatchDetectEntitiesResponse < Struct.new(
|
138
|
+
:result_list,
|
139
|
+
:error_list)
|
140
|
+
include Aws::Structure
|
141
|
+
end
|
142
|
+
|
143
|
+
# The result of calling the operation. The operation returns one object
|
144
|
+
# for each document that is successfully processed by the operation.
|
145
|
+
#
|
146
|
+
# @!attribute [rw] index
|
147
|
+
# The zero-based index of the document in the input list.
|
148
|
+
# @return [Integer]
|
149
|
+
#
|
150
|
+
# @!attribute [rw] key_phrases
|
151
|
+
# One or more KeyPhrase objects, one for each key phrase detected in
|
152
|
+
# the document.
|
153
|
+
# @return [Array<Types::KeyPhrase>]
|
154
|
+
#
|
155
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectKeyPhrasesItemResult AWS API Documentation
|
156
|
+
#
|
157
|
+
class BatchDetectKeyPhrasesItemResult < Struct.new(
|
158
|
+
:index,
|
159
|
+
:key_phrases)
|
160
|
+
include Aws::Structure
|
161
|
+
end
|
162
|
+
|
163
|
+
# @note When making an API call, you may pass BatchDetectKeyPhrasesRequest
|
164
|
+
# data as a hash:
|
165
|
+
#
|
166
|
+
# {
|
167
|
+
# text_list: ["String"], # required
|
168
|
+
# language_code: "String", # required
|
169
|
+
# }
|
170
|
+
#
|
171
|
+
# @!attribute [rw] text_list
|
172
|
+
# A list containing the text of the input documents. The list can
|
173
|
+
# contain a maximum of 25 documents. Each document must contain fewer
|
174
|
+
# that 5,000 bytes of UTF-8 encoded characters.
|
175
|
+
# @return [Array<String>]
|
176
|
+
#
|
177
|
+
# @!attribute [rw] language_code
|
178
|
+
# The language of the input documents. All documents must be in the
|
179
|
+
# same language.
|
180
|
+
# @return [String]
|
181
|
+
#
|
182
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectKeyPhrasesRequest AWS API Documentation
|
183
|
+
#
|
184
|
+
class BatchDetectKeyPhrasesRequest < Struct.new(
|
185
|
+
:text_list,
|
186
|
+
:language_code)
|
187
|
+
include Aws::Structure
|
188
|
+
end
|
189
|
+
|
190
|
+
# @!attribute [rw] result_list
|
191
|
+
# A list of objects containing the results of the operation. The
|
192
|
+
# results are sorted in ascending order by the `Index` field and match
|
193
|
+
# the order of the documents in the input list. If all of the
|
194
|
+
# documents contain an error, the `ResultList` is empty.
|
195
|
+
# @return [Array<Types::BatchDetectKeyPhrasesItemResult>]
|
196
|
+
#
|
197
|
+
# @!attribute [rw] error_list
|
198
|
+
# A list containing one object for each document that contained an
|
199
|
+
# error. The results are sorted in ascending order by the `Index`
|
200
|
+
# field and match the order of the documents in the input list. If
|
201
|
+
# there are no errors in the batch, the `ErrorList` is empty.
|
202
|
+
# @return [Array<Types::BatchItemError>]
|
203
|
+
#
|
204
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectKeyPhrasesResponse AWS API Documentation
|
205
|
+
#
|
206
|
+
class BatchDetectKeyPhrasesResponse < Struct.new(
|
207
|
+
:result_list,
|
208
|
+
:error_list)
|
209
|
+
include Aws::Structure
|
210
|
+
end
|
211
|
+
|
212
|
+
# The result of calling the operation. The operation returns one object
|
213
|
+
# for each document that is successfully processed by the operation.
|
214
|
+
#
|
215
|
+
# @!attribute [rw] index
|
216
|
+
# The zero-based index of the document in the input list.
|
217
|
+
# @return [Integer]
|
218
|
+
#
|
219
|
+
# @!attribute [rw] sentiment
|
220
|
+
# The sentiment detected in the document.
|
221
|
+
# @return [String]
|
222
|
+
#
|
223
|
+
# @!attribute [rw] sentiment_score
|
224
|
+
# The level of confidence that Amazon Comprehend has in the accuracy
|
225
|
+
# of its sentiment detection.
|
226
|
+
# @return [Types::SentimentScore]
|
227
|
+
#
|
228
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectSentimentItemResult AWS API Documentation
|
229
|
+
#
|
230
|
+
class BatchDetectSentimentItemResult < Struct.new(
|
231
|
+
:index,
|
232
|
+
:sentiment,
|
233
|
+
:sentiment_score)
|
234
|
+
include Aws::Structure
|
235
|
+
end
|
236
|
+
|
237
|
+
# @note When making an API call, you may pass BatchDetectSentimentRequest
|
238
|
+
# data as a hash:
|
239
|
+
#
|
240
|
+
# {
|
241
|
+
# text_list: ["String"], # required
|
242
|
+
# language_code: "String", # required
|
243
|
+
# }
|
244
|
+
#
|
245
|
+
# @!attribute [rw] text_list
|
246
|
+
# A list containing the text of the input documents. The list can
|
247
|
+
# contain a maximum of 25 documents. Each document must contain fewer
|
248
|
+
# that 5,000 bytes of UTF-8 encoded characters.
|
249
|
+
# @return [Array<String>]
|
250
|
+
#
|
251
|
+
# @!attribute [rw] language_code
|
252
|
+
# The language of the input documents. All documents must be in the
|
253
|
+
# same language.
|
254
|
+
# @return [String]
|
255
|
+
#
|
256
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectSentimentRequest AWS API Documentation
|
257
|
+
#
|
258
|
+
class BatchDetectSentimentRequest < Struct.new(
|
259
|
+
:text_list,
|
260
|
+
:language_code)
|
261
|
+
include Aws::Structure
|
262
|
+
end
|
263
|
+
|
264
|
+
# @!attribute [rw] result_list
|
265
|
+
# A list of objects containing the results of the operation. The
|
266
|
+
# results are sorted in ascending order by the `Index` field and match
|
267
|
+
# the order of the documents in the input list. If all of the
|
268
|
+
# documents contain an error, the `ResultList` is empty.
|
269
|
+
# @return [Array<Types::BatchDetectSentimentItemResult>]
|
270
|
+
#
|
271
|
+
# @!attribute [rw] error_list
|
272
|
+
# A list containing one object for each document that contained an
|
273
|
+
# error. The results are sorted in ascending order by the `Index`
|
274
|
+
# field and match the order of the documents in the input list. If
|
275
|
+
# there are no errors in the batch, the `ErrorList` is empty.
|
276
|
+
# @return [Array<Types::BatchItemError>]
|
277
|
+
#
|
278
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectSentimentResponse AWS API Documentation
|
279
|
+
#
|
280
|
+
class BatchDetectSentimentResponse < Struct.new(
|
281
|
+
:result_list,
|
282
|
+
:error_list)
|
283
|
+
include Aws::Structure
|
284
|
+
end
|
285
|
+
|
286
|
+
# Describes an error that occurred while processing a document in a
|
287
|
+
# batch. The operation returns on `BatchItemError` object for each
|
288
|
+
# document that contained an error.
|
289
|
+
#
|
290
|
+
# @!attribute [rw] index
|
291
|
+
# The zero-based index of the document in the input list.
|
292
|
+
# @return [Integer]
|
293
|
+
#
|
294
|
+
# @!attribute [rw] error_code
|
295
|
+
# The numeric error code of the error.
|
296
|
+
# @return [String]
|
297
|
+
#
|
298
|
+
# @!attribute [rw] error_message
|
299
|
+
# A text description of the error.
|
300
|
+
# @return [String]
|
301
|
+
#
|
302
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchItemError AWS API Documentation
|
303
|
+
#
|
304
|
+
class BatchItemError < Struct.new(
|
305
|
+
:index,
|
306
|
+
:error_code,
|
307
|
+
:error_message)
|
308
|
+
include Aws::Structure
|
309
|
+
end
|
310
|
+
|
311
|
+
# @note When making an API call, you may pass DescribeTopicsDetectionJobRequest
|
312
|
+
# data as a hash:
|
313
|
+
#
|
314
|
+
# {
|
315
|
+
# job_id: "JobId", # required
|
316
|
+
# }
|
317
|
+
#
|
318
|
+
# @!attribute [rw] job_id
|
319
|
+
# The identifier assigned by the user to the detection job.
|
320
|
+
# @return [String]
|
321
|
+
#
|
322
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeTopicsDetectionJobRequest AWS API Documentation
|
323
|
+
#
|
324
|
+
class DescribeTopicsDetectionJobRequest < Struct.new(
|
325
|
+
:job_id)
|
326
|
+
include Aws::Structure
|
327
|
+
end
|
328
|
+
|
329
|
+
# @!attribute [rw] topics_detection_job_properties
|
330
|
+
# The list of properties for the requested job.
|
331
|
+
# @return [Types::TopicsDetectionJobProperties]
|
332
|
+
#
|
333
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeTopicsDetectionJobResponse AWS API Documentation
|
334
|
+
#
|
335
|
+
class DescribeTopicsDetectionJobResponse < Struct.new(
|
336
|
+
:topics_detection_job_properties)
|
337
|
+
include Aws::Structure
|
338
|
+
end
|
339
|
+
|
340
|
+
# @note When making an API call, you may pass DetectDominantLanguageRequest
|
341
|
+
# data as a hash:
|
342
|
+
#
|
343
|
+
# {
|
344
|
+
# text: "String", # required
|
345
|
+
# }
|
346
|
+
#
|
347
|
+
# @!attribute [rw] text
|
348
|
+
# A UTF-8 text string. Each string should contain at least 20
|
349
|
+
# characters and must contain fewer that 5,000 bytes of UTF-8 encoded
|
350
|
+
# characters.
|
351
|
+
# @return [String]
|
352
|
+
#
|
353
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectDominantLanguageRequest AWS API Documentation
|
354
|
+
#
|
355
|
+
class DetectDominantLanguageRequest < Struct.new(
|
356
|
+
:text)
|
357
|
+
include Aws::Structure
|
358
|
+
end
|
359
|
+
|
360
|
+
# @!attribute [rw] languages
|
361
|
+
# The languages that Amazon Comprehend detected in the input text. For
|
362
|
+
# each language, the response returns the RFC 5646 language code and
|
363
|
+
# the level of confidence that Amazon Comprehend has in the accuracy
|
364
|
+
# of its inference. For more information about RFC 5646, see [Tags for
|
365
|
+
# Identifying Languages][1] on the *IETF Tools* web site.
|
366
|
+
#
|
367
|
+
#
|
368
|
+
#
|
369
|
+
# [1]: https://tools.ietf.org/html/rfc5646
|
370
|
+
# @return [Array<Types::DominantLanguage>]
|
371
|
+
#
|
372
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectDominantLanguageResponse AWS API Documentation
|
373
|
+
#
|
374
|
+
class DetectDominantLanguageResponse < Struct.new(
|
375
|
+
:languages)
|
376
|
+
include Aws::Structure
|
377
|
+
end
|
378
|
+
|
379
|
+
# @note When making an API call, you may pass DetectEntitiesRequest
|
380
|
+
# data as a hash:
|
381
|
+
#
|
382
|
+
# {
|
383
|
+
# text: "String", # required
|
384
|
+
# language_code: "en", # required, accepts en, es
|
385
|
+
# }
|
386
|
+
#
|
387
|
+
# @!attribute [rw] text
|
388
|
+
# A UTF-8 text string. Each string must contain fewer that 5,000 bytes
|
389
|
+
# of UTF-8 encoded characters.
|
390
|
+
# @return [String]
|
391
|
+
#
|
392
|
+
# @!attribute [rw] language_code
|
393
|
+
# The RFC 5646 language code of the input text. If the request does
|
394
|
+
# not specify the language code, the service detects the dominant
|
395
|
+
# language. If you specify a language code that the service does not
|
396
|
+
# support, it returns `UnsupportedLanguageException` exception. For
|
397
|
+
# more information about RFC 5646, see [Tags for Identifying
|
398
|
+
# Languages][1] on the *IETF Tools* web site.
|
399
|
+
#
|
400
|
+
#
|
401
|
+
#
|
402
|
+
# [1]: https://tools.ietf.org/html/rfc5646
|
403
|
+
# @return [String]
|
404
|
+
#
|
405
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectEntitiesRequest AWS API Documentation
|
406
|
+
#
|
407
|
+
class DetectEntitiesRequest < Struct.new(
|
408
|
+
:text,
|
409
|
+
:language_code)
|
410
|
+
include Aws::Structure
|
411
|
+
end
|
412
|
+
|
413
|
+
# @!attribute [rw] entities
|
414
|
+
# A collection of entities identified in the input text. For each
|
415
|
+
# entity, the response provides the entity text, entity type, where
|
416
|
+
# the entity text begins and ends, and the level of confidence that
|
417
|
+
# Amazon Comprehend has in the detection. For a list of entity types,
|
418
|
+
# see how-entities.
|
419
|
+
# @return [Array<Types::Entity>]
|
420
|
+
#
|
421
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectEntitiesResponse AWS API Documentation
|
422
|
+
#
|
423
|
+
class DetectEntitiesResponse < Struct.new(
|
424
|
+
:entities)
|
425
|
+
include Aws::Structure
|
426
|
+
end
|
427
|
+
|
428
|
+
# @note When making an API call, you may pass DetectKeyPhrasesRequest
|
429
|
+
# data as a hash:
|
430
|
+
#
|
431
|
+
# {
|
432
|
+
# text: "String", # required
|
433
|
+
# language_code: "en", # required, accepts en, es
|
434
|
+
# }
|
435
|
+
#
|
436
|
+
# @!attribute [rw] text
|
437
|
+
# A UTF-8 text string. Each string must contain fewer that 5,000 bytes
|
438
|
+
# of UTF-8 encoded characters.
|
439
|
+
# @return [String]
|
440
|
+
#
|
441
|
+
# @!attribute [rw] language_code
|
442
|
+
# The RFC 5646 language code for the input text. If you don't specify
|
443
|
+
# a language code, Amazon Comprehend detects the dominant language. If
|
444
|
+
# you specify the code for a language that Amazon Comprehend does not
|
445
|
+
# support, it returns and `UnsupportedLanguageException`. For more
|
446
|
+
# information about RFC 5646, see [Tags for Identifying Languages][1]
|
447
|
+
# on the *IETF Tools* web site.
|
448
|
+
#
|
449
|
+
#
|
450
|
+
#
|
451
|
+
# [1]: https://tools.ietf.org/html/rfc5646
|
452
|
+
# @return [String]
|
453
|
+
#
|
454
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectKeyPhrasesRequest AWS API Documentation
|
455
|
+
#
|
456
|
+
class DetectKeyPhrasesRequest < Struct.new(
|
457
|
+
:text,
|
458
|
+
:language_code)
|
459
|
+
include Aws::Structure
|
460
|
+
end
|
461
|
+
|
462
|
+
# @!attribute [rw] key_phrases
|
463
|
+
# A collection of key phrases that Amazon Comprehend identified in the
|
464
|
+
# input text. For each key phrase, the response provides the text of
|
465
|
+
# the key phrase, where the key phrase begins and ends, and the level
|
466
|
+
# of confidence that Amazon Comprehend has in the accuracy of the
|
467
|
+
# detection.
|
468
|
+
# @return [Array<Types::KeyPhrase>]
|
469
|
+
#
|
470
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectKeyPhrasesResponse AWS API Documentation
|
471
|
+
#
|
472
|
+
class DetectKeyPhrasesResponse < Struct.new(
|
473
|
+
:key_phrases)
|
474
|
+
include Aws::Structure
|
475
|
+
end
|
476
|
+
|
477
|
+
# @note When making an API call, you may pass DetectSentimentRequest
|
478
|
+
# data as a hash:
|
479
|
+
#
|
480
|
+
# {
|
481
|
+
# text: "String", # required
|
482
|
+
# language_code: "en", # required, accepts en, es
|
483
|
+
# }
|
484
|
+
#
|
485
|
+
# @!attribute [rw] text
|
486
|
+
# A UTF-8 text string. Each string must contain fewer that 5,000 bytes
|
487
|
+
# of UTF-8 encoded characters.
|
488
|
+
# @return [String]
|
489
|
+
#
|
490
|
+
# @!attribute [rw] language_code
|
491
|
+
# The RFC 5646 language code for the input text. If you don't specify
|
492
|
+
# a language code, Amazon Comprehend detects the dominant language. If
|
493
|
+
# you specify the code for a language that Amazon Comprehend does not
|
494
|
+
# support, it returns and `UnsupportedLanguageException`. For more
|
495
|
+
# information about RFC 5646, see [Tags for Identifying Languages][1]
|
496
|
+
# on the *IETF Tools* web site.
|
497
|
+
#
|
498
|
+
#
|
499
|
+
#
|
500
|
+
# [1]: https://tools.ietf.org/html/rfc5646
|
501
|
+
# @return [String]
|
502
|
+
#
|
503
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectSentimentRequest AWS API Documentation
|
504
|
+
#
|
505
|
+
class DetectSentimentRequest < Struct.new(
|
506
|
+
:text,
|
507
|
+
:language_code)
|
508
|
+
include Aws::Structure
|
509
|
+
end
|
510
|
+
|
511
|
+
# @!attribute [rw] sentiment
|
512
|
+
# The inferred sentiment that Amazon Comprehend has the highest level
|
513
|
+
# of confidence in.
|
514
|
+
# @return [String]
|
515
|
+
#
|
516
|
+
# @!attribute [rw] sentiment_score
|
517
|
+
# An object that lists the sentiments, and their corresponding
|
518
|
+
# confidence levels.
|
519
|
+
# @return [Types::SentimentScore]
|
520
|
+
#
|
521
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectSentimentResponse AWS API Documentation
|
522
|
+
#
|
523
|
+
class DetectSentimentResponse < Struct.new(
|
524
|
+
:sentiment,
|
525
|
+
:sentiment_score)
|
526
|
+
include Aws::Structure
|
527
|
+
end
|
528
|
+
|
529
|
+
# Returns the code for the dominant language in the input text and the
|
530
|
+
# level of confidence that Amazon Comprehend has in the accuracy of the
|
531
|
+
# detection.
|
532
|
+
#
|
533
|
+
# @!attribute [rw] language_code
|
534
|
+
# The RFC 5646 language code for the dominant language.
|
535
|
+
# @return [String]
|
536
|
+
#
|
537
|
+
# @!attribute [rw] score
|
538
|
+
# The level of confidence that Amazon Comprehend has in the accuracy
|
539
|
+
# of the detection.
|
540
|
+
# @return [Float]
|
541
|
+
#
|
542
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DominantLanguage AWS API Documentation
|
543
|
+
#
|
544
|
+
class DominantLanguage < Struct.new(
|
545
|
+
:language_code,
|
546
|
+
:score)
|
547
|
+
include Aws::Structure
|
548
|
+
end
|
549
|
+
|
550
|
+
# Provides information about an entity.
|
551
|
+
#
|
552
|
+
# @!attribute [rw] score
|
553
|
+
# The level of confidence that Amazon Comprehend has in the accuracy
|
554
|
+
# of the detection.
|
555
|
+
# @return [Float]
|
556
|
+
#
|
557
|
+
# @!attribute [rw] type
|
558
|
+
# The entity's type.
|
559
|
+
# @return [String]
|
560
|
+
#
|
561
|
+
# @!attribute [rw] text
|
562
|
+
# The text of the entity.
|
563
|
+
# @return [String]
|
564
|
+
#
|
565
|
+
# @!attribute [rw] begin_offset
|
566
|
+
# A character offset in the input text that shows where the entity
|
567
|
+
# begins (the first character is at position 0). The offset returns
|
568
|
+
# the position of each UTF-8 code point in the string. A *code point*
|
569
|
+
# is the abstract character from a particular graphical
|
570
|
+
# representation. For example, a multi-byte UTF-8 character maps to a
|
571
|
+
# single code point.
|
572
|
+
# @return [Integer]
|
573
|
+
#
|
574
|
+
# @!attribute [rw] end_offset
|
575
|
+
# A character offset in the input text that shows where the entity
|
576
|
+
# ends. The offset returns the position of each UTF-8 code point in
|
577
|
+
# the string. A *code point* is the abstract character from a
|
578
|
+
# particular graphical representation. For example, a multi-byte UTF-8
|
579
|
+
# character maps to a single code point.
|
580
|
+
# @return [Integer]
|
581
|
+
#
|
582
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/Entity AWS API Documentation
|
583
|
+
#
|
584
|
+
class Entity < Struct.new(
|
585
|
+
:score,
|
586
|
+
:type,
|
587
|
+
:text,
|
588
|
+
:begin_offset,
|
589
|
+
:end_offset)
|
590
|
+
include Aws::Structure
|
591
|
+
end
|
592
|
+
|
593
|
+
# The input properties for a topic detection job.
|
594
|
+
#
|
595
|
+
# @note When making an API call, you may pass InputDataConfig
|
596
|
+
# data as a hash:
|
597
|
+
#
|
598
|
+
# {
|
599
|
+
# s3_uri: "S3Uri", # required
|
600
|
+
# input_format: "ONE_DOC_PER_FILE", # accepts ONE_DOC_PER_FILE, ONE_DOC_PER_LINE
|
601
|
+
# }
|
602
|
+
#
|
603
|
+
# @!attribute [rw] s3_uri
|
604
|
+
# The Amazon S3 URI for the input data. The URI must be in same region
|
605
|
+
# as the API endpoint that you are calling. The URI can point to a
|
606
|
+
# single input file or it can provide the prefix for a collection of
|
607
|
+
# data files.
|
608
|
+
#
|
609
|
+
# For example, if you use the URI `S3://bucketName/prefix`, if the
|
610
|
+
# prefix is a single file, Amazon Comprehend uses that file as input.
|
611
|
+
# If more than one file begins with the prefix, Amazon Comprehend uses
|
612
|
+
# all of them as input.
|
613
|
+
# @return [String]
|
614
|
+
#
|
615
|
+
# @!attribute [rw] input_format
|
616
|
+
# Specifies how the text in an input file should be processed:
|
617
|
+
#
|
618
|
+
# * `ONE_DOC_PER_FILE` - Each file is considered a separate document.
|
619
|
+
# Use this option when you are processing large documents, such as
|
620
|
+
# newspaper articles or scientific papers.
|
621
|
+
#
|
622
|
+
# * `ONE_DOC_PER_LINE` - Each line in a file is considered a separate
|
623
|
+
# document. Use this option when you are processing many short
|
624
|
+
# documents, such as text messages.
|
625
|
+
# @return [String]
|
626
|
+
#
|
627
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/InputDataConfig AWS API Documentation
|
628
|
+
#
|
629
|
+
class InputDataConfig < Struct.new(
|
630
|
+
:s3_uri,
|
631
|
+
:input_format)
|
632
|
+
include Aws::Structure
|
633
|
+
end
|
634
|
+
|
635
|
+
# Describes a key noun phrase.
|
636
|
+
#
|
637
|
+
# @!attribute [rw] score
|
638
|
+
# The level of confidence that Amazon Comprehend has in the accuracy
|
639
|
+
# of the detection.
|
640
|
+
# @return [Float]
|
641
|
+
#
|
642
|
+
# @!attribute [rw] text
|
643
|
+
# The text of a key noun phrase.
|
644
|
+
# @return [String]
|
645
|
+
#
|
646
|
+
# @!attribute [rw] begin_offset
|
647
|
+
# A character offset in the input text that shows where the key phrase
|
648
|
+
# begins (the first character is at position 0). The offset returns
|
649
|
+
# the position of each UTF-8 code point in the string. A *code point*
|
650
|
+
# is the abstract character from a particular graphical
|
651
|
+
# representation. For example, a multi-byte UTF-8 character maps to a
|
652
|
+
# single code point.
|
653
|
+
# @return [Integer]
|
654
|
+
#
|
655
|
+
# @!attribute [rw] end_offset
|
656
|
+
# A character offset in the input text where the key phrase ends. The
|
657
|
+
# offset returns the position of each UTF-8 code point in the string.
|
658
|
+
# A `code point` is the abstract character from a particular graphical
|
659
|
+
# representation. For example, a multi-byte UTF-8 character maps to a
|
660
|
+
# single code point.
|
661
|
+
# @return [Integer]
|
662
|
+
#
|
663
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/KeyPhrase AWS API Documentation
|
664
|
+
#
|
665
|
+
class KeyPhrase < Struct.new(
|
666
|
+
:score,
|
667
|
+
:text,
|
668
|
+
:begin_offset,
|
669
|
+
:end_offset)
|
670
|
+
include Aws::Structure
|
671
|
+
end
|
672
|
+
|
673
|
+
# @note When making an API call, you may pass ListTopicsDetectionJobsRequest
|
674
|
+
# data as a hash:
|
675
|
+
#
|
676
|
+
# {
|
677
|
+
# filter: {
|
678
|
+
# job_name: "JobName",
|
679
|
+
# job_status: "SUBMITTED", # accepts SUBMITTED, IN_PROGRESS, COMPLETED, FAILED
|
680
|
+
# submit_time_before: Time.now,
|
681
|
+
# submit_time_after: Time.now,
|
682
|
+
# },
|
683
|
+
# next_token: "String",
|
684
|
+
# max_results: 1,
|
685
|
+
# }
|
686
|
+
#
|
687
|
+
# @!attribute [rw] filter
|
688
|
+
# Filters the jobs that are returned. Jobs can be filtered on their
|
689
|
+
# name, status, or the date and time that they were submitted. You can
|
690
|
+
# set only one filter at a time.
|
691
|
+
# @return [Types::TopicsDetectionJobFilter]
|
692
|
+
#
|
693
|
+
# @!attribute [rw] next_token
|
694
|
+
# Identifies the next page of results to return.
|
695
|
+
# @return [String]
|
696
|
+
#
|
697
|
+
# @!attribute [rw] max_results
|
698
|
+
# The maximum number of results to return in each page.
|
699
|
+
# @return [Integer]
|
700
|
+
#
|
701
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListTopicsDetectionJobsRequest AWS API Documentation
|
702
|
+
#
|
703
|
+
class ListTopicsDetectionJobsRequest < Struct.new(
|
704
|
+
:filter,
|
705
|
+
:next_token,
|
706
|
+
:max_results)
|
707
|
+
include Aws::Structure
|
708
|
+
end
|
709
|
+
|
710
|
+
# @!attribute [rw] topics_detection_job_properties_list
|
711
|
+
# A list containing the properties of each job that is returned.
|
712
|
+
# @return [Array<Types::TopicsDetectionJobProperties>]
|
713
|
+
#
|
714
|
+
# @!attribute [rw] next_token
|
715
|
+
# Identifies the next page of results to return.
|
716
|
+
# @return [String]
|
717
|
+
#
|
718
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListTopicsDetectionJobsResponse AWS API Documentation
|
719
|
+
#
|
720
|
+
class ListTopicsDetectionJobsResponse < Struct.new(
|
721
|
+
:topics_detection_job_properties_list,
|
722
|
+
:next_token)
|
723
|
+
include Aws::Structure
|
724
|
+
end
|
725
|
+
|
726
|
+
# Provides configuration parameters for the output of topic detection
|
727
|
+
# jobs.
|
728
|
+
#
|
729
|
+
# @note When making an API call, you may pass OutputDataConfig
|
730
|
+
# data as a hash:
|
731
|
+
#
|
732
|
+
# {
|
733
|
+
# s3_uri: "S3Uri", # required
|
734
|
+
# }
|
735
|
+
#
|
736
|
+
# @!attribute [rw] s3_uri
|
737
|
+
# The Amazon S3 URI where you want to write the output data. The URI
|
738
|
+
# must be in the same region as the API endpoint that you are calling.
|
739
|
+
#
|
740
|
+
# The service creates an output file called `output.tar.gz`. It is a
|
741
|
+
# compressed archive that contains two files, `topic-terms.csv` that
|
742
|
+
# lists the terms associated with each topic, and `doc-topics.csv`
|
743
|
+
# that lists the documents associated with each topic. For more
|
744
|
+
# information, see topic-modeling.
|
745
|
+
# @return [String]
|
746
|
+
#
|
747
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/OutputDataConfig AWS API Documentation
|
748
|
+
#
|
749
|
+
class OutputDataConfig < Struct.new(
|
750
|
+
:s3_uri)
|
751
|
+
include Aws::Structure
|
752
|
+
end
|
753
|
+
|
754
|
+
# Describes the level of confidence that Amazon Comprehend has in the
|
755
|
+
# accuracy of its detection of sentiments.
|
756
|
+
#
|
757
|
+
# @!attribute [rw] positive
|
758
|
+
# The level of confidence that Amazon Comprehend has in the accuracy
|
759
|
+
# of its detection of the `POSITIVE` sentiment.
|
760
|
+
# @return [Float]
|
761
|
+
#
|
762
|
+
# @!attribute [rw] negative
|
763
|
+
# The level of confidence that Amazon Comprehend has in the accuracy
|
764
|
+
# of its detection of the `NEGATIVE` sentiment.
|
765
|
+
# @return [Float]
|
766
|
+
#
|
767
|
+
# @!attribute [rw] neutral
|
768
|
+
# The level of confidence that Amazon Comprehend has in the accuracy
|
769
|
+
# of its detection of the `NEUTRAL` sentiment.
|
770
|
+
# @return [Float]
|
771
|
+
#
|
772
|
+
# @!attribute [rw] mixed
|
773
|
+
# The level of confidence that Amazon Comprehend has in the accuracy
|
774
|
+
# of its detection of the `MIXED` sentiment.
|
775
|
+
# @return [Float]
|
776
|
+
#
|
777
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/SentimentScore AWS API Documentation
|
778
|
+
#
|
779
|
+
class SentimentScore < Struct.new(
|
780
|
+
:positive,
|
781
|
+
:negative,
|
782
|
+
:neutral,
|
783
|
+
:mixed)
|
784
|
+
include Aws::Structure
|
785
|
+
end
|
786
|
+
|
787
|
+
# @note When making an API call, you may pass StartTopicsDetectionJobRequest
|
788
|
+
# data as a hash:
|
789
|
+
#
|
790
|
+
# {
|
791
|
+
# input_data_config: { # required
|
792
|
+
# s3_uri: "S3Uri", # required
|
793
|
+
# input_format: "ONE_DOC_PER_FILE", # accepts ONE_DOC_PER_FILE, ONE_DOC_PER_LINE
|
794
|
+
# },
|
795
|
+
# output_data_config: { # required
|
796
|
+
# s3_uri: "S3Uri", # required
|
797
|
+
# },
|
798
|
+
# data_access_role_arn: "IamRoleArn", # required
|
799
|
+
# job_name: "JobName",
|
800
|
+
# number_of_topics: 1,
|
801
|
+
# client_request_token: "ClientRequestTokenString",
|
802
|
+
# }
|
803
|
+
#
|
804
|
+
# @!attribute [rw] input_data_config
|
805
|
+
# Specifies the format and location of the input data for the job.
|
806
|
+
# @return [Types::InputDataConfig]
|
807
|
+
#
|
808
|
+
# @!attribute [rw] output_data_config
|
809
|
+
# Specifies where to send the output files.
|
810
|
+
# @return [Types::OutputDataConfig]
|
811
|
+
#
|
812
|
+
# @!attribute [rw] data_access_role_arn
|
813
|
+
# The Amazon Resource Name (ARN) of the AWS Identity and Access
|
814
|
+
# Management (IAM) role that grants Amazon Comprehend read access to
|
815
|
+
# your input data.
|
816
|
+
# @return [String]
|
817
|
+
#
|
818
|
+
# @!attribute [rw] job_name
|
819
|
+
# The identifier of the job.
|
820
|
+
# @return [String]
|
821
|
+
#
|
822
|
+
# @!attribute [rw] number_of_topics
|
823
|
+
# The number of topics to detect.
|
824
|
+
# @return [Integer]
|
825
|
+
#
|
826
|
+
# @!attribute [rw] client_request_token
|
827
|
+
# A unique identifier for the request. If you do not set the client
|
828
|
+
# request token, Amazon Comprehend generates one.
|
829
|
+
#
|
830
|
+
# **A suitable default value is auto-generated.** You should normally
|
831
|
+
# not need to pass this option.
|
832
|
+
# @return [String]
|
833
|
+
#
|
834
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartTopicsDetectionJobRequest AWS API Documentation
|
835
|
+
#
|
836
|
+
class StartTopicsDetectionJobRequest < Struct.new(
|
837
|
+
:input_data_config,
|
838
|
+
:output_data_config,
|
839
|
+
:data_access_role_arn,
|
840
|
+
:job_name,
|
841
|
+
:number_of_topics,
|
842
|
+
:client_request_token)
|
843
|
+
include Aws::Structure
|
844
|
+
end
|
845
|
+
|
846
|
+
# @!attribute [rw] job_id
|
847
|
+
# The identifier generated for the job. To get the status of the job,
|
848
|
+
# use this identifier with the `DescribeTopicDetectionJob` operation.
|
849
|
+
# @return [String]
|
850
|
+
#
|
851
|
+
# @!attribute [rw] job_status
|
852
|
+
# The status of the job:
|
853
|
+
#
|
854
|
+
# * SUBMITTED - The job has been received and is queued for
|
855
|
+
# processing.
|
856
|
+
#
|
857
|
+
# * IN\_PROGRESS - Amazon Comprehend is processing the job.
|
858
|
+
#
|
859
|
+
# * COMPLETED - The job was successfully completed and the output is
|
860
|
+
# available.
|
861
|
+
#
|
862
|
+
# * FAILED - The job did not complete. To get details, use the
|
863
|
+
# `DescribeTopicDetectionJob` operation.
|
864
|
+
# @return [String]
|
865
|
+
#
|
866
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartTopicsDetectionJobResponse AWS API Documentation
|
867
|
+
#
|
868
|
+
class StartTopicsDetectionJobResponse < Struct.new(
|
869
|
+
:job_id,
|
870
|
+
:job_status)
|
871
|
+
include Aws::Structure
|
872
|
+
end
|
873
|
+
|
874
|
+
# Provides information for filtering topic detection jobs. For more
|
875
|
+
# information, see .
|
876
|
+
#
|
877
|
+
# @note When making an API call, you may pass TopicsDetectionJobFilter
|
878
|
+
# data as a hash:
|
879
|
+
#
|
880
|
+
# {
|
881
|
+
# job_name: "JobName",
|
882
|
+
# job_status: "SUBMITTED", # accepts SUBMITTED, IN_PROGRESS, COMPLETED, FAILED
|
883
|
+
# submit_time_before: Time.now,
|
884
|
+
# submit_time_after: Time.now,
|
885
|
+
# }
|
886
|
+
#
|
887
|
+
# @!attribute [rw] job_name
|
888
|
+
# @return [String]
|
889
|
+
#
|
890
|
+
# @!attribute [rw] job_status
|
891
|
+
# Filters the list of topic detection jobs based on job status.
|
892
|
+
# Returns only jobs with the specified status.
|
893
|
+
# @return [String]
|
894
|
+
#
|
895
|
+
# @!attribute [rw] submit_time_before
|
896
|
+
# Filters the list of jobs based on the time that the job was
|
897
|
+
# submitted for processing. Only returns jobs submitted before the
|
898
|
+
# specified time. Jobs are returned in descending order, newest to
|
899
|
+
# oldest.
|
900
|
+
# @return [Time]
|
901
|
+
#
|
902
|
+
# @!attribute [rw] submit_time_after
|
903
|
+
# Filters the list of jobs based on the time that the job was
|
904
|
+
# submitted for processing. Only returns jobs submitted after the
|
905
|
+
# specified time. Jobs are returned in ascending order, oldest to
|
906
|
+
# newest.
|
907
|
+
# @return [Time]
|
908
|
+
#
|
909
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/TopicsDetectionJobFilter AWS API Documentation
|
910
|
+
#
|
911
|
+
class TopicsDetectionJobFilter < Struct.new(
|
912
|
+
:job_name,
|
913
|
+
:job_status,
|
914
|
+
:submit_time_before,
|
915
|
+
:submit_time_after)
|
916
|
+
include Aws::Structure
|
917
|
+
end
|
918
|
+
|
919
|
+
# Provides information about a topic detection job.
|
920
|
+
#
|
921
|
+
# @!attribute [rw] job_id
|
922
|
+
# The identifier assigned to the topic detection job.
|
923
|
+
# @return [String]
|
924
|
+
#
|
925
|
+
# @!attribute [rw] job_name
|
926
|
+
# The name of the topic detection job.
|
927
|
+
# @return [String]
|
928
|
+
#
|
929
|
+
# @!attribute [rw] job_status
|
930
|
+
# The current status of the topic detection job. If the status is
|
931
|
+
# `Failed`, the reason for the failure is shown in the `Message`
|
932
|
+
# field.
|
933
|
+
# @return [String]
|
934
|
+
#
|
935
|
+
# @!attribute [rw] message
|
936
|
+
# A description for the status of a job.
|
937
|
+
# @return [String]
|
938
|
+
#
|
939
|
+
# @!attribute [rw] submit_time
|
940
|
+
# The time that the topic detection job was submitted for processing.
|
941
|
+
# @return [Time]
|
942
|
+
#
|
943
|
+
# @!attribute [rw] end_time
|
944
|
+
# The time that the topic detection job was completed.
|
945
|
+
# @return [Time]
|
946
|
+
#
|
947
|
+
# @!attribute [rw] input_data_config
|
948
|
+
# The input data configuration supplied when you created the topic
|
949
|
+
# detection job.
|
950
|
+
# @return [Types::InputDataConfig]
|
951
|
+
#
|
952
|
+
# @!attribute [rw] output_data_config
|
953
|
+
# The output data configuration supplied when you created the topic
|
954
|
+
# detection job.
|
955
|
+
# @return [Types::OutputDataConfig]
|
956
|
+
#
|
957
|
+
# @!attribute [rw] number_of_topics
|
958
|
+
# The number of topics to detect supplied when you created the topic
|
959
|
+
# detection job. The default is 10.
|
960
|
+
# @return [Integer]
|
961
|
+
#
|
962
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/TopicsDetectionJobProperties AWS API Documentation
|
963
|
+
#
|
964
|
+
class TopicsDetectionJobProperties < Struct.new(
|
965
|
+
:job_id,
|
966
|
+
:job_name,
|
967
|
+
:job_status,
|
968
|
+
:message,
|
969
|
+
:submit_time,
|
970
|
+
:end_time,
|
971
|
+
:input_data_config,
|
972
|
+
:output_data_config,
|
973
|
+
:number_of_topics)
|
974
|
+
include Aws::Structure
|
975
|
+
end
|
976
|
+
|
977
|
+
end
|
978
|
+
end
|