aws-sdk-comprehend 1.61.0 → 1.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-comprehend/client.rb +205 -40
- data/lib/aws-sdk-comprehend/client_api.rb +82 -0
- data/lib/aws-sdk-comprehend/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-comprehend/endpoint_provider.rb +112 -0
- data/lib/aws-sdk-comprehend/endpoints.rb +1037 -0
- data/lib/aws-sdk-comprehend/plugins/endpoints.rb +214 -0
- data/lib/aws-sdk-comprehend/types.rb +317 -79
- data/lib/aws-sdk-comprehend.rb +5 -1
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d212d21125ecdc6ca982ffe33cd1d5a15def0f2dde020e50d72933597899a1c6
|
4
|
+
data.tar.gz: e62eef5a460d224bd305d092f13240bd797fb7b8dcc51f7324adcd84b0badcee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef957369421573536c7594b798e30d7ca24ca6c6508456646487097c0c631703f4ef69faa6dbc7fde543225028a9472f48bf005bf652222e2faf41b744fba7ce
|
7
|
+
data.tar.gz: 1a85f0719dfca01cbb6a7a8df95e48b8ebe71068bee62031e317f045a55c7d7a7c148b66a52b6007cc1ed10a8df979bf104c102e4944edebb84399e23e9b73e6
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.63.0 (2022-10-25)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
8
|
+
|
9
|
+
1.62.0 (2022-09-21)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Feature - Amazon Comprehend now supports synchronous mode for targeted sentiment API operations.
|
13
|
+
|
4
14
|
1.61.0 (2022-05-20)
|
5
15
|
------------------
|
6
16
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.63.0
|
@@ -30,7 +30,7 @@ require 'aws-sdk-core/plugins/http_checksum.rb'
|
|
30
30
|
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
31
31
|
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
32
32
|
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
33
|
-
require 'aws-sdk-core/plugins/
|
33
|
+
require 'aws-sdk-core/plugins/sign.rb'
|
34
34
|
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
35
35
|
|
36
36
|
Aws::Plugins::GlobalConfiguration.add_identifier(:comprehend)
|
@@ -79,8 +79,9 @@ module Aws::Comprehend
|
|
79
79
|
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
80
80
|
add_plugin(Aws::Plugins::DefaultsMode)
|
81
81
|
add_plugin(Aws::Plugins::RecursionDetection)
|
82
|
-
add_plugin(Aws::Plugins::
|
82
|
+
add_plugin(Aws::Plugins::Sign)
|
83
83
|
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
84
|
+
add_plugin(Aws::Comprehend::Plugins::Endpoints)
|
84
85
|
|
85
86
|
# @overload initialize(options)
|
86
87
|
# @param [Hash] options
|
@@ -297,6 +298,19 @@ module Aws::Comprehend
|
|
297
298
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
298
299
|
# requests are made, and retries are disabled.
|
299
300
|
#
|
301
|
+
# @option options [Aws::TokenProvider] :token_provider
|
302
|
+
# A Bearer Token Provider. This can be an instance of any one of the
|
303
|
+
# following classes:
|
304
|
+
#
|
305
|
+
# * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
|
306
|
+
# tokens.
|
307
|
+
#
|
308
|
+
# * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
|
309
|
+
# access token generated from `aws login`.
|
310
|
+
#
|
311
|
+
# When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
|
312
|
+
# will be used to search for tokens configured for your profile in shared configuration files.
|
313
|
+
#
|
300
314
|
# @option options [Boolean] :use_dualstack_endpoint
|
301
315
|
# When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
|
302
316
|
# will be used if available.
|
@@ -310,6 +324,9 @@ module Aws::Comprehend
|
|
310
324
|
# When `true`, request parameters are validated before
|
311
325
|
# sending the request.
|
312
326
|
#
|
327
|
+
# @option options [Aws::Comprehend::EndpointProvider] :endpoint_provider
|
328
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::Comprehend::EndpointParameters`
|
329
|
+
#
|
313
330
|
# @option options [URI::HTTP,String] :http_proxy A proxy to send
|
314
331
|
# requests through. Formatted like 'http://proxy.com:123'.
|
315
332
|
#
|
@@ -370,10 +387,10 @@ module Aws::Comprehend
|
|
370
387
|
# [1]: https://docs.aws.amazon.com/comprehend/latest/dg/how-languages.html
|
371
388
|
#
|
372
389
|
# @option params [required, Array<String>] :text_list
|
373
|
-
# A list containing the text of the input documents. The
|
374
|
-
# contain a maximum of 25 documents. Each document should
|
375
|
-
# least 20 characters
|
376
|
-
#
|
390
|
+
# A list containing the UTF-8 encoded text of the input documents. The
|
391
|
+
# list can contain a maximum of 25 documents. Each document should
|
392
|
+
# contain at least 20 characters. The maximum size of each document is 5
|
393
|
+
# KB.
|
377
394
|
#
|
378
395
|
# @return [Types::BatchDetectDominantLanguageResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
379
396
|
#
|
@@ -409,12 +426,16 @@ module Aws::Comprehend
|
|
409
426
|
|
410
427
|
# Inspects the text of a batch of documents for named entities and
|
411
428
|
# returns information about them. For more information about named
|
412
|
-
# entities, see
|
429
|
+
# entities, see [Entities][1] in the Comprehend Developer Guide.
|
430
|
+
#
|
431
|
+
#
|
432
|
+
#
|
433
|
+
# [1]: https://docs.aws.amazon.com/comprehend/latest/dg/how-entities.html
|
413
434
|
#
|
414
435
|
# @option params [required, Array<String>] :text_list
|
415
|
-
# A list containing the text of the input documents. The
|
416
|
-
# contain a maximum of 25 documents.
|
417
|
-
#
|
436
|
+
# A list containing the UTF-8 encoded text of the input documents. The
|
437
|
+
# list can contain a maximum of 25 documents. The maximum size of each
|
438
|
+
# document is 5 KB.
|
418
439
|
#
|
419
440
|
# @option params [required, String] :language_code
|
420
441
|
# The language of the input documents. You can specify any of the
|
@@ -460,9 +481,9 @@ module Aws::Comprehend
|
|
460
481
|
# Detects the key noun phrases found in a batch of documents.
|
461
482
|
#
|
462
483
|
# @option params [required, Array<String>] :text_list
|
463
|
-
# A list containing the text of the input documents. The
|
464
|
-
# contain a maximum of 25 documents.
|
465
|
-
#
|
484
|
+
# A list containing the UTF-8 encoded text of the input documents. The
|
485
|
+
# list can contain a maximum of 25 documents. The maximum size of each
|
486
|
+
# document is 5 KB.
|
466
487
|
#
|
467
488
|
# @option params [required, String] :language_code
|
468
489
|
# The language of the input documents. You can specify any of the
|
@@ -509,9 +530,15 @@ module Aws::Comprehend
|
|
509
530
|
# in each one.
|
510
531
|
#
|
511
532
|
# @option params [required, Array<String>] :text_list
|
512
|
-
# A list containing the text of the input documents. The
|
513
|
-
# contain a maximum of 25 documents.
|
514
|
-
#
|
533
|
+
# A list containing the UTF-8 encoded text of the input documents. The
|
534
|
+
# list can contain a maximum of 25 documents. The maximum size of each
|
535
|
+
# document is 5 KB.
|
536
|
+
#
|
537
|
+
# <note markdown="1"> Amazon Comprehend performs real-time sentiment analysis on the first
|
538
|
+
# 500 characters of the input text and ignores any additional text in
|
539
|
+
# the input.
|
540
|
+
#
|
541
|
+
# </note>
|
515
542
|
#
|
516
543
|
# @option params [required, String] :language_code
|
517
544
|
# The language of the input documents. You can specify any of the
|
@@ -555,12 +582,17 @@ module Aws::Comprehend
|
|
555
582
|
|
556
583
|
# Inspects the text of a batch of documents for the syntax and part of
|
557
584
|
# speech of the words in the document and returns information about
|
558
|
-
# them. For more information, see
|
585
|
+
# them. For more information, see [Syntax][1] in the Comprehend
|
586
|
+
# Developer Guide.
|
587
|
+
#
|
588
|
+
#
|
589
|
+
#
|
590
|
+
# [1]: https://docs.aws.amazon.com/comprehend/latest/dg/how-syntax.html
|
559
591
|
#
|
560
592
|
# @option params [required, Array<String>] :text_list
|
561
|
-
# A list containing the text of the input documents. The
|
562
|
-
# contain a maximum of 25 documents.
|
563
|
-
#
|
593
|
+
# A list containing the UTF-8 encoded text of the input documents. The
|
594
|
+
# list can contain a maximum of 25 documents. The maximum size for each
|
595
|
+
# document is 5 KB.
|
564
596
|
#
|
565
597
|
# @option params [required, String] :language_code
|
566
598
|
# The language of the input documents. You can specify any of the
|
@@ -605,6 +637,70 @@ module Aws::Comprehend
|
|
605
637
|
req.send_request(options)
|
606
638
|
end
|
607
639
|
|
640
|
+
# Inspects a batch of documents and returns a sentiment analysis for
|
641
|
+
# each entity identified in the documents.
|
642
|
+
#
|
643
|
+
# For more information about targeted sentiment, see [Targeted
|
644
|
+
# sentiment][1].
|
645
|
+
#
|
646
|
+
#
|
647
|
+
#
|
648
|
+
# [1]: https://docs.aws.amazon.com/comprehend/latest/dg/how-targeted-sentiment.html
|
649
|
+
#
|
650
|
+
# @option params [required, Array<String>] :text_list
|
651
|
+
# A list containing the UTF-8 encoded text of the input documents. The
|
652
|
+
# list can contain a maximum of 25 documents. The maximum size of each
|
653
|
+
# document is 5 KB.
|
654
|
+
#
|
655
|
+
# @option params [required, String] :language_code
|
656
|
+
# The language of the input documents. Currently, English is the only
|
657
|
+
# supported language.
|
658
|
+
#
|
659
|
+
# @return [Types::BatchDetectTargetedSentimentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
660
|
+
#
|
661
|
+
# * {Types::BatchDetectTargetedSentimentResponse#result_list #result_list} => Array<Types::BatchDetectTargetedSentimentItemResult>
|
662
|
+
# * {Types::BatchDetectTargetedSentimentResponse#error_list #error_list} => Array<Types::BatchItemError>
|
663
|
+
#
|
664
|
+
# @example Request syntax with placeholder values
|
665
|
+
#
|
666
|
+
# resp = client.batch_detect_targeted_sentiment({
|
667
|
+
# text_list: ["CustomerInputString"], # required
|
668
|
+
# language_code: "en", # required, accepts en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
|
669
|
+
# })
|
670
|
+
#
|
671
|
+
# @example Response structure
|
672
|
+
#
|
673
|
+
# resp.result_list #=> Array
|
674
|
+
# resp.result_list[0].index #=> Integer
|
675
|
+
# resp.result_list[0].entities #=> Array
|
676
|
+
# resp.result_list[0].entities[0].descriptive_mention_index #=> Array
|
677
|
+
# resp.result_list[0].entities[0].descriptive_mention_index[0] #=> Integer
|
678
|
+
# resp.result_list[0].entities[0].mentions #=> Array
|
679
|
+
# resp.result_list[0].entities[0].mentions[0].score #=> Float
|
680
|
+
# resp.result_list[0].entities[0].mentions[0].group_score #=> Float
|
681
|
+
# resp.result_list[0].entities[0].mentions[0].text #=> String
|
682
|
+
# resp.result_list[0].entities[0].mentions[0].type #=> String, one of "PERSON", "LOCATION", "ORGANIZATION", "FACILITY", "BRAND", "COMMERCIAL_ITEM", "MOVIE", "MUSIC", "BOOK", "SOFTWARE", "GAME", "PERSONAL_TITLE", "EVENT", "DATE", "QUANTITY", "ATTRIBUTE", "OTHER"
|
683
|
+
# resp.result_list[0].entities[0].mentions[0].mention_sentiment.sentiment #=> String, one of "POSITIVE", "NEGATIVE", "NEUTRAL", "MIXED"
|
684
|
+
# resp.result_list[0].entities[0].mentions[0].mention_sentiment.sentiment_score.positive #=> Float
|
685
|
+
# resp.result_list[0].entities[0].mentions[0].mention_sentiment.sentiment_score.negative #=> Float
|
686
|
+
# resp.result_list[0].entities[0].mentions[0].mention_sentiment.sentiment_score.neutral #=> Float
|
687
|
+
# resp.result_list[0].entities[0].mentions[0].mention_sentiment.sentiment_score.mixed #=> Float
|
688
|
+
# resp.result_list[0].entities[0].mentions[0].begin_offset #=> Integer
|
689
|
+
# resp.result_list[0].entities[0].mentions[0].end_offset #=> Integer
|
690
|
+
# resp.error_list #=> Array
|
691
|
+
# resp.error_list[0].index #=> Integer
|
692
|
+
# resp.error_list[0].error_code #=> String
|
693
|
+
# resp.error_list[0].error_message #=> String
|
694
|
+
#
|
695
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectTargetedSentiment AWS API Documentation
|
696
|
+
#
|
697
|
+
# @overload batch_detect_targeted_sentiment(params = {})
|
698
|
+
# @param [Hash] params ({})
|
699
|
+
def batch_detect_targeted_sentiment(params = {}, options = {})
|
700
|
+
req = build_request(:batch_detect_targeted_sentiment, params)
|
701
|
+
req.send_request(options)
|
702
|
+
end
|
703
|
+
|
608
704
|
# Creates a new document classification request to analyze a single
|
609
705
|
# document in real-time, using a previously created and trained custom
|
610
706
|
# model and an endpoint.
|
@@ -655,9 +751,7 @@ module Aws::Comprehend
|
|
655
751
|
# types such as name, address, bank account number, or phone number.
|
656
752
|
#
|
657
753
|
# @option params [required, String] :text
|
658
|
-
#
|
659
|
-
# document in real-time, returning personally identifiable information
|
660
|
-
# (PII) entity labels.
|
754
|
+
# A UTF-8 text string. The maximum string size is 100 KB.
|
661
755
|
#
|
662
756
|
# @option params [required, String] :language_code
|
663
757
|
# The language of the input documents. Currently, English is the only
|
@@ -694,7 +788,11 @@ module Aws::Comprehend
|
|
694
788
|
# documents that labeled with the categories that you want to use. After
|
695
789
|
# the classifier is trained you can use it to categorize a set of
|
696
790
|
# labeled documents into the categories. For more information, see
|
697
|
-
#
|
791
|
+
# [Document Classification][1] in the Comprehend Developer Guide.
|
792
|
+
#
|
793
|
+
#
|
794
|
+
#
|
795
|
+
# [1]: https://docs.aws.amazon.com/comprehend/latest/dg/how-document-classification.html
|
698
796
|
#
|
699
797
|
# @option params [required, String] :document_classifier_name
|
700
798
|
# The name of the document classifier.
|
@@ -1896,8 +1994,8 @@ module Aws::Comprehend
|
|
1896
1994
|
# [1]: https://docs.aws.amazon.com/comprehend/latest/dg/how-languages.html
|
1897
1995
|
#
|
1898
1996
|
# @option params [required, String] :text
|
1899
|
-
# A UTF-8 text string.
|
1900
|
-
#
|
1997
|
+
# A UTF-8 text string. The string must contain at least 20 characters.
|
1998
|
+
# The maximum string size is 100 KB.
|
1901
1999
|
#
|
1902
2000
|
# @return [Types::DetectDominantLanguageResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1903
2001
|
#
|
@@ -1925,11 +2023,15 @@ module Aws::Comprehend
|
|
1925
2023
|
end
|
1926
2024
|
|
1927
2025
|
# Inspects text for named entities, and returns information about them.
|
1928
|
-
# For more information, about named entities, see
|
2026
|
+
# For more information, about named entities, see [Entities][1] in the
|
2027
|
+
# Comprehend Developer Guide.
|
2028
|
+
#
|
2029
|
+
#
|
2030
|
+
#
|
2031
|
+
# [1]: https://docs.aws.amazon.com/comprehend/latest/dg/how-entities.html
|
1929
2032
|
#
|
1930
2033
|
# @option params [required, String] :text
|
1931
|
-
# A UTF-8 text string.
|
1932
|
-
# of UTF-8 encoded characters.
|
2034
|
+
# A UTF-8 text string. The maximum string size is 100 KB.
|
1933
2035
|
#
|
1934
2036
|
# @option params [String] :language_code
|
1935
2037
|
# The language of the input documents. You can specify any of the
|
@@ -1989,8 +2091,8 @@ module Aws::Comprehend
|
|
1989
2091
|
# Detects the key noun phrases found in the text.
|
1990
2092
|
#
|
1991
2093
|
# @option params [required, String] :text
|
1992
|
-
# A UTF-8 text string.
|
1993
|
-
#
|
2094
|
+
# A UTF-8 text string. The string must contain less than 100 KB of UTF-8
|
2095
|
+
# encoded characters.
|
1994
2096
|
#
|
1995
2097
|
# @option params [required, String] :language_code
|
1996
2098
|
# The language of the input documents. You can specify any of the
|
@@ -2029,8 +2131,7 @@ module Aws::Comprehend
|
|
2029
2131
|
# identifiable information (PII) and returns information about them.
|
2030
2132
|
#
|
2031
2133
|
# @option params [required, String] :text
|
2032
|
-
# A UTF-8 text string.
|
2033
|
-
# of UTF-8 encoded characters.
|
2134
|
+
# A UTF-8 text string. The maximum string size is 100 KB.
|
2034
2135
|
#
|
2035
2136
|
# @option params [required, String] :language_code
|
2036
2137
|
# The language of the input documents. Currently, English is the only
|
@@ -2068,8 +2169,13 @@ module Aws::Comprehend
|
|
2068
2169
|
# (`POSITIVE`, `NEUTRAL`, `MIXED`, or `NEGATIVE`).
|
2069
2170
|
#
|
2070
2171
|
# @option params [required, String] :text
|
2071
|
-
# A UTF-8 text string.
|
2072
|
-
#
|
2172
|
+
# A UTF-8 text string. The maximum string size is 5 KB.
|
2173
|
+
#
|
2174
|
+
# <note markdown="1"> Amazon Comprehend performs real-time sentiment analysis on the first
|
2175
|
+
# 500 characters of the input text and ignores any additional text in
|
2176
|
+
# the input.
|
2177
|
+
#
|
2178
|
+
# </note>
|
2073
2179
|
#
|
2074
2180
|
# @option params [required, String] :language_code
|
2075
2181
|
# The language of the input documents. You can specify any of the
|
@@ -2106,11 +2212,15 @@ module Aws::Comprehend
|
|
2106
2212
|
end
|
2107
2213
|
|
2108
2214
|
# Inspects text for syntax and the part of speech of words in the
|
2109
|
-
# document. For more information,
|
2215
|
+
# document. For more information, see [Syntax][1] in the Comprehend
|
2216
|
+
# Developer Guide.
|
2217
|
+
#
|
2218
|
+
#
|
2219
|
+
#
|
2220
|
+
# [1]: https://docs.aws.amazon.com/comprehend/latest/dg/how-syntax.html
|
2110
2221
|
#
|
2111
2222
|
# @option params [required, String] :text
|
2112
|
-
# A UTF-8 string.
|
2113
|
-
# encoded characters.
|
2223
|
+
# A UTF-8 string. The maximum string size is 5 KB.
|
2114
2224
|
#
|
2115
2225
|
# @option params [required, String] :language_code
|
2116
2226
|
# The language code of the input documents. You can specify any of the
|
@@ -2148,6 +2258,61 @@ module Aws::Comprehend
|
|
2148
2258
|
req.send_request(options)
|
2149
2259
|
end
|
2150
2260
|
|
2261
|
+
# Inspects the input text and returns a sentiment analysis for each
|
2262
|
+
# entity identified in the text.
|
2263
|
+
#
|
2264
|
+
# For more information about targeted sentiment, see [Targeted
|
2265
|
+
# sentiment][1].
|
2266
|
+
#
|
2267
|
+
#
|
2268
|
+
#
|
2269
|
+
# [1]: https://docs.aws.amazon.com/comprehend/latest/dg/how-targeted-sentiment.html
|
2270
|
+
#
|
2271
|
+
# @option params [required, String] :text
|
2272
|
+
# A UTF-8 text string. The maximum string length is 5 KB.
|
2273
|
+
#
|
2274
|
+
# @option params [required, String] :language_code
|
2275
|
+
# The language of the input documents. Currently, English is the only
|
2276
|
+
# supported language.
|
2277
|
+
#
|
2278
|
+
# @return [Types::DetectTargetedSentimentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
2279
|
+
#
|
2280
|
+
# * {Types::DetectTargetedSentimentResponse#entities #entities} => Array<Types::TargetedSentimentEntity>
|
2281
|
+
#
|
2282
|
+
# @example Request syntax with placeholder values
|
2283
|
+
#
|
2284
|
+
# resp = client.detect_targeted_sentiment({
|
2285
|
+
# text: "CustomerInputString", # required
|
2286
|
+
# language_code: "en", # required, accepts en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
|
2287
|
+
# })
|
2288
|
+
#
|
2289
|
+
# @example Response structure
|
2290
|
+
#
|
2291
|
+
# resp.entities #=> Array
|
2292
|
+
# resp.entities[0].descriptive_mention_index #=> Array
|
2293
|
+
# resp.entities[0].descriptive_mention_index[0] #=> Integer
|
2294
|
+
# resp.entities[0].mentions #=> Array
|
2295
|
+
# resp.entities[0].mentions[0].score #=> Float
|
2296
|
+
# resp.entities[0].mentions[0].group_score #=> Float
|
2297
|
+
# resp.entities[0].mentions[0].text #=> String
|
2298
|
+
# resp.entities[0].mentions[0].type #=> String, one of "PERSON", "LOCATION", "ORGANIZATION", "FACILITY", "BRAND", "COMMERCIAL_ITEM", "MOVIE", "MUSIC", "BOOK", "SOFTWARE", "GAME", "PERSONAL_TITLE", "EVENT", "DATE", "QUANTITY", "ATTRIBUTE", "OTHER"
|
2299
|
+
# resp.entities[0].mentions[0].mention_sentiment.sentiment #=> String, one of "POSITIVE", "NEGATIVE", "NEUTRAL", "MIXED"
|
2300
|
+
# resp.entities[0].mentions[0].mention_sentiment.sentiment_score.positive #=> Float
|
2301
|
+
# resp.entities[0].mentions[0].mention_sentiment.sentiment_score.negative #=> Float
|
2302
|
+
# resp.entities[0].mentions[0].mention_sentiment.sentiment_score.neutral #=> Float
|
2303
|
+
# resp.entities[0].mentions[0].mention_sentiment.sentiment_score.mixed #=> Float
|
2304
|
+
# resp.entities[0].mentions[0].begin_offset #=> Integer
|
2305
|
+
# resp.entities[0].mentions[0].end_offset #=> Integer
|
2306
|
+
#
|
2307
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectTargetedSentiment AWS API Documentation
|
2308
|
+
#
|
2309
|
+
# @overload detect_targeted_sentiment(params = {})
|
2310
|
+
# @param [Hash] params ({})
|
2311
|
+
def detect_targeted_sentiment(params = {}, options = {})
|
2312
|
+
req = build_request(:detect_targeted_sentiment, params)
|
2313
|
+
req.send_request(options)
|
2314
|
+
end
|
2315
|
+
|
2151
2316
|
# Creates a new custom model that replicates a source custom model that
|
2152
2317
|
# you import. The source model can be in your AWS account or another
|
2153
2318
|
# one.
|
@@ -4063,7 +4228,7 @@ module Aws::Comprehend
|
|
4063
4228
|
#
|
4064
4229
|
# @option params [required, String] :language_code
|
4065
4230
|
# The language of the input documents. Currently, English is the only
|
4066
|
-
#
|
4231
|
+
# supported language.
|
4067
4232
|
#
|
4068
4233
|
# @option params [String] :client_request_token
|
4069
4234
|
# A unique identifier for the request. If you don't set the client
|
@@ -4720,7 +4885,7 @@ module Aws::Comprehend
|
|
4720
4885
|
params: params,
|
4721
4886
|
config: config)
|
4722
4887
|
context[:gem_name] = 'aws-sdk-comprehend'
|
4723
|
-
context[:gem_version] = '1.
|
4888
|
+
context[:gem_version] = '1.63.0'
|
4724
4889
|
Seahorse::Client::Request.new(handlers, context)
|
4725
4890
|
end
|
4726
4891
|
|
@@ -33,6 +33,9 @@ module Aws::Comprehend
|
|
33
33
|
BatchDetectSyntaxItemResult = Shapes::StructureShape.new(name: 'BatchDetectSyntaxItemResult')
|
34
34
|
BatchDetectSyntaxRequest = Shapes::StructureShape.new(name: 'BatchDetectSyntaxRequest')
|
35
35
|
BatchDetectSyntaxResponse = Shapes::StructureShape.new(name: 'BatchDetectSyntaxResponse')
|
36
|
+
BatchDetectTargetedSentimentItemResult = Shapes::StructureShape.new(name: 'BatchDetectTargetedSentimentItemResult')
|
37
|
+
BatchDetectTargetedSentimentRequest = Shapes::StructureShape.new(name: 'BatchDetectTargetedSentimentRequest')
|
38
|
+
BatchDetectTargetedSentimentResponse = Shapes::StructureShape.new(name: 'BatchDetectTargetedSentimentResponse')
|
36
39
|
BatchItemError = Shapes::StructureShape.new(name: 'BatchItemError')
|
37
40
|
BatchItemErrorList = Shapes::ListShape.new(name: 'BatchItemErrorList')
|
38
41
|
BatchSizeLimitExceededException = Shapes::StructureShape.new(name: 'BatchSizeLimitExceededException')
|
@@ -103,6 +106,8 @@ module Aws::Comprehend
|
|
103
106
|
DetectSentimentResponse = Shapes::StructureShape.new(name: 'DetectSentimentResponse')
|
104
107
|
DetectSyntaxRequest = Shapes::StructureShape.new(name: 'DetectSyntaxRequest')
|
105
108
|
DetectSyntaxResponse = Shapes::StructureShape.new(name: 'DetectSyntaxResponse')
|
109
|
+
DetectTargetedSentimentRequest = Shapes::StructureShape.new(name: 'DetectTargetedSentimentRequest')
|
110
|
+
DetectTargetedSentimentResponse = Shapes::StructureShape.new(name: 'DetectTargetedSentimentResponse')
|
106
111
|
DocumentClass = Shapes::StructureShape.new(name: 'DocumentClass')
|
107
112
|
DocumentClassificationJobFilter = Shapes::StructureShape.new(name: 'DocumentClassificationJobFilter')
|
108
113
|
DocumentClassificationJobProperties = Shapes::StructureShape.new(name: 'DocumentClassificationJobProperties')
|
@@ -208,20 +213,24 @@ module Aws::Comprehend
|
|
208
213
|
ListKeyPhrasesDetectionJobsRequest = Shapes::StructureShape.new(name: 'ListKeyPhrasesDetectionJobsRequest')
|
209
214
|
ListKeyPhrasesDetectionJobsResponse = Shapes::StructureShape.new(name: 'ListKeyPhrasesDetectionJobsResponse')
|
210
215
|
ListOfClasses = Shapes::ListShape.new(name: 'ListOfClasses')
|
216
|
+
ListOfDescriptiveMentionIndices = Shapes::ListShape.new(name: 'ListOfDescriptiveMentionIndices')
|
211
217
|
ListOfDetectDominantLanguageResult = Shapes::ListShape.new(name: 'ListOfDetectDominantLanguageResult')
|
212
218
|
ListOfDetectEntitiesResult = Shapes::ListShape.new(name: 'ListOfDetectEntitiesResult')
|
213
219
|
ListOfDetectKeyPhrasesResult = Shapes::ListShape.new(name: 'ListOfDetectKeyPhrasesResult')
|
214
220
|
ListOfDetectSentimentResult = Shapes::ListShape.new(name: 'ListOfDetectSentimentResult')
|
215
221
|
ListOfDetectSyntaxResult = Shapes::ListShape.new(name: 'ListOfDetectSyntaxResult')
|
222
|
+
ListOfDetectTargetedSentimentResult = Shapes::ListShape.new(name: 'ListOfDetectTargetedSentimentResult')
|
216
223
|
ListOfDocumentReadFeatureTypes = Shapes::ListShape.new(name: 'ListOfDocumentReadFeatureTypes')
|
217
224
|
ListOfDominantLanguages = Shapes::ListShape.new(name: 'ListOfDominantLanguages')
|
218
225
|
ListOfEntities = Shapes::ListShape.new(name: 'ListOfEntities')
|
219
226
|
ListOfEntityLabels = Shapes::ListShape.new(name: 'ListOfEntityLabels')
|
220
227
|
ListOfKeyPhrases = Shapes::ListShape.new(name: 'ListOfKeyPhrases')
|
221
228
|
ListOfLabels = Shapes::ListShape.new(name: 'ListOfLabels')
|
229
|
+
ListOfMentions = Shapes::ListShape.new(name: 'ListOfMentions')
|
222
230
|
ListOfPiiEntities = Shapes::ListShape.new(name: 'ListOfPiiEntities')
|
223
231
|
ListOfPiiEntityTypes = Shapes::ListShape.new(name: 'ListOfPiiEntityTypes')
|
224
232
|
ListOfSyntaxTokens = Shapes::ListShape.new(name: 'ListOfSyntaxTokens')
|
233
|
+
ListOfTargetedSentimentEntities = Shapes::ListShape.new(name: 'ListOfTargetedSentimentEntities')
|
225
234
|
ListPiiEntitiesDetectionJobsRequest = Shapes::StructureShape.new(name: 'ListPiiEntitiesDetectionJobsRequest')
|
226
235
|
ListPiiEntitiesDetectionJobsResponse = Shapes::StructureShape.new(name: 'ListPiiEntitiesDetectionJobsResponse')
|
227
236
|
ListSentimentDetectionJobsRequest = Shapes::StructureShape.new(name: 'ListSentimentDetectionJobsRequest')
|
@@ -234,6 +243,7 @@ module Aws::Comprehend
|
|
234
243
|
ListTopicsDetectionJobsResponse = Shapes::StructureShape.new(name: 'ListTopicsDetectionJobsResponse')
|
235
244
|
MaskCharacter = Shapes::StringShape.new(name: 'MaskCharacter')
|
236
245
|
MaxResultsInteger = Shapes::IntegerShape.new(name: 'MaxResultsInteger')
|
246
|
+
MentionSentiment = Shapes::StructureShape.new(name: 'MentionSentiment')
|
237
247
|
ModelStatus = Shapes::StringShape.new(name: 'ModelStatus')
|
238
248
|
NumberOfTopicsInteger = Shapes::IntegerShape.new(name: 'NumberOfTopicsInteger')
|
239
249
|
OutputDataConfig = Shapes::StructureShape.new(name: 'OutputDataConfig')
|
@@ -317,6 +327,9 @@ module Aws::Comprehend
|
|
317
327
|
TargetedSentimentDetectionJobFilter = Shapes::StructureShape.new(name: 'TargetedSentimentDetectionJobFilter')
|
318
328
|
TargetedSentimentDetectionJobProperties = Shapes::StructureShape.new(name: 'TargetedSentimentDetectionJobProperties')
|
319
329
|
TargetedSentimentDetectionJobPropertiesList = Shapes::ListShape.new(name: 'TargetedSentimentDetectionJobPropertiesList')
|
330
|
+
TargetedSentimentEntity = Shapes::StructureShape.new(name: 'TargetedSentimentEntity')
|
331
|
+
TargetedSentimentEntityType = Shapes::StringShape.new(name: 'TargetedSentimentEntityType')
|
332
|
+
TargetedSentimentMention = Shapes::StructureShape.new(name: 'TargetedSentimentMention')
|
320
333
|
TextSizeLimitExceededException = Shapes::StructureShape.new(name: 'TextSizeLimitExceededException')
|
321
334
|
Timestamp = Shapes::TimestampShape.new(name: 'Timestamp')
|
322
335
|
TooManyRequestsException = Shapes::StructureShape.new(name: 'TooManyRequestsException')
|
@@ -403,6 +416,18 @@ module Aws::Comprehend
|
|
403
416
|
BatchDetectSyntaxResponse.add_member(:error_list, Shapes::ShapeRef.new(shape: BatchItemErrorList, required: true, location_name: "ErrorList"))
|
404
417
|
BatchDetectSyntaxResponse.struct_class = Types::BatchDetectSyntaxResponse
|
405
418
|
|
419
|
+
BatchDetectTargetedSentimentItemResult.add_member(:index, Shapes::ShapeRef.new(shape: Integer, location_name: "Index"))
|
420
|
+
BatchDetectTargetedSentimentItemResult.add_member(:entities, Shapes::ShapeRef.new(shape: ListOfTargetedSentimentEntities, location_name: "Entities"))
|
421
|
+
BatchDetectTargetedSentimentItemResult.struct_class = Types::BatchDetectTargetedSentimentItemResult
|
422
|
+
|
423
|
+
BatchDetectTargetedSentimentRequest.add_member(:text_list, Shapes::ShapeRef.new(shape: CustomerInputStringList, required: true, location_name: "TextList"))
|
424
|
+
BatchDetectTargetedSentimentRequest.add_member(:language_code, Shapes::ShapeRef.new(shape: LanguageCode, required: true, location_name: "LanguageCode"))
|
425
|
+
BatchDetectTargetedSentimentRequest.struct_class = Types::BatchDetectTargetedSentimentRequest
|
426
|
+
|
427
|
+
BatchDetectTargetedSentimentResponse.add_member(:result_list, Shapes::ShapeRef.new(shape: ListOfDetectTargetedSentimentResult, required: true, location_name: "ResultList"))
|
428
|
+
BatchDetectTargetedSentimentResponse.add_member(:error_list, Shapes::ShapeRef.new(shape: BatchItemErrorList, required: true, location_name: "ErrorList"))
|
429
|
+
BatchDetectTargetedSentimentResponse.struct_class = Types::BatchDetectTargetedSentimentResponse
|
430
|
+
|
406
431
|
BatchItemError.add_member(:index, Shapes::ShapeRef.new(shape: Integer, location_name: "Index"))
|
407
432
|
BatchItemError.add_member(:error_code, Shapes::ShapeRef.new(shape: String, location_name: "ErrorCode"))
|
408
433
|
BatchItemError.add_member(:error_message, Shapes::ShapeRef.new(shape: String, location_name: "ErrorMessage"))
|
@@ -639,6 +664,13 @@ module Aws::Comprehend
|
|
639
664
|
DetectSyntaxResponse.add_member(:syntax_tokens, Shapes::ShapeRef.new(shape: ListOfSyntaxTokens, location_name: "SyntaxTokens"))
|
640
665
|
DetectSyntaxResponse.struct_class = Types::DetectSyntaxResponse
|
641
666
|
|
667
|
+
DetectTargetedSentimentRequest.add_member(:text, Shapes::ShapeRef.new(shape: CustomerInputString, required: true, location_name: "Text"))
|
668
|
+
DetectTargetedSentimentRequest.add_member(:language_code, Shapes::ShapeRef.new(shape: LanguageCode, required: true, location_name: "LanguageCode"))
|
669
|
+
DetectTargetedSentimentRequest.struct_class = Types::DetectTargetedSentimentRequest
|
670
|
+
|
671
|
+
DetectTargetedSentimentResponse.add_member(:entities, Shapes::ShapeRef.new(shape: ListOfTargetedSentimentEntities, location_name: "Entities"))
|
672
|
+
DetectTargetedSentimentResponse.struct_class = Types::DetectTargetedSentimentResponse
|
673
|
+
|
642
674
|
DocumentClass.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "Name"))
|
643
675
|
DocumentClass.add_member(:score, Shapes::ShapeRef.new(shape: Float, location_name: "Score"))
|
644
676
|
DocumentClass.struct_class = Types::DocumentClass
|
@@ -1064,6 +1096,8 @@ module Aws::Comprehend
|
|
1064
1096
|
|
1065
1097
|
ListOfClasses.member = Shapes::ShapeRef.new(shape: DocumentClass)
|
1066
1098
|
|
1099
|
+
ListOfDescriptiveMentionIndices.member = Shapes::ShapeRef.new(shape: Integer)
|
1100
|
+
|
1067
1101
|
ListOfDetectDominantLanguageResult.member = Shapes::ShapeRef.new(shape: BatchDetectDominantLanguageItemResult)
|
1068
1102
|
|
1069
1103
|
ListOfDetectEntitiesResult.member = Shapes::ShapeRef.new(shape: BatchDetectEntitiesItemResult)
|
@@ -1074,6 +1108,8 @@ module Aws::Comprehend
|
|
1074
1108
|
|
1075
1109
|
ListOfDetectSyntaxResult.member = Shapes::ShapeRef.new(shape: BatchDetectSyntaxItemResult)
|
1076
1110
|
|
1111
|
+
ListOfDetectTargetedSentimentResult.member = Shapes::ShapeRef.new(shape: BatchDetectTargetedSentimentItemResult)
|
1112
|
+
|
1077
1113
|
ListOfDocumentReadFeatureTypes.member = Shapes::ShapeRef.new(shape: DocumentReadFeatureTypes)
|
1078
1114
|
|
1079
1115
|
ListOfDominantLanguages.member = Shapes::ShapeRef.new(shape: DominantLanguage)
|
@@ -1086,12 +1122,16 @@ module Aws::Comprehend
|
|
1086
1122
|
|
1087
1123
|
ListOfLabels.member = Shapes::ShapeRef.new(shape: DocumentLabel)
|
1088
1124
|
|
1125
|
+
ListOfMentions.member = Shapes::ShapeRef.new(shape: TargetedSentimentMention)
|
1126
|
+
|
1089
1127
|
ListOfPiiEntities.member = Shapes::ShapeRef.new(shape: PiiEntity)
|
1090
1128
|
|
1091
1129
|
ListOfPiiEntityTypes.member = Shapes::ShapeRef.new(shape: PiiEntityType)
|
1092
1130
|
|
1093
1131
|
ListOfSyntaxTokens.member = Shapes::ShapeRef.new(shape: SyntaxToken)
|
1094
1132
|
|
1133
|
+
ListOfTargetedSentimentEntities.member = Shapes::ShapeRef.new(shape: TargetedSentimentEntity)
|
1134
|
+
|
1095
1135
|
ListPiiEntitiesDetectionJobsRequest.add_member(:filter, Shapes::ShapeRef.new(shape: PiiEntitiesDetectionJobFilter, location_name: "Filter"))
|
1096
1136
|
ListPiiEntitiesDetectionJobsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
|
1097
1137
|
ListPiiEntitiesDetectionJobsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResultsInteger, location_name: "MaxResults"))
|
@@ -1135,6 +1175,10 @@ module Aws::Comprehend
|
|
1135
1175
|
ListTopicsDetectionJobsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
|
1136
1176
|
ListTopicsDetectionJobsResponse.struct_class = Types::ListTopicsDetectionJobsResponse
|
1137
1177
|
|
1178
|
+
MentionSentiment.add_member(:sentiment, Shapes::ShapeRef.new(shape: SentimentType, location_name: "Sentiment"))
|
1179
|
+
MentionSentiment.add_member(:sentiment_score, Shapes::ShapeRef.new(shape: SentimentScore, location_name: "SentimentScore"))
|
1180
|
+
MentionSentiment.struct_class = Types::MentionSentiment
|
1181
|
+
|
1138
1182
|
OutputDataConfig.add_member(:s3_uri, Shapes::ShapeRef.new(shape: S3Uri, required: true, location_name: "S3Uri"))
|
1139
1183
|
OutputDataConfig.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: KmsKeyId, location_name: "KmsKeyId"))
|
1140
1184
|
OutputDataConfig.struct_class = Types::OutputDataConfig
|
@@ -1482,6 +1526,19 @@ module Aws::Comprehend
|
|
1482
1526
|
|
1483
1527
|
TargetedSentimentDetectionJobPropertiesList.member = Shapes::ShapeRef.new(shape: TargetedSentimentDetectionJobProperties)
|
1484
1528
|
|
1529
|
+
TargetedSentimentEntity.add_member(:descriptive_mention_index, Shapes::ShapeRef.new(shape: ListOfDescriptiveMentionIndices, location_name: "DescriptiveMentionIndex"))
|
1530
|
+
TargetedSentimentEntity.add_member(:mentions, Shapes::ShapeRef.new(shape: ListOfMentions, location_name: "Mentions"))
|
1531
|
+
TargetedSentimentEntity.struct_class = Types::TargetedSentimentEntity
|
1532
|
+
|
1533
|
+
TargetedSentimentMention.add_member(:score, Shapes::ShapeRef.new(shape: Float, location_name: "Score"))
|
1534
|
+
TargetedSentimentMention.add_member(:group_score, Shapes::ShapeRef.new(shape: Float, location_name: "GroupScore"))
|
1535
|
+
TargetedSentimentMention.add_member(:text, Shapes::ShapeRef.new(shape: String, location_name: "Text"))
|
1536
|
+
TargetedSentimentMention.add_member(:type, Shapes::ShapeRef.new(shape: TargetedSentimentEntityType, location_name: "Type"))
|
1537
|
+
TargetedSentimentMention.add_member(:mention_sentiment, Shapes::ShapeRef.new(shape: MentionSentiment, location_name: "MentionSentiment"))
|
1538
|
+
TargetedSentimentMention.add_member(:begin_offset, Shapes::ShapeRef.new(shape: Integer, location_name: "BeginOffset"))
|
1539
|
+
TargetedSentimentMention.add_member(:end_offset, Shapes::ShapeRef.new(shape: Integer, location_name: "EndOffset"))
|
1540
|
+
TargetedSentimentMention.struct_class = Types::TargetedSentimentMention
|
1541
|
+
|
1485
1542
|
TextSizeLimitExceededException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
1486
1543
|
TextSizeLimitExceededException.struct_class = Types::TextSizeLimitExceededException
|
1487
1544
|
|
@@ -1621,6 +1678,19 @@ module Aws::Comprehend
|
|
1621
1678
|
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
1622
1679
|
end)
|
1623
1680
|
|
1681
|
+
api.add_operation(:batch_detect_targeted_sentiment, Seahorse::Model::Operation.new.tap do |o|
|
1682
|
+
o.name = "BatchDetectTargetedSentiment"
|
1683
|
+
o.http_method = "POST"
|
1684
|
+
o.http_request_uri = "/"
|
1685
|
+
o.input = Shapes::ShapeRef.new(shape: BatchDetectTargetedSentimentRequest)
|
1686
|
+
o.output = Shapes::ShapeRef.new(shape: BatchDetectTargetedSentimentResponse)
|
1687
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
1688
|
+
o.errors << Shapes::ShapeRef.new(shape: TextSizeLimitExceededException)
|
1689
|
+
o.errors << Shapes::ShapeRef.new(shape: UnsupportedLanguageException)
|
1690
|
+
o.errors << Shapes::ShapeRef.new(shape: BatchSizeLimitExceededException)
|
1691
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
1692
|
+
end)
|
1693
|
+
|
1624
1694
|
api.add_operation(:classify_document, Seahorse::Model::Operation.new.tap do |o|
|
1625
1695
|
o.name = "ClassifyDocument"
|
1626
1696
|
o.http_method = "POST"
|
@@ -1972,6 +2042,18 @@ module Aws::Comprehend
|
|
1972
2042
|
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
1973
2043
|
end)
|
1974
2044
|
|
2045
|
+
api.add_operation(:detect_targeted_sentiment, Seahorse::Model::Operation.new.tap do |o|
|
2046
|
+
o.name = "DetectTargetedSentiment"
|
2047
|
+
o.http_method = "POST"
|
2048
|
+
o.http_request_uri = "/"
|
2049
|
+
o.input = Shapes::ShapeRef.new(shape: DetectTargetedSentimentRequest)
|
2050
|
+
o.output = Shapes::ShapeRef.new(shape: DetectTargetedSentimentResponse)
|
2051
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
2052
|
+
o.errors << Shapes::ShapeRef.new(shape: TextSizeLimitExceededException)
|
2053
|
+
o.errors << Shapes::ShapeRef.new(shape: UnsupportedLanguageException)
|
2054
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
2055
|
+
end)
|
2056
|
+
|
1975
2057
|
api.add_operation(:import_model, Seahorse::Model::Operation.new.tap do |o|
|
1976
2058
|
o.name = "ImportModel"
|
1977
2059
|
o.http_method = "POST"
|