@aws-sdk/client-comprehend 3.171.0 → 3.178.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist-cjs/Comprehend.js +30 -0
  3. package/dist-cjs/commands/BatchDetectTargetedSentimentCommand.js +36 -0
  4. package/dist-cjs/commands/DetectTargetedSentimentCommand.js +36 -0
  5. package/dist-cjs/commands/index.js +2 -0
  6. package/dist-cjs/models/models_0.js +59 -5
  7. package/dist-cjs/protocols/Aws_json1_1.js +218 -3
  8. package/dist-es/Comprehend.js +30 -0
  9. package/dist-es/commands/BatchDetectTargetedSentimentCommand.js +39 -0
  10. package/dist-es/commands/DetectTargetedSentimentCommand.js +39 -0
  11. package/dist-es/commands/index.js +2 -0
  12. package/dist-es/models/models_0.js +28 -0
  13. package/dist-es/protocols/Aws_json1_1.js +252 -0
  14. package/dist-types/Comprehend.d.ts +31 -6
  15. package/dist-types/ComprehendClient.d.ts +4 -2
  16. package/dist-types/commands/BatchDetectEntitiesCommand.d.ts +3 -2
  17. package/dist-types/commands/BatchDetectSyntaxCommand.d.ts +3 -1
  18. package/dist-types/commands/BatchDetectTargetedSentimentCommand.d.ts +37 -0
  19. package/dist-types/commands/CreateDocumentClassifierCommand.d.ts +3 -1
  20. package/dist-types/commands/DetectEntitiesCommand.d.ts +2 -1
  21. package/dist-types/commands/DetectSyntaxCommand.d.ts +3 -1
  22. package/dist-types/commands/DetectTargetedSentimentCommand.d.ts +36 -0
  23. package/dist-types/commands/index.d.ts +2 -0
  24. package/dist-types/models/models_0.d.ts +230 -68
  25. package/dist-types/protocols/Aws_json1_1.d.ts +6 -0
  26. package/dist-types/runtimeConfig.browser.d.ts +1 -1
  27. package/dist-types/runtimeConfig.d.ts +1 -1
  28. package/dist-types/runtimeConfig.native.d.ts +1 -1
  29. package/dist-types/ts3.4/Comprehend.d.ts +34 -0
  30. package/dist-types/ts3.4/ComprehendClient.d.ts +12 -0
  31. package/dist-types/ts3.4/commands/BatchDetectTargetedSentimentCommand.d.ts +39 -0
  32. package/dist-types/ts3.4/commands/DetectTargetedSentimentCommand.d.ts +39 -0
  33. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  34. package/dist-types/ts3.4/models/models_0.d.ts +79 -0
  35. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +24 -0
  36. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -1
  37. package/dist-types/ts3.4/runtimeConfig.d.ts +3 -1
  38. package/dist-types/ts3.4/runtimeConfig.native.d.ts +3 -1
  39. package/package.json +26 -26
@@ -3,6 +3,7 @@ export * from "./BatchDetectEntitiesCommand";
3
3
  export * from "./BatchDetectKeyPhrasesCommand";
4
4
  export * from "./BatchDetectSentimentCommand";
5
5
  export * from "./BatchDetectSyntaxCommand";
6
+ export * from "./BatchDetectTargetedSentimentCommand";
6
7
  export * from "./ClassifyDocumentCommand";
7
8
  export * from "./ContainsPiiEntitiesCommand";
8
9
  export * from "./CreateDocumentClassifierCommand";
@@ -31,6 +32,7 @@ export * from "./DetectKeyPhrasesCommand";
31
32
  export * from "./DetectPiiEntitiesCommand";
32
33
  export * from "./DetectSentimentCommand";
33
34
  export * from "./DetectSyntaxCommand";
35
+ export * from "./DetectTargetedSentimentCommand";
34
36
  export * from "./ImportModelCommand";
35
37
  export * from "./ListDocumentClassificationJobsCommand";
36
38
  export * from "./ListDocumentClassifierSummariesCommand";
@@ -68,9 +68,8 @@ export interface AugmentedManifestsListItem {
68
68
  }
69
69
  export interface BatchDetectDominantLanguageRequest {
70
70
  /**
71
- * <p>A list containing the text of the input documents. The list can contain a maximum of 25
72
- * documents. Each document should contain at least 20 characters and must contain fewer than
73
- * 5,000 bytes of UTF-8 encoded characters.</p>
71
+ * <p>A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25
72
+ * documents. Each document should contain at least 20 characters. The maximum size of each document is 5 KB.</p>
74
73
  */
75
74
  TextList: string[] | undefined;
76
75
  }
@@ -207,9 +206,8 @@ export declare enum LanguageCode {
207
206
  }
