@aws-sdk/client-comprehend 3.445.0 → 3.448.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.
- package/README.md +8 -0
- package/dist-cjs/Comprehend.js +2 -0
- package/dist-cjs/commands/DetectToxicContentCommand.js +52 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +21 -2
- package/dist-cjs/protocols/Aws_json1_1.js +86 -4
- package/dist-es/Comprehend.js +2 -0
- package/dist-es/commands/DetectToxicContentCommand.js +48 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +17 -0
- package/dist-es/protocols/Aws_json1_1.js +80 -0
- package/dist-types/Comprehend.d.ts +7 -0
- package/dist-types/ComprehendClient.d.ts +3 -2
- package/dist-types/commands/BatchDetectTargetedSentimentCommand.d.ts +1 -1
- package/dist-types/commands/ClassifyDocumentCommand.d.ts +15 -3
- package/dist-types/commands/DetectTargetedSentimentCommand.d.ts +1 -1
- package/dist-types/commands/DetectToxicContentCommand.d.ts +108 -0
- package/dist-types/commands/StopEntitiesDetectionJobCommand.d.ts +1 -1
- package/dist-types/commands/StopEventsDetectionJobCommand.d.ts +1 -1
- package/dist-types/commands/StopKeyPhrasesDetectionJobCommand.d.ts +1 -1
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +136 -106
- package/dist-types/models/models_1.d.ts +79 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
- package/dist-types/ts3.4/Comprehend.d.ts +17 -0
- package/dist-types/ts3.4/ComprehendClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/DetectToxicContentCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/StopEntitiesDetectionJobCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/StopEventsDetectionJobCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/StopKeyPhrasesDetectionJobCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +33 -21
- package/dist-types/ts3.4/models/models_1.d.ts +21 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +12 -0
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ export interface DetectTargetedSentimentCommandOutput extends DetectTargetedSent
|
|
|
24
24
|
/**
|
|
25
25
|
* @public
|
|
26
26
|
* <p>Inspects the input text and returns a sentiment analysis for each entity identified in the text.</p>
|
|
27
|
-
* <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>
|
|
27
|
+
* <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> in the <i>Amazon Comprehend Developer Guide</i>.</p>
|
|
28
28
|
* @example
|
|
29
29
|
* Use a bare-bones client and the command you need to make an API call.
|
|
30
30
|
* ```javascript
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
|
|
4
|
+
import { ComprehendClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ComprehendClient";
|
|
5
|
+
import { DetectToxicContentRequest, DetectToxicContentResponse } from "../models/models_0";
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export { __MetadataBearer, $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link DetectToxicContentCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface DetectToxicContentCommandInput extends DetectToxicContentRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link DetectToxicContentCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface DetectToxicContentCommandOutput extends DetectToxicContentResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
* <p>Performs toxicity analysis on the list of text strings that you provide as input.
|
|
27
|
+
* The analysis uses the order of strings in the list to determine context when predicting toxicity.
|
|
28
|
+
* The API response contains a results list that matches the size of the input list.
|
|
29
|
+
* For more information about toxicity detection, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/toxicity-detection.html">Toxicity detection</a> in the <i>Amazon Comprehend Developer Guide</i>
|
|
30
|
+
* </p>
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { ComprehendClient, DetectToxicContentCommand } from "@aws-sdk/client-comprehend"; // ES Modules import
|
|
35
|
+
* // const { ComprehendClient, DetectToxicContentCommand } = require("@aws-sdk/client-comprehend"); // CommonJS import
|
|
36
|
+
* const client = new ComprehendClient(config);
|
|
37
|
+
* const input = { // DetectToxicContentRequest
|
|
38
|
+
* TextSegments: [ // ListOfTextSegments // required
|
|
39
|
+
* { // TextSegment
|
|
40
|
+
* Text: "STRING_VALUE", // required
|
|
41
|
+
* },
|
|
42
|
+
* ],
|
|
43
|
+
* LanguageCode: "en" || "es" || "fr" || "de" || "it" || "pt" || "ar" || "hi" || "ja" || "ko" || "zh" || "zh-TW", // required
|
|
44
|
+
* };
|
|
45
|
+
* const command = new DetectToxicContentCommand(input);
|
|
46
|
+
* const response = await client.send(command);
|
|
47
|
+
* // { // DetectToxicContentResponse
|
|
48
|
+
* // ResultList: [ // ListOfToxicLabels
|
|
49
|
+
* // { // ToxicLabels
|
|
50
|
+
* // Labels: [ // ListOfToxicContent
|
|
51
|
+
* // { // ToxicContent
|
|
52
|
+
* // Name: "GRAPHIC" || "HARASSMENT_OR_ABUSE" || "HATE_SPEECH" || "INSULT" || "PROFANITY" || "SEXUAL" || "VIOLENCE_OR_THREAT",
|
|
53
|
+
* // Score: Number("float"),
|
|
54
|
+
* // },
|
|
55
|
+
* // ],
|
|
56
|
+
* // Toxicity: Number("float"),
|
|
57
|
+
* // },
|
|
58
|
+
* // ],
|
|
59
|
+
* // };
|
|
60
|
+
*
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @param DetectToxicContentCommandInput - {@link DetectToxicContentCommandInput}
|
|
64
|
+
* @returns {@link DetectToxicContentCommandOutput}
|
|
65
|
+
* @see {@link DetectToxicContentCommandInput} for command's `input` shape.
|
|
66
|
+
* @see {@link DetectToxicContentCommandOutput} for command's `response` shape.
|
|
67
|
+
* @see {@link ComprehendClientResolvedConfig | config} for ComprehendClient's `config` shape.
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link InternalServerException} (server fault)
|
|
70
|
+
* <p>An internal server error occurred. Retry your request.</p>
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link InvalidRequestException} (client fault)
|
|
73
|
+
* <p>The request is invalid.</p>
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link TextSizeLimitExceededException} (client fault)
|
|
76
|
+
* <p>The size of the input text exceeds the limit. Use a smaller document.</p>
|
|
77
|
+
*
|
|
78
|
+
* @throws {@link UnsupportedLanguageException} (client fault)
|
|
79
|
+
* <p>Amazon Comprehend can't process the language of the input text. For custom entity
|
|
80
|
+
* recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted.
|
|
81
|
+
* For a list of supported languages,
|
|
82
|
+
* <a href="https://docs.aws.amazon.com/comprehend/latest/dg/supported-languages.html">Supported languages</a> in the Comprehend Developer Guide.
|
|
83
|
+
* </p>
|
|
84
|
+
*
|
|
85
|
+
* @throws {@link ComprehendServiceException}
|
|
86
|
+
* <p>Base exception class for all service exceptions from Comprehend service.</p>
|
|
87
|
+
*
|
|
88
|
+
*/
|
|
89
|
+
export declare class DetectToxicContentCommand extends $Command<DetectToxicContentCommandInput, DetectToxicContentCommandOutput, ComprehendClientResolvedConfig> {
|
|
90
|
+
readonly input: DetectToxicContentCommandInput;
|
|
91
|
+
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
92
|
+
/**
|
|
93
|
+
* @public
|
|
94
|
+
*/
|
|
95
|
+
constructor(input: DetectToxicContentCommandInput);
|
|
96
|
+
/**
|
|
97
|
+
* @internal
|
|
98
|
+
*/
|
|
99
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: ComprehendClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DetectToxicContentCommandInput, DetectToxicContentCommandOutput>;
|
|
100
|
+
/**
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
private serialize;
|
|
104
|
+
/**
|
|
105
|
+
* @internal
|
|
106
|
+
*/
|
|
107
|
+
private deserialize;
|
|
108
|
+
}
|
|
@@ -2,7 +2,7 @@ import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
|
2
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
3
|
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
|
|
4
4
|
import { ComprehendClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ComprehendClient";
|
|
5
|
-
import { StopEntitiesDetectionJobRequest, StopEntitiesDetectionJobResponse } from "../models/
|
|
5
|
+
import { StopEntitiesDetectionJobRequest, StopEntitiesDetectionJobResponse } from "../models/models_1";
|
|
6
6
|
/**
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
@@ -2,7 +2,7 @@ import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
|
2
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
3
|
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
|
|
4
4
|
import { ComprehendClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ComprehendClient";
|
|
5
|
-
import { StopEventsDetectionJobRequest, StopEventsDetectionJobResponse } from "../models/
|
|
5
|
+
import { StopEventsDetectionJobRequest, StopEventsDetectionJobResponse } from "../models/models_1";
|
|
6
6
|
/**
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
@@ -2,7 +2,7 @@ import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
|
2
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
3
|
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
|
|
4
4
|
import { ComprehendClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ComprehendClient";
|
|
5
|
-
import { StopKeyPhrasesDetectionJobRequest, StopKeyPhrasesDetectionJobResponse } from "../models/
|
|
5
|
+
import { StopKeyPhrasesDetectionJobRequest, StopKeyPhrasesDetectionJobResponse } from "../models/models_1";
|
|
6
6
|
/**
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
@@ -39,6 +39,7 @@ export * from "./DetectPiiEntitiesCommand";
|
|
|
39
39
|
export * from "./DetectSentimentCommand";
|
|
40
40
|
export * from "./DetectSyntaxCommand";
|
|
41
41
|
export * from "./DetectTargetedSentimentCommand";
|
|
42
|
+
export * from "./DetectToxicContentCommand";
|
|
42
43
|
export * from "./ImportModelCommand";
|
|
43
44
|
export * from "./ListDatasetsCommand";
|
|
44
45
|
export * from "./ListDocumentClassificationJobsCommand";
|
|
@@ -883,7 +883,7 @@ export interface BatchDetectTargetedSentimentRequest {
|
|
|
883
883
|
/**
|
|
884
884
|
* @public
|
|
885
885
|
* <p>Contains the sentiment and sentiment score for one mention of an entity.</p>
|
|
886
|
-
* <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>
|
|
886
|
+
* <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> in the <i>Amazon Comprehend Developer Guide</i>.</p>
|
|
887
887
|
*/
|
|
888
888
|
export interface MentionSentiment {
|
|
889
889
|
/**
|
|
@@ -929,7 +929,7 @@ export type TargetedSentimentEntityType = (typeof TargetedSentimentEntityType)[k
|
|
|
929
929
|
* @public
|
|
930
930
|
* <p>Information about one mention of an entity. The mention information includes the location of the mention
|
|
931
931
|
* in the text and the sentiment of the mention.</p>
|
|
932
|
-
* <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>
|
|
932
|
+
* <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> in the <i>Amazon Comprehend Developer Guide</i>.</p>
|
|
933
933
|
*/
|
|
934
934
|
export interface TargetedSentimentMention {
|
|
935
935
|
/**
|
|
@@ -971,7 +971,7 @@ export interface TargetedSentimentMention {
|
|
|
971
971
|
/**
|
|
972
972
|
* @public
|
|
973
973
|
* <p>Information about one of the entities found by targeted sentiment analysis.</p>
|
|
974
|
-
* <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>
|
|
974
|
+
* <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> in the <i>Amazon Comprehend Developer Guide</i>.</p>
|
|
975
975
|
*/
|
|
976
976
|
export interface TargetedSentimentEntity {
|
|
977
977
|
/**
|
|
@@ -1396,14 +1396,18 @@ export interface ClassifyDocumentRequest {
|
|
|
1396
1396
|
Text?: string;
|
|
1397
1397
|
/**
|
|
1398
1398
|
* @public
|
|
1399
|
-
* <p>The Amazon Resource Number (ARN) of the endpoint.
|
|
1399
|
+
* <p>The Amazon Resource Number (ARN) of the endpoint. </p>
|
|
1400
|
+
* <p>For prompt classification, Amazon Comprehend provides the endpoint ARN: <code>zzz</code>.</p>
|
|
1401
|
+
* <p>For custom classification, you create an endpoint for your custom model. For more information,
|
|
1402
|
+
* see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/using-endpoints.html">Using Amazon Comprehend endpoints</a>.</p>
|
|
1400
1403
|
*/
|
|
1401
1404
|
EndpointArn: string | undefined;
|
|
1402
1405
|
/**
|
|
1403
1406
|
* @public
|
|
1404
|
-
* <p>Use the <code>Bytes</code> parameter to input a text, PDF, Word or image file
|
|
1405
|
-
*
|
|
1406
|
-
*
|
|
1407
|
+
* <p>Use the <code>Bytes</code> parameter to input a text, PDF, Word or image file.</p>
|
|
1408
|
+
* <p>When you classify a document using a custom model, you can also use the <code>Bytes</code> parameter to input an Amazon Textract <code>DetectDocumentText</code>
|
|
1409
|
+
* or <code>AnalyzeDocument</code> output file.</p>
|
|
1410
|
+
* <p>To classify a document using the prompt classifier, use the <code>Text</code> parameter for input.</p>
|
|
1407
1411
|
* <p>Provide the input document as a sequence of base64-encoded bytes.
|
|
1408
1412
|
* If your code uses an Amazon Web Services SDK to classify documents, the SDK may encode
|
|
1409
1413
|
* the document file bytes for you. </p>
|
|
@@ -1604,7 +1608,7 @@ export type PageBasedWarningCode = (typeof PageBasedWarningCode)[keyof typeof Pa
|
|
|
1604
1608
|
* <p>The system identified one of the following warnings while processing the input document:</p>
|
|
1605
1609
|
* <ul>
|
|
1606
1610
|
* <li>
|
|
1607
|
-
* <p>The document to classify is plain text, but the classifier is a native model.</p>
|
|
1611
|
+
* <p>The document to classify is plain text, but the classifier is a native document model.</p>
|
|
1608
1612
|
* </li>
|
|
1609
1613
|
* <li>
|
|
1610
1614
|
* <p>The document to classify is semi-structured, but the classifier is a plain-text model.</p>
|
|
@@ -1638,6 +1642,8 @@ export interface ClassifyDocumentResponse {
|
|
|
1638
1642
|
* models. Individual classes are mutually exclusive and each document is expected to have only a
|
|
1639
1643
|
* single class assigned to it. For example, an animal can be a dog or a cat, but not both at the
|
|
1640
1644
|
* same time. </p>
|
|
1645
|
+
* <p>For prompt classification, the response includes a single class (<code>UNDESIRED_PROMPT</code>), along with a confidence score.
|
|
1646
|
+
* A higher confidence score indicates that the input prompt is undesired in nature.</p>
|
|
1641
1647
|
*/
|
|
1642
1648
|
Classes?: DocumentClass[];
|
|
1643
1649
|
/**
|
|
@@ -2155,7 +2161,7 @@ export declare const DocumentClassifierDataFormat: {
|
|
|
2155
2161
|
export type DocumentClassifierDataFormat = (typeof DocumentClassifierDataFormat)[keyof typeof DocumentClassifierDataFormat];
|
|
2156
2162
|
/**
|
|
2157
2163
|
* @public
|
|
2158
|
-
* <p>The location of the training documents. This parameter is required in a request to create a
|
|
2164
|
+
* <p>The location of the training documents. This parameter is required in a request to create a semi-structured document classification model.</p>
|
|
2159
2165
|
*/
|
|
2160
2166
|
export interface DocumentClassifierDocuments {
|
|
2161
2167
|
/**
|
|
@@ -2227,9 +2233,8 @@ export interface DocumentClassifierInputDataConfig {
|
|
|
2227
2233
|
S3Uri?: string;
|
|
2228
2234
|
/**
|
|
2229
2235
|
* @public
|
|
2230
|
-
* <p>This specifies the Amazon S3 location
|
|
2231
|
-
*
|
|
2232
|
-
* calling. </p>
|
|
2236
|
+
* <p>This specifies the Amazon S3 location that contains the test annotations for the document classifier.
|
|
2237
|
+
* The URI must be in the same Amazon Web Services Region as the API endpoint that you are calling. </p>
|
|
2233
2238
|
*/
|
|
2234
2239
|
TestS3Uri?: string;
|
|
2235
2240
|
/**
|
|
@@ -2254,13 +2259,13 @@ export interface DocumentClassifierInputDataConfig {
|
|
|
2254
2259
|
/**
|
|
2255
2260
|
* @public
|
|
2256
2261
|
* <p>The type of input documents for training the model. Provide plain-text documents to create a plain-text model, and
|
|
2257
|
-
* provide semi-structured documents to create a native model.</p>
|
|
2262
|
+
* provide semi-structured documents to create a native document model.</p>
|
|
2258
2263
|
*/
|
|
2259
2264
|
DocumentType?: DocumentClassifierDocumentTypeFormat;
|
|
2260
2265
|
/**
|
|
2261
2266
|
* @public
|
|
2262
2267
|
* <p>The S3 location of the training documents.
|
|
2263
|
-
* This parameter is required in a request to create a native
|
|
2268
|
+
* This parameter is required in a request to create a native document model.</p>
|
|
2264
2269
|
*/
|
|
2265
2270
|
Documents?: DocumentClassifierDocuments;
|
|
2266
2271
|
/**
|
|
@@ -2307,7 +2312,7 @@ export type DocumentClassifierMode = (typeof DocumentClassifierMode)[keyof typeo
|
|
|
2307
2312
|
/**
|
|
2308
2313
|
* @public
|
|
2309
2314
|
* <p>Provide the location for output data from a custom classifier job. This field is mandatory
|
|
2310
|
-
*
|
|
2315
|
+
* if you are training a native document model.</p>
|
|
2311
2316
|
*/
|
|
2312
2317
|
export interface DocumentClassifierOutputDataConfig {
|
|
2313
2318
|
/**
|
|
@@ -2419,7 +2424,7 @@ export interface CreateDocumentClassifierRequest {
|
|
|
2419
2424
|
/**
|
|
2420
2425
|
* @public
|
|
2421
2426
|
* <p>Specifies the location for the output files from a custom classifier job.
|
|
2422
|
-
*
|
|
2427
|
+
* This parameter is required for a request that creates a native document model.</p>
|
|
2423
2428
|
*/
|
|
2424
2429
|
OutputDataConfig?: DocumentClassifierOutputDataConfig;
|
|
2425
2430
|
/**
|
|
@@ -2933,7 +2938,7 @@ export declare const ModelType: {
|
|
|
2933
2938
|
export type ModelType = (typeof ModelType)[keyof typeof ModelType];
|
|
2934
2939
|
/**
|
|
2935
2940
|
* @public
|
|
2936
|
-
* <p>Configuration required for a
|
|
2941
|
+
* <p>Configuration required for a document classification model.</p>
|
|
2937
2942
|
*/
|
|
2938
2943
|
export interface DocumentClassificationConfig {
|
|
2939
2944
|
/**
|
|
@@ -2960,7 +2965,7 @@ export interface EntityRecognitionConfig {
|
|
|
2960
2965
|
}
|
|
2961
2966
|
/**
|
|
2962
2967
|
* @public
|
|
2963
|
-
* <p>Configuration about the
|
|
2968
|
+
* <p>Configuration about the model associated with a flywheel.</p>
|
|
2964
2969
|
*/
|
|
2965
2970
|
export interface TaskConfig {
|
|
2966
2971
|
/**
|
|
@@ -2970,7 +2975,7 @@ export interface TaskConfig {
|
|
|
2970
2975
|
LanguageCode: LanguageCode | undefined;
|
|
2971
2976
|
/**
|
|
2972
2977
|
* @public
|
|
2973
|
-
* <p>Configuration required for a classification model.</p>
|
|
2978
|
+
* <p>Configuration required for a document classification model.</p>
|
|
2974
2979
|
*/
|
|
2975
2980
|
DocumentClassificationConfig?: DocumentClassificationConfig;
|
|
2976
2981
|
/**
|
|
@@ -2990,7 +2995,8 @@ export interface CreateFlywheelRequest {
|
|
|
2990
2995
|
FlywheelName: string | undefined;
|
|
2991
2996
|
/**
|
|
2992
2997
|
* @public
|
|
2993
|
-
* <p>To associate an existing model with the flywheel, specify the Amazon Resource Number (ARN) of the model version
|
|
2998
|
+
* <p>To associate an existing model with the flywheel, specify the Amazon Resource Number (ARN) of the model version.
|
|
2999
|
+
* Do not set <code>TaskConfig</code> or <code>ModelType</code> if you specify an <code>ActiveModelArn</code>.</p>
|
|
2994
3000
|
*/
|
|
2995
3001
|
ActiveModelArn?: string;
|
|
2996
3002
|
/**
|
|
@@ -3001,12 +3007,13 @@ export interface CreateFlywheelRequest {
|
|
|
3001
3007
|
DataAccessRoleArn: string | undefined;
|
|
3002
3008
|
/**
|
|
3003
3009
|
* @public
|
|
3004
|
-
* <p>Configuration about the
|
|
3010
|
+
* <p>Configuration about the model associated with the flywheel.
|
|
3011
|
+
* You need to set <code>TaskConfig</code> if you are creating a flywheel for a new model.</p>
|
|
3005
3012
|
*/
|
|
3006
3013
|
TaskConfig?: TaskConfig;
|
|
3007
3014
|
/**
|
|
3008
3015
|
* @public
|
|
3009
|
-
* <p>The model type.</p>
|
|
3016
|
+
* <p>The model type. You need to set <code>ModelType</code> if you are creating a flywheel for a new model.</p>
|
|
3010
3017
|
*/
|
|
3011
3018
|
ModelType?: ModelType;
|
|
3012
3019
|
/**
|
|
@@ -3311,7 +3318,9 @@ export interface OutputDataConfig {
|
|
|
3311
3318
|
/**
|
|
3312
3319
|
* @public
|
|
3313
3320
|
* <p>ID for the Amazon Web Services Key Management Service (KMS) key that Amazon Comprehend uses to encrypt the
|
|
3314
|
-
* output results from an analysis job.
|
|
3321
|
+
* output results from an analysis job. Specify the Key Id of a symmetric key, because you cannot use an asymmetric
|
|
3322
|
+
* key for uploading data to S3.</p>
|
|
3323
|
+
* <p>The KmsKeyId can be one of the following formats:</p>
|
|
3315
3324
|
* <ul>
|
|
3316
3325
|
* <li>
|
|
3317
3326
|
* <p>KMS Key ID: <code>"1234abcd-12ab-34cd-56ef-1234567890ab"</code>
|
|
@@ -3429,7 +3438,7 @@ export interface DocumentClassificationJobProperties {
|
|
|
3429
3438
|
/**
|
|
3430
3439
|
* @public
|
|
3431
3440
|
* <p> Configuration parameters for a private Virtual Private Cloud (VPC) containing the
|
|
3432
|
-
* resources you are using for your document classification job. For more information, see <a href="https://docs.aws.amazon.com/
|
|
3441
|
+
* resources you are using for your document classification job. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html">Amazon
|
|
3433
3442
|
* VPC</a>. </p>
|
|
3434
3443
|
*/
|
|
3435
3444
|
VpcConfig?: VpcConfig;
|
|
@@ -3591,7 +3600,7 @@ export interface DocumentClassifierProperties {
|
|
|
3591
3600
|
/**
|
|
3592
3601
|
* @public
|
|
3593
3602
|
* <p> Configuration parameters for a private Virtual Private Cloud (VPC) containing the
|
|
3594
|
-
* resources you are using for your custom classifier. For more information, see <a href="https://docs.aws.amazon.com/
|
|
3603
|
+
* resources you are using for your custom classifier. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html">Amazon
|
|
3595
3604
|
* VPC</a>. </p>
|
|
3596
3605
|
*/
|
|
3597
3606
|
VpcConfig?: VpcConfig;
|
|
@@ -4415,7 +4424,7 @@ export interface FlywheelProperties {
|
|
|
4415
4424
|
DataAccessRoleArn?: string;
|
|
4416
4425
|
/**
|
|
4417
4426
|
* @public
|
|
4418
|
-
* <p>Configuration about the
|
|
4427
|
+
* <p>Configuration about the model associated with a flywheel.</p>
|
|
4419
4428
|
*/
|
|
4420
4429
|
TaskConfig?: TaskConfig;
|
|
4421
4430
|
/**
|
|
@@ -5594,6 +5603,98 @@ export interface DetectTargetedSentimentResponse {
|
|
|
5594
5603
|
*/
|
|
5595
5604
|
Entities?: TargetedSentimentEntity[];
|
|
5596
5605
|
}
|
|
5606
|
+
/**
|
|
5607
|
+
* @public
|
|
5608
|
+
* <p>One of the of text strings. Each string has a size limit of 1KB.</p>
|
|
5609
|
+
*/
|
|
5610
|
+
export interface TextSegment {
|
|
5611
|
+
/**
|
|
5612
|
+
* @public
|
|
5613
|
+
* <p>The text content.</p>
|
|
5614
|
+
*/
|
|
5615
|
+
Text: string | undefined;
|
|
5616
|
+
}
|
|
5617
|
+
/**
|
|
5618
|
+
* @public
|
|
5619
|
+
*/
|
|
5620
|
+
export interface DetectToxicContentRequest {
|
|
5621
|
+
/**
|
|
5622
|
+
* @public
|
|
5623
|
+
* <p>A list of up to 10 text strings. The maximum size for the list is 10 KB.</p>
|
|
5624
|
+
*/
|
|
5625
|
+
TextSegments: TextSegment[] | undefined;
|
|
5626
|
+
/**
|
|
5627
|
+
* @public
|
|
5628
|
+
* <p>The language of the input text. Currently, English is the only supported language.</p>
|
|
5629
|
+
*/
|
|
5630
|
+
LanguageCode: LanguageCode | undefined;
|
|
5631
|
+
}
|
|
5632
|
+
/**
|
|
5633
|
+
* @public
|
|
5634
|
+
* @enum
|
|
5635
|
+
*/
|
|
5636
|
+
export declare const ToxicContentType: {
|
|
5637
|
+
readonly GRAPHIC: "GRAPHIC";
|
|
5638
|
+
readonly HARASSMENT_OR_ABUSE: "HARASSMENT_OR_ABUSE";
|
|
5639
|
+
readonly HATE_SPEECH: "HATE_SPEECH";
|
|
5640
|
+
readonly INSULT: "INSULT";
|
|
5641
|
+
readonly PROFANITY: "PROFANITY";
|
|
5642
|
+
readonly SEXUAL: "SEXUAL";
|
|
5643
|
+
readonly VIOLENCE_OR_THREAT: "VIOLENCE_OR_THREAT";
|
|
5644
|
+
};
|
|
5645
|
+
/**
|
|
5646
|
+
* @public
|
|
5647
|
+
*/
|
|
5648
|
+
export type ToxicContentType = (typeof ToxicContentType)[keyof typeof ToxicContentType];
|
|
5649
|
+
/**
|
|
5650
|
+
* @public
|
|
5651
|
+
* <p>Toxic content analysis result for one string. For more information about toxicity detection, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/toxicity-detection.html">Toxicity detection</a> in the <i>Amazon Comprehend Developer Guide</i>
|
|
5652
|
+
* </p>
|
|
5653
|
+
*/
|
|
5654
|
+
export interface ToxicContent {
|
|
5655
|
+
/**
|
|
5656
|
+
* @public
|
|
5657
|
+
* <p>The name of the toxic content type.</p>
|
|
5658
|
+
*/
|
|
5659
|
+
Name?: ToxicContentType;
|
|
5660
|
+
/**
|
|
5661
|
+
* @public
|
|
5662
|
+
* <p>
|
|
5663
|
+
* Model confidence in the detected content type. Value range is zero to one, where one is highest confidence.</p>
|
|
5664
|
+
*/
|
|
5665
|
+
Score?: number;
|
|
5666
|
+
}
|
|
5667
|
+
/**
|
|
5668
|
+
* @public
|
|
5669
|
+
* <p>Toxicity analysis result for one string. For more information about toxicity detection, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/toxicity-detection.html">Toxicity detection</a> in the <i>Amazon Comprehend Developer Guide</i>
|
|
5670
|
+
* </p>
|
|
5671
|
+
*/
|
|
5672
|
+
export interface ToxicLabels {
|
|
5673
|
+
/**
|
|
5674
|
+
* @public
|
|
5675
|
+
* <p>Array of toxic content types identified in the string.</p>
|
|
5676
|
+
*/
|
|
5677
|
+
Labels?: ToxicContent[];
|
|
5678
|
+
/**
|
|
5679
|
+
* @public
|
|
5680
|
+
* <p>Overall toxicity score for the string.</p>
|
|
5681
|
+
*/
|
|
5682
|
+
Toxicity?: number;
|
|
5683
|
+
}
|
|
5684
|
+
/**
|
|
5685
|
+
* @public
|
|
5686
|
+
*/
|
|
5687
|
+
export interface DetectToxicContentResponse {
|
|
5688
|
+
/**
|
|
5689
|
+
* @public
|
|
5690
|
+
* <p>Results of the content moderation analysis.
|
|
5691
|
+
* Each entry in the results list contains a list of toxic content types identified in
|
|
5692
|
+
* the text, along with a confidence score for each content type.
|
|
5693
|
+
* The results list also includes a toxicity score for each entry in the results list.
|
|
5694
|
+
* </p>
|
|
5695
|
+
*/
|
|
5696
|
+
ResultList?: ToxicLabels[];
|
|
5697
|
+
}
|
|
5597
5698
|
/**
|
|
5598
5699
|
* @public
|
|
5599
5700
|
*/
|
|
@@ -7742,7 +7843,7 @@ export interface StartTargetedSentimentDetectionJobRequest {
|
|
|
7742
7843
|
/**
|
|
7743
7844
|
* @public
|
|
7744
7845
|
* <p>The Amazon Resource Name (ARN) of the IAM role that
|
|
7745
|
-
* grants Amazon Comprehend read access to your input data. For more information, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/
|
|
7846
|
+
* grants Amazon Comprehend read access to your input data. For more information, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/security_iam_id-based-policy-examples.html#auth-role-permissions">Role-based permissions</a>.</p>
|
|
7746
7847
|
*/
|
|
7747
7848
|
DataAccessRoleArn: string | undefined;
|
|
7748
7849
|
/**
|
|
@@ -7983,85 +8084,6 @@ export interface StopDominantLanguageDetectionJobResponse {
|
|
|
7983
8084
|
*/
|
|
7984
8085
|
JobStatus?: JobStatus;
|
|
7985
8086
|
}
|
|
7986
|
-
/**
|
|
7987
|
-
* @public
|
|
7988
|
-
*/
|
|
7989
|
-
export interface StopEntitiesDetectionJobRequest {
|
|
7990
|
-
/**
|
|
7991
|
-
* @public
|
|
7992
|
-
* <p>The identifier of the entities detection job to stop.</p>
|
|
7993
|
-
*/
|
|
7994
|
-
JobId: string | undefined;
|
|
7995
|
-
}
|
|
7996
|
-
/**
|
|
7997
|
-
* @public
|
|
7998
|
-
*/
|
|
7999
|
-
export interface StopEntitiesDetectionJobResponse {
|
|
8000
|
-
/**
|
|
8001
|
-
* @public
|
|
8002
|
-
* <p>The identifier of the entities detection job to stop.</p>
|
|
8003
|
-
*/
|
|
8004
|
-
JobId?: string;
|
|
8005
|
-
/**
|
|
8006
|
-
* @public
|
|
8007
|
-
* <p>Either <code>STOP_REQUESTED</code> if the job is currently running, or
|
|
8008
|
-
* <code>STOPPED</code> if the job was previously stopped with the
|
|
8009
|
-
* <code>StopEntitiesDetectionJob</code> operation.</p>
|
|
8010
|
-
*/
|
|
8011
|
-
JobStatus?: JobStatus;
|
|
8012
|
-
}
|
|
8013
|
-
/**
|
|
8014
|
-
* @public
|
|
8015
|
-
*/
|
|
8016
|
-
export interface StopEventsDetectionJobRequest {
|
|
8017
|
-
/**
|
|
8018
|
-
* @public
|
|
8019
|
-
* <p>The identifier of the events detection job to stop.</p>
|
|
8020
|
-
*/
|
|
8021
|
-
JobId: string | undefined;
|
|
8022
|
-
}
|
|
8023
|
-
/**
|
|
8024
|
-
* @public
|
|
8025
|
-
*/
|
|
8026
|
-
export interface StopEventsDetectionJobResponse {
|
|
8027
|
-
/**
|
|
8028
|
-
* @public
|
|
8029
|
-
* <p>The identifier of the events detection job to stop.</p>
|
|
8030
|
-
*/
|
|
8031
|
-
JobId?: string;
|
|
8032
|
-
/**
|
|
8033
|
-
* @public
|
|
8034
|
-
* <p>The status of the events detection job.</p>
|
|
8035
|
-
*/
|
|
8036
|
-
JobStatus?: JobStatus;
|
|
8037
|
-
}
|
|
8038
|
-
/**
|
|
8039
|
-
* @public
|
|
8040
|
-
*/
|
|
8041
|
-
export interface StopKeyPhrasesDetectionJobRequest {
|
|
8042
|
-
/**
|
|
8043
|
-
* @public
|
|
8044
|
-
* <p>The identifier of the key phrases detection job to stop.</p>
|
|
8045
|
-
*/
|
|
8046
|
-
JobId: string | undefined;
|
|
8047
|
-
}
|
|
8048
|
-
/**
|
|
8049
|
-
* @public
|
|
8050
|
-
*/
|
|
8051
|
-
export interface StopKeyPhrasesDetectionJobResponse {
|
|
8052
|
-
/**
|
|
8053
|
-
* @public
|
|
8054
|
-
* <p>The identifier of the key phrases detection job to stop.</p>
|
|
8055
|
-
*/
|
|
8056
|
-
JobId?: string;
|
|
8057
|
-
/**
|
|
8058
|
-
* @public
|
|
8059
|
-
* <p>Either <code>STOP_REQUESTED</code> if the job is currently running, or
|
|
8060
|
-
* <code>STOPPED</code> if the job was previously stopped with the
|
|
8061
|
-
* <code>StopKeyPhrasesDetectionJob</code> operation.</p>
|
|
8062
|
-
*/
|
|
8063
|
-
JobStatus?: JobStatus;
|
|
8064
|
-
}
|
|
8065
8087
|
/**
|
|
8066
8088
|
* @internal
|
|
8067
8089
|
*/
|
|
@@ -8190,6 +8212,14 @@ export declare const DetectTargetedSentimentRequestFilterSensitiveLog: (obj: Det
|
|
|
8190
8212
|
* @internal
|
|
8191
8213
|
*/
|
|
8192
8214
|
export declare const DetectTargetedSentimentResponseFilterSensitiveLog: (obj: DetectTargetedSentimentResponse) => any;
|
|
8215
|
+
/**
|
|
8216
|
+
* @internal
|
|
8217
|
+
*/
|
|
8218
|
+
export declare const TextSegmentFilterSensitiveLog: (obj: TextSegment) => any;
|
|
8219
|
+
/**
|
|
8220
|
+
* @internal
|
|
8221
|
+
*/
|
|
8222
|
+
export declare const DetectToxicContentRequestFilterSensitiveLog: (obj: DetectToxicContentRequest) => any;
|
|
8193
8223
|
/**
|
|
8194
8224
|
* @internal
|
|
8195
8225
|
*/
|
|
@@ -1,6 +1,85 @@
|
|
|
1
1
|
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
|
|
2
2
|
import { ComprehendServiceException as __BaseException } from "./ComprehendServiceException";
|
|
3
3
|
import { FlywheelProperties, JobStatus, Tag, VpcConfig } from "./models_0";
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface StopEntitiesDetectionJobRequest {
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
* <p>The identifier of the entities detection job to stop.</p>
|
|
11
|
+
*/
|
|
12
|
+
JobId: string | undefined;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export interface StopEntitiesDetectionJobResponse {
|
|
18
|
+
/**
|
|
19
|
+
* @public
|
|
20
|
+
* <p>The identifier of the entities detection job to stop.</p>
|
|
21
|
+
*/
|
|
22
|
+
JobId?: string;
|
|
23
|
+
/**
|
|
24
|
+
* @public
|
|
25
|
+
* <p>Either <code>STOP_REQUESTED</code> if the job is currently running, or
|
|
26
|
+
* <code>STOPPED</code> if the job was previously stopped with the
|
|
27
|
+
* <code>StopEntitiesDetectionJob</code> operation.</p>
|
|
28
|
+
*/
|
|
29
|
+
JobStatus?: JobStatus;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
export interface StopEventsDetectionJobRequest {
|
|
35
|
+
/**
|
|
36
|
+
* @public
|
|
37
|
+
* <p>The identifier of the events detection job to stop.</p>
|
|
38
|
+
*/
|
|
39
|
+
JobId: string | undefined;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
export interface StopEventsDetectionJobResponse {
|
|
45
|
+
/**
|
|
46
|
+
* @public
|
|
47
|
+
* <p>The identifier of the events detection job to stop.</p>
|
|
48
|
+
*/
|
|
49
|
+
JobId?: string;
|
|
50
|
+
/**
|
|
51
|
+
* @public
|
|
52
|
+
* <p>The status of the events detection job.</p>
|
|
53
|
+
*/
|
|
54
|
+
JobStatus?: JobStatus;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* @public
|
|
58
|
+
*/
|
|
59
|
+
export interface StopKeyPhrasesDetectionJobRequest {
|
|
60
|
+
/**
|
|
61
|
+
* @public
|
|
62
|
+
* <p>The identifier of the key phrases detection job to stop.</p>
|
|
63
|
+
*/
|
|
64
|
+
JobId: string | undefined;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
export interface StopKeyPhrasesDetectionJobResponse {
|
|
70
|
+
/**
|
|
71
|
+
* @public
|
|
72
|
+
* <p>The identifier of the key phrases detection job to stop.</p>
|
|
73
|
+
*/
|
|
74
|
+
JobId?: string;
|
|
75
|
+
/**
|
|
76
|
+
* @public
|
|
77
|
+
* <p>Either <code>STOP_REQUESTED</code> if the job is currently running, or
|
|
78
|
+
* <code>STOPPED</code> if the job was previously stopped with the
|
|
79
|
+
* <code>StopKeyPhrasesDetectionJob</code> operation.</p>
|
|
80
|
+
*/
|
|
81
|
+
JobStatus?: JobStatus;
|
|
82
|
+
}
|
|
4
83
|
/**
|
|
5
84
|
* @public
|
|
6
85
|
*/
|