@azure/ai-language-text 1.1.0-alpha.20241204.2 → 1.1.0-alpha.20241205.3
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/dist/browser/azureKeyCredentialPolicy.d.ts +9 -0
- package/dist/browser/azureKeyCredentialPolicy.d.ts.map +1 -0
- package/dist/browser/constants.d.ts +14 -0
- package/dist/browser/constants.d.ts.map +1 -0
- package/dist/browser/generated/generatedClient.d.ts +33 -0
- package/dist/browser/generated/generatedClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/generatedClient.js +3 -3
- package/dist/browser/generated/generatedClient.js.map +1 -0
- package/dist/browser/generated/index.d.ts +4 -0
- package/dist/browser/generated/index.d.ts.map +1 -0
- package/dist/browser/generated/index.js +11 -0
- package/dist/browser/generated/index.js.map +1 -0
- package/dist/browser/generated/models/index.d.ts +2034 -0
- package/dist/browser/generated/models/index.d.ts.map +1 -0
- package/dist/browser/generated/models/mappers.d.ts +171 -0
- package/dist/browser/generated/models/mappers.d.ts.map +1 -0
- package/dist/browser/generated/models/parameters.d.ts +12 -0
- package/dist/browser/generated/models/parameters.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/models/parameters.js +1 -1
- package/{dist-esm/src → dist/browser}/generated/models/parameters.js.map +1 -1
- package/dist/browser/generated/operations/analyzeText.d.ts +27 -0
- package/dist/browser/generated/operations/analyzeText.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/operations/analyzeText.js +2 -2
- package/dist/browser/generated/operations/analyzeText.js.map +1 -0
- package/dist/browser/generated/operations/index.d.ts +2 -0
- package/dist/browser/generated/operations/index.d.ts.map +1 -0
- package/{dist-esm/src/generated → dist/browser/generated/operations}/index.js +1 -3
- package/dist/browser/generated/operations/index.js.map +1 -0
- package/dist/browser/generated/operationsInterfaces/analyzeText.d.ts +19 -0
- package/dist/browser/generated/operationsInterfaces/analyzeText.d.ts.map +1 -0
- package/dist/browser/generated/operationsInterfaces/analyzeText.js.map +1 -0
- package/dist/browser/generated/operationsInterfaces/index.d.ts +2 -0
- package/dist/browser/generated/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/browser/generated/operationsInterfaces/index.js +9 -0
- package/dist/browser/generated/operationsInterfaces/index.js.map +1 -0
- package/dist/browser/index.d.ts +16 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/index.js +3 -3
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/logger.d.ts +6 -0
- package/dist/browser/logger.d.ts.map +1 -0
- package/dist/browser/lro.d.ts +60 -0
- package/dist/browser/lro.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/lro.js +5 -5
- package/dist/browser/lro.js.map +1 -0
- package/dist/browser/models.d.ts +881 -0
- package/dist/browser/models.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/models.js +1 -1
- package/dist/browser/models.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/textAnalysisClient.d.ts +487 -0
- package/dist/browser/textAnalysisClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/textAnalysisClient.js +7 -7
- package/dist/browser/textAnalysisClient.js.map +1 -0
- package/dist/browser/transforms.d.ts +12 -0
- package/dist/browser/transforms.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/transforms.js +1 -1
- package/dist/browser/transforms.js.map +1 -0
- package/dist/browser/util.d.ts +57 -0
- package/dist/browser/util.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/util.js +1 -1
- package/dist/browser/util.js.map +1 -0
- package/dist/commonjs/azureKeyCredentialPolicy.d.ts +9 -0
- package/dist/commonjs/azureKeyCredentialPolicy.d.ts.map +1 -0
- package/dist/commonjs/azureKeyCredentialPolicy.js +25 -0
- package/dist/commonjs/azureKeyCredentialPolicy.js.map +1 -0
- package/dist/commonjs/constants.d.ts +14 -0
- package/dist/commonjs/constants.d.ts.map +1 -0
- package/dist/commonjs/constants.js +19 -0
- package/dist/commonjs/constants.js.map +1 -0
- package/dist/commonjs/generated/generatedClient.d.ts +33 -0
- package/dist/commonjs/generated/generatedClient.d.ts.map +1 -0
- package/dist/commonjs/generated/generatedClient.js +134 -0
- package/dist/commonjs/generated/generatedClient.js.map +1 -0
- package/dist/commonjs/generated/index.d.ts +4 -0
- package/dist/commonjs/generated/index.d.ts.map +1 -0
- package/dist/commonjs/generated/index.js +16 -0
- package/dist/commonjs/generated/index.js.map +1 -0
- package/dist/commonjs/generated/models/index.d.ts +2034 -0
- package/dist/commonjs/generated/models/index.d.ts.map +1 -0
- package/dist/commonjs/generated/models/index.js +735 -0
- package/dist/commonjs/generated/models/index.js.map +1 -0
- package/dist/commonjs/generated/models/mappers.d.ts +171 -0
- package/dist/commonjs/generated/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/generated/models/mappers.js +2848 -0
- package/dist/commonjs/generated/models/mappers.js.map +1 -0
- package/dist/commonjs/generated/models/parameters.d.ts +12 -0
- package/dist/commonjs/generated/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/generated/models/parameters.js +101 -0
- package/dist/commonjs/generated/models/parameters.js.map +1 -0
- package/dist/commonjs/generated/operations/analyzeText.d.ts +27 -0
- package/dist/commonjs/generated/operations/analyzeText.d.ts.map +1 -0
- package/dist/commonjs/generated/operations/analyzeText.js +83 -0
- package/dist/commonjs/generated/operations/analyzeText.js.map +1 -0
- package/dist/commonjs/generated/operations/index.d.ts +2 -0
- package/dist/commonjs/generated/operations/index.d.ts.map +1 -0
- package/dist/commonjs/generated/operations/index.js +12 -0
- package/dist/commonjs/generated/operations/index.js.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/analyzeText.d.ts +19 -0
- package/dist/commonjs/generated/operationsInterfaces/analyzeText.d.ts.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/analyzeText.js +10 -0
- package/dist/commonjs/generated/operationsInterfaces/analyzeText.js.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/index.d.ts +2 -0
- package/dist/commonjs/generated/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/index.js +12 -0
- package/dist/commonjs/generated/operationsInterfaces/index.js.map +1 -0
- package/dist/commonjs/index.d.ts +16 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +31 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/logger.d.ts +6 -0
- package/dist/commonjs/logger.d.ts.map +1 -0
- package/dist/commonjs/logger.js +12 -0
- package/dist/commonjs/logger.js.map +1 -0
- package/dist/commonjs/lro.d.ts +60 -0
- package/dist/commonjs/lro.d.ts.map +1 -0
- package/dist/commonjs/lro.js +200 -0
- package/dist/commonjs/lro.js.map +1 -0
- package/dist/commonjs/models.d.ts +881 -0
- package/dist/commonjs/models.d.ts.map +1 -0
- package/dist/commonjs/models.js +38 -0
- package/dist/commonjs/models.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/textAnalysisClient.d.ts +487 -0
- package/dist/commonjs/textAnalysisClient.d.ts.map +1 -0
- package/dist/commonjs/textAnalysisClient.js +211 -0
- package/dist/commonjs/textAnalysisClient.js.map +1 -0
- package/dist/commonjs/transforms.d.ts +12 -0
- package/dist/commonjs/transforms.d.ts.map +1 -0
- package/dist/commonjs/transforms.js +388 -0
- package/dist/commonjs/transforms.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/commonjs/util.d.ts +57 -0
- package/dist/commonjs/util.d.ts.map +1 -0
- package/dist/commonjs/util.js +141 -0
- package/dist/commonjs/util.js.map +1 -0
- package/dist/esm/azureKeyCredentialPolicy.d.ts +9 -0
- package/dist/esm/azureKeyCredentialPolicy.d.ts.map +1 -0
- package/dist/esm/azureKeyCredentialPolicy.js +22 -0
- package/dist/esm/azureKeyCredentialPolicy.js.map +1 -0
- package/dist/esm/constants.d.ts +14 -0
- package/dist/esm/constants.d.ts.map +1 -0
- package/dist/esm/constants.js +16 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/generated/generatedClient.d.ts +33 -0
- package/dist/esm/generated/generatedClient.d.ts.map +1 -0
- package/dist/esm/generated/generatedClient.js +129 -0
- package/dist/esm/generated/generatedClient.js.map +1 -0
- package/dist/esm/generated/index.d.ts +4 -0
- package/dist/esm/generated/index.d.ts.map +1 -0
- package/dist/esm/generated/index.js +11 -0
- package/dist/esm/generated/index.js.map +1 -0
- package/dist/esm/generated/models/index.d.ts +2034 -0
- package/dist/esm/generated/models/index.d.ts.map +1 -0
- package/dist/esm/generated/models/index.js +732 -0
- package/dist/esm/generated/models/index.js.map +1 -0
- package/dist/esm/generated/models/mappers.d.ts +171 -0
- package/dist/esm/generated/models/mappers.d.ts.map +1 -0
- package/dist/esm/generated/models/mappers.js +2843 -0
- package/dist/esm/generated/models/mappers.js.map +1 -0
- package/dist/esm/generated/models/parameters.d.ts +12 -0
- package/dist/esm/generated/models/parameters.d.ts.map +1 -0
- package/dist/esm/generated/models/parameters.js +98 -0
- package/dist/esm/generated/models/parameters.js.map +1 -0
- package/dist/esm/generated/operations/analyzeText.d.ts +27 -0
- package/dist/esm/generated/operations/analyzeText.d.ts.map +1 -0
- package/dist/esm/generated/operations/analyzeText.js +78 -0
- package/dist/esm/generated/operations/analyzeText.js.map +1 -0
- package/dist/esm/generated/operations/index.d.ts +2 -0
- package/dist/esm/generated/operations/index.d.ts.map +1 -0
- package/dist/esm/generated/operations/index.js +9 -0
- package/dist/esm/generated/operations/index.js.map +1 -0
- package/dist/esm/generated/operationsInterfaces/analyzeText.d.ts +19 -0
- package/dist/esm/generated/operationsInterfaces/analyzeText.d.ts.map +1 -0
- package/{dist-esm/src/generated/operationsInterfaces/index.js → dist/esm/generated/operationsInterfaces/analyzeText.js} +2 -2
- package/dist/esm/generated/operationsInterfaces/analyzeText.js.map +1 -0
- package/dist/esm/generated/operationsInterfaces/index.d.ts +2 -0
- package/dist/esm/generated/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/esm/generated/operationsInterfaces/index.js +9 -0
- package/dist/esm/generated/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/index.d.ts +16 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +18 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/logger.d.ts +6 -0
- package/dist/esm/logger.d.ts.map +1 -0
- package/dist/esm/logger.js +9 -0
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/lro.d.ts +60 -0
- package/dist/esm/lro.d.ts.map +1 -0
- package/dist/esm/lro.js +191 -0
- package/dist/esm/lro.js.map +1 -0
- package/dist/esm/models.d.ts +881 -0
- package/dist/esm/models.d.ts.map +1 -0
- package/dist/esm/models.js +35 -0
- package/dist/esm/models.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/textAnalysisClient.d.ts +487 -0
- package/dist/esm/textAnalysisClient.d.ts.map +1 -0
- package/dist/esm/textAnalysisClient.js +207 -0
- package/dist/esm/textAnalysisClient.js.map +1 -0
- package/dist/esm/transforms.d.ts +12 -0
- package/dist/esm/transforms.d.ts.map +1 -0
- package/dist/esm/transforms.js +383 -0
- package/dist/esm/transforms.js.map +1 -0
- package/dist/esm/util.d.ts +57 -0
- package/dist/esm/util.d.ts.map +1 -0
- package/dist/esm/util.js +131 -0
- package/dist/esm/util.js.map +1 -0
- package/dist/react-native/azureKeyCredentialPolicy.d.ts +9 -0
- package/dist/react-native/azureKeyCredentialPolicy.d.ts.map +1 -0
- package/dist/react-native/azureKeyCredentialPolicy.js +22 -0
- package/dist/react-native/azureKeyCredentialPolicy.js.map +1 -0
- package/dist/react-native/constants.d.ts +14 -0
- package/dist/react-native/constants.d.ts.map +1 -0
- package/dist/react-native/constants.js +16 -0
- package/dist/react-native/constants.js.map +1 -0
- package/dist/react-native/generated/generatedClient.d.ts +33 -0
- package/dist/react-native/generated/generatedClient.d.ts.map +1 -0
- package/dist/react-native/generated/generatedClient.js +129 -0
- package/dist/react-native/generated/generatedClient.js.map +1 -0
- package/dist/react-native/generated/index.d.ts +4 -0
- package/dist/react-native/generated/index.d.ts.map +1 -0
- package/dist/react-native/generated/index.js +11 -0
- package/dist/react-native/generated/index.js.map +1 -0
- package/dist/react-native/generated/models/index.d.ts +2034 -0
- package/dist/react-native/generated/models/index.d.ts.map +1 -0
- package/dist/react-native/generated/models/index.js +732 -0
- package/dist/react-native/generated/models/index.js.map +1 -0
- package/dist/react-native/generated/models/mappers.d.ts +171 -0
- package/dist/react-native/generated/models/mappers.d.ts.map +1 -0
- package/dist/react-native/generated/models/mappers.js +2843 -0
- package/dist/react-native/generated/models/mappers.js.map +1 -0
- package/dist/react-native/generated/models/parameters.d.ts +12 -0
- package/dist/react-native/generated/models/parameters.d.ts.map +1 -0
- package/dist/react-native/generated/models/parameters.js +98 -0
- package/dist/react-native/generated/models/parameters.js.map +1 -0
- package/dist/react-native/generated/operations/analyzeText.d.ts +27 -0
- package/dist/react-native/generated/operations/analyzeText.d.ts.map +1 -0
- package/dist/react-native/generated/operations/analyzeText.js +78 -0
- package/dist/react-native/generated/operations/analyzeText.js.map +1 -0
- package/dist/react-native/generated/operations/index.d.ts +2 -0
- package/dist/react-native/generated/operations/index.d.ts.map +1 -0
- package/dist/react-native/generated/operations/index.js +9 -0
- package/dist/react-native/generated/operations/index.js.map +1 -0
- package/dist/react-native/generated/operationsInterfaces/analyzeText.d.ts +19 -0
- package/dist/react-native/generated/operationsInterfaces/analyzeText.d.ts.map +1 -0
- package/{dist-esm/src/generated/operations/index.js → dist/react-native/generated/operationsInterfaces/analyzeText.js} +2 -2
- package/dist/react-native/generated/operationsInterfaces/analyzeText.js.map +1 -0
- package/dist/react-native/generated/operationsInterfaces/index.d.ts +2 -0
- package/dist/react-native/generated/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/react-native/generated/operationsInterfaces/index.js +9 -0
- package/dist/react-native/generated/operationsInterfaces/index.js.map +1 -0
- package/dist/react-native/index.d.ts +16 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +18 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/logger.d.ts +6 -0
- package/dist/react-native/logger.d.ts.map +1 -0
- package/dist/react-native/logger.js +9 -0
- package/dist/react-native/logger.js.map +1 -0
- package/dist/react-native/lro.d.ts +60 -0
- package/dist/react-native/lro.d.ts.map +1 -0
- package/dist/react-native/lro.js +191 -0
- package/dist/react-native/lro.js.map +1 -0
- package/dist/react-native/models.d.ts +881 -0
- package/dist/react-native/models.d.ts.map +1 -0
- package/dist/react-native/models.js +35 -0
- package/dist/react-native/models.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/textAnalysisClient.d.ts +487 -0
- package/dist/react-native/textAnalysisClient.d.ts.map +1 -0
- package/dist/react-native/textAnalysisClient.js +207 -0
- package/dist/react-native/textAnalysisClient.js.map +1 -0
- package/dist/react-native/transforms.d.ts +12 -0
- package/dist/react-native/transforms.d.ts.map +1 -0
- package/dist/react-native/transforms.js +383 -0
- package/dist/react-native/transforms.js.map +1 -0
- package/dist/react-native/util.d.ts +57 -0
- package/dist/react-native/util.d.ts.map +1 -0
- package/dist/react-native/util.js +131 -0
- package/dist/react-native/util.js.map +1 -0
- package/package.json +71 -50
- package/dist/index.js +0 -5015
- package/dist/index.js.map +0 -1
- package/dist-esm/src/generated/generatedClient.js.map +0 -1
- package/dist-esm/src/generated/index.js.map +0 -1
- package/dist-esm/src/generated/operations/analyzeText.js.map +0 -1
- package/dist-esm/src/generated/operations/index.js.map +0 -1
- package/dist-esm/src/generated/operationsInterfaces/analyzeText.js.map +0 -1
- package/dist-esm/src/generated/operationsInterfaces/index.js.map +0 -1
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/lro.js.map +0 -1
- package/dist-esm/src/models.js.map +0 -1
- package/dist-esm/src/textAnalysisClient.js.map +0 -1
- package/dist-esm/src/transforms.js.map +0 -1
- package/dist-esm/src/util.js.map +0 -1
- package/types/ai-language-text.d.ts +0 -2716
- /package/{dist-esm/src → dist/browser}/azureKeyCredentialPolicy.js +0 -0
- /package/{dist-esm/src → dist/browser}/azureKeyCredentialPolicy.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/constants.js +0 -0
- /package/{dist-esm/src → dist/browser}/constants.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/models/index.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/models/index.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/models/mappers.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/models/mappers.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/operationsInterfaces/analyzeText.js +0 -0
- /package/{dist-esm/src → dist/browser}/logger.js +0 -0
- /package/{dist-esm/src → dist/browser}/logger.js.map +0 -0
@@ -0,0 +1,881 @@
|
|
1
|
+
import type { AbstractiveSummary, AssessmentSentiment, ClassificationCategory, CustomEntityRecognitionAction, CustomMultiLabelClassificationAction, CustomSingleLabelClassificationAction, DetectedLanguage, DocumentSentimentLabel, DocumentWarning, Entity, EntityDataSource, EntityLinkingAction, EntityRecognitionAction, ExtractiveSummarizationAction, HealthcareAction, HealthcareAssertion, HealthcareEntityCategory, KeyPhraseExtractionAction, LanguageDetectionAction, LinkedEntity, PiiEntityRecognitionAction, RelationType, SentenceSentimentLabel, SentimentAnalysisAction, SentimentConfidenceScores, StringIndexType, SummarySentence, TargetConfidenceScores, TextDocumentBatchStatistics, TextDocumentStatistics, TokenSentimentLabel } from "./generated/index.js";
|
2
|
+
import { KnownErrorCode, KnownInnerErrorCode } from "./generated/index.js";
|
3
|
+
import type { CommonClientOptions, OperationOptions } from "@azure/core-client";
|
4
|
+
import type { OperationState, SimplePollerLike } from "@azure/core-lro";
|
5
|
+
import type { PagedAsyncIterableIterator } from "@azure/core-paging";
|
6
|
+
/**
|
7
|
+
* Configuration options for {@link TextAnalysisClient}.
|
8
|
+
*/
|
9
|
+
export interface TextAnalysisClientOptions extends CommonClientOptions {
|
10
|
+
/**
|
11
|
+
* The default country hint to use. Defaults to "us".
|
12
|
+
*/
|
13
|
+
defaultCountryHint?: string;
|
14
|
+
/**
|
15
|
+
* The default language to use. Defaults to "en".
|
16
|
+
*/
|
17
|
+
defaultLanguage?: string;
|
18
|
+
/**
|
19
|
+
* The version of the Cognitive Language Service API to use.
|
20
|
+
*/
|
21
|
+
serviceVersion?: string;
|
22
|
+
}
|
23
|
+
/**
|
24
|
+
* Options common to all operations.
|
25
|
+
*/
|
26
|
+
export interface TextAnalysisOperationOptions extends OperationOptions {
|
27
|
+
/**
|
28
|
+
* If set to true, response will contain input and document level statistics.
|
29
|
+
*/
|
30
|
+
includeStatistics?: boolean;
|
31
|
+
}
|
32
|
+
/**
|
33
|
+
* Options for the begin analyze actions operation.
|
34
|
+
*/
|
35
|
+
export interface BeginAnalyzeBatchOptions extends TextAnalysisOperationOptions {
|
36
|
+
/**
|
37
|
+
* Time delay between poll requests, in milliseconds.
|
38
|
+
*/
|
39
|
+
updateIntervalInMs?: number;
|
40
|
+
/**
|
41
|
+
* The operation's display name.
|
42
|
+
*/
|
43
|
+
displayName?: string;
|
44
|
+
}
|
45
|
+
/**
|
46
|
+
* Options for the begin analyze actions operation.
|
47
|
+
*/
|
48
|
+
export interface RestoreAnalyzeBatchPollerOptions extends TextAnalysisOperationOptions {
|
49
|
+
/**
|
50
|
+
* Time delay between poll requests, in milliseconds.
|
51
|
+
*/
|
52
|
+
updateIntervalInMs?: number;
|
53
|
+
}
|
54
|
+
/**
|
55
|
+
* Type of actions supported by the {@link TextAnalysisClient.analyze} method.
|
56
|
+
*/
|
57
|
+
export declare const AnalyzeActionNames: {
|
58
|
+
readonly EntityLinking: "EntityLinking";
|
59
|
+
readonly EntityRecognition: "EntityRecognition";
|
60
|
+
readonly KeyPhraseExtraction: "KeyPhraseExtraction";
|
61
|
+
readonly PiiEntityRecognition: "PiiEntityRecognition";
|
62
|
+
readonly LanguageDetection: "LanguageDetection";
|
63
|
+
readonly SentimentAnalysis: "SentimentAnalysis";
|
64
|
+
};
|
65
|
+
/**
|
66
|
+
* Type of actions supported by the {@link TextAnalysisClient.beginAnalyzeBatch} method.
|
67
|
+
*/
|
68
|
+
export declare const AnalyzeBatchActionNames: {
|
69
|
+
readonly SentimentAnalysis: "SentimentAnalysis";
|
70
|
+
readonly EntityRecognition: "EntityRecognition";
|
71
|
+
readonly PiiEntityRecognition: "PiiEntityRecognition";
|
72
|
+
readonly KeyPhraseExtraction: "KeyPhraseExtraction";
|
73
|
+
readonly EntityLinking: "EntityLinking";
|
74
|
+
readonly Healthcare: "Healthcare";
|
75
|
+
readonly ExtractiveSummarization: "ExtractiveSummarization";
|
76
|
+
readonly AbstractiveSummarization: "AbstractiveSummarization";
|
77
|
+
readonly CustomEntityRecognition: "CustomEntityRecognition";
|
78
|
+
readonly CustomSingleLabelClassification: "CustomSingleLabelClassification";
|
79
|
+
readonly CustomMultiLabelClassification: "CustomMultiLabelClassification";
|
80
|
+
};
|
81
|
+
/**
|
82
|
+
* Type of actions supported by the {@link TextAnalysisClient.analyze} method.
|
83
|
+
*/
|
84
|
+
export type AnalyzeActionName = keyof typeof AnalyzeActionNames;
|
85
|
+
/**
|
86
|
+
* The type of parameters for every action in ${@link AnalyzeActionNames}.
|
87
|
+
*/
|
88
|
+
export type AnalyzeActionParameters<ActionName extends AnalyzeActionName> = {
|
89
|
+
EntityLinking: EntityLinkingAction;
|
90
|
+
EntityRecognition: EntityRecognitionAction;
|
91
|
+
PiiEntityRecognition: PiiEntityRecognitionAction;
|
92
|
+
KeyPhraseExtraction: KeyPhraseExtractionAction;
|
93
|
+
SentimentAnalysis: SentimentAnalysisAction;
|
94
|
+
LanguageDetection: LanguageDetectionAction;
|
95
|
+
}[ActionName];
|
96
|
+
/**
|
97
|
+
* The type of results of every action in ${@link AnalyzeActionNames}.
|
98
|
+
*/
|
99
|
+
export type AnalyzeResult<ActionName extends AnalyzeActionName> = {
|
100
|
+
EntityLinking: EntityLinkingResult[];
|
101
|
+
EntityRecognition: EntityRecognitionResult[];
|
102
|
+
PiiEntityRecognition: PiiEntityRecognitionResult[];
|
103
|
+
KeyPhraseExtraction: KeyPhraseExtractionResult[];
|
104
|
+
SentimentAnalysis: SentimentAnalysisResult[];
|
105
|
+
LanguageDetection: LanguageDetectionResult[];
|
106
|
+
}[ActionName];
|
107
|
+
/** Options for an Abstractive Summarization action. */
|
108
|
+
export interface AbstractiveSummarizationAction {
|
109
|
+
/** The approximate number of sentences to be part of the summary. */
|
110
|
+
sentenceCount?: number;
|
111
|
+
/**
|
112
|
+
* Specifies the measurement unit used to calculate the offset and length properties. For a list of possible values, see {@link KnownStringIndexType}.
|
113
|
+
*
|
114
|
+
* The default is the JavaScript's default which is "Utf16CodeUnit".
|
115
|
+
*/
|
116
|
+
stringIndexType?: StringIndexType;
|
117
|
+
}
|
118
|
+
/**
|
119
|
+
* Enum of possible error codes of a {@link TextAnalysisError}.
|
120
|
+
*/
|
121
|
+
export declare const KnownTextAnalysisErrorCode: {
|
122
|
+
InvalidRequest: KnownInnerErrorCode.InvalidRequest;
|
123
|
+
InvalidParameterValue: KnownInnerErrorCode.InvalidParameterValue;
|
124
|
+
KnowledgeBaseNotFound: KnownInnerErrorCode.KnowledgeBaseNotFound;
|
125
|
+
AzureCognitiveSearchNotFound: KnownInnerErrorCode.AzureCognitiveSearchNotFound;
|
126
|
+
AzureCognitiveSearchThrottling: KnownInnerErrorCode.AzureCognitiveSearchThrottling;
|
127
|
+
ExtractionFailure: KnownInnerErrorCode.ExtractionFailure;
|
128
|
+
InvalidRequestBodyFormat: KnownInnerErrorCode.InvalidRequestBodyFormat;
|
129
|
+
EmptyRequest: KnownInnerErrorCode.EmptyRequest;
|
130
|
+
MissingInputDocuments: KnownInnerErrorCode.MissingInputDocuments;
|
131
|
+
InvalidDocument: KnownInnerErrorCode.InvalidDocument;
|
132
|
+
ModelVersionIncorrect: KnownInnerErrorCode.ModelVersionIncorrect;
|
133
|
+
InvalidDocumentBatch: KnownInnerErrorCode.InvalidDocumentBatch;
|
134
|
+
UnsupportedLanguageCode: KnownInnerErrorCode.UnsupportedLanguageCode;
|
135
|
+
InvalidCountryHint: KnownInnerErrorCode.InvalidCountryHint;
|
136
|
+
InvalidArgument: KnownErrorCode.InvalidArgument;
|
137
|
+
Unauthorized: KnownErrorCode.Unauthorized;
|
138
|
+
Forbidden: KnownErrorCode.Forbidden;
|
139
|
+
NotFound: KnownErrorCode.NotFound;
|
140
|
+
ProjectNotFound: KnownErrorCode.ProjectNotFound;
|
141
|
+
OperationNotFound: KnownErrorCode.OperationNotFound;
|
142
|
+
AzureCognitiveSearchIndexNotFound: KnownErrorCode.AzureCognitiveSearchIndexNotFound;
|
143
|
+
TooManyRequests: KnownErrorCode.TooManyRequests;
|
144
|
+
AzureCognitiveSearchIndexLimitReached: KnownErrorCode.AzureCognitiveSearchIndexLimitReached;
|
145
|
+
InternalServerError: KnownErrorCode.InternalServerError;
|
146
|
+
ServiceUnavailable: KnownErrorCode.ServiceUnavailable;
|
147
|
+
Timeout: KnownErrorCode.Timeout;
|
148
|
+
QuotaExceeded: KnownErrorCode.QuotaExceeded;
|
149
|
+
Conflict: KnownErrorCode.Conflict;
|
150
|
+
Warning: KnownErrorCode.Warning;
|
151
|
+
};
|
152
|
+
/**
|
153
|
+
* Type describing an API error.
|
154
|
+
*/
|
155
|
+
export interface TextAnalysisError {
|
156
|
+
/**
|
157
|
+
* A code describing the kind of error produced. See {@link KnownTextAnalysisErrorCode}.
|
158
|
+
*/
|
159
|
+
readonly code: string;
|
160
|
+
/**
|
161
|
+
* A message from the service explaining the error
|
162
|
+
*/
|
163
|
+
readonly message: string;
|
164
|
+
/**
|
165
|
+
* The target of the particular error (for example, the name of an invalid parameter)
|
166
|
+
*/
|
167
|
+
readonly target?: string;
|
168
|
+
}
|
169
|
+
/**
|
170
|
+
* Base type for results of an action corresponding to a single input document.
|
171
|
+
*/
|
172
|
+
export interface TextAnalysisSuccessResult {
|
173
|
+
/**
|
174
|
+
* Unique, non-empty document identifier.
|
175
|
+
*/
|
176
|
+
readonly id: string;
|
177
|
+
/**
|
178
|
+
* Statistics about the input document and how it was processed by the service.
|
179
|
+
* This property will have a value when includeStatistics is set to true in
|
180
|
+
* the client call.
|
181
|
+
*/
|
182
|
+
readonly statistics?: TextDocumentStatistics;
|
183
|
+
/**
|
184
|
+
* An array of warning data corresponding to this document.
|
185
|
+
*
|
186
|
+
* If no warnings were returned, this array will be empty.
|
187
|
+
*/
|
188
|
+
readonly warnings: DocumentWarning[];
|
189
|
+
/**
|
190
|
+
* Discriminant to determine if this is an error result.
|
191
|
+
*/
|
192
|
+
readonly error?: undefined;
|
193
|
+
}
|
194
|
+
/**
|
195
|
+
* Base type for error results of an action corresponding to a single document.
|
196
|
+
*/
|
197
|
+
export interface TextAnalysisErrorResult {
|
198
|
+
/**
|
199
|
+
* Unique, non-empty document identifier.
|
200
|
+
*/
|
201
|
+
readonly id: string;
|
202
|
+
/**
|
203
|
+
* The Error for this document result.
|
204
|
+
*/
|
205
|
+
readonly error: TextAnalysisError;
|
206
|
+
}
|
207
|
+
/**
|
208
|
+
* The result of an entity recognition action on a single document.
|
209
|
+
*/
|
210
|
+
export type EntityRecognitionResult = EntityRecognitionSuccessResult | EntityRecognitionErrorResult;
|
211
|
+
/**
|
212
|
+
* The result of an entity recognition action on a single document, containing
|
213
|
+
* a collection of {@link Entity} objects identified in that document.
|
214
|
+
*/
|
215
|
+
export interface EntityRecognitionSuccessResult extends TextAnalysisSuccessResult {
|
216
|
+
/**
|
217
|
+
* The collection of entities identified in the input document.
|
218
|
+
*/
|
219
|
+
readonly entities: Entity[];
|
220
|
+
}
|
221
|
+
/**
|
222
|
+
* An error result from an entity recognition action on a single document.
|
223
|
+
*/
|
224
|
+
export type EntityRecognitionErrorResult = TextAnalysisErrorResult;
|
225
|
+
/**
|
226
|
+
* The result of an entity recognition action on a single document.
|
227
|
+
*/
|
228
|
+
export type PiiEntityRecognitionResult = PiiEntityRecognitionSuccessResult | PiiEntityRecognitionErrorResult;
|
229
|
+
/**
|
230
|
+
* The result of a pii entity recognition action on a single document,
|
231
|
+
* containing the collection of {@link Entity} objects identified in that
|
232
|
+
* document.
|
233
|
+
*/
|
234
|
+
export interface PiiEntityRecognitionSuccessResult extends TextAnalysisSuccessResult {
|
235
|
+
/**
|
236
|
+
* The collection of entities identified in the input document.
|
237
|
+
*/
|
238
|
+
readonly entities: Entity[];
|
239
|
+
/**
|
240
|
+
* The text redacted.
|
241
|
+
*/
|
242
|
+
readonly redactedText: string;
|
243
|
+
}
|
244
|
+
/**
|
245
|
+
* An error result from a pii entity recognition action on a single document.
|
246
|
+
*/
|
247
|
+
export type PiiEntityRecognitionErrorResult = TextAnalysisErrorResult;
|
248
|
+
/**
|
249
|
+
* The result of an entity linking action on a single document.
|
250
|
+
*/
|
251
|
+
export type EntityLinkingResult = EntityLinkingSuccessResult | EntityLinkingErrorResult;
|
252
|
+
/**
|
253
|
+
* The result of a entity linking action on a single document, containing a
|
254
|
+
* collection of the {@link LinkedEntity} objects identified in that document.
|
255
|
+
*/
|
256
|
+
export interface EntityLinkingSuccessResult extends TextAnalysisSuccessResult {
|
257
|
+
/**
|
258
|
+
* The collection of entities identified in the input document.
|
259
|
+
*/
|
260
|
+
readonly entities: LinkedEntity[];
|
261
|
+
}
|
262
|
+
/**
|
263
|
+
* An error result from an entity linking action on a single document.
|
264
|
+
*/
|
265
|
+
export type EntityLinkingErrorResult = TextAnalysisErrorResult;
|
266
|
+
/**
|
267
|
+
* The result of a language detection action on a single document.
|
268
|
+
*/
|
269
|
+
export type LanguageDetectionResult = LanguageDetectionSuccessResult | LanguageDetectionErrorResult;
|
270
|
+
/**
|
271
|
+
* The result of a language detection action on a single document,
|
272
|
+
* containing a prediction of what language the document is written in.
|
273
|
+
*/
|
274
|
+
export interface LanguageDetectionSuccessResult extends TextAnalysisSuccessResult {
|
275
|
+
/**
|
276
|
+
* The top detected language by confidence score.
|
277
|
+
*/
|
278
|
+
readonly primaryLanguage: DetectedLanguage;
|
279
|
+
}
|
280
|
+
/**
|
281
|
+
* An error result from a language detection action on a single document.
|
282
|
+
*/
|
283
|
+
export type LanguageDetectionErrorResult = TextAnalysisErrorResult;
|
284
|
+
/**
|
285
|
+
* The result of a sentiment analysis action on a single document.
|
286
|
+
*/
|
287
|
+
export type KeyPhraseExtractionResult = KeyPhraseExtractionSuccessResult | KeyPhraseExtractionErrorResult;
|
288
|
+
/**
|
289
|
+
* The result of a key phrase extraction action on a single document,
|
290
|
+
* containing a collection of the key phrases identified in that document.
|
291
|
+
*/
|
292
|
+
export interface KeyPhraseExtractionSuccessResult extends TextAnalysisSuccessResult {
|
293
|
+
/**
|
294
|
+
* A list of representative words or phrases. The number of key phrases
|
295
|
+
* returned is proportional to the number of words in the input document.
|
296
|
+
*/
|
297
|
+
readonly keyPhrases: string[];
|
298
|
+
}
|
299
|
+
/**
|
300
|
+
* An error result from a key phrase extraction action on a single document.
|
301
|
+
*/
|
302
|
+
export type KeyPhraseExtractionErrorResult = TextAnalysisErrorResult;
|
303
|
+
/**
|
304
|
+
* The result of a sentiment analysis action on a single document.
|
305
|
+
*/
|
306
|
+
export type SentimentAnalysisResult = SentimentAnalysisSuccessResult | SentimentAnalysisErrorResult;
|
307
|
+
/**
|
308
|
+
* The result of a sentiment analysis action on a single document,
|
309
|
+
* containing the predicted sentiment for each sentence as well as for the full
|
310
|
+
* document.
|
311
|
+
*/
|
312
|
+
export interface SentimentAnalysisSuccessResult extends TextAnalysisSuccessResult {
|
313
|
+
/**
|
314
|
+
* Predicted sentiment for document. For a list of possible values, see {@link DocumentSentimentLabel}
|
315
|
+
*/
|
316
|
+
readonly sentiment: DocumentSentimentLabel;
|
317
|
+
/**
|
318
|
+
* Document level sentiment confidence scores between 0 and 1 for each
|
319
|
+
* sentiment class.
|
320
|
+
*/
|
321
|
+
readonly confidenceScores: SentimentConfidenceScores;
|
322
|
+
/**
|
323
|
+
* The predicted sentiment for each sentence in the corresponding document.
|
324
|
+
*/
|
325
|
+
readonly sentences: SentenceSentiment[];
|
326
|
+
}
|
327
|
+
/**
|
328
|
+
* The predicted sentiment for a given span of text. For more information
|
329
|
+
* regarding text sentiment, see {@link https://docs.microsoft.com//azure/cognitive-services/language-service/sentiment-opinion-mining/overview}.
|
330
|
+
*/
|
331
|
+
export interface SentenceSentiment {
|
332
|
+
/**
|
333
|
+
* The sentence text.
|
334
|
+
*/
|
335
|
+
readonly text: string;
|
336
|
+
/**
|
337
|
+
* The predicted Sentiment for the sentence. For a list of possible values,
|
338
|
+
* see {@link SentenceSentimentLabel}
|
339
|
+
*/
|
340
|
+
readonly sentiment: SentenceSentimentLabel;
|
341
|
+
/**
|
342
|
+
* The sentiment confidence score between 0 and 1 for the sentence for all
|
343
|
+
* classes.
|
344
|
+
*/
|
345
|
+
readonly confidenceScores: SentimentConfidenceScores;
|
346
|
+
/**
|
347
|
+
* The sentence text offset from the start of the document.
|
348
|
+
*/
|
349
|
+
readonly offset: number;
|
350
|
+
/**
|
351
|
+
* The length of the sentence text.
|
352
|
+
*/
|
353
|
+
readonly length: number;
|
354
|
+
/**
|
355
|
+
* The list of opinions mined from this sentence. For example in "The food is
|
356
|
+
* good, but the service is bad", the following two opinions will be returned:
|
357
|
+
* "food is good" and "service is bad".
|
358
|
+
*
|
359
|
+
* It is non-empty only returned if {@link includeOpinionMining} was set to
|
360
|
+
* `true`.
|
361
|
+
*/
|
362
|
+
readonly opinions: Opinion[];
|
363
|
+
}
|
364
|
+
/**
|
365
|
+
* TargetSentiment contains the predicted sentiment, confidence scores and other
|
366
|
+
* information about a target of a product. A target of a product/service is a
|
367
|
+
* key component of that product/service. For example in "The food at Hotel Foo
|
368
|
+
* is good", "food" is a target of "Hotel Foo".
|
369
|
+
*/
|
370
|
+
export interface TargetSentiment {
|
371
|
+
/**
|
372
|
+
* The sentiment confidence score between 0 and 1 for the target for
|
373
|
+
* 'positive' and 'negative' labels.
|
374
|
+
*/
|
375
|
+
readonly confidenceScores: TargetConfidenceScores;
|
376
|
+
/**
|
377
|
+
* The predicted Sentiment for the Target. For a list of possible values,
|
378
|
+
* see {@link TokenSentimentLabel}
|
379
|
+
*/
|
380
|
+
readonly sentiment: TokenSentimentLabel;
|
381
|
+
/**
|
382
|
+
* The target text.
|
383
|
+
*/
|
384
|
+
readonly text: string;
|
385
|
+
/**
|
386
|
+
* The Target text offset from the start of the sentence.
|
387
|
+
*/
|
388
|
+
readonly offset: number;
|
389
|
+
/**
|
390
|
+
* The length of the Target text.
|
391
|
+
*/
|
392
|
+
readonly length: number;
|
393
|
+
}
|
394
|
+
/**
|
395
|
+
* A mined opinion object represents an opinion we've extracted from a sentence.
|
396
|
+
* It consists of both a target that these assessments are about, and the actual
|
397
|
+
* assessments themselves.
|
398
|
+
*/
|
399
|
+
export interface Opinion {
|
400
|
+
/**
|
401
|
+
* The target of a product/service that this assessment is about.
|
402
|
+
*/
|
403
|
+
readonly target: TargetSentiment;
|
404
|
+
/**
|
405
|
+
* The actual assessments of the target.
|
406
|
+
*/
|
407
|
+
readonly assessments: AssessmentSentiment[];
|
408
|
+
}
|
409
|
+
/**
|
410
|
+
* A healthcare entity represented as a node in a directed graph where the edges are
|
411
|
+
* a particular type of relationship between the source and target nodes.
|
412
|
+
*/
|
413
|
+
export interface HealthcareEntity extends Entity {
|
414
|
+
/**
|
415
|
+
* Normalized name for the entity. For example, the normalized text for "histologically" is "histologic".
|
416
|
+
*/
|
417
|
+
readonly normalizedText?: string;
|
418
|
+
/**
|
419
|
+
* Whether the entity is negated.
|
420
|
+
*/
|
421
|
+
readonly assertion?: HealthcareAssertion;
|
422
|
+
/**
|
423
|
+
* Entity references in known data sources.
|
424
|
+
*/
|
425
|
+
readonly dataSources: EntityDataSource[];
|
426
|
+
/**
|
427
|
+
* Defines values for HealthcareEntityCategory.
|
428
|
+
* {@link KnownHealthcareEntityCategory} can be used interchangeably with HealthcareEntityCategory,
|
429
|
+
* this enum contains the known values that the service supports.
|
430
|
+
* ### Known values supported by the service
|
431
|
+
* **BODY_STRUCTURE**
|
432
|
+
* **AGE**
|
433
|
+
* **GENDER**
|
434
|
+
* **EXAMINATION_NAME**
|
435
|
+
* **DATE**
|
436
|
+
* **DIRECTION**
|
437
|
+
* **FREQUENCY**
|
438
|
+
* **MEASUREMENT_VALUE**
|
439
|
+
* **MEASUREMENT_UNIT**
|
440
|
+
* **RELATIONAL_OPERATOR**
|
441
|
+
* **TIME**
|
442
|
+
* **GENE_OR_PROTEIN**
|
443
|
+
* **VARIANT**
|
444
|
+
* **ADMINISTRATIVE_EVENT**
|
445
|
+
* **CARE_ENVIRONMENT**
|
446
|
+
* **HEALTHCARE_PROFESSION**
|
447
|
+
* **DIAGNOSIS**
|
448
|
+
* **SYMPTOM_OR_SIGN**
|
449
|
+
* **CONDITION_QUALIFIER**
|
450
|
+
* **MEDICATION_CLASS**
|
451
|
+
* **MEDICATION_NAME**
|
452
|
+
* **DOSAGE**
|
453
|
+
* **MEDICATION_FORM**
|
454
|
+
* **MEDICATION_ROUTE**
|
455
|
+
* **FAMILY_RELATION**
|
456
|
+
* **TREATMENT_NAME**
|
457
|
+
*/
|
458
|
+
readonly category: HealthcareEntityCategory;
|
459
|
+
}
|
460
|
+
/**
|
461
|
+
* The type of different roles a healthcare entity can play in a relation.
|
462
|
+
*/
|
463
|
+
export type HealthcareEntityRelationRoleType = string;
|
464
|
+
/**
|
465
|
+
* A healthcare entity that plays a specific role in a relation.
|
466
|
+
*/
|
467
|
+
export interface HealthcareEntityRelationRole {
|
468
|
+
/**
|
469
|
+
* A healthcare entity
|
470
|
+
*/
|
471
|
+
readonly entity: HealthcareEntity;
|
472
|
+
/**
|
473
|
+
* The role of the healthcare entity in a particular relation.
|
474
|
+
*/
|
475
|
+
readonly name: HealthcareEntityRelationRoleType;
|
476
|
+
}
|
477
|
+
/**
|
478
|
+
* A relationship between two or more healthcare entities.
|
479
|
+
*/
|
480
|
+
export interface HealthcareEntityRelation {
|
481
|
+
/**
|
482
|
+
* The type of the healthcare relation.
|
483
|
+
*/
|
484
|
+
readonly relationType: RelationType;
|
485
|
+
/**
|
486
|
+
* The list of healthcare entities and their roles in the healthcare relation.
|
487
|
+
*/
|
488
|
+
readonly roles: HealthcareEntityRelationRole[];
|
489
|
+
/**
|
490
|
+
* The confidence score between 0 and 1 of the extracted relation.
|
491
|
+
*/
|
492
|
+
readonly confidenceScore?: number;
|
493
|
+
}
|
494
|
+
/**
|
495
|
+
* The results of a successful healthcare analysis action for a single document.
|
496
|
+
*/
|
497
|
+
export interface HealthcareSuccessResult extends TextAnalysisSuccessResult {
|
498
|
+
/**
|
499
|
+
* Healthcare entities.
|
500
|
+
*/
|
501
|
+
readonly entities: HealthcareEntity[];
|
502
|
+
/**
|
503
|
+
* Relations between healthcare entities.
|
504
|
+
*/
|
505
|
+
readonly entityRelations: HealthcareEntityRelation[];
|
506
|
+
}
|
507
|
+
/**
|
508
|
+
* An error result from the healthcare analysis action on a single document.
|
509
|
+
*/
|
510
|
+
export type HealthcareErrorResult = TextAnalysisErrorResult;
|
511
|
+
/**
|
512
|
+
* The result of the healthcare analysis action on a single document.
|
513
|
+
*/
|
514
|
+
export type HealthcareResult = HealthcareSuccessResult | HealthcareErrorResult;
|
515
|
+
/**
|
516
|
+
* The result of the extractive summarization action on a single document.
|
517
|
+
*/
|
518
|
+
export type ExtractiveSummarizationResult = ExtractiveSummarizationSuccessResult | ExtractiveSummarizationErrorResult;
|
519
|
+
/**
|
520
|
+
* The result of the extractive summarization action on a single document,
|
521
|
+
* containing a collection of the summary identified in that document.
|
522
|
+
*/
|
523
|
+
export interface ExtractiveSummarizationSuccessResult extends TextAnalysisSuccessResult {
|
524
|
+
/**
|
525
|
+
* A list of sentences composing a summary of the input document.
|
526
|
+
*/
|
527
|
+
readonly sentences: SummarySentence[];
|
528
|
+
}
|
529
|
+
/**
|
530
|
+
* An error result from the extractive summarization action on a single document.
|
531
|
+
*/
|
532
|
+
export type ExtractiveSummarizationErrorResult = TextAnalysisErrorResult;
|
533
|
+
/**
|
534
|
+
* The result of the abstractive summarization action on a single document.
|
535
|
+
*/
|
536
|
+
export type AbstractiveSummarizationResult = AbstractiveSummarizationSuccessResult | AbstractiveSummarizationErrorResult;
|
537
|
+
/**
|
538
|
+
* The result of the abstractive summarization action on a single document,
|
539
|
+
* containing a collection of the summaries identified for that document.
|
540
|
+
*/
|
541
|
+
export interface AbstractiveSummarizationSuccessResult extends TextAnalysisSuccessResult {
|
542
|
+
/**
|
543
|
+
* A list of summaries of the input document.
|
544
|
+
*/
|
545
|
+
readonly summaries: AbstractiveSummary[];
|
546
|
+
}
|
547
|
+
/**
|
548
|
+
* An error result from the abstractive summarization action on a single document.
|
549
|
+
*/
|
550
|
+
export type AbstractiveSummarizationErrorResult = TextAnalysisErrorResult;
|
551
|
+
/**
|
552
|
+
* The result of the custom entity recognition action on a single document.
|
553
|
+
*/
|
554
|
+
export type CustomEntityRecognitionResult = CustomEntityRecognitionSuccessResult | CustomEntityRecognitionErrorResult;
|
555
|
+
/**
|
556
|
+
* The result of the custom entity recognition action on a single document,
|
557
|
+
* containing a collection of the entities identified in that document.
|
558
|
+
*/
|
559
|
+
export interface CustomEntityRecognitionSuccessResult extends TextAnalysisSuccessResult {
|
560
|
+
/**
|
561
|
+
* The collection of entities identified in the input document.
|
562
|
+
*/
|
563
|
+
readonly entities: Entity[];
|
564
|
+
}
|
565
|
+
/**
|
566
|
+
* An error result from the custom entity recognition action on a single document.
|
567
|
+
*/
|
568
|
+
export type CustomEntityRecognitionErrorResult = TextAnalysisErrorResult;
|
569
|
+
/**
|
570
|
+
* The result of the single-label classification action on a single document.
|
571
|
+
*/
|
572
|
+
export type CustomSingleLabelClassificationResult = CustomSingleLabelClassificationSuccessResult | CustomSingleLabelClassificationErrorResult;
|
573
|
+
/**
|
574
|
+
* The result of a successful single-label classification action on a single document,
|
575
|
+
* containing the result of the classification.
|
576
|
+
*/
|
577
|
+
export interface CustomSingleLabelClassificationSuccessResult extends TextAnalysisSuccessResult {
|
578
|
+
/**
|
579
|
+
* The collection of classifications in the input document.
|
580
|
+
*/
|
581
|
+
readonly classifications: ClassificationCategory[];
|
582
|
+
}
|
583
|
+
/**
|
584
|
+
* An error result from the single-label classification action on a single document.
|
585
|
+
*/
|
586
|
+
export type CustomSingleLabelClassificationErrorResult = TextAnalysisErrorResult;
|
587
|
+
/**
|
588
|
+
* The result of the multi-label classification action on a multi document.
|
589
|
+
*/
|
590
|
+
export type CustomMultiLabelClassificationResult = CustomMultiLabelClassificationSuccessResult | CustomMultiLabelClassificationErrorResult;
|
591
|
+
/**
|
592
|
+
* The result of a successful multi-label classification action on a multi document,
|
593
|
+
* containing the result of the classification.
|
594
|
+
*/
|
595
|
+
export interface CustomMultiLabelClassificationSuccessResult extends TextAnalysisSuccessResult {
|
596
|
+
/**
|
597
|
+
* The collection of classifications in the input document.
|
598
|
+
*/
|
599
|
+
readonly classifications: ClassificationCategory[];
|
600
|
+
}
|
601
|
+
/**
|
602
|
+
* An error result from the multi-label classification action on a multi document.
|
603
|
+
*/
|
604
|
+
export type CustomMultiLabelClassificationErrorResult = TextAnalysisErrorResult;
|
605
|
+
/**
|
606
|
+
* Options common to all batch actions.
|
607
|
+
*/
|
608
|
+
export interface AnalyzeBatchActionCommon {
|
609
|
+
/**
|
610
|
+
* The name of the action.
|
611
|
+
*/
|
612
|
+
actionName?: string;
|
613
|
+
}
|
614
|
+
/** Options for an entity linking batch action. */
|
615
|
+
export interface EntityLinkingBatchAction extends AnalyzeBatchActionCommon, EntityLinkingAction {
|
616
|
+
/**
|
617
|
+
* The kind of the action.
|
618
|
+
*/
|
619
|
+
kind: "EntityLinking";
|
620
|
+
}
|
621
|
+
/** Options for an entity recognition batch action. */
|
622
|
+
export interface EntityRecognitionBatchAction extends AnalyzeBatchActionCommon, EntityRecognitionAction {
|
623
|
+
/**
|
624
|
+
* The kind of the action.
|
625
|
+
*/
|
626
|
+
kind: "EntityRecognition";
|
627
|
+
}
|
628
|
+
/** Options for an key phrase extraction batch action. */
|
629
|
+
export interface KeyPhraseExtractionBatchAction extends AnalyzeBatchActionCommon, KeyPhraseExtractionAction {
|
630
|
+
/**
|
631
|
+
* The kind of the action.
|
632
|
+
*/
|
633
|
+
kind: "KeyPhraseExtraction";
|
634
|
+
}
|
635
|
+
/** Options for a pii entity recognition batch action. */
|
636
|
+
export interface PiiEntityRecognitionBatchAction extends AnalyzeBatchActionCommon, PiiEntityRecognitionAction {
|
637
|
+
/**
|
638
|
+
* The kind of the action.
|
639
|
+
*/
|
640
|
+
kind: "PiiEntityRecognition";
|
641
|
+
}
|
642
|
+
/** Options for a healthcare batch action. */
|
643
|
+
export interface HealthcareBatchAction extends AnalyzeBatchActionCommon, HealthcareAction {
|
644
|
+
/**
|
645
|
+
* The kind of the action.
|
646
|
+
*/
|
647
|
+
kind: "Healthcare";
|
648
|
+
}
|
649
|
+
/** Options for a sentiment analysis batch action. */
|
650
|
+
export interface SentimentAnalysisBatchAction extends AnalyzeBatchActionCommon, SentimentAnalysisAction {
|
651
|
+
/**
|
652
|
+
* The kind of the action.
|
653
|
+
*/
|
654
|
+
kind: "SentimentAnalysis";
|
655
|
+
}
|
656
|
+
/** Options for an extractive summarization batch action. */
|
657
|
+
export interface ExtractiveSummarizationBatchAction extends AnalyzeBatchActionCommon, ExtractiveSummarizationAction {
|
658
|
+
/**
|
659
|
+
* The kind of the action.
|
660
|
+
*/
|
661
|
+
kind: "ExtractiveSummarization";
|
662
|
+
}
|
663
|
+
/** Options for an abstractive summarization batch action. */
|
664
|
+
export interface AbstractiveSummarizationBatchAction extends AnalyzeBatchActionCommon, AbstractiveSummarizationAction {
|
665
|
+
/**
|
666
|
+
* The kind of the action.
|
667
|
+
*/
|
668
|
+
kind: "AbstractiveSummarization";
|
669
|
+
}
|
670
|
+
/** Options for a custom entity recognition batch action. */
|
671
|
+
export interface CustomEntityRecognitionBatchAction extends AnalyzeBatchActionCommon, CustomEntityRecognitionAction {
|
672
|
+
/**
|
673
|
+
* The kind of the action.
|
674
|
+
*/
|
675
|
+
kind: "CustomEntityRecognition";
|
676
|
+
}
|
677
|
+
/** Options for a custom single-label classification batch action. */
|
678
|
+
export interface CustomSingleLabelClassificationBatchAction extends AnalyzeBatchActionCommon, CustomSingleLabelClassificationAction {
|
679
|
+
/**
|
680
|
+
* The kind of the action.
|
681
|
+
*/
|
682
|
+
kind: "CustomSingleLabelClassification";
|
683
|
+
}
|
684
|
+
/** Options for a custom multi-label classification batch action. */
|
685
|
+
export interface CustomMultiLabelClassificationBatchAction extends AnalyzeBatchActionCommon, CustomMultiLabelClassificationAction {
|
686
|
+
/**
|
687
|
+
* The kind of the action.
|
688
|
+
*/
|
689
|
+
kind: "CustomMultiLabelClassification";
|
690
|
+
}
|
691
|
+
/**
|
692
|
+
* Batch of actions.
|
693
|
+
*/
|
694
|
+
export type AnalyzeBatchAction = EntityLinkingBatchAction | EntityRecognitionBatchAction | KeyPhraseExtractionBatchAction | PiiEntityRecognitionBatchAction | HealthcareBatchAction | SentimentAnalysisBatchAction | ExtractiveSummarizationBatchAction | AbstractiveSummarizationBatchAction | CustomEntityRecognitionBatchAction | CustomSingleLabelClassificationBatchAction | CustomMultiLabelClassificationBatchAction;
|
695
|
+
/**
|
696
|
+
* Type of actions supported by the {@link TextAnalysisClient.beginAnalyzeBatch} method.
|
697
|
+
*/
|
698
|
+
export type AnalyzeBatchActionName = keyof typeof AnalyzeBatchActionNames;
|
699
|
+
/** The State of a batched action */
|
700
|
+
export interface BatchActionState<Kind extends AnalyzeBatchActionName> {
|
701
|
+
/**
|
702
|
+
* The kind of the action results.
|
703
|
+
*/
|
704
|
+
readonly kind: Kind;
|
705
|
+
/**
|
706
|
+
* The name of the action.
|
707
|
+
*/
|
708
|
+
readonly actionName?: string;
|
709
|
+
/**
|
710
|
+
* Action statistics.
|
711
|
+
*/
|
712
|
+
readonly statistics?: TextDocumentBatchStatistics;
|
713
|
+
}
|
714
|
+
/**
|
715
|
+
* Action metadata.
|
716
|
+
*/
|
717
|
+
export interface ActionMetadata {
|
718
|
+
/**
|
719
|
+
* The model version used to perform the action.
|
720
|
+
*/
|
721
|
+
readonly modelVersion: string;
|
722
|
+
}
|
723
|
+
/**
|
724
|
+
* Custom action metadata.
|
725
|
+
*/
|
726
|
+
export interface CustomActionMetadata {
|
727
|
+
/**
|
728
|
+
* The name of the project used to perform the action.
|
729
|
+
*/
|
730
|
+
readonly projectName: string;
|
731
|
+
/**
|
732
|
+
* The name of the deployment used to perform the action.
|
733
|
+
*/
|
734
|
+
readonly deploymentName: string;
|
735
|
+
}
|
736
|
+
/**
|
737
|
+
* The state of a succeeded batched action.
|
738
|
+
*/
|
739
|
+
export interface BatchActionSuccessResult<T, Kind extends AnalyzeBatchActionName> extends BatchActionState<Kind> {
|
740
|
+
/**
|
741
|
+
* The list of document results.
|
742
|
+
*/
|
743
|
+
readonly results: T[];
|
744
|
+
/**
|
745
|
+
* When this action was completed by the service.
|
746
|
+
*/
|
747
|
+
readonly completedOn: Date;
|
748
|
+
/**
|
749
|
+
* Discriminant to determine if that this is an error result.
|
750
|
+
*/
|
751
|
+
readonly error?: undefined;
|
752
|
+
}
|
753
|
+
/**
|
754
|
+
* The error of an analyze batch action.
|
755
|
+
*/
|
756
|
+
export interface BatchActionErrorResult<Kind extends AnalyzeBatchActionName> extends BatchActionState<Kind> {
|
757
|
+
/**
|
758
|
+
* When this action was completed by the service.
|
759
|
+
*/
|
760
|
+
readonly failedOn: Date;
|
761
|
+
/**
|
762
|
+
* The Error for this action result.
|
763
|
+
*/
|
764
|
+
readonly error: TextAnalysisError;
|
765
|
+
}
|
766
|
+
/**
|
767
|
+
* The result of a batched action.
|
768
|
+
*/
|
769
|
+
export type BatchActionResult<T, Kind extends AnalyzeBatchActionName> = BatchActionSuccessResult<T, Kind> | BatchActionErrorResult<Kind>;
|
770
|
+
/**
|
771
|
+
* The result of an entity linking batch action.
|
772
|
+
*/
|
773
|
+
export type EntityLinkingBatchResult = ActionMetadata & BatchActionResult<EntityLinkingResult, "EntityLinking">;
|
774
|
+
/**
|
775
|
+
* The result of an entity recognition batch action.
|
776
|
+
*/
|
777
|
+
export type EntityRecognitionBatchResult = ActionMetadata & BatchActionResult<EntityRecognitionResult, "EntityRecognition">;
|
778
|
+
/**
|
779
|
+
* The result of a key phrase extraction batch action.
|
780
|
+
*/
|
781
|
+
export type KeyPhraseExtractionBatchResult = ActionMetadata & BatchActionResult<KeyPhraseExtractionResult, "KeyPhraseExtraction">;
|
782
|
+
/**
|
783
|
+
* The result of a pii entity recognition batch action.
|
784
|
+
*/
|
785
|
+
export type PiiEntityRecognitionBatchResult = ActionMetadata & BatchActionResult<PiiEntityRecognitionResult, "PiiEntityRecognition">;
|
786
|
+
/**
|
787
|
+
* The result of a sentiment analysis batch action.
|
788
|
+
*/
|
789
|
+
export type SentimentAnalysisBatchResult = ActionMetadata & BatchActionResult<SentimentAnalysisResult, "SentimentAnalysis">;
|
790
|
+
/**
|
791
|
+
* The result of a healthcare batch action.
|
792
|
+
*/
|
793
|
+
export type HealthcareBatchResult = ActionMetadata & BatchActionResult<HealthcareResult, "Healthcare">;
|
794
|
+
/**
|
795
|
+
* The result of an extractive summarization batch action.
|
796
|
+
*/
|
797
|
+
export type ExtractiveSummarizationBatchResult = ActionMetadata & BatchActionResult<ExtractiveSummarizationResult, "ExtractiveSummarization">;
|
798
|
+
/**
|
799
|
+
* The result of an abstractive summarization batch action.
|
800
|
+
*/
|
801
|
+
export type AbstractiveSummarizationBatchResult = ActionMetadata & BatchActionResult<AbstractiveSummarizationResult, "AbstractiveSummarization">;
|
802
|
+
/**
|
803
|
+
* The result of a custom entity recognition batch action.
|
804
|
+
*/
|
805
|
+
export type CustomEntityRecognitionBatchResult = CustomActionMetadata & BatchActionResult<CustomEntityRecognitionResult, "CustomEntityRecognition">;
|
806
|
+
/**
|
807
|
+
* The result of a custom single-label classification batch action.
|
808
|
+
*/
|
809
|
+
export type CustomSingleLabelClassificationBatchResult = CustomActionMetadata & BatchActionResult<CustomSingleLabelClassificationResult, "CustomSingleLabelClassification">;
|
810
|
+
/**
|
811
|
+
* The result of a custom multi-label classification batch action.
|
812
|
+
*/
|
813
|
+
export type CustomMultiLabelClassificationBatchResult = CustomActionMetadata & BatchActionResult<CustomMultiLabelClassificationResult, "CustomMultiLabelClassification">;
|
814
|
+
/**
|
815
|
+
* Results of a batch of actions.
|
816
|
+
*/
|
817
|
+
export type AnalyzeBatchResult = EntityLinkingBatchResult | EntityRecognitionBatchResult | KeyPhraseExtractionBatchResult | PiiEntityRecognitionBatchResult | SentimentAnalysisBatchResult | HealthcareBatchResult | ExtractiveSummarizationBatchResult | AbstractiveSummarizationBatchResult | CustomEntityRecognitionBatchResult | CustomSingleLabelClassificationBatchResult | CustomMultiLabelClassificationBatchResult;
|
818
|
+
/**
|
819
|
+
* An error result from a sentiment analysis action on a single document.
|
820
|
+
*/
|
821
|
+
export type SentimentAnalysisErrorResult = TextAnalysisErrorResult;
|
822
|
+
/**
|
823
|
+
* Paged results of the {@link TextAnalysisClient.beginAnalyzeBatch} operation.
|
824
|
+
*/
|
825
|
+
export type PagedAnalyzeBatchResult = PagedAsyncIterableIterator<AnalyzeBatchResult>;
|
826
|
+
/**
|
827
|
+
* A poller that polls long-running operations started by {@link TextAnalysisClient.beginAnalyzeBatch}.
|
828
|
+
*/
|
829
|
+
export type AnalyzeBatchPoller = PollerLike<AnalyzeBatchOperationState, PagedAnalyzeBatchResult>;
|
830
|
+
/**
|
831
|
+
* The metadata for long-running operations started by {@link TextAnalysisClient.beginAnalyzeBatch}.
|
832
|
+
*/
|
833
|
+
export interface AnalyzeBatchOperationMetadata {
|
834
|
+
/**
|
835
|
+
* The date and time the operation was created.
|
836
|
+
*/
|
837
|
+
readonly createdOn: Date;
|
838
|
+
/**
|
839
|
+
* The date and time when the operation results will expire on the server.
|
840
|
+
*/
|
841
|
+
readonly expiresOn?: Date;
|
842
|
+
/**
|
843
|
+
* The operation id.
|
844
|
+
*/
|
845
|
+
readonly id: string;
|
846
|
+
/**
|
847
|
+
* The time the operation status was last updated.
|
848
|
+
*/
|
849
|
+
readonly modifiedOn: Date;
|
850
|
+
/**
|
851
|
+
* Number of successfully completed actions.
|
852
|
+
*/
|
853
|
+
readonly actionSucceededCount: number;
|
854
|
+
/**
|
855
|
+
* Number of failed actions.
|
856
|
+
*/
|
857
|
+
readonly actionFailedCount: number;
|
858
|
+
/**
|
859
|
+
* Number of actions still in progress.
|
860
|
+
*/
|
861
|
+
readonly actionInProgressCount: number;
|
862
|
+
/**
|
863
|
+
* The operation's display name.
|
864
|
+
*/
|
865
|
+
readonly displayName?: string;
|
866
|
+
}
|
867
|
+
/**
|
868
|
+
* The state of the begin analyze polling operation.
|
869
|
+
*/
|
870
|
+
export interface AnalyzeBatchOperationState extends OperationState<PagedAnalyzeBatchResult>, AnalyzeBatchOperationMetadata {
|
871
|
+
}
|
872
|
+
/**
|
873
|
+
* Abstract representation of a poller, intended to expose just the minimal API that the user needs to work with.
|
874
|
+
*/
|
875
|
+
export interface PollerLike<TState extends OperationState<TResult>, TResult> extends SimplePollerLike<TState, TResult> {
|
876
|
+
/**
|
877
|
+
* sends a cancellation request.
|
878
|
+
*/
|
879
|
+
sendCancellationRequest: () => Promise<void>;
|
880
|
+
}
|
881
|
+
//# sourceMappingURL=models.d.ts.map
|