208
207
  export interface BatchDetectEntitiesRequest {
209
208
  /**
210
- * <p>A list containing the text of the input documents. The list can contain a maximum of 25
211
- * documents. Each document must contain fewer than 5,000 bytes of UTF-8 encoded
212
- * characters.</p>
209
+ * <p>A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25
210
+ * documents. The maximum size of each document is 5 KB.</p>
213
211
  */
214
212
  TextList: string[] | undefined;
215
213
  /**
@@ -248,18 +246,13 @@ export interface Entity {
248
246
  */
249
247
  Text?: string;
250
248
  /**
251
- * <p>A character offset in the input text that shows where the entity begins (the first
252
- * character is at position 0). The offset returns the position of each UTF-8 code point in the
253
- * string. A <i>code point</i> is the abstract character from a particular
254
- * graphical representation. For example, a multi-byte UTF-8 character maps to a single code
255
- * point.</p>
249
+ * <p>The zero-based offset from the beginning of the source text to the first character in the
250
+ * entity.</p>
256
251
  */
257
252
  BeginOffset?: number;
258
253
  /**
259
- * <p>A character offset in the input text that shows where the entity ends. The offset
260
- * returns the position of each UTF-8 code point in the string. A <i>code point</i>
261
- * is the abstract character from a particular graphical representation. For example, a
262
- * multi-byte UTF-8 character maps to a single code point. </p>
254
+ * <p>The zero-based offset from the beginning of the source text to the last character in the
255
+ * entity.</p>
263
256
  */
264
257
  EndOffset?: number;
265
258
  }
