@azure/ai-language-text 1.1.0-alpha.20250107.1 → 1.1.0-alpha.20250109.1
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 +31 -29
- package/dist/browser/index.d.ts +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/models.d.ts +1 -1
- package/dist/browser/models.js.map +1 -1
- package/dist/browser/textAnalysisClient.d.ts +14 -14
- package/dist/browser/textAnalysisClient.js.map +1 -1
- package/dist/commonjs/index.d.ts +1 -1
- package/dist/commonjs/index.js +1 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/models.d.ts +1 -1
- package/dist/commonjs/models.js.map +1 -1
- package/dist/commonjs/textAnalysisClient.d.ts +14 -14
- package/dist/commonjs/textAnalysisClient.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/models.d.ts +1 -1
- package/dist/esm/models.js.map +1 -1
- package/dist/esm/textAnalysisClient.d.ts +14 -14
- package/dist/esm/textAnalysisClient.js.map +1 -1
- package/dist/react-native/index.d.ts +1 -1
- package/dist/react-native/index.js +1 -1
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/models.d.ts +1 -1
- package/dist/react-native/models.js.map +1 -1
- package/dist/react-native/textAnalysisClient.d.ts +14 -14
- package/dist/react-native/textAnalysisClient.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
@@ -30,7 +30,7 @@ Key links:
|
|
30
30
|
- [Source code](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/)
|
31
31
|
- [Package (NPM)](https://www.npmjs.com/package/@azure/ai-language-text)
|
32
32
|
- [API reference documentation](https://aka.ms/ai-language-text-js-api)
|
33
|
-
- [Product documentation](https://
|
33
|
+
- [Product documentation](https://learn.microsoft.com/azure/cognitive-services/language-service/)
|
34
34
|
- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cognitivelanguage/ai-language-text/samples)
|
35
35
|
|
36
36
|
#### **_Migrating from @azure/ai-text-analytics advisory_ ⚠️**
|
@@ -39,9 +39,8 @@ Please see the [Migration Guide](https://github.com/azure/azure-sdk-for-js/blob/
|
|
39
39
|
|
40
40
|
## What's New
|
41
41
|
|
42
|
-
|
43
|
-
|
44
|
-
|
42
|
+
- [Abstractive Summarization](https://github.com/azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/Samples.md#abstractive-summarization)
|
43
|
+
- [Healthcare Analysis](https://github.com/azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/Samples.md#healthcare-analysis)
|
45
44
|
|
46
45
|
## Getting started
|
47
46
|
|
@@ -187,29 +186,32 @@ if (result.error !== undefined) {
|
|
187
186
|
## Samples
|
188
187
|
|
189
188
|
### Client Usage
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
189
|
+
|
190
|
+
- [Actions Batching](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/samples-dev/batching.ts)
|
191
|
+
- [Choose Model Version](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/samples-dev/modelVersion.ts)
|
192
|
+
- [Paging](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/samples-dev/paging.ts)
|
193
|
+
- [Rehydrate Polling](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/samples-dev/rehydratePolling.ts)
|
194
|
+
- [Get Statistics](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/samples-dev/stats.ts)
|
195
195
|
|
196
196
|
### Prebuilt Tasks
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
197
|
+
|
198
|
+
- [Abstractive Summarization](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/samples-dev/abstractiveSummarization.ts)
|
199
|
+
- [Language Detection](https://github.com/azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/Samples.md#language-detection)
|
200
|
+
- [Entity Linking](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/samples-dev/entityLinking.ts)
|
201
|
+
- [Entity Regconition](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/samples-dev/entityRecognition.ts)
|
202
|
+
- [Extractive Summarization](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/samples-dev/extractiveSummarization.ts)
|
203
|
+
- [Healthcare Analysis](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/samples-dev/healthcare.ts)
|
204
|
+
- [Key Phrase Extraction](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/samples-dev/keyPhraseExtraction.ts)
|
205
|
+
- [Language Detection](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/samples-dev/languageDetection.ts)
|
206
|
+
- [Opinion Mining](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/samples-dev/opinionMining.ts)
|
207
|
+
- [PII Entity Recognition](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/samples-dev/piiEntityRecognition.ts)
|
208
|
+
- [Sentiment Analysis](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/samples-dev/sentimentAnalysis.ts)
|
208
209
|
|
209
210
|
### Custom Tasks
|
210
|
-
|
211
|
-
|
212
|
-
|
211
|
+
|
212
|
+
- [Custom Entity Recognition](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/samples-dev/customEntityRecognition.ts)
|
213
|
+
- [Custom Single-lable Classfication](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/samples-dev/customSingleLabelClassification.ts)
|
214
|
+
- [Custom Multi-lable Classfication](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cognitivelanguage/ai-language-text/samples-dev/customMultiLabelClassification.ts)
|
213
215
|
|
214
216
|
## Troubleshooting
|
215
217
|
|
@@ -240,14 +242,14 @@ If you'd like to contribute to this library, please read the [contributing guide
|
|
240
242
|

|
241
243
|
|
242
244
|
[cli_docs]: https://learn.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli?tabs=windows#prerequisites
|
243
|
-
[azure_cli]: https://
|
245
|
+
[azure_cli]: https://learn.microsoft.com/cli/azure
|
244
246
|
[azure_sub]: https://azure.microsoft.com/free/
|
245
|
-
[cognitive_resource]: https://
|
247
|
+
[cognitive_resource]: https://learn.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account
|
246
248
|
[azure_portal]: https://portal.azure.com
|
247
249
|
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
|
248
|
-
[cognitive_auth]: https://
|
249
|
-
[register_aad_app]: https://
|
250
|
+
[cognitive_auth]: https://learn.microsoft.com/azure/cognitive-services/authentication
|
251
|
+
[register_aad_app]: https://learn.microsoft.com/azure/cognitive-services/authentication#assign-a-role-to-a-service-principal
|
250
252
|
[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential
|
251
|
-
[data_limits]: https://
|
253
|
+
[data_limits]: https://learn.microsoft.com/azure/cognitive-services/language-service/concepts/data-limits
|
252
254
|
[analyze_sentiment_opinion_mining_sample]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cognitivelanguage/ai-language-text/samples/v1-beta/javascript/opinionMining.js
|
253
|
-
[lang_studio]: https://
|
255
|
+
[lang_studio]: https://learn.microsoft.com/azure/cognitive-services/language-service/language-studio
|
package/dist/browser/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* [Azure Cognitive Language Services](https://
|
2
|
+
* [Azure Cognitive Language Services](https://learn.microsoft.com/azure/cognitive-services/language-service/overview)
|
3
3
|
* is a suite of natural language processing (NLP) skills built with
|
4
4
|
* best-in-class Microsoft machine learning algorithms used to analyze
|
5
5
|
* unstructured text for actions such as sentiment analysis, key phrase
|
package/dist/browser/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
2
|
// Licensed under the MIT License.
|
3
3
|
/**
|
4
|
-
* [Azure Cognitive Language Services](https://
|
4
|
+
* [Azure Cognitive Language Services](https://learn.microsoft.com/azure/cognitive-services/language-service/overview)
|
5
5
|
* is a suite of natural language processing (NLP) skills built with
|
6
6
|
* best-in-class Microsoft machine learning algorithms used to analyze
|
7
7
|
* unstructured text for actions such as sentiment analysis, key phrase
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;GAQG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,cAAc,aAAa,CAAC;AAC5B,OAAO;AA6CL,qBAAqB;AACrB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EAEnB,iBAAiB,EACjB,4CAA4C,EAC5C,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * [Azure Cognitive Language Services](https://
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;GAQG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,cAAc,aAAa,CAAC;AAC5B,OAAO;AA6CL,qBAAqB;AACrB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EAEnB,iBAAiB,EACjB,4CAA4C,EAC5C,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * [Azure Cognitive Language Services](https://learn.microsoft.com/azure/cognitive-services/language-service/overview)\n * is a suite of natural language processing (NLP) skills built with\n * best-in-class Microsoft machine learning algorithms used to analyze\n * unstructured text for actions such as sentiment analysis, key phrase\n * extraction, and language detection.\n *\n * @packageDocumentation\n */\n\nexport { AzureKeyCredential } from \"@azure/core-auth\";\n\nexport { TextAnalysisClient } from \"./textAnalysisClient.js\";\nexport * from \"./models.js\";\nexport {\n AssessmentSentiment,\n SentimentAnalysisAction,\n EntityLinkingAction,\n EntityRecognitionAction,\n KeyPhraseExtractionAction,\n LanguageDetectionAction,\n PiiEntityRecognitionAction,\n StringIndexType,\n LinkedEntity,\n Entity,\n DetectedLanguage,\n PiiEntityCategory,\n PiiEntityDomain,\n SentimentConfidenceScores,\n SentenceSentimentLabel,\n DocumentSentimentLabel,\n TargetConfidenceScores,\n TokenSentimentLabel,\n LanguageDetectionInput,\n TextDocumentInput,\n TextDocumentStatistics,\n DocumentWarning,\n WarningCode,\n Match,\n ActionCommon,\n ActionPrebuilt,\n HealthcareAction,\n CustomEntityRecognitionAction,\n CustomSingleLabelClassificationAction,\n CustomMultiLabelClassificationAction,\n ActionCustom,\n ClassificationCategory,\n HealthcareAssertion,\n HealthcareEntityCategory,\n EntityDataSource,\n RelationType,\n EntityAssociation,\n EntityCertainty,\n EntityConditionality,\n SummaryContext,\n AbstractiveSummary,\n ExtractiveSummarizationAction,\n SummarySentence,\n ExtractiveSummarizationOrderingCriteria,\n /** orphan exports */\n KnownPiiEntityDomain,\n KnownPiiEntityCategory,\n KnownStringIndexType,\n KnownErrorCode,\n KnownInnerErrorCode,\n TextDocumentBatchStatistics,\n KnownRelationType,\n KnownExtractiveSummarizationOrderingCriteria,\n KnownHealthcareEntityCategory,\n} from \"./generated/models/index.js\";\n"]}
|
package/dist/browser/models.d.ts
CHANGED
@@ -326,7 +326,7 @@ export interface SentimentAnalysisSuccessResult extends TextAnalysisSuccessResul
|
|
326
326
|
}
|
327
327
|
/**
|
328
328
|
* The predicted sentiment for a given span of text. For more information
|
329
|
-
* regarding text sentiment, see {@link https://
|
329
|
+
* regarding text sentiment, see {@link https://learn.microsoft.com//azure/cognitive-services/language-service/sentiment-opinion-mining/overview}.
|
330
330
|
*/
|
331
331
|
export interface SentenceSentiment {
|
332
332
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAmClC,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AA0D3E;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,aAAa,EAAE,eAAe;IAC9B,iBAAiB,EAAE,mBAAmB;IACtC,mBAAmB,EAAE,qBAAqB;IAC1C,oBAAoB,EAAE,sBAAsB;IAC5C,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;CAC9B,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;IACtC,oBAAoB,EAAE,sBAAsB;IAC5C,mBAAmB,EAAE,qBAAqB;IAC1C,aAAa,EAAE,eAAe;IAC9B,UAAU,EAAE,YAAY;IACxB,uBAAuB,EAAE,yBAAyB;IAClD,wBAAwB,EAAE,0BAA0B;IACpD,uBAAuB,EAAE,yBAAyB;IAClD,+BAA+B,EAAE,iCAAiC;IAClE,8BAA8B,EAAE,gCAAgC;CACxD,CAAC;AA2CX;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,mCAAQ,cAAc,GAAK,mBAAmB,CAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n AbstractiveSummary,\n AssessmentSentiment,\n ClassificationCategory,\n CustomEntityRecognitionAction,\n CustomMultiLabelClassificationAction,\n CustomSingleLabelClassificationAction,\n DetectedLanguage,\n DocumentSentimentLabel,\n DocumentWarning,\n Entity,\n EntityDataSource,\n EntityLinkingAction,\n EntityRecognitionAction,\n ExtractiveSummarizationAction,\n HealthcareAction,\n HealthcareAssertion,\n HealthcareEntityCategory,\n KeyPhraseExtractionAction,\n LanguageDetectionAction,\n LinkedEntity,\n PiiEntityRecognitionAction,\n RelationType,\n SentenceSentimentLabel,\n SentimentAnalysisAction,\n SentimentConfidenceScores,\n StringIndexType,\n SummarySentence,\n TargetConfidenceScores,\n TextDocumentBatchStatistics,\n TextDocumentStatistics,\n TokenSentimentLabel,\n} from \"./generated/index.js\";\nimport { KnownErrorCode, KnownInnerErrorCode } from \"./generated/index.js\";\nimport type { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport type { OperationState, SimplePollerLike } from \"@azure/core-lro\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\n\n/**\n * Configuration options for {@link TextAnalysisClient}.\n */\nexport interface TextAnalysisClientOptions extends CommonClientOptions {\n /**\n * The default country hint to use. Defaults to \"us\".\n */\n defaultCountryHint?: string;\n\n /**\n * The default language to use. Defaults to \"en\".\n */\n defaultLanguage?: string;\n /**\n * The version of the Cognitive Language Service API to use.\n */\n serviceVersion?: string;\n}\n\n/**\n * Options common to all operations.\n */\nexport interface TextAnalysisOperationOptions extends OperationOptions {\n /**\n * If set to true, response will contain input and document level statistics.\n */\n includeStatistics?: boolean;\n}\n\n/**\n * Options for the begin analyze actions operation.\n */\nexport interface BeginAnalyzeBatchOptions extends TextAnalysisOperationOptions {\n /**\n * Time delay between poll requests, in milliseconds.\n */\n updateIntervalInMs?: number;\n /**\n * The operation's display name.\n */\n displayName?: string;\n}\n\n/**\n * Options for the begin analyze actions operation.\n */\nexport interface RestoreAnalyzeBatchPollerOptions extends TextAnalysisOperationOptions {\n /**\n * Time delay between poll requests, in milliseconds.\n */\n updateIntervalInMs?: number;\n}\n\n/**\n * Type of actions supported by the {@link TextAnalysisClient.analyze} method.\n */\nexport const AnalyzeActionNames = {\n EntityLinking: \"EntityLinking\",\n EntityRecognition: \"EntityRecognition\",\n KeyPhraseExtraction: \"KeyPhraseExtraction\",\n PiiEntityRecognition: \"PiiEntityRecognition\",\n LanguageDetection: \"LanguageDetection\",\n SentimentAnalysis: \"SentimentAnalysis\",\n} as const;\n\n/**\n * Type of actions supported by the {@link TextAnalysisClient.beginAnalyzeBatch} method.\n */\nexport const AnalyzeBatchActionNames = {\n SentimentAnalysis: \"SentimentAnalysis\",\n EntityRecognition: \"EntityRecognition\",\n PiiEntityRecognition: \"PiiEntityRecognition\",\n KeyPhraseExtraction: \"KeyPhraseExtraction\",\n EntityLinking: \"EntityLinking\",\n Healthcare: \"Healthcare\",\n ExtractiveSummarization: \"ExtractiveSummarization\",\n AbstractiveSummarization: \"AbstractiveSummarization\",\n CustomEntityRecognition: \"CustomEntityRecognition\",\n CustomSingleLabelClassification: \"CustomSingleLabelClassification\",\n CustomMultiLabelClassification: \"CustomMultiLabelClassification\",\n} as const;\n\n/**\n * Type of actions supported by the {@link TextAnalysisClient.analyze} method.\n */\nexport type AnalyzeActionName = keyof typeof AnalyzeActionNames;\n\n/**\n * The type of parameters for every action in ${@link AnalyzeActionNames}.\n */\nexport type AnalyzeActionParameters<ActionName extends AnalyzeActionName> = {\n EntityLinking: EntityLinkingAction;\n EntityRecognition: EntityRecognitionAction;\n PiiEntityRecognition: PiiEntityRecognitionAction;\n KeyPhraseExtraction: KeyPhraseExtractionAction;\n SentimentAnalysis: SentimentAnalysisAction;\n LanguageDetection: LanguageDetectionAction;\n}[ActionName];\n\n/**\n * The type of results of every action in ${@link AnalyzeActionNames}.\n */\nexport type AnalyzeResult<ActionName extends AnalyzeActionName> = {\n EntityLinking: EntityLinkingResult[];\n EntityRecognition: EntityRecognitionResult[];\n PiiEntityRecognition: PiiEntityRecognitionResult[];\n KeyPhraseExtraction: KeyPhraseExtractionResult[];\n SentimentAnalysis: SentimentAnalysisResult[];\n LanguageDetection: LanguageDetectionResult[];\n}[ActionName];\n\n/** Options for an Abstractive Summarization action. */\nexport interface AbstractiveSummarizationAction {\n /** The approximate number of sentences to be part of the summary. */\n sentenceCount?: number;\n /**\n * Specifies the measurement unit used to calculate the offset and length properties. For a list of possible values, see {@link KnownStringIndexType}.\n *\n * The default is the JavaScript's default which is \"Utf16CodeUnit\".\n */\n stringIndexType?: StringIndexType;\n}\n\n/**\n * Enum of possible error codes of a {@link TextAnalysisError}.\n */\nexport const KnownTextAnalysisErrorCode = { ...KnownErrorCode, ...KnownInnerErrorCode };\n\n/**\n * Type describing an API error.\n */\nexport interface TextAnalysisError {\n /**\n * A code describing the kind of error produced. See {@link KnownTextAnalysisErrorCode}.\n */\n readonly code: string;\n /**\n * A message from the service explaining the error\n */\n readonly message: string;\n /**\n * The target of the particular error (for example, the name of an invalid parameter)\n */\n readonly target?: string;\n}\n\n/**\n * Base type for results of an action corresponding to a single input document.\n */\nexport interface TextAnalysisSuccessResult {\n /**\n * Unique, non-empty document identifier.\n */\n readonly id: string;\n\n /**\n * Statistics about the input document and how it was processed by the service.\n * This property will have a value when includeStatistics is set to true in\n * the client call.\n */\n readonly statistics?: TextDocumentStatistics;\n\n /**\n * An array of warning data corresponding to this document.\n *\n * If no warnings were returned, this array will be empty.\n */\n readonly warnings: DocumentWarning[];\n\n /**\n * Discriminant to determine if this is an error result.\n */\n readonly error?: undefined;\n}\n\n/**\n * Base type for error results of an action corresponding to a single document.\n */\nexport interface TextAnalysisErrorResult {\n /**\n * Unique, non-empty document identifier.\n */\n readonly id: string;\n\n /**\n * The Error for this document result.\n */\n readonly error: TextAnalysisError;\n}\n\n/**\n * The result of an entity recognition action on a single document.\n */\nexport type EntityRecognitionResult = EntityRecognitionSuccessResult | EntityRecognitionErrorResult;\n\n/**\n * The result of an entity recognition action on a single document, containing\n * a collection of {@link Entity} objects identified in that document.\n */\nexport interface EntityRecognitionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n readonly entities: Entity[];\n}\n\n/**\n * An error result from an entity recognition action on a single document.\n */\nexport type EntityRecognitionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of an entity recognition action on a single document.\n */\nexport type PiiEntityRecognitionResult =\n | PiiEntityRecognitionSuccessResult\n | PiiEntityRecognitionErrorResult;\n\n/**\n * The result of a pii entity recognition action on a single document,\n * containing the collection of {@link Entity} objects identified in that\n * document.\n */\nexport interface PiiEntityRecognitionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n readonly entities: Entity[];\n /**\n * The text redacted.\n */\n readonly redactedText: string;\n}\n\n/**\n * An error result from a pii entity recognition action on a single document.\n */\nexport type PiiEntityRecognitionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of an entity linking action on a single document.\n */\nexport type EntityLinkingResult = EntityLinkingSuccessResult | EntityLinkingErrorResult;\n\n/**\n * The result of a entity linking action on a single document, containing a\n * collection of the {@link LinkedEntity} objects identified in that document.\n */\nexport interface EntityLinkingSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n readonly entities: LinkedEntity[];\n}\n\n/**\n * An error result from an entity linking action on a single document.\n */\nexport type EntityLinkingErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of a language detection action on a single document.\n */\nexport type LanguageDetectionResult = LanguageDetectionSuccessResult | LanguageDetectionErrorResult;\n\n/**\n * The result of a language detection action on a single document,\n * containing a prediction of what language the document is written in.\n */\nexport interface LanguageDetectionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The top detected language by confidence score.\n */\n readonly primaryLanguage: DetectedLanguage;\n}\n\n/**\n * An error result from a language detection action on a single document.\n */\nexport type LanguageDetectionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of a sentiment analysis action on a single document.\n */\nexport type KeyPhraseExtractionResult =\n | KeyPhraseExtractionSuccessResult\n | KeyPhraseExtractionErrorResult;\n\n/**\n * The result of a key phrase extraction action on a single document,\n * containing a collection of the key phrases identified in that document.\n */\nexport interface KeyPhraseExtractionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * A list of representative words or phrases. The number of key phrases\n * returned is proportional to the number of words in the input document.\n */\n readonly keyPhrases: string[];\n}\n\n/**\n * An error result from a key phrase extraction action on a single document.\n */\nexport type KeyPhraseExtractionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of a sentiment analysis action on a single document.\n */\nexport type SentimentAnalysisResult = SentimentAnalysisSuccessResult | SentimentAnalysisErrorResult;\n\n/**\n * The result of a sentiment analysis action on a single document,\n * containing the predicted sentiment for each sentence as well as for the full\n * document.\n */\nexport interface SentimentAnalysisSuccessResult extends TextAnalysisSuccessResult {\n /**\n * Predicted sentiment for document. For a list of possible values, see {@link DocumentSentimentLabel}\n */\n readonly sentiment: DocumentSentimentLabel;\n /**\n * Document level sentiment confidence scores between 0 and 1 for each\n * sentiment class.\n */\n readonly confidenceScores: SentimentConfidenceScores;\n /**\n * The predicted sentiment for each sentence in the corresponding document.\n */\n readonly sentences: SentenceSentiment[];\n}\n\n/**\n * The predicted sentiment for a given span of text. For more information\n * regarding text sentiment, see {@link https://docs.microsoft.com//azure/cognitive-services/language-service/sentiment-opinion-mining/overview}.\n */\nexport interface SentenceSentiment {\n /**\n * The sentence text.\n */\n readonly text: string;\n /**\n * The predicted Sentiment for the sentence. For a list of possible values,\n * see {@link SentenceSentimentLabel}\n */\n readonly sentiment: SentenceSentimentLabel;\n /**\n * The sentiment confidence score between 0 and 1 for the sentence for all\n * classes.\n */\n readonly confidenceScores: SentimentConfidenceScores;\n /**\n * The sentence text offset from the start of the document.\n */\n readonly offset: number;\n /**\n * The length of the sentence text.\n */\n readonly length: number;\n /**\n * The list of opinions mined from this sentence. For example in \"The food is\n * good, but the service is bad\", the following two opinions will be returned:\n * \"food is good\" and \"service is bad\".\n *\n * It is non-empty only returned if {@link includeOpinionMining} was set to\n * `true`.\n */\n readonly opinions: Opinion[];\n}\n\n/**\n * TargetSentiment contains the predicted sentiment, confidence scores and other\n * information about a target of a product. A target of a product/service is a\n * key component of that product/service. For example in \"The food at Hotel Foo\n * is good\", \"food\" is a target of \"Hotel Foo\".\n */\nexport interface TargetSentiment {\n /**\n * The sentiment confidence score between 0 and 1 for the target for\n * 'positive' and 'negative' labels.\n */\n readonly confidenceScores: TargetConfidenceScores;\n /**\n * The predicted Sentiment for the Target. For a list of possible values,\n * see {@link TokenSentimentLabel}\n */\n readonly sentiment: TokenSentimentLabel;\n /**\n * The target text.\n */\n readonly text: string;\n /**\n * The Target text offset from the start of the sentence.\n */\n readonly offset: number;\n /**\n * The length of the Target text.\n */\n readonly length: number;\n}\n\n/**\n * A mined opinion object represents an opinion we've extracted from a sentence.\n * It consists of both a target that these assessments are about, and the actual\n * assessments themselves.\n */\nexport interface Opinion {\n /**\n * The target of a product/service that this assessment is about.\n */\n readonly target: TargetSentiment;\n /**\n * The actual assessments of the target.\n */\n readonly assessments: AssessmentSentiment[];\n}\n\n/**\n * A healthcare entity represented as a node in a directed graph where the edges are\n * a particular type of relationship between the source and target nodes.\n */\nexport interface HealthcareEntity extends Entity {\n /**\n * Normalized name for the entity. For example, the normalized text for \"histologically\" is \"histologic\".\n */\n readonly normalizedText?: string;\n /**\n * Whether the entity is negated.\n */\n readonly assertion?: HealthcareAssertion;\n /**\n * Entity references in known data sources.\n */\n readonly dataSources: EntityDataSource[];\n /**\n * Defines values for HealthcareEntityCategory.\n * {@link KnownHealthcareEntityCategory} can be used interchangeably with HealthcareEntityCategory,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **BODY_STRUCTURE**\n * **AGE**\n * **GENDER**\n * **EXAMINATION_NAME**\n * **DATE**\n * **DIRECTION**\n * **FREQUENCY**\n * **MEASUREMENT_VALUE**\n * **MEASUREMENT_UNIT**\n * **RELATIONAL_OPERATOR**\n * **TIME**\n * **GENE_OR_PROTEIN**\n * **VARIANT**\n * **ADMINISTRATIVE_EVENT**\n * **CARE_ENVIRONMENT**\n * **HEALTHCARE_PROFESSION**\n * **DIAGNOSIS**\n * **SYMPTOM_OR_SIGN**\n * **CONDITION_QUALIFIER**\n * **MEDICATION_CLASS**\n * **MEDICATION_NAME**\n * **DOSAGE**\n * **MEDICATION_FORM**\n * **MEDICATION_ROUTE**\n * **FAMILY_RELATION**\n * **TREATMENT_NAME**\n */\n readonly category: HealthcareEntityCategory;\n}\n\n/**\n * The type of different roles a healthcare entity can play in a relation.\n */\nexport type HealthcareEntityRelationRoleType = string;\n\n/**\n * A healthcare entity that plays a specific role in a relation.\n */\nexport interface HealthcareEntityRelationRole {\n /**\n * A healthcare entity\n */\n readonly entity: HealthcareEntity;\n /**\n * The role of the healthcare entity in a particular relation.\n */\n readonly name: HealthcareEntityRelationRoleType;\n}\n\n/**\n * A relationship between two or more healthcare entities.\n */\nexport interface HealthcareEntityRelation {\n /**\n * The type of the healthcare relation.\n */\n readonly relationType: RelationType;\n /**\n * The list of healthcare entities and their roles in the healthcare relation.\n */\n readonly roles: HealthcareEntityRelationRole[];\n /**\n * The confidence score between 0 and 1 of the extracted relation.\n */\n readonly confidenceScore?: number;\n}\n\n/**\n * The results of a successful healthcare analysis action for a single document.\n */\nexport interface HealthcareSuccessResult extends TextAnalysisSuccessResult {\n /**\n * Healthcare entities.\n */\n readonly entities: HealthcareEntity[];\n /**\n * Relations between healthcare entities.\n */\n readonly entityRelations: HealthcareEntityRelation[];\n}\n\n/**\n * An error result from the healthcare analysis action on a single document.\n */\nexport type HealthcareErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the healthcare analysis action on a single document.\n */\nexport type HealthcareResult = HealthcareSuccessResult | HealthcareErrorResult;\n\n/**\n * The result of the extractive summarization action on a single document.\n */\nexport type ExtractiveSummarizationResult =\n | ExtractiveSummarizationSuccessResult\n | ExtractiveSummarizationErrorResult;\n\n/**\n * The result of the extractive summarization action on a single document,\n * containing a collection of the summary identified in that document.\n */\nexport interface ExtractiveSummarizationSuccessResult extends TextAnalysisSuccessResult {\n /**\n * A list of sentences composing a summary of the input document.\n */\n readonly sentences: SummarySentence[];\n}\n\n/**\n * An error result from the extractive summarization action on a single document.\n */\nexport type ExtractiveSummarizationErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the abstractive summarization action on a single document.\n */\nexport type AbstractiveSummarizationResult =\n | AbstractiveSummarizationSuccessResult\n | AbstractiveSummarizationErrorResult;\n\n/**\n * The result of the abstractive summarization action on a single document,\n * containing a collection of the summaries identified for that document.\n */\nexport interface AbstractiveSummarizationSuccessResult extends TextAnalysisSuccessResult {\n /**\n * A list of summaries of the input document.\n */\n readonly summaries: AbstractiveSummary[];\n}\n\n/**\n * An error result from the abstractive summarization action on a single document.\n */\nexport type AbstractiveSummarizationErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the custom entity recognition action on a single document.\n */\nexport type CustomEntityRecognitionResult =\n | CustomEntityRecognitionSuccessResult\n | CustomEntityRecognitionErrorResult;\n\n/**\n * The result of the custom entity recognition action on a single document,\n * containing a collection of the entities identified in that document.\n */\nexport interface CustomEntityRecognitionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n readonly entities: Entity[];\n}\n\n/**\n * An error result from the custom entity recognition action on a single document.\n */\nexport type CustomEntityRecognitionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the single-label classification action on a single document.\n */\nexport type CustomSingleLabelClassificationResult =\n | CustomSingleLabelClassificationSuccessResult\n | CustomSingleLabelClassificationErrorResult;\n\n/**\n * The result of a successful single-label classification action on a single document,\n * containing the result of the classification.\n */\nexport interface CustomSingleLabelClassificationSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of classifications in the input document.\n */\n readonly classifications: ClassificationCategory[];\n}\n\n/**\n * An error result from the single-label classification action on a single document.\n */\nexport type CustomSingleLabelClassificationErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the multi-label classification action on a multi document.\n */\nexport type CustomMultiLabelClassificationResult =\n | CustomMultiLabelClassificationSuccessResult\n | CustomMultiLabelClassificationErrorResult;\n\n/**\n * The result of a successful multi-label classification action on a multi document,\n * containing the result of the classification.\n */\nexport interface CustomMultiLabelClassificationSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of classifications in the input document.\n */\n readonly classifications: ClassificationCategory[];\n}\n\n/**\n * An error result from the multi-label classification action on a multi document.\n */\nexport type CustomMultiLabelClassificationErrorResult = TextAnalysisErrorResult;\n\n/**\n * Options common to all batch actions.\n */\nexport interface AnalyzeBatchActionCommon {\n /**\n * The name of the action.\n */\n actionName?: string;\n}\n\n/** Options for an entity linking batch action. */\nexport interface EntityLinkingBatchAction extends AnalyzeBatchActionCommon, EntityLinkingAction {\n /**\n * The kind of the action.\n */\n kind: \"EntityLinking\";\n}\n\n/** Options for an entity recognition batch action. */\nexport interface EntityRecognitionBatchAction\n extends AnalyzeBatchActionCommon,\n EntityRecognitionAction {\n /**\n * The kind of the action.\n */\n kind: \"EntityRecognition\";\n}\n\n/** Options for an key phrase extraction batch action. */\nexport interface KeyPhraseExtractionBatchAction\n extends AnalyzeBatchActionCommon,\n KeyPhraseExtractionAction {\n /**\n * The kind of the action.\n */\n kind: \"KeyPhraseExtraction\";\n}\n\n/** Options for a pii entity recognition batch action. */\nexport interface PiiEntityRecognitionBatchAction\n extends AnalyzeBatchActionCommon,\n PiiEntityRecognitionAction {\n /**\n * The kind of the action.\n */\n kind: \"PiiEntityRecognition\";\n}\n\n/** Options for a healthcare batch action. */\nexport interface HealthcareBatchAction extends AnalyzeBatchActionCommon, HealthcareAction {\n /**\n * The kind of the action.\n */\n kind: \"Healthcare\";\n}\n\n/** Options for a sentiment analysis batch action. */\nexport interface SentimentAnalysisBatchAction\n extends AnalyzeBatchActionCommon,\n SentimentAnalysisAction {\n /**\n * The kind of the action.\n */\n kind: \"SentimentAnalysis\";\n}\n\n/** Options for an extractive summarization batch action. */\nexport interface ExtractiveSummarizationBatchAction\n extends AnalyzeBatchActionCommon,\n ExtractiveSummarizationAction {\n /**\n * The kind of the action.\n */\n kind: \"ExtractiveSummarization\";\n}\n\n/** Options for an abstractive summarization batch action. */\nexport interface AbstractiveSummarizationBatchAction\n extends AnalyzeBatchActionCommon,\n AbstractiveSummarizationAction {\n /**\n * The kind of the action.\n */\n kind: \"AbstractiveSummarization\";\n}\n\n/** Options for a custom entity recognition batch action. */\nexport interface CustomEntityRecognitionBatchAction\n extends AnalyzeBatchActionCommon,\n CustomEntityRecognitionAction {\n /**\n * The kind of the action.\n */\n kind: \"CustomEntityRecognition\";\n}\n\n/** Options for a custom single-label classification batch action. */\nexport interface CustomSingleLabelClassificationBatchAction\n extends AnalyzeBatchActionCommon,\n CustomSingleLabelClassificationAction {\n /**\n * The kind of the action.\n */\n kind: \"CustomSingleLabelClassification\";\n}\n\n/** Options for a custom multi-label classification batch action. */\nexport interface CustomMultiLabelClassificationBatchAction\n extends AnalyzeBatchActionCommon,\n CustomMultiLabelClassificationAction {\n /**\n * The kind of the action.\n */\n kind: \"CustomMultiLabelClassification\";\n}\n\n/**\n * Batch of actions.\n */\nexport type AnalyzeBatchAction =\n | EntityLinkingBatchAction\n | EntityRecognitionBatchAction\n | KeyPhraseExtractionBatchAction\n | PiiEntityRecognitionBatchAction\n | HealthcareBatchAction\n | SentimentAnalysisBatchAction\n | ExtractiveSummarizationBatchAction\n | AbstractiveSummarizationBatchAction\n | CustomEntityRecognitionBatchAction\n | CustomSingleLabelClassificationBatchAction\n | CustomMultiLabelClassificationBatchAction;\n\n/**\n * Type of actions supported by the {@link TextAnalysisClient.beginAnalyzeBatch} method.\n */\nexport type AnalyzeBatchActionName = keyof typeof AnalyzeBatchActionNames;\n\n/** The State of a batched action */\nexport interface BatchActionState<Kind extends AnalyzeBatchActionName> {\n /**\n * The kind of the action results.\n */\n readonly kind: Kind;\n /**\n * The name of the action.\n */\n readonly actionName?: string;\n /**\n * Action statistics.\n */\n readonly statistics?: TextDocumentBatchStatistics;\n}\n\n/**\n * Action metadata.\n */\nexport interface ActionMetadata {\n /**\n * The model version used to perform the action.\n */\n readonly modelVersion: string;\n}\n\n/**\n * Custom action metadata.\n */\nexport interface CustomActionMetadata {\n /**\n * The name of the project used to perform the action.\n */\n readonly projectName: string;\n /**\n * The name of the deployment used to perform the action.\n */\n readonly deploymentName: string;\n}\n\n/**\n * The state of a succeeded batched action.\n */\nexport interface BatchActionSuccessResult<T, Kind extends AnalyzeBatchActionName>\n extends BatchActionState<Kind> {\n /**\n * The list of document results.\n */\n readonly results: T[];\n /**\n * When this action was completed by the service.\n */\n readonly completedOn: Date;\n /**\n * Discriminant to determine if that this is an error result.\n */\n readonly error?: undefined;\n}\n\n/**\n * The error of an analyze batch action.\n */\nexport interface BatchActionErrorResult<Kind extends AnalyzeBatchActionName>\n extends BatchActionState<Kind> {\n /**\n * When this action was completed by the service.\n */\n readonly failedOn: Date;\n /**\n * The Error for this action result.\n */\n readonly error: TextAnalysisError;\n}\n\n/**\n * The result of a batched action.\n */\nexport type BatchActionResult<T, Kind extends AnalyzeBatchActionName> =\n | BatchActionSuccessResult<T, Kind>\n | BatchActionErrorResult<Kind>;\n\n/**\n * The result of an entity linking batch action.\n */\nexport type EntityLinkingBatchResult = ActionMetadata &\n BatchActionResult<EntityLinkingResult, \"EntityLinking\">;\n\n/**\n * The result of an entity recognition batch action.\n */\nexport type EntityRecognitionBatchResult = ActionMetadata &\n BatchActionResult<EntityRecognitionResult, \"EntityRecognition\">;\n\n/**\n * The result of a key phrase extraction batch action.\n */\nexport type KeyPhraseExtractionBatchResult = ActionMetadata &\n BatchActionResult<KeyPhraseExtractionResult, \"KeyPhraseExtraction\">;\n\n/**\n * The result of a pii entity recognition batch action.\n */\nexport type PiiEntityRecognitionBatchResult = ActionMetadata &\n BatchActionResult<PiiEntityRecognitionResult, \"PiiEntityRecognition\">;\n\n/**\n * The result of a sentiment analysis batch action.\n */\nexport type SentimentAnalysisBatchResult = ActionMetadata &\n BatchActionResult<SentimentAnalysisResult, \"SentimentAnalysis\">;\n\n/**\n * The result of a healthcare batch action.\n */\nexport type HealthcareBatchResult = ActionMetadata &\n BatchActionResult<HealthcareResult, \"Healthcare\">;\n\n/**\n * The result of an extractive summarization batch action.\n */\nexport type ExtractiveSummarizationBatchResult = ActionMetadata &\n BatchActionResult<ExtractiveSummarizationResult, \"ExtractiveSummarization\">;\n\n/**\n * The result of an abstractive summarization batch action.\n */\nexport type AbstractiveSummarizationBatchResult = ActionMetadata &\n BatchActionResult<AbstractiveSummarizationResult, \"AbstractiveSummarization\">;\n\n/**\n * The result of a custom entity recognition batch action.\n */\nexport type CustomEntityRecognitionBatchResult = CustomActionMetadata &\n BatchActionResult<CustomEntityRecognitionResult, \"CustomEntityRecognition\">;\n\n/**\n * The result of a custom single-label classification batch action.\n */\nexport type CustomSingleLabelClassificationBatchResult = CustomActionMetadata &\n BatchActionResult<CustomSingleLabelClassificationResult, \"CustomSingleLabelClassification\">;\n\n/**\n * The result of a custom multi-label classification batch action.\n */\nexport type CustomMultiLabelClassificationBatchResult = CustomActionMetadata &\n BatchActionResult<CustomMultiLabelClassificationResult, \"CustomMultiLabelClassification\">;\n/**\n * Results of a batch of actions.\n */\nexport type AnalyzeBatchResult =\n | EntityLinkingBatchResult\n | EntityRecognitionBatchResult\n | KeyPhraseExtractionBatchResult\n | PiiEntityRecognitionBatchResult\n | SentimentAnalysisBatchResult\n | HealthcareBatchResult\n | ExtractiveSummarizationBatchResult\n | AbstractiveSummarizationBatchResult\n | CustomEntityRecognitionBatchResult\n | CustomSingleLabelClassificationBatchResult\n | CustomMultiLabelClassificationBatchResult;\n\n/**\n * An error result from a sentiment analysis action on a single document.\n */\nexport type SentimentAnalysisErrorResult = TextAnalysisErrorResult;\n\n/**\n * Paged results of the {@link TextAnalysisClient.beginAnalyzeBatch} operation.\n */\nexport type PagedAnalyzeBatchResult = PagedAsyncIterableIterator<AnalyzeBatchResult>;\n\n/**\n * A poller that polls long-running operations started by {@link TextAnalysisClient.beginAnalyzeBatch}.\n */\nexport type AnalyzeBatchPoller = PollerLike<AnalyzeBatchOperationState, PagedAnalyzeBatchResult>;\n\n/**\n * The metadata for long-running operations started by {@link TextAnalysisClient.beginAnalyzeBatch}.\n */\nexport interface AnalyzeBatchOperationMetadata {\n /**\n * The date and time the operation was created.\n */\n readonly createdOn: Date;\n /**\n * The date and time when the operation results will expire on the server.\n */\n readonly expiresOn?: Date;\n /**\n * The operation id.\n */\n readonly id: string;\n /**\n * The time the operation status was last updated.\n */\n readonly modifiedOn: Date;\n /**\n * Number of successfully completed actions.\n */\n readonly actionSucceededCount: number;\n /**\n * Number of failed actions.\n */\n readonly actionFailedCount: number;\n /**\n * Number of actions still in progress.\n */\n readonly actionInProgressCount: number;\n /**\n * The operation's display name.\n */\n readonly displayName?: string;\n}\n\n/**\n * The state of the begin analyze polling operation.\n */\nexport interface AnalyzeBatchOperationState\n extends OperationState<PagedAnalyzeBatchResult>,\n AnalyzeBatchOperationMetadata {}\n\n/**\n * Abstract representation of a poller, intended to expose just the minimal API that the user needs to work with.\n */\nexport interface PollerLike<TState extends OperationState<TResult>, TResult>\n extends SimplePollerLike<TState, TResult> {\n /**\n * sends a cancellation request.\n */\n sendCancellationRequest: () => Promise<void>;\n}\n"]}
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAmClC,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AA0D3E;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,aAAa,EAAE,eAAe;IAC9B,iBAAiB,EAAE,mBAAmB;IACtC,mBAAmB,EAAE,qBAAqB;IAC1C,oBAAoB,EAAE,sBAAsB;IAC5C,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;CAC9B,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;IACtC,oBAAoB,EAAE,sBAAsB;IAC5C,mBAAmB,EAAE,qBAAqB;IAC1C,aAAa,EAAE,eAAe;IAC9B,UAAU,EAAE,YAAY;IACxB,uBAAuB,EAAE,yBAAyB;IAClD,wBAAwB,EAAE,0BAA0B;IACpD,uBAAuB,EAAE,yBAAyB;IAClD,+BAA+B,EAAE,iCAAiC;IAClE,8BAA8B,EAAE,gCAAgC;CACxD,CAAC;AA2CX;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,mCAAQ,cAAc,GAAK,mBAAmB,CAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n AbstractiveSummary,\n AssessmentSentiment,\n ClassificationCategory,\n CustomEntityRecognitionAction,\n CustomMultiLabelClassificationAction,\n CustomSingleLabelClassificationAction,\n DetectedLanguage,\n DocumentSentimentLabel,\n DocumentWarning,\n Entity,\n EntityDataSource,\n EntityLinkingAction,\n EntityRecognitionAction,\n ExtractiveSummarizationAction,\n HealthcareAction,\n HealthcareAssertion,\n HealthcareEntityCategory,\n KeyPhraseExtractionAction,\n LanguageDetectionAction,\n LinkedEntity,\n PiiEntityRecognitionAction,\n RelationType,\n SentenceSentimentLabel,\n SentimentAnalysisAction,\n SentimentConfidenceScores,\n StringIndexType,\n SummarySentence,\n TargetConfidenceScores,\n TextDocumentBatchStatistics,\n TextDocumentStatistics,\n TokenSentimentLabel,\n} from \"./generated/index.js\";\nimport { KnownErrorCode, KnownInnerErrorCode } from \"./generated/index.js\";\nimport type { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport type { OperationState, SimplePollerLike } from \"@azure/core-lro\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\n\n/**\n * Configuration options for {@link TextAnalysisClient}.\n */\nexport interface TextAnalysisClientOptions extends CommonClientOptions {\n /**\n * The default country hint to use. Defaults to \"us\".\n */\n defaultCountryHint?: string;\n\n /**\n * The default language to use. Defaults to \"en\".\n */\n defaultLanguage?: string;\n /**\n * The version of the Cognitive Language Service API to use.\n */\n serviceVersion?: string;\n}\n\n/**\n * Options common to all operations.\n */\nexport interface TextAnalysisOperationOptions extends OperationOptions {\n /**\n * If set to true, response will contain input and document level statistics.\n */\n includeStatistics?: boolean;\n}\n\n/**\n * Options for the begin analyze actions operation.\n */\nexport interface BeginAnalyzeBatchOptions extends TextAnalysisOperationOptions {\n /**\n * Time delay between poll requests, in milliseconds.\n */\n updateIntervalInMs?: number;\n /**\n * The operation's display name.\n */\n displayName?: string;\n}\n\n/**\n * Options for the begin analyze actions operation.\n */\nexport interface RestoreAnalyzeBatchPollerOptions extends TextAnalysisOperationOptions {\n /**\n * Time delay between poll requests, in milliseconds.\n */\n updateIntervalInMs?: number;\n}\n\n/**\n * Type of actions supported by the {@link TextAnalysisClient.analyze} method.\n */\nexport const AnalyzeActionNames = {\n EntityLinking: \"EntityLinking\",\n EntityRecognition: \"EntityRecognition\",\n KeyPhraseExtraction: \"KeyPhraseExtraction\",\n PiiEntityRecognition: \"PiiEntityRecognition\",\n LanguageDetection: \"LanguageDetection\",\n SentimentAnalysis: \"SentimentAnalysis\",\n} as const;\n\n/**\n * Type of actions supported by the {@link TextAnalysisClient.beginAnalyzeBatch} method.\n */\nexport const AnalyzeBatchActionNames = {\n SentimentAnalysis: \"SentimentAnalysis\",\n EntityRecognition: \"EntityRecognition\",\n PiiEntityRecognition: \"PiiEntityRecognition\",\n KeyPhraseExtraction: \"KeyPhraseExtraction\",\n EntityLinking: \"EntityLinking\",\n Healthcare: \"Healthcare\",\n ExtractiveSummarization: \"ExtractiveSummarization\",\n AbstractiveSummarization: \"AbstractiveSummarization\",\n CustomEntityRecognition: \"CustomEntityRecognition\",\n CustomSingleLabelClassification: \"CustomSingleLabelClassification\",\n CustomMultiLabelClassification: \"CustomMultiLabelClassification\",\n} as const;\n\n/**\n * Type of actions supported by the {@link TextAnalysisClient.analyze} method.\n */\nexport type AnalyzeActionName = keyof typeof AnalyzeActionNames;\n\n/**\n * The type of parameters for every action in ${@link AnalyzeActionNames}.\n */\nexport type AnalyzeActionParameters<ActionName extends AnalyzeActionName> = {\n EntityLinking: EntityLinkingAction;\n EntityRecognition: EntityRecognitionAction;\n PiiEntityRecognition: PiiEntityRecognitionAction;\n KeyPhraseExtraction: KeyPhraseExtractionAction;\n SentimentAnalysis: SentimentAnalysisAction;\n LanguageDetection: LanguageDetectionAction;\n}[ActionName];\n\n/**\n * The type of results of every action in ${@link AnalyzeActionNames}.\n */\nexport type AnalyzeResult<ActionName extends AnalyzeActionName> = {\n EntityLinking: EntityLinkingResult[];\n EntityRecognition: EntityRecognitionResult[];\n PiiEntityRecognition: PiiEntityRecognitionResult[];\n KeyPhraseExtraction: KeyPhraseExtractionResult[];\n SentimentAnalysis: SentimentAnalysisResult[];\n LanguageDetection: LanguageDetectionResult[];\n}[ActionName];\n\n/** Options for an Abstractive Summarization action. */\nexport interface AbstractiveSummarizationAction {\n /** The approximate number of sentences to be part of the summary. */\n sentenceCount?: number;\n /**\n * Specifies the measurement unit used to calculate the offset and length properties. For a list of possible values, see {@link KnownStringIndexType}.\n *\n * The default is the JavaScript's default which is \"Utf16CodeUnit\".\n */\n stringIndexType?: StringIndexType;\n}\n\n/**\n * Enum of possible error codes of a {@link TextAnalysisError}.\n */\nexport const KnownTextAnalysisErrorCode = { ...KnownErrorCode, ...KnownInnerErrorCode };\n\n/**\n * Type describing an API error.\n */\nexport interface TextAnalysisError {\n /**\n * A code describing the kind of error produced. See {@link KnownTextAnalysisErrorCode}.\n */\n readonly code: string;\n /**\n * A message from the service explaining the error\n */\n readonly message: string;\n /**\n * The target of the particular error (for example, the name of an invalid parameter)\n */\n readonly target?: string;\n}\n\n/**\n * Base type for results of an action corresponding to a single input document.\n */\nexport interface TextAnalysisSuccessResult {\n /**\n * Unique, non-empty document identifier.\n */\n readonly id: string;\n\n /**\n * Statistics about the input document and how it was processed by the service.\n * This property will have a value when includeStatistics is set to true in\n * the client call.\n */\n readonly statistics?: TextDocumentStatistics;\n\n /**\n * An array of warning data corresponding to this document.\n *\n * If no warnings were returned, this array will be empty.\n */\n readonly warnings: DocumentWarning[];\n\n /**\n * Discriminant to determine if this is an error result.\n */\n readonly error?: undefined;\n}\n\n/**\n * Base type for error results of an action corresponding to a single document.\n */\nexport interface TextAnalysisErrorResult {\n /**\n * Unique, non-empty document identifier.\n */\n readonly id: string;\n\n /**\n * The Error for this document result.\n */\n readonly error: TextAnalysisError;\n}\n\n/**\n * The result of an entity recognition action on a single document.\n */\nexport type EntityRecognitionResult = EntityRecognitionSuccessResult | EntityRecognitionErrorResult;\n\n/**\n * The result of an entity recognition action on a single document, containing\n * a collection of {@link Entity} objects identified in that document.\n */\nexport interface EntityRecognitionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n readonly entities: Entity[];\n}\n\n/**\n * An error result from an entity recognition action on a single document.\n */\nexport type EntityRecognitionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of an entity recognition action on a single document.\n */\nexport type PiiEntityRecognitionResult =\n | PiiEntityRecognitionSuccessResult\n | PiiEntityRecognitionErrorResult;\n\n/**\n * The result of a pii entity recognition action on a single document,\n * containing the collection of {@link Entity} objects identified in that\n * document.\n */\nexport interface PiiEntityRecognitionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n readonly entities: Entity[];\n /**\n * The text redacted.\n */\n readonly redactedText: string;\n}\n\n/**\n * An error result from a pii entity recognition action on a single document.\n */\nexport type PiiEntityRecognitionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of an entity linking action on a single document.\n */\nexport type EntityLinkingResult = EntityLinkingSuccessResult | EntityLinkingErrorResult;\n\n/**\n * The result of a entity linking action on a single document, containing a\n * collection of the {@link LinkedEntity} objects identified in that document.\n */\nexport interface EntityLinkingSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n readonly entities: LinkedEntity[];\n}\n\n/**\n * An error result from an entity linking action on a single document.\n */\nexport type EntityLinkingErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of a language detection action on a single document.\n */\nexport type LanguageDetectionResult = LanguageDetectionSuccessResult | LanguageDetectionErrorResult;\n\n/**\n * The result of a language detection action on a single document,\n * containing a prediction of what language the document is written in.\n */\nexport interface LanguageDetectionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The top detected language by confidence score.\n */\n readonly primaryLanguage: DetectedLanguage;\n}\n\n/**\n * An error result from a language detection action on a single document.\n */\nexport type LanguageDetectionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of a sentiment analysis action on a single document.\n */\nexport type KeyPhraseExtractionResult =\n | KeyPhraseExtractionSuccessResult\n | KeyPhraseExtractionErrorResult;\n\n/**\n * The result of a key phrase extraction action on a single document,\n * containing a collection of the key phrases identified in that document.\n */\nexport interface KeyPhraseExtractionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * A list of representative words or phrases. The number of key phrases\n * returned is proportional to the number of words in the input document.\n */\n readonly keyPhrases: string[];\n}\n\n/**\n * An error result from a key phrase extraction action on a single document.\n */\nexport type KeyPhraseExtractionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of a sentiment analysis action on a single document.\n */\nexport type SentimentAnalysisResult = SentimentAnalysisSuccessResult | SentimentAnalysisErrorResult;\n\n/**\n * The result of a sentiment analysis action on a single document,\n * containing the predicted sentiment for each sentence as well as for the full\n * document.\n */\nexport interface SentimentAnalysisSuccessResult extends TextAnalysisSuccessResult {\n /**\n * Predicted sentiment for document. For a list of possible values, see {@link DocumentSentimentLabel}\n */\n readonly sentiment: DocumentSentimentLabel;\n /**\n * Document level sentiment confidence scores between 0 and 1 for each\n * sentiment class.\n */\n readonly confidenceScores: SentimentConfidenceScores;\n /**\n * The predicted sentiment for each sentence in the corresponding document.\n */\n readonly sentences: SentenceSentiment[];\n}\n\n/**\n * The predicted sentiment for a given span of text. For more information\n * regarding text sentiment, see {@link https://learn.microsoft.com//azure/cognitive-services/language-service/sentiment-opinion-mining/overview}.\n */\nexport interface SentenceSentiment {\n /**\n * The sentence text.\n */\n readonly text: string;\n /**\n * The predicted Sentiment for the sentence. For a list of possible values,\n * see {@link SentenceSentimentLabel}\n */\n readonly sentiment: SentenceSentimentLabel;\n /**\n * The sentiment confidence score between 0 and 1 for the sentence for all\n * classes.\n */\n readonly confidenceScores: SentimentConfidenceScores;\n /**\n * The sentence text offset from the start of the document.\n */\n readonly offset: number;\n /**\n * The length of the sentence text.\n */\n readonly length: number;\n /**\n * The list of opinions mined from this sentence. For example in \"The food is\n * good, but the service is bad\", the following two opinions will be returned:\n * \"food is good\" and \"service is bad\".\n *\n * It is non-empty only returned if {@link includeOpinionMining} was set to\n * `true`.\n */\n readonly opinions: Opinion[];\n}\n\n/**\n * TargetSentiment contains the predicted sentiment, confidence scores and other\n * information about a target of a product. A target of a product/service is a\n * key component of that product/service. For example in \"The food at Hotel Foo\n * is good\", \"food\" is a target of \"Hotel Foo\".\n */\nexport interface TargetSentiment {\n /**\n * The sentiment confidence score between 0 and 1 for the target for\n * 'positive' and 'negative' labels.\n */\n readonly confidenceScores: TargetConfidenceScores;\n /**\n * The predicted Sentiment for the Target. For a list of possible values,\n * see {@link TokenSentimentLabel}\n */\n readonly sentiment: TokenSentimentLabel;\n /**\n * The target text.\n */\n readonly text: string;\n /**\n * The Target text offset from the start of the sentence.\n */\n readonly offset: number;\n /**\n * The length of the Target text.\n */\n readonly length: number;\n}\n\n/**\n * A mined opinion object represents an opinion we've extracted from a sentence.\n * It consists of both a target that these assessments are about, and the actual\n * assessments themselves.\n */\nexport interface Opinion {\n /**\n * The target of a product/service that this assessment is about.\n */\n readonly target: TargetSentiment;\n /**\n * The actual assessments of the target.\n */\n readonly assessments: AssessmentSentiment[];\n}\n\n/**\n * A healthcare entity represented as a node in a directed graph where the edges are\n * a particular type of relationship between the source and target nodes.\n */\nexport interface HealthcareEntity extends Entity {\n /**\n * Normalized name for the entity. For example, the normalized text for \"histologically\" is \"histologic\".\n */\n readonly normalizedText?: string;\n /**\n * Whether the entity is negated.\n */\n readonly assertion?: HealthcareAssertion;\n /**\n * Entity references in known data sources.\n */\n readonly dataSources: EntityDataSource[];\n /**\n * Defines values for HealthcareEntityCategory.\n * {@link KnownHealthcareEntityCategory} can be used interchangeably with HealthcareEntityCategory,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **BODY_STRUCTURE**\n * **AGE**\n * **GENDER**\n * **EXAMINATION_NAME**\n * **DATE**\n * **DIRECTION**\n * **FREQUENCY**\n * **MEASUREMENT_VALUE**\n * **MEASUREMENT_UNIT**\n * **RELATIONAL_OPERATOR**\n * **TIME**\n * **GENE_OR_PROTEIN**\n * **VARIANT**\n * **ADMINISTRATIVE_EVENT**\n * **CARE_ENVIRONMENT**\n * **HEALTHCARE_PROFESSION**\n * **DIAGNOSIS**\n * **SYMPTOM_OR_SIGN**\n * **CONDITION_QUALIFIER**\n * **MEDICATION_CLASS**\n * **MEDICATION_NAME**\n * **DOSAGE**\n * **MEDICATION_FORM**\n * **MEDICATION_ROUTE**\n * **FAMILY_RELATION**\n * **TREATMENT_NAME**\n */\n readonly category: HealthcareEntityCategory;\n}\n\n/**\n * The type of different roles a healthcare entity can play in a relation.\n */\nexport type HealthcareEntityRelationRoleType = string;\n\n/**\n * A healthcare entity that plays a specific role in a relation.\n */\nexport interface HealthcareEntityRelationRole {\n /**\n * A healthcare entity\n */\n readonly entity: HealthcareEntity;\n /**\n * The role of the healthcare entity in a particular relation.\n */\n readonly name: HealthcareEntityRelationRoleType;\n}\n\n/**\n * A relationship between two or more healthcare entities.\n */\nexport interface HealthcareEntityRelation {\n /**\n * The type of the healthcare relation.\n */\n readonly relationType: RelationType;\n /**\n * The list of healthcare entities and their roles in the healthcare relation.\n */\n readonly roles: HealthcareEntityRelationRole[];\n /**\n * The confidence score between 0 and 1 of the extracted relation.\n */\n readonly confidenceScore?: number;\n}\n\n/**\n * The results of a successful healthcare analysis action for a single document.\n */\nexport interface HealthcareSuccessResult extends TextAnalysisSuccessResult {\n /**\n * Healthcare entities.\n */\n readonly entities: HealthcareEntity[];\n /**\n * Relations between healthcare entities.\n */\n readonly entityRelations: HealthcareEntityRelation[];\n}\n\n/**\n * An error result from the healthcare analysis action on a single document.\n */\nexport type HealthcareErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the healthcare analysis action on a single document.\n */\nexport type HealthcareResult = HealthcareSuccessResult | HealthcareErrorResult;\n\n/**\n * The result of the extractive summarization action on a single document.\n */\nexport type ExtractiveSummarizationResult =\n | ExtractiveSummarizationSuccessResult\n | ExtractiveSummarizationErrorResult;\n\n/**\n * The result of the extractive summarization action on a single document,\n * containing a collection of the summary identified in that document.\n */\nexport interface ExtractiveSummarizationSuccessResult extends TextAnalysisSuccessResult {\n /**\n * A list of sentences composing a summary of the input document.\n */\n readonly sentences: SummarySentence[];\n}\n\n/**\n * An error result from the extractive summarization action on a single document.\n */\nexport type ExtractiveSummarizationErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the abstractive summarization action on a single document.\n */\nexport type AbstractiveSummarizationResult =\n | AbstractiveSummarizationSuccessResult\n | AbstractiveSummarizationErrorResult;\n\n/**\n * The result of the abstractive summarization action on a single document,\n * containing a collection of the summaries identified for that document.\n */\nexport interface AbstractiveSummarizationSuccessResult extends TextAnalysisSuccessResult {\n /**\n * A list of summaries of the input document.\n */\n readonly summaries: AbstractiveSummary[];\n}\n\n/**\n * An error result from the abstractive summarization action on a single document.\n */\nexport type AbstractiveSummarizationErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the custom entity recognition action on a single document.\n */\nexport type CustomEntityRecognitionResult =\n | CustomEntityRecognitionSuccessResult\n | CustomEntityRecognitionErrorResult;\n\n/**\n * The result of the custom entity recognition action on a single document,\n * containing a collection of the entities identified in that document.\n */\nexport interface CustomEntityRecognitionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n readonly entities: Entity[];\n}\n\n/**\n * An error result from the custom entity recognition action on a single document.\n */\nexport type CustomEntityRecognitionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the single-label classification action on a single document.\n */\nexport type CustomSingleLabelClassificationResult =\n | CustomSingleLabelClassificationSuccessResult\n | CustomSingleLabelClassificationErrorResult;\n\n/**\n * The result of a successful single-label classification action on a single document,\n * containing the result of the classification.\n */\nexport interface CustomSingleLabelClassificationSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of classifications in the input document.\n */\n readonly classifications: ClassificationCategory[];\n}\n\n/**\n * An error result from the single-label classification action on a single document.\n */\nexport type CustomSingleLabelClassificationErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the multi-label classification action on a multi document.\n */\nexport type CustomMultiLabelClassificationResult =\n | CustomMultiLabelClassificationSuccessResult\n | CustomMultiLabelClassificationErrorResult;\n\n/**\n * The result of a successful multi-label classification action on a multi document,\n * containing the result of the classification.\n */\nexport interface CustomMultiLabelClassificationSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of classifications in the input document.\n */\n readonly classifications: ClassificationCategory[];\n}\n\n/**\n * An error result from the multi-label classification action on a multi document.\n */\nexport type CustomMultiLabelClassificationErrorResult = TextAnalysisErrorResult;\n\n/**\n * Options common to all batch actions.\n */\nexport interface AnalyzeBatchActionCommon {\n /**\n * The name of the action.\n */\n actionName?: string;\n}\n\n/** Options for an entity linking batch action. */\nexport interface EntityLinkingBatchAction extends AnalyzeBatchActionCommon, EntityLinkingAction {\n /**\n * The kind of the action.\n */\n kind: \"EntityLinking\";\n}\n\n/** Options for an entity recognition batch action. */\nexport interface EntityRecognitionBatchAction\n extends AnalyzeBatchActionCommon,\n EntityRecognitionAction {\n /**\n * The kind of the action.\n */\n kind: \"EntityRecognition\";\n}\n\n/** Options for an key phrase extraction batch action. */\nexport interface KeyPhraseExtractionBatchAction\n extends AnalyzeBatchActionCommon,\n KeyPhraseExtractionAction {\n /**\n * The kind of the action.\n */\n kind: \"KeyPhraseExtraction\";\n}\n\n/** Options for a pii entity recognition batch action. */\nexport interface PiiEntityRecognitionBatchAction\n extends AnalyzeBatchActionCommon,\n PiiEntityRecognitionAction {\n /**\n * The kind of the action.\n */\n kind: \"PiiEntityRecognition\";\n}\n\n/** Options for a healthcare batch action. */\nexport interface HealthcareBatchAction extends AnalyzeBatchActionCommon, HealthcareAction {\n /**\n * The kind of the action.\n */\n kind: \"Healthcare\";\n}\n\n/** Options for a sentiment analysis batch action. */\nexport interface SentimentAnalysisBatchAction\n extends AnalyzeBatchActionCommon,\n SentimentAnalysisAction {\n /**\n * The kind of the action.\n */\n kind: \"SentimentAnalysis\";\n}\n\n/** Options for an extractive summarization batch action. */\nexport interface ExtractiveSummarizationBatchAction\n extends AnalyzeBatchActionCommon,\n ExtractiveSummarizationAction {\n /**\n * The kind of the action.\n */\n kind: \"ExtractiveSummarization\";\n}\n\n/** Options for an abstractive summarization batch action. */\nexport interface AbstractiveSummarizationBatchAction\n extends AnalyzeBatchActionCommon,\n AbstractiveSummarizationAction {\n /**\n * The kind of the action.\n */\n kind: \"AbstractiveSummarization\";\n}\n\n/** Options for a custom entity recognition batch action. */\nexport interface CustomEntityRecognitionBatchAction\n extends AnalyzeBatchActionCommon,\n CustomEntityRecognitionAction {\n /**\n * The kind of the action.\n */\n kind: \"CustomEntityRecognition\";\n}\n\n/** Options for a custom single-label classification batch action. */\nexport interface CustomSingleLabelClassificationBatchAction\n extends AnalyzeBatchActionCommon,\n CustomSingleLabelClassificationAction {\n /**\n * The kind of the action.\n */\n kind: \"CustomSingleLabelClassification\";\n}\n\n/** Options for a custom multi-label classification batch action. */\nexport interface CustomMultiLabelClassificationBatchAction\n extends AnalyzeBatchActionCommon,\n CustomMultiLabelClassificationAction {\n /**\n * The kind of the action.\n */\n kind: \"CustomMultiLabelClassification\";\n}\n\n/**\n * Batch of actions.\n */\nexport type AnalyzeBatchAction =\n | EntityLinkingBatchAction\n | EntityRecognitionBatchAction\n | KeyPhraseExtractionBatchAction\n | PiiEntityRecognitionBatchAction\n | HealthcareBatchAction\n | SentimentAnalysisBatchAction\n | ExtractiveSummarizationBatchAction\n | AbstractiveSummarizationBatchAction\n | CustomEntityRecognitionBatchAction\n | CustomSingleLabelClassificationBatchAction\n | CustomMultiLabelClassificationBatchAction;\n\n/**\n * Type of actions supported by the {@link TextAnalysisClient.beginAnalyzeBatch} method.\n */\nexport type AnalyzeBatchActionName = keyof typeof AnalyzeBatchActionNames;\n\n/** The State of a batched action */\nexport interface BatchActionState<Kind extends AnalyzeBatchActionName> {\n /**\n * The kind of the action results.\n */\n readonly kind: Kind;\n /**\n * The name of the action.\n */\n readonly actionName?: string;\n /**\n * Action statistics.\n */\n readonly statistics?: TextDocumentBatchStatistics;\n}\n\n/**\n * Action metadata.\n */\nexport interface ActionMetadata {\n /**\n * The model version used to perform the action.\n */\n readonly modelVersion: string;\n}\n\n/**\n * Custom action metadata.\n */\nexport interface CustomActionMetadata {\n /**\n * The name of the project used to perform the action.\n */\n readonly projectName: string;\n /**\n * The name of the deployment used to perform the action.\n */\n readonly deploymentName: string;\n}\n\n/**\n * The state of a succeeded batched action.\n */\nexport interface BatchActionSuccessResult<T, Kind extends AnalyzeBatchActionName>\n extends BatchActionState<Kind> {\n /**\n * The list of document results.\n */\n readonly results: T[];\n /**\n * When this action was completed by the service.\n */\n readonly completedOn: Date;\n /**\n * Discriminant to determine if that this is an error result.\n */\n readonly error?: undefined;\n}\n\n/**\n * The error of an analyze batch action.\n */\nexport interface BatchActionErrorResult<Kind extends AnalyzeBatchActionName>\n extends BatchActionState<Kind> {\n /**\n * When this action was completed by the service.\n */\n readonly failedOn: Date;\n /**\n * The Error for this action result.\n */\n readonly error: TextAnalysisError;\n}\n\n/**\n * The result of a batched action.\n */\nexport type BatchActionResult<T, Kind extends AnalyzeBatchActionName> =\n | BatchActionSuccessResult<T, Kind>\n | BatchActionErrorResult<Kind>;\n\n/**\n * The result of an entity linking batch action.\n */\nexport type EntityLinkingBatchResult = ActionMetadata &\n BatchActionResult<EntityLinkingResult, \"EntityLinking\">;\n\n/**\n * The result of an entity recognition batch action.\n */\nexport type EntityRecognitionBatchResult = ActionMetadata &\n BatchActionResult<EntityRecognitionResult, \"EntityRecognition\">;\n\n/**\n * The result of a key phrase extraction batch action.\n */\nexport type KeyPhraseExtractionBatchResult = ActionMetadata &\n BatchActionResult<KeyPhraseExtractionResult, \"KeyPhraseExtraction\">;\n\n/**\n * The result of a pii entity recognition batch action.\n */\nexport type PiiEntityRecognitionBatchResult = ActionMetadata &\n BatchActionResult<PiiEntityRecognitionResult, \"PiiEntityRecognition\">;\n\n/**\n * The result of a sentiment analysis batch action.\n */\nexport type SentimentAnalysisBatchResult = ActionMetadata &\n BatchActionResult<SentimentAnalysisResult, \"SentimentAnalysis\">;\n\n/**\n * The result of a healthcare batch action.\n */\nexport type HealthcareBatchResult = ActionMetadata &\n BatchActionResult<HealthcareResult, \"Healthcare\">;\n\n/**\n * The result of an extractive summarization batch action.\n */\nexport type ExtractiveSummarizationBatchResult = ActionMetadata &\n BatchActionResult<ExtractiveSummarizationResult, \"ExtractiveSummarization\">;\n\n/**\n * The result of an abstractive summarization batch action.\n */\nexport type AbstractiveSummarizationBatchResult = ActionMetadata &\n BatchActionResult<AbstractiveSummarizationResult, \"AbstractiveSummarization\">;\n\n/**\n * The result of a custom entity recognition batch action.\n */\nexport type CustomEntityRecognitionBatchResult = CustomActionMetadata &\n BatchActionResult<CustomEntityRecognitionResult, \"CustomEntityRecognition\">;\n\n/**\n * The result of a custom single-label classification batch action.\n */\nexport type CustomSingleLabelClassificationBatchResult = CustomActionMetadata &\n BatchActionResult<CustomSingleLabelClassificationResult, \"CustomSingleLabelClassification\">;\n\n/**\n * The result of a custom multi-label classification batch action.\n */\nexport type CustomMultiLabelClassificationBatchResult = CustomActionMetadata &\n BatchActionResult<CustomMultiLabelClassificationResult, \"CustomMultiLabelClassification\">;\n/**\n * Results of a batch of actions.\n */\nexport type AnalyzeBatchResult =\n | EntityLinkingBatchResult\n | EntityRecognitionBatchResult\n | KeyPhraseExtractionBatchResult\n | PiiEntityRecognitionBatchResult\n | SentimentAnalysisBatchResult\n | HealthcareBatchResult\n | ExtractiveSummarizationBatchResult\n | AbstractiveSummarizationBatchResult\n | CustomEntityRecognitionBatchResult\n | CustomSingleLabelClassificationBatchResult\n | CustomMultiLabelClassificationBatchResult;\n\n/**\n * An error result from a sentiment analysis action on a single document.\n */\nexport type SentimentAnalysisErrorResult = TextAnalysisErrorResult;\n\n/**\n * Paged results of the {@link TextAnalysisClient.beginAnalyzeBatch} operation.\n */\nexport type PagedAnalyzeBatchResult = PagedAsyncIterableIterator<AnalyzeBatchResult>;\n\n/**\n * A poller that polls long-running operations started by {@link TextAnalysisClient.beginAnalyzeBatch}.\n */\nexport type AnalyzeBatchPoller = PollerLike<AnalyzeBatchOperationState, PagedAnalyzeBatchResult>;\n\n/**\n * The metadata for long-running operations started by {@link TextAnalysisClient.beginAnalyzeBatch}.\n */\nexport interface AnalyzeBatchOperationMetadata {\n /**\n * The date and time the operation was created.\n */\n readonly createdOn: Date;\n /**\n * The date and time when the operation results will expire on the server.\n */\n readonly expiresOn?: Date;\n /**\n * The operation id.\n */\n readonly id: string;\n /**\n * The time the operation status was last updated.\n */\n readonly modifiedOn: Date;\n /**\n * Number of successfully completed actions.\n */\n readonly actionSucceededCount: number;\n /**\n * Number of failed actions.\n */\n readonly actionFailedCount: number;\n /**\n * Number of actions still in progress.\n */\n readonly actionInProgressCount: number;\n /**\n * The operation's display name.\n */\n readonly displayName?: string;\n}\n\n/**\n * The state of the begin analyze polling operation.\n */\nexport interface AnalyzeBatchOperationState\n extends OperationState<PagedAnalyzeBatchResult>,\n AnalyzeBatchOperationMetadata {}\n\n/**\n * Abstract representation of a poller, intended to expose just the minimal API that the user needs to work with.\n */\nexport interface PollerLike<TState extends OperationState<TResult>, TResult>\n extends SimplePollerLike<TState, TResult> {\n /**\n * sends a cancellation request.\n */\n sendCancellationRequest: () => Promise<void>;\n}\n"]}
|
@@ -102,7 +102,7 @@ export declare class TextAnalysisClient {
|
|
102
102
|
* inferred language is correct. Scores close to 1 indicate high certainty in
|
103
103
|
* the result. 120 languages are supported.
|
104
104
|
*
|
105
|
-
* See {@link https://
|
105
|
+
* See {@link https://learn.microsoft.com//azure/cognitive-services/language-service/concepts/data-limits}
|
106
106
|
* for data limits.
|
107
107
|
*
|
108
108
|
* ### Examples
|
@@ -124,7 +124,7 @@ export declare class TextAnalysisClient {
|
|
124
124
|
* }
|
125
125
|
* ```
|
126
126
|
*
|
127
|
-
* See {@link https://
|
127
|
+
* See {@link https://learn.microsoft.com//azure/cognitive-services/language-service/language-detection/overview}
|
128
128
|
* for more information on language detection.
|
129
129
|
*
|
130
130
|
* @param actionName - the name of the action to be performed on the input
|
@@ -143,7 +143,7 @@ export declare class TextAnalysisClient {
|
|
143
143
|
* inferred language is correct. Scores close to 1 indicate high certainty in
|
144
144
|
* the result. 120 languages are supported.
|
145
145
|
*
|
146
|
-
* See {@link https://
|
146
|
+
* See {@link https://learn.microsoft.com//azure/cognitive-services/language-service/concepts/data-limits}
|
147
147
|
* for data limits.
|
148
148
|
*
|
149
149
|
* ### Examples
|
@@ -164,7 +164,7 @@ export declare class TextAnalysisClient {
|
|
164
164
|
* }
|
165
165
|
* ```
|
166
166
|
*
|
167
|
-
* See {@link https://
|
167
|
+
* See {@link https://learn.microsoft.com//azure/cognitive-services/language-service/language-detection/overview}
|
168
168
|
* for more information on language detection.
|
169
169
|
*
|
170
170
|
* @param actionName - the name of the action to be performed on the input
|
@@ -194,7 +194,7 @@ export declare class TextAnalysisClient {
|
|
194
194
|
* in the text and the latter is the original text after all such Pii entities
|
195
195
|
* have been redacted from it.
|
196
196
|
*
|
197
|
-
* See {@link https://
|
197
|
+
* See {@link https://learn.microsoft.com//azure/cognitive-services/language-service/concepts/data-limits}
|
198
198
|
* for data limits.
|
199
199
|
*
|
200
200
|
* ### Examples
|
@@ -228,7 +228,7 @@ export declare class TextAnalysisClient {
|
|
228
228
|
* }
|
229
229
|
* ```
|
230
230
|
*
|
231
|
-
* See {@link https://
|
231
|
+
* See {@link https://learn.microsoft.com//azure/cognitive-services/language-service/sentiment-opinion-mining/overview}
|
232
232
|
* for more information on opinion mining.
|
233
233
|
*
|
234
234
|
* #### Personally identifiable information
|
@@ -253,7 +253,7 @@ export declare class TextAnalysisClient {
|
|
253
253
|
* }
|
254
254
|
* ```
|
255
255
|
*
|
256
|
-
* See {@link https://
|
256
|
+
* See {@link https://learn.microsoft.com//azure/cognitive-services/language-service/personally-identifiable-information/overview}
|
257
257
|
* for more information on personally identifiable information.
|
258
258
|
*
|
259
259
|
* @param actionName - the name of the action to be performed on the input
|
@@ -275,7 +275,7 @@ export declare class TextAnalysisClient {
|
|
275
275
|
* in the text and the latter is the original text after all such Pii entities
|
276
276
|
* have been redacted from it.
|
277
277
|
*
|
278
|
-
* See {@link https://
|
278
|
+
* See {@link https://learn.microsoft.com//azure/cognitive-services/language-service/concepts/data-limits}
|
279
279
|
* for data limits.
|
280
280
|
*
|
281
281
|
* ### Examples
|
@@ -305,7 +305,7 @@ export declare class TextAnalysisClient {
|
|
305
305
|
* }
|
306
306
|
* ```
|
307
307
|
*
|
308
|
-
* See {@link https://
|
308
|
+
* See {@link https://learn.microsoft.com//azure/cognitive-services/language-service/sentiment-opinion-mining/overview}
|
309
309
|
* for more information on opinion mining.
|
310
310
|
*
|
311
311
|
* #### Personally identifiable information
|
@@ -331,7 +331,7 @@ export declare class TextAnalysisClient {
|
|
331
331
|
* }
|
332
332
|
* ```
|
333
333
|
*
|
334
|
-
* See {@link https://
|
334
|
+
* See {@link https://learn.microsoft.com//azure/cognitive-services/language-service/personally-identifiable-information/overview}
|
335
335
|
* for more information on personally identifiable information.
|
336
336
|
*
|
337
337
|
* @param actionName - the name of the action to be performed on the input
|
@@ -343,7 +343,7 @@ export declare class TextAnalysisClient {
|
|
343
343
|
* the service will apply a model where the language is explicitly set to
|
344
344
|
* "None". Language support varies per action, for example, more information
|
345
345
|
* about the languages supported for Entity Recognition actions can be
|
346
|
-
* found in {@link https://
|
346
|
+
* found in {@link https://learn.microsoft.com//azure/cognitive-services/language-service/named-entity-recognition/language-support}.
|
347
347
|
* If set to "auto", the service will automatically infer the language from
|
348
348
|
* the input text.
|
349
349
|
* @param options - optional action parameters and settings for the operation
|
@@ -360,7 +360,7 @@ export declare class TextAnalysisClient {
|
|
360
360
|
* The results array contains the results for those input actions where each
|
361
361
|
* item also has a `kind` field that specifies the type of the results.
|
362
362
|
*
|
363
|
-
* See {@link https://
|
363
|
+
* See {@link https://learn.microsoft.com//azure/cognitive-services/language-service/concepts/data-limits}
|
364
364
|
* for data limits.
|
365
365
|
*
|
366
366
|
* ### Examples
|
@@ -403,7 +403,7 @@ export declare class TextAnalysisClient {
|
|
403
403
|
* the service will apply a model where the language is explicitly set to
|
404
404
|
* "None". Language support varies per action, for example, more information
|
405
405
|
* about the languages supported for Entity Recognition actions can be
|
406
|
-
* found in {@link https://
|
406
|
+
* found in {@link https://learn.microsoft.com//azure/cognitive-services/language-service/named-entity-recognition/language-support}.
|
407
407
|
* If set to "auto", the service will automatically infer the language from
|
408
408
|
* the input text.
|
409
409
|
* @param options - optional settings for the operation
|
@@ -420,7 +420,7 @@ export declare class TextAnalysisClient {
|
|
420
420
|
* The results array contains the results for those input actions where each
|
421
421
|
* item also has a `kind` field that specifies the type of the results.
|
422
422
|
*
|
423
|
-
* See {@link https://
|
423
|
+
* See {@link https://learn.microsoft.com//azure/cognitive-services/language-service/concepts/data-limits}
|
424
424
|
* for data limits.
|
425
425
|
*
|
426
426
|
* ### Examples
|