@@ -298,7 +291,9 @@ export interface BatchDetectEntitiesResponse {
298
291
  /**
299
292
  * <p>Amazon Comprehend can't process the language of the input text. For custom entity
300
293
  * recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted.
301
- * For a list of supported languages, see <a>supported-languages</a>. </p>
294
+ * For a list of supported languages,
295
+ * <a href="https://docs.aws.amazon.com/comprehend/latest/dg/supported-languages.html">Supported languages</a> in the Comprehend Developer Guide.
296
+ * </p>
302
297
  */
303
298
  export declare class UnsupportedLanguageException extends __BaseException {
304
299
  readonly name: "UnsupportedLanguageException";
@@ -311,9 +306,8 @@ export declare class UnsupportedLanguageException extends __BaseException {
311
306
  }
312
307
  export interface BatchDetectKeyPhrasesRequest {
313
308
  /**
314
- * <p>A list containing the text of the input documents. The list can contain a maximum of 25
315
- * documents. Each document must contain fewer than 5,000 bytes of UTF-8 encoded
316
- * characters.</p>
309
+ * <p>A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25
310
+ * documents. The maximum size of each document is 5 KB.</p>
317
311
  */
318
312
  TextList: string[] | undefined;
319
313
  /**
@@ -336,18 +330,13 @@ export interface KeyPhrase {
336
330
  */
337
331
  Text?: string;
338
332
  /**
339
- * <p>A character offset in the input text that shows where the key phrase begins (the first
340
- * character is at position 0). The offset returns the position of each UTF-8 code point in the
341
- * string. A <i>code point</i> is the abstract character from a particular
342
- * graphical representation. For example, a multi-byte UTF-8 character maps to a single code
343
- * point.</p>
333
+ * <p>The zero-based offset from the beginning of the source text to the first character in the
334
+ * key phrase.</p>
344
335
  */
345
336
  BeginOffset?: number;
346
337
  /**
347
- * <p>A character offset in the input text where the key phrase ends. The offset returns the
348
- * position of each UTF-8 code point in the string. A <code>code point</code> is the abstract
349
- * character from a particular graphical representation. For example, a multi-byte UTF-8
350
- * character maps to a single code point.</p>
338
+ * <p>The zero-based offset from the beginning of the source text to the last character in the
339
+ * key phrase.</p>
351
340
  */
352
341
  EndOffset?: number;
353
342
  }
@@ -385,9 +374,12 @@ export interface BatchDetectKeyPhrasesResponse {
385
374
  }
386
375
  export interface BatchDetectSentimentRequest {
387
376
  /**
388
- * <p>A list containing the text of the input documents. The list can contain a maximum of 25
389
- * documents. Each document must contain fewer that 5,000 bytes of UTF-8 encoded
390
- * characters.</p>
377
+ * <p>A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25
378
+ * documents. The maximum size of each document is 5 KB. </p>
379
+ * <note>
380
+ * <p>Amazon Comprehend performs real-time sentiment analysis on the first 500 characters of the input text
381
+ * and ignores any additional text in the input.</p>
382
+ * </note>
391
383
  */
392
384
  TextList: string[] | undefined;
393
385
  /**
@@ -474,9 +466,8 @@ export declare enum SyntaxLanguageCode {
474
466
  }
475
467
  export interface BatchDetectSyntaxRequest {
476
468
  /**
477
- * <p>A list containing the text of the input documents. The list can contain a maximum of 25
478
- * documents. Each document must contain fewer that 5,000 bytes of UTF-8 encoded
479
- * characters.</p>
469
+ * <p>A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25
470
+ * documents. The maximum size for each document is 5 KB.</p>
480
471
  */
481
472
  TextList: string[] | undefined;
482
473
  /**
@@ -509,7 +500,9 @@ export declare enum PartOfSpeechTagType {
509
500
  /**
510
501
  * <p>Identifies the part of speech represented by the token and gives the confidence that
511
502
  * Amazon Comprehend has that the part of speech was correctly identified. For more information
512
- * about the parts of speech that Amazon Comprehend can identify, see <a>how-syntax</a>.</p>
503
+ * about the parts of speech that Amazon Comprehend can identify, see
504
+ * <a href="https://docs.aws.amazon.com/comprehend/latest/dg/how-syntax.html">Syntax</a> in the Comprehend Developer Guide.
505
+ * </p>
513
506
  */
514
507
  export interface PartOfSpeechTag {
515
508
  /**
@@ -547,7 +540,9 @@ export interface SyntaxToken {
547
540
  EndOffset?: number;
548
541
  /**
549
542
  * <p>Provides the part of speech label and the confidence level that Amazon Comprehend has that
550
- * the part of speech was correctly identified. For more information, see <a>how-syntax</a>.</p>
543
+ * the part of speech was correctly identified. For more information, see
544
+ * <a href="https://docs.aws.amazon.com/comprehend/latest/dg/how-syntax.html">Syntax</a> in the Comprehend Developer Guide.
545
+ * </p>
551
546
  */
552
547
  PartOfSpeech?: PartOfSpeechTag;
553
548
  }
@@ -581,6 +576,127 @@ export interface BatchDetectSyntaxResponse {
581
576
  */
582
577
  ErrorList: BatchItemError[] | undefined;
583
578
  }
579
+ export interface BatchDetectTargetedSentimentRequest {
580
+ /**
581
+ * <p>A list containing the UTF-8 encoded text of the input documents.
582
+ * The list can contain a maximum of 25 documents. The maximum size of each document is 5 KB.</p>
583
+ */
584
+ TextList: string[] | undefined;
585
+ /**
586
+ * <p>The language of the input documents. Currently, English is the only supported language.</p>
587
+ */
588
+ LanguageCode: LanguageCode | string | undefined;
589
+ }
590
+ /**
591
+ * <p>Contains the sentiment and sentiment score for one mention of an entity.</p>
592
+ * <p>For more information about targeted sentiment, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/how-targeted-sentiment.html">Targeted sentiment</a>.</p>
593
+ */
594
+ export interface MentionSentiment {
595
+ /**
596
+ * <p>The sentiment of the mention. </p>
597
+ */
598
+ Sentiment?: SentimentType | string;
599
+ /**
600
+ * <p>Describes the level of confidence that Amazon Comprehend has in the accuracy of its
601
+ * detection of sentiments.</p>
602
+ */
603
+ SentimentScore?: SentimentScore;
604
+ }
605
+ export declare enum TargetedSentimentEntityType {
606
+ ATTRIBUTE = "ATTRIBUTE",
607
+ BOOK = "BOOK",
608
+ BRAND = "BRAND",
609
+ COMMERCIAL_ITEM = "COMMERCIAL_ITEM",
610
+ DATE = "DATE",
611
+ EVENT = "EVENT",
612
+ FACILITY = "FACILITY",
613
+ GAME = "GAME",
614
+ LOCATION = "LOCATION",
615
+ MOVIE = "MOVIE",
616
+ MUSIC = "MUSIC",
617
+ ORGANIZATION = "ORGANIZATION",
618
+ OTHER = "OTHER",
619
+ PERSON = "PERSON",
620
+ PERSONAL_TITLE = "PERSONAL_TITLE",
621
+ QUANTITY = "QUANTITY",
622
+ SOFTWARE = "SOFTWARE"
623
+ }
624
+ /**
625
+ * <p>Information about one mention of an entity. The mention information includes the location of the mention
626
+ * in the text and the sentiment of the mention.</p>
627
+ * <p>For more information about targeted sentiment, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/how-targeted-sentiment.html">Targeted sentiment</a>.</p>
628
+ */
629
+ export interface TargetedSentimentMention {
630
+ /**
631
+ * <p>Model confidence that the entity is relevant. Value range is zero to one, where one is highest confidence.</p>
632
+ */
633
+ Score?: number;
634
+ /**
635
+ * <p>The confidence that all the entities mentioned in the group relate to the same entity.</p>
636
+ */
637
+ GroupScore?: number;
638
+ /**
639
+ * <p>The text in the document that identifies the entity.</p>
640
+ */
641
+ Text?: string;
642
+ /**
643
+ * <p>The type of the entity. Amazon Comprehend supports a variety of <a href="https://docs.aws.amazon.com/comprehend/latest/dg/how-targeted-sentiment.html#how-targeted-sentiment-entities">entity types</a>.</p>
644
+ */
645
+ Type?: TargetedSentimentEntityType | string;
646
+ /**
647
+ * <p>Contains the sentiment and sentiment score for the mention.</p>
648
+ */
649
+ MentionSentiment?: MentionSentiment;
650
+ /**
651
+ * <p>The offset into the document text where the mention begins.</p>
652
+ */
653
+ BeginOffset?: number;
654
+ /**
655
+ * <p>The offset into the document text where the mention ends.</p>
656
+ */
657
+ EndOffset?: number;
658
+ }
659
+ /**
660
+ * <p>Information about one of the entities found by targeted sentiment analysis.</p>
661
+ * <p>For more information about targeted sentiment, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/how-targeted-sentiment.html">Targeted sentiment</a>.</p>
662
+ */
663
+ export interface TargetedSentimentEntity {
664
+ /**
665
+ * <p>One or more index into the Mentions array that provides the best name for the entity group.</p>
666
+ */
667
+ DescriptiveMentionIndex?: number[];
668
+ /**
669
+ * <p>An array of mentions of the entity in the document. The array represents a co-reference group.
670
+ * See <a href="https://docs.aws.amazon.com/comprehend/latest/dg/how-targeted-sentiment.html#how-targeted-sentiment-values">
671
+ * Co-reference group</a> for an example. </p>
672
+ */
673
+ Mentions?: TargetedSentimentMention[];
674
+ }
675
+ /**
676
+ * <p>Analysis results for one of the documents in the batch.</p>
677
+ */
678
+ export interface BatchDetectTargetedSentimentItemResult {
679
+ /**
680
+ * <p>The zero-based index of this result in the input list.</p>
681
+ */
682
+ Index?: number;
683
+ /**
684
+ * <p>An array of targeted sentiment entities.</p>
685
+ */
686
+ Entities?: TargetedSentimentEntity[];
687
+ }
688
+ export interface BatchDetectTargetedSentimentResponse {
689
+ /**
690
+ * <p>A list of objects containing the results of the operation.
691
+ * The results are sorted in ascending order by the <code>Index</code> field and match the order of the documents in the input list.
692
+ * If all of the documents contain an error, the <code>ResultList</code> is empty.</p>
693
+ */
694
+ ResultList: BatchDetectTargetedSentimentItemResult[] | undefined;
695
+ /**
696
+ * <p>List of errors that the operation can return.</p>
697
+ */
698
+ ErrorList: BatchItemError[] | undefined;
699
+ }
584
700
  /**
585
701
  * <p>Describes the result metrics for the test data associated with an documentation
586
702
  * classifier.</p>
@@ -730,8 +846,7 @@ export declare class ResourceUnavailableException extends __BaseException {
730
846
  }
731
847
  export interface ContainsPiiEntitiesRequest {
732
848
  /**
733
- * <p>Creates a new document classification request to analyze a single document in real-time,
734
- * returning personally identifiable information (PII) entity labels.</p>
849
+ * <p>A UTF-8 text string. The maximum string size is 100 KB.</p>
735
850
  */
736
851
  Text: string | undefined;
737
852
  /**
@@ -806,7 +921,9 @@ export declare enum DocumentClassifierDataFormat {
806
921
  }
807
922
  /**
808
923
  * <p>The input properties for training a document classifier. </p>
809
- * <p>For more information on how the input file is formatted, see <a>prep-classifier-data</a>. </p>
924
+ * <p>For more information on how the input file is formatted, see
925
+ * <a href="https://docs.aws.amazon.com/comprehend/latest/dg/prep-classifier-data.html">Preparing training data</a> in the Comprehend Developer Guide.
926
+ * </p>
810
927
  */
811
928
  export interface DocumentClassifierInputDataConfig {
812
929
  /**
@@ -843,9 +960,9 @@ export interface DocumentClassifierInputDataConfig {
843
960
  */
844
961
  S3Uri?: string;
845
962
  /**
846
- * <p>The Amazon S3 URI for the input data. The Amazon S3 bucket must be in the same AWS Region
847
- * as the API endpoint that you are calling. The URI can point to a single input file or it can
848
- * provide the prefix for a collection of input files. </p>
963
+ * <p>This specifies the Amazon S3 location where the test annotations for an entity recognizer
964
+ * are located. The URI must be in the same AWS Region as the API endpoint that you are
965
+ * calling. </p>
849
966
  */
850
967
  TestS3Uri?: string;
851
968
  /**
@@ -1199,9 +1316,8 @@ export interface EntityRecognizerAnnotations {
1199
1316
  */
1200
1317
  S3Uri: string | undefined;
1201
1318
  /**
1202
- * <p>This specifies the Amazon S3 location where the test annotations for an entity recognizer
1203
- * are located. The URI must be in the same AWS Region as the API endpoint that you are
1204
- * calling.</p>
1319
+ * <p> Specifies the Amazon S3 location where the test annotations for an entity recognizer are
1320
+ * located. The URI must be in the same region as the API endpoint that you are calling.</p>
1205
1321
  */
1206
1322
  TestS3Uri?: string;
1207
1323
  }
@@ -2972,8 +3088,7 @@ export interface DescribeTopicsDetectionJobResponse {
2972
3088
  }
2973
3089
  export interface DetectDominantLanguageRequest {
2974
3090
  /**
2975
- * <p>A UTF-8 text string. Each string should contain at least 20 characters and must contain
2976
- * fewer that 5,000 bytes of UTF-8 encoded characters.</p>
3091
+ * <p>A UTF-8 text string. The string must contain at least 20 characters. The maximum string size is 100 KB.</p>
2977
3092
  */
2978
3093
  Text: string | undefined;
2979
3094
  }
@@ -2988,8 +3103,7 @@ export interface DetectDominantLanguageResponse {
2988
3103
  }
2989
3104
  export interface DetectEntitiesRequest {
2990
3105
  /**
2991
- * <p>A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded
2992
- * characters.</p>
3106
+ * <p>A UTF-8 text string. The maximum string size is 100 KB.</p>
2993
3107
  */
2994
3108
  Text: string | undefined;
2995
3109
  /**
@@ -3017,13 +3131,15 @@ export interface DetectEntitiesResponse {
3017
3131
  * confidence that Amazon Comprehend has in the detection. </p>
3018
3132
  * <p>If your request uses a custom entity recognition model, Amazon Comprehend detects the
3019
3133
  * entities that the model is trained to recognize. Otherwise, it detects the default entity
3020
- * types. For a list of default entity types, see <a>how-entities</a>.</p>
3134
+ * types. For a list of default entity types, see
3135
+ * <a href="https://docs.aws.amazon.com/comprehend/latest/dg/how-entities.html">Entities</a> in the Comprehend Developer Guide.
3136
+ * </p>
3021
3137
  */
3022
3138
  Entities?: Entity[];
3023
3139
  }
3024
3140
  export interface DetectKeyPhrasesRequest {
3025
3141
  /**
3026
- * <p>A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded
3142
+ * <p>A UTF-8 text string. The string must contain less than 100 KB of UTF-8 encoded
3027
3143
  * characters.</p>
3028
3144
  */
3029
3145
  Text: string | undefined;
@@ -3044,8 +3160,7 @@ export interface DetectKeyPhrasesResponse {
3044
3160
  }
3045
3161
  export interface DetectPiiEntitiesRequest {
3046
3162
  /**
3047
- * <p>A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded
3048
- * characters.</p>
3163
+ * <p>A UTF-8 text string. The maximum string size is 100 KB.</p>
3049
3164
  */
3050
3165
  Text: string | undefined;
3051
3166
  /**
@@ -3067,18 +3182,13 @@ export interface PiiEntity {
3067
3182
  */
3068
3183
  Type?: PiiEntityType | string;
3069
3184
  /**
3070
- * <p>A character offset in the input text that shows where the PII entity begins (the first
3071
- * character is at position 0). The offset returns the position of each UTF-8 code point in the
3072
- * string. A <i>code point</i> is the abstract character from a particular
3073
- * graphical representation. For example, a multi-byte UTF-8 character maps to a single code
3074
- * point.</p>
3185
+ * <p>The zero-based offset from the beginning of the source text to the first character in the
3186
+ * entity.</p>
3075
3187
  */
3076
3188
  BeginOffset?: number;
3077
3189
  /**
3078
- * <p>A character offset in the input text that shows where the PII entity ends. The offset
3079
- * returns the position of each UTF-8 code point in the string. A <i>code point</i>
3080
- * is the abstract character from a particular graphical representation. For example, a
3081
- * multi-byte UTF-8 character maps to a single code point.</p>
3190
+ * <p>The zero-based offset from the beginning of the source text to the last character in the
3191
+ * entity.</p>
3082
3192
  */
3083
3193
  EndOffset?: number;
3084
3194
  }
@@ -3092,8 +3202,11 @@ export interface DetectPiiEntitiesResponse {
3092
3202
  }
3093
3203
  export interface DetectSentimentRequest {
3094
3204
  /**
3095
- * <p>A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded
3096
- * characters.</p>
3205
+ * <p>A UTF-8 text string. The maximum string size is 5 KB.</p>
3206
+ * <note>
3207
+ * <p>Amazon Comprehend performs real-time sentiment analysis on the first 500 characters of the input text
3208
+ * and ignores any additional text in the input.</p>
3209
+ * </note>
3097
3210
  */
3098
3211
  Text: string | undefined;
3099
3212
  /**
@@ -3116,8 +3229,7 @@ export interface DetectSentimentResponse {
3116
3229
  }
3117
3230
  export interface DetectSyntaxRequest {
3118
3231
  /**
3119
- * <p>A UTF-8 string. Each string must contain fewer that 5,000 bytes of UTF encoded
3120
- * characters.</p>
3232
+ * <p>A UTF-8 string. The maximum string size is 5 KB.</p>
3121
3233
  */
3122
3234
  Text: string | undefined;
3123
3235
  /**
@@ -3131,10 +3243,28 @@ export interface DetectSyntaxResponse {
3131
3243
  /**
3132
3244
  * <p>A collection of syntax tokens describing the text. For each token, the response provides
3133
3245
  * the text, the token type, where the text begins and ends, and the level of confidence that
3134
- * Amazon Comprehend has that the token is correct. For a list of token types, see <a>how-syntax</a>.</p>
3246
+ * Amazon Comprehend has that the token is correct. For a list of token types, see
3247
+ * <a href="https://docs.aws.amazon.com/comprehend/latest/dg/how-syntax.html">Syntax</a> in the Comprehend Developer Guide.
3248
+ * </p>
3135
3249
  */
3136
3250
  SyntaxTokens?: SyntaxToken[];
3137
3251
  }
3252
+ export interface DetectTargetedSentimentRequest {
3253
+ /**
3254
+ * <p>A UTF-8 text string. The maximum string length is 5 KB.</p>
3255
+ */
3256
+ Text: string | undefined;
3257
+ /**
3258
+ * <p>The language of the input documents. Currently, English is the only supported language.</p>
3259
+ */
3260
+ LanguageCode: LanguageCode | string | undefined;
3261
+ }
3262
+ export interface DetectTargetedSentimentResponse {
3263
+ /**
3264
+ * <p>Targeted sentiment analysis for each of the entities identified in the input text.</p>
3265
+ */
3266
+ Entities?: TargetedSentimentEntity[];
3267
+ }
3138
3268
  export interface ImportModelRequest {
3139
3269
  /**
3140
3270
  * <p>The Amazon Resource Name (ARN) of the custom model to import.</p>
@@ -4616,7 +4746,7 @@ export interface StartTargetedSentimentDetectionJobRequest {
4616
4746
  */
4617
4747
  JobName?: string;
4618
4748
  /**
4619
- * <p>The language of the input documents. Currently, English is the only valid language.</p>
4749
+ * <p>The language of the input documents. Currently, English is the only supported language.</p>
4620
4750
  */
4621
4751
  LanguageCode: LanguageCode | string | undefined;
4622
4752
  /**
@@ -5101,6 +5231,30 @@ export declare const BatchDetectSyntaxItemResultFilterSensitiveLog: (obj: BatchD
5101
5231
  * @internal
5102
5232
  */
5103
5233
  export declare const BatchDetectSyntaxResponseFilterSensitiveLog: (obj: BatchDetectSyntaxResponse) => any;
5234
+ /**
5235
+ * @internal
5236
+ */
5237
+ export declare const BatchDetectTargetedSentimentRequestFilterSensitiveLog: (obj: BatchDetectTargetedSentimentRequest) => any;
5238
+ /**
5239
+ * @internal
5240
+ */
5241
+ export declare const MentionSentimentFilterSensitiveLog: (obj: MentionSentiment) => any;
5242
+ /**
5243
+ * @internal
5244
+ */
5245
+ export declare const TargetedSentimentMentionFilterSensitiveLog: (obj: TargetedSentimentMention) => any;
5246
+ /**
5247
+ * @internal
5248
+ */
5249
+ export declare const TargetedSentimentEntityFilterSensitiveLog: (obj: TargetedSentimentEntity) => any;
5250
+ /**
5251
+ * @internal
5252
+ */
5253
+ export declare const BatchDetectTargetedSentimentItemResultFilterSensitiveLog: (obj: BatchDetectTargetedSentimentItemResult) => any;
5254
+ /**
5255
+ * @internal
5256
+ */
5257
+ export declare const BatchDetectTargetedSentimentResponseFilterSensitiveLog: (obj: BatchDetectTargetedSentimentResponse) => any;
5104
5258
  /**
5105
5259
  * @internal
5106
5260
  */
@@ -5469,6 +5623,14 @@ export declare const DetectSyntaxRequestFilterSensitiveLog: (obj: DetectSyntaxRe
5469
5623
  * @internal
5470
5624
  */
5471
5625
  export declare const DetectSyntaxResponseFilterSensitiveLog: (obj: DetectSyntaxResponse) => any;
5626
+ /**
5627
+ * @internal
5628
+ */
5629
+ export declare const DetectTargetedSentimentRequestFilterSensitiveLog: (obj: DetectTargetedSentimentRequest) => any;
5630
+ /**
5631
+ * @internal
5632
+ */
5633
+ export declare const DetectTargetedSentimentResponseFilterSensitiveLog: (obj: DetectTargetedSentimentResponse) => any;
5472
5634
  /**
5473
5635
  * @internal
5474
5636
  */
@@ -5,6 +5,7 @@ import { BatchDetectEntitiesCommandInput, BatchDetectEntitiesCommandOutput } fro
5
5
  import { BatchDetectKeyPhrasesCommandInput, BatchDetectKeyPhrasesCommandOutput } from "../commands/BatchDetectKeyPhrasesCommand";
6
6
  import { BatchDetectSentimentCommandInput, BatchDetectSentimentCommandOutput } from "../commands/BatchDetectSentimentCommand";
7
7
  import { BatchDetectSyntaxCommandInput, BatchDetectSyntaxCommandOutput } from "../commands/BatchDetectSyntaxCommand";
8
+ import { BatchDetectTargetedSentimentCommandInput, BatchDetectTargetedSentimentCommandOutput } from "../commands/BatchDetectTargetedSentimentCommand";
8
9
  import { ClassifyDocumentCommandInput, ClassifyDocumentCommandOutput } from "../commands/ClassifyDocumentCommand";
9
10
  import { ContainsPiiEntitiesCommandInput, ContainsPiiEntitiesCommandOutput } from "../commands/ContainsPiiEntitiesCommand";
10
11
  import { CreateDocumentClassifierCommandInput, CreateDocumentClassifierCommandOutput } from "../commands/CreateDocumentClassifierCommand";
@@ -33,6 +34,7 @@ import { DetectKeyPhrasesCommandInput, DetectKeyPhrasesCommandOutput } from "../
33
34
  import { DetectPiiEntitiesCommandInput, DetectPiiEntitiesCommandOutput } from "../commands/DetectPiiEntitiesCommand";
34
35
  import { DetectSentimentCommandInput, DetectSentimentCommandOutput } from "../commands/DetectSentimentCommand";
35
36
  import { DetectSyntaxCommandInput, DetectSyntaxCommandOutput } from "../commands/DetectSyntaxCommand";
37
+ import { DetectTargetedSentimentCommandInput, DetectTargetedSentimentCommandOutput } from "../commands/DetectTargetedSentimentCommand";
36
38
  import { ImportModelCommandInput, ImportModelCommandOutput } from "../commands/ImportModelCommand";
37
39
  import { ListDocumentClassificationJobsCommandInput, ListDocumentClassificationJobsCommandOutput } from "../commands/ListDocumentClassificationJobsCommand";
38
40
  import { ListDocumentClassifiersCommandInput, ListDocumentClassifiersCommandOutput } from "../commands/ListDocumentClassifiersCommand";
@@ -76,6 +78,7 @@ export declare const serializeAws_json1_1BatchDetectEntitiesCommand: (input: Bat
76
78
  export declare const serializeAws_json1_1BatchDetectKeyPhrasesCommand: (input: BatchDetectKeyPhrasesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
77
79
  export declare const serializeAws_json1_1BatchDetectSentimentCommand: (input: BatchDetectSentimentCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
78
80
  export declare const serializeAws_json1_1BatchDetectSyntaxCommand: (input: BatchDetectSyntaxCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
81
+ export declare const serializeAws_json1_1BatchDetectTargetedSentimentCommand: (input: BatchDetectTargetedSentimentCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
79
82
  export declare const serializeAws_json1_1ClassifyDocumentCommand: (input: ClassifyDocumentCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
80
83
  export declare const serializeAws_json1_1ContainsPiiEntitiesCommand: (input: ContainsPiiEntitiesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
81
84
  export declare const serializeAws_json1_1CreateDocumentClassifierCommand: (input: CreateDocumentClassifierCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
@@ -104,6 +107,7 @@ export declare const serializeAws_json1_1DetectKeyPhrasesCommand: (input: Detect
104
107
  export declare const serializeAws_json1_1DetectPiiEntitiesCommand: (input: DetectPiiEntitiesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
105
108
  export declare const serializeAws_json1_1DetectSentimentCommand: (input: DetectSentimentCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
106
109
  export declare const serializeAws_json1_1DetectSyntaxCommand: (input: DetectSyntaxCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
110
+ export declare const serializeAws_json1_1DetectTargetedSentimentCommand: (input: DetectTargetedSentimentCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
107
111
  export declare const serializeAws_json1_1ImportModelCommand: (input: ImportModelCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
108
112
  export declare const serializeAws_json1_1ListDocumentClassificationJobsCommand: (input: ListDocumentClassificationJobsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
109
113
  export declare const serializeAws_json1_1ListDocumentClassifiersCommand: (input: ListDocumentClassifiersCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
@@ -147,6 +151,7 @@ export declare const deserializeAws_json1_1BatchDetectEntitiesCommand: (output:
147
151
  export declare const deserializeAws_json1_1BatchDetectKeyPhrasesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<BatchDetectKeyPhrasesCommandOutput>;
148
152
  export declare const deserializeAws_json1_1BatchDetectSentimentCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<BatchDetectSentimentCommandOutput>;
149
153
  export declare const deserializeAws_json1_1BatchDetectSyntaxCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<BatchDetectSyntaxCommandOutput>;
154
+ export declare const deserializeAws_json1_1BatchDetectTargetedSentimentCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<BatchDetectTargetedSentimentCommandOutput>;
150
155
  export declare const deserializeAws_json1_1ClassifyDocumentCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ClassifyDocumentCommandOutput>;
151
156
  export declare const deserializeAws_json1_1ContainsPiiEntitiesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ContainsPiiEntitiesCommandOutput>;
152
157
  export declare const deserializeAws_json1_1CreateDocumentClassifierCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<CreateDocumentClassifierCommandOutput>;
@@ -175,6 +180,7 @@ export declare const deserializeAws_json1_1DetectKeyPhrasesCommand: (output: __H
175
180
  export declare const deserializeAws_json1_1DetectPiiEntitiesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DetectPiiEntitiesCommandOutput>;
176
181
  export declare const deserializeAws_json1_1DetectSentimentCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DetectSentimentCommandOutput>;
177
182
  export declare const deserializeAws_json1_1DetectSyntaxCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DetectSyntaxCommandOutput>;
183
+ export declare const deserializeAws_json1_1DetectTargetedSentimentCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DetectTargetedSentimentCommandOutput>;
178
184
  export declare const deserializeAws_json1_1ImportModelCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ImportModelCommandOutput>;
179
185
  export declare const deserializeAws_json1_1ListDocumentClassificationJobsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListDocumentClassificationJobsCommandOutput>;
180
186
  export declare const deserializeAws_json1_1ListDocumentClassifiersCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListDocumentClassifiersCommandOutput>;
@@ -31,7 +31,7 @@ export declare const getRuntimeConfig: (config: ComprehendClientConfig) => {
31
31
  tls?: boolean | undefined;
32
32
  retryStrategy?: import("@aws-sdk/types").RetryStrategy | undefined;
33
33
  credentials?: import("@aws-sdk/types").Credentials | import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials> | undefined;
34
- signer?: import("@aws-sdk/types").RequestSigner | import("@aws-sdk/types").Provider<import("@aws-sdk/types").RequestSigner> | undefined;
34
+ signer?: import("@aws-sdk/types").RequestSigner | ((authScheme?: import("@aws-sdk/types").AuthScheme | undefined) => Promise<import("@aws-sdk/types").RequestSigner>) | undefined;
35
35
  signingEscapePath?: boolean | undefined;
36
36
  systemClockOffset?: number | undefined;
37
37
  signingRegion?: string | undefined;
@@ -31,7 +31,7 @@ export declare const getRuntimeConfig: (config: ComprehendClientConfig) => {
31
31
  tls?: boolean | undefined;
32
32
  retryStrategy?: import("@aws-sdk/types").RetryStrategy | undefined;
33
33
  credentials?: import("@aws-sdk/types").Credentials | import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials> | undefined;
34
- signer?: import("@aws-sdk/types").RequestSigner | import("@aws-sdk/types").Provider<import("@aws-sdk/types").RequestSigner> | undefined;
34
+ signer?: import("@aws-sdk/types").RequestSigner | ((authScheme?: import("@aws-sdk/types").AuthScheme | undefined) => Promise<import("@aws-sdk/types").RequestSigner>) | undefined;
35
35
  signingEscapePath?: boolean | undefined;
36
36
  systemClockOffset?: number | undefined;
37
37
  signingRegion?: string | undefined;
@@ -30,7 +30,7 @@ export declare const getRuntimeConfig: (config: ComprehendClientConfig) => {
30
30
  tls?: boolean | undefined;
31
31
  retryStrategy?: import("@aws-sdk/types").RetryStrategy | undefined;
32
32
  credentials?: import("@aws-sdk/types").Credentials | import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials> | undefined;
33
- signer?: import("@aws-sdk/types").RequestSigner | import("@aws-sdk/types").Provider<import("@aws-sdk/types").RequestSigner> | undefined;
33
+ signer?: import("@aws-sdk/types").RequestSigner | ((authScheme?: import("@aws-sdk/types").AuthScheme | undefined) => Promise<import("@aws-sdk/types").RequestSigner>) | undefined;
34
34
  signingEscapePath?: boolean | undefined;
35
35
  systemClockOffset?: number | undefined;
36
36
  signingRegion?: string | undefined;
@@ -19,6 +19,10 @@ import {
19
19
  BatchDetectSyntaxCommandInput,
20
20
  BatchDetectSyntaxCommandOutput,
21
21
  } from "./commands/BatchDetectSyntaxCommand";
22
+ import {
23
+ BatchDetectTargetedSentimentCommandInput,
24
+ BatchDetectTargetedSentimentCommandOutput,
25
+ } from "./commands/BatchDetectTargetedSentimentCommand";
22
26
  import {
23
27
  ClassifyDocumentCommandInput,
24
28
  ClassifyDocumentCommandOutput,
@@ -131,6 +135,10 @@ import {
131
135
  DetectSyntaxCommandInput,
132
136
  DetectSyntaxCommandOutput,
133
137
  } from "./commands/DetectSyntaxCommand";
138
+ import {
139
+ DetectTargetedSentimentCommandInput,
140
+ DetectTargetedSentimentCommandOutput,
141
+ } from "./commands/DetectTargetedSentimentCommand";
134
142
  import {
135
143
  ImportModelCommandInput,
136
144
  ImportModelCommandOutput,
@@ -350,6 +358,19 @@ export declare class Comprehend extends ComprehendClient {
350
358
  options: __HttpHandlerOptions,
351
359
  cb: (err: any, data?: BatchDetectSyntaxCommandOutput) => void
352
360
  ): void;
361
+ batchDetectTargetedSentiment(
362
+ args: BatchDetectTargetedSentimentCommandInput,
363
+ options?: __HttpHandlerOptions
364
+ ): Promise<BatchDetectTargetedSentimentCommandOutput>;
365
+ batchDetectTargetedSentiment(
366
+ args: BatchDetectTargetedSentimentCommandInput,
367
+ cb: (err: any, data?: BatchDetectTargetedSentimentCommandOutput) => void
368
+ ): void;
369
+ batchDetectTargetedSentiment(
370
+ args: BatchDetectTargetedSentimentCommandInput,
371
+ options: __HttpHandlerOptions,
372
+ cb: (err: any, data?: BatchDetectTargetedSentimentCommandOutput) => void
373
+ ): void;
353
374
  classifyDocument(
354
375
  args: ClassifyDocumentCommandInput,
355
376
  options?: __HttpHandlerOptions
@@ -732,6 +753,19 @@ export declare class Comprehend extends ComprehendClient {
732
753
  options: __HttpHandlerOptions,
733
754
  cb: (err: any, data?: DetectSyntaxCommandOutput) => void
734
755
  ): void;
756
+ detectTargetedSentiment(
757
+ args: DetectTargetedSentimentCommandInput,
758
+ options?: __HttpHandlerOptions
759
+ ): Promise<DetectTargetedSentimentCommandOutput>;
760
+ detectTargetedSentiment(
761
+ args: DetectTargetedSentimentCommandInput,
762
+ cb: (err: any, data?: DetectTargetedSentimentCommandOutput) => void
763
+ ): void;
764
+ detectTargetedSentiment(
765
+ args: DetectTargetedSentimentCommandInput,
766
+ options: __HttpHandlerOptions,
767
+ cb: (err: any, data?: DetectTargetedSentimentCommandOutput) => void
768
+ ): void;
735
769
  importModel(
736
770
  args: ImportModelCommandInput,
737
771
  options?: __HttpHandlerOptions