@azure/ai-language-text 1.0.0-alpha.20220816.1 → 1.0.0-alpha.20220907.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/README.md +2 -53
- package/dist/index.js +198 -455
- package/dist/index.js.map +1 -1
- package/dist-esm/src/constants.js +1 -1
- package/dist-esm/src/constants.js.map +1 -1
- package/dist-esm/src/generated/generatedClient.js +2 -2
- package/dist-esm/src/generated/generatedClient.js.map +1 -1
- package/dist-esm/src/generated/models/index.js +71 -47
- package/dist-esm/src/generated/models/index.js.map +1 -1
- package/dist-esm/src/generated/models/mappers.js +16 -281
- package/dist-esm/src/generated/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/models/parameters.js +1 -1
- package/dist-esm/src/generated/models/parameters.js.map +1 -1
- package/dist-esm/src/index.js +1 -1
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/lro.js +19 -24
- package/dist-esm/src/lro.js.map +1 -1
- package/dist-esm/src/models.js +0 -9
- package/dist-esm/src/models.js.map +1 -1
- package/dist-esm/src/textAnalysisClient.js +41 -26
- package/dist-esm/src/textAnalysisClient.js.map +1 -1
- package/dist-esm/src/transforms.js +38 -43
- package/dist-esm/src/transforms.js.map +1 -1
- package/dist-esm/src/util.js +7 -8
- package/dist-esm/src/util.js.map +1 -1
- package/package.json +3 -3
- package/types/ai-language-text.d.ts +63 -148
package/dist/index.js
CHANGED
@@ -4,12 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
var coreAuth = require('@azure/core-auth');
|
6
6
|
var tslib = require('tslib');
|
7
|
-
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
8
|
-
var coreLro = require('@azure/core-lro');
|
9
7
|
var coreTracing = require('@azure/core-tracing');
|
10
8
|
var logger$1 = require('@azure/logger');
|
11
9
|
var coreClient = require('@azure/core-client');
|
12
10
|
var corePaging = require('@azure/core-paging');
|
11
|
+
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
12
|
+
var coreLro = require('@azure/core-lro');
|
13
13
|
|
14
14
|
function _interopNamespace(e) {
|
15
15
|
if (e && e.__esModule) return e;
|
@@ -29,8 +29,8 @@ function _interopNamespace(e) {
|
|
29
29
|
return Object.freeze(n);
|
30
30
|
}
|
31
31
|
|
32
|
-
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
33
32
|
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
33
|
+
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
34
34
|
|
35
35
|
// Copyright (c) Microsoft Corporation.
|
36
36
|
// Licensed under the MIT license.
|
@@ -42,7 +42,7 @@ const DEFAULT_COGNITIVE_SCOPE = "https://cognitiveservices.azure.com/.default";
|
|
42
42
|
/**
|
43
43
|
* @internal
|
44
44
|
*/
|
45
|
-
const SDK_VERSION = "1.0.0
|
45
|
+
const SDK_VERSION = "1.0.0";
|
46
46
|
/**
|
47
47
|
* @internal
|
48
48
|
*/
|
@@ -61,16 +61,16 @@ const logger = logger$1.createClientLogger("ai-language-text");
|
|
61
61
|
* return a sorted array of results.
|
62
62
|
*
|
63
63
|
* @internal
|
64
|
-
* @param
|
64
|
+
* @param sortedIds - An array of sorted IDs
|
65
65
|
* @param unsortedArray - An array of entries that contain `id` but are not sorted
|
66
66
|
*/
|
67
|
-
function sortResponseIdObjects(
|
67
|
+
function sortResponseIdObjects(sortedIds, unsortedArray) {
|
68
68
|
const unsortedMap = new Map();
|
69
69
|
for (const item of unsortedArray) {
|
70
70
|
unsortedMap.set(item.id, item);
|
71
71
|
}
|
72
|
-
if (unsortedArray.length !==
|
73
|
-
const ordinal = unsortedArray.length >
|
72
|
+
if (unsortedArray.length !== sortedIds.length) {
|
73
|
+
const ordinal = unsortedArray.length > sortedIds.length ? "more" : "fewer";
|
74
74
|
logger.warning(`The service returned ${ordinal} responses than inputs. Some errors may be treated as fatal.`);
|
75
75
|
}
|
76
76
|
const result = [];
|
@@ -79,8 +79,8 @@ function sortResponseIdObjects(sortedArray, unsortedArray) {
|
|
79
79
|
* items than unsortedArray so it is ok to ignore the case when a sorted item
|
80
80
|
* ID is not found in `unsortedMap`.
|
81
81
|
*/
|
82
|
-
for (const
|
83
|
-
const item = unsortedMap.get(
|
82
|
+
for (const id of sortedIds) {
|
83
|
+
const item = unsortedMap.get(id);
|
84
84
|
if (item) {
|
85
85
|
result.push(item);
|
86
86
|
}
|
@@ -154,11 +154,10 @@ function convertToLanguageDetectionInput(inputs, countryHint) {
|
|
154
154
|
* @internal
|
155
155
|
*/
|
156
156
|
function getOperationOptions(options) {
|
157
|
-
const { abortSignal,
|
157
|
+
const { abortSignal, includeStatistics, onResponse, requestOptions, serializerOptions, tracingOptions } = options, rest = tslib.__rest(options, ["abortSignal", "includeStatistics", "onResponse", "requestOptions", "serializerOptions", "tracingOptions"]);
|
158
158
|
return {
|
159
159
|
options: {
|
160
160
|
abortSignal,
|
161
|
-
apiVersion,
|
162
161
|
includeStatistics,
|
163
162
|
onResponse,
|
164
163
|
requestOptions,
|
@@ -445,11 +444,11 @@ const JobState = {
|
|
445
444
|
serializedName: "jobId",
|
446
445
|
required: true,
|
447
446
|
type: {
|
448
|
-
name: "
|
447
|
+
name: "String"
|
449
448
|
}
|
450
449
|
},
|
451
450
|
modifiedOn: {
|
452
|
-
serializedName: "
|
451
|
+
serializedName: "lastUpdatedDateTime",
|
453
452
|
required: true,
|
454
453
|
type: {
|
455
454
|
name: "DateTime"
|
@@ -459,16 +458,7 @@ const JobState = {
|
|
459
458
|
serializedName: "status",
|
460
459
|
required: true,
|
461
460
|
type: {
|
462
|
-
name: "
|
463
|
-
allowedValues: [
|
464
|
-
"notStarted",
|
465
|
-
"running",
|
466
|
-
"succeeded",
|
467
|
-
"partiallySucceeded",
|
468
|
-
"failed",
|
469
|
-
"cancelled",
|
470
|
-
"cancelling"
|
471
|
-
]
|
461
|
+
name: "String"
|
472
462
|
}
|
473
463
|
},
|
474
464
|
errors: {
|
@@ -571,16 +561,7 @@ const TaskState = {
|
|
571
561
|
serializedName: "status",
|
572
562
|
required: true,
|
573
563
|
type: {
|
574
|
-
name: "
|
575
|
-
allowedValues: [
|
576
|
-
"notStarted",
|
577
|
-
"running",
|
578
|
-
"succeeded",
|
579
|
-
"partiallySucceeded",
|
580
|
-
"failed",
|
581
|
-
"cancelled",
|
582
|
-
"cancelling"
|
583
|
-
]
|
564
|
+
name: "String"
|
584
565
|
}
|
585
566
|
}
|
586
567
|
}
|
@@ -1477,42 +1458,6 @@ const Match = {
|
|
1477
1458
|
}
|
1478
1459
|
}
|
1479
1460
|
};
|
1480
|
-
const SummarySentence = {
|
1481
|
-
type: {
|
1482
|
-
name: "Composite",
|
1483
|
-
className: "SummarySentence",
|
1484
|
-
modelProperties: {
|
1485
|
-
text: {
|
1486
|
-
serializedName: "text",
|
1487
|
-
required: true,
|
1488
|
-
type: {
|
1489
|
-
name: "String"
|
1490
|
-
}
|
1491
|
-
},
|
1492
|
-
rankScore: {
|
1493
|
-
serializedName: "rankScore",
|
1494
|
-
required: true,
|
1495
|
-
type: {
|
1496
|
-
name: "Number"
|
1497
|
-
}
|
1498
|
-
},
|
1499
|
-
offset: {
|
1500
|
-
serializedName: "offset",
|
1501
|
-
required: true,
|
1502
|
-
type: {
|
1503
|
-
name: "Number"
|
1504
|
-
}
|
1505
|
-
},
|
1506
|
-
length: {
|
1507
|
-
serializedName: "length",
|
1508
|
-
required: true,
|
1509
|
-
type: {
|
1510
|
-
name: "Number"
|
1511
|
-
}
|
1512
|
-
}
|
1513
|
-
}
|
1514
|
-
}
|
1515
|
-
};
|
1516
1461
|
const DetectedLanguage = {
|
1517
1462
|
type: {
|
1518
1463
|
name: "Composite",
|
@@ -1556,63 +1501,6 @@ const Pagination = {
|
|
1556
1501
|
}
|
1557
1502
|
}
|
1558
1503
|
};
|
1559
|
-
const JobMetadata = {
|
1560
|
-
type: {
|
1561
|
-
name: "Composite",
|
1562
|
-
className: "JobMetadata",
|
1563
|
-
modelProperties: {
|
1564
|
-
displayName: {
|
1565
|
-
serializedName: "displayName",
|
1566
|
-
type: {
|
1567
|
-
name: "String"
|
1568
|
-
}
|
1569
|
-
},
|
1570
|
-
createdDateTime: {
|
1571
|
-
serializedName: "createdDateTime",
|
1572
|
-
required: true,
|
1573
|
-
type: {
|
1574
|
-
name: "DateTime"
|
1575
|
-
}
|
1576
|
-
},
|
1577
|
-
expirationDateTime: {
|
1578
|
-
serializedName: "expirationDateTime",
|
1579
|
-
type: {
|
1580
|
-
name: "DateTime"
|
1581
|
-
}
|
1582
|
-
},
|
1583
|
-
jobId: {
|
1584
|
-
serializedName: "jobId",
|
1585
|
-
required: true,
|
1586
|
-
type: {
|
1587
|
-
name: "Uuid"
|
1588
|
-
}
|
1589
|
-
},
|
1590
|
-
lastUpdateDateTime: {
|
1591
|
-
serializedName: "lastUpdateDateTime",
|
1592
|
-
required: true,
|
1593
|
-
type: {
|
1594
|
-
name: "DateTime"
|
1595
|
-
}
|
1596
|
-
},
|
1597
|
-
status: {
|
1598
|
-
serializedName: "status",
|
1599
|
-
required: true,
|
1600
|
-
type: {
|
1601
|
-
name: "Enum",
|
1602
|
-
allowedValues: [
|
1603
|
-
"notStarted",
|
1604
|
-
"running",
|
1605
|
-
"succeeded",
|
1606
|
-
"partiallySucceeded",
|
1607
|
-
"failed",
|
1608
|
-
"cancelled",
|
1609
|
-
"cancelling"
|
1610
|
-
]
|
1611
|
-
}
|
1612
|
-
}
|
1613
|
-
}
|
1614
|
-
}
|
1615
|
-
};
|
1616
1504
|
const JobErrors = {
|
1617
1505
|
type: {
|
1618
1506
|
name: "Composite",
|
@@ -2033,25 +1921,6 @@ const PiiResult = {
|
|
2033
1921
|
} })
|
2034
1922
|
}
|
2035
1923
|
};
|
2036
|
-
const ExtractiveSummarizationResult = {
|
2037
|
-
type: {
|
2038
|
-
name: "Composite",
|
2039
|
-
className: "ExtractiveSummarizationResult",
|
2040
|
-
modelProperties: Object.assign(Object.assign({}, PreBuiltResult.type.modelProperties), { documents: {
|
2041
|
-
serializedName: "documents",
|
2042
|
-
required: true,
|
2043
|
-
type: {
|
2044
|
-
name: "Sequence",
|
2045
|
-
element: {
|
2046
|
-
type: {
|
2047
|
-
name: "Composite",
|
2048
|
-
className: "ExtractiveSummarizationResultDocumentsItem"
|
2049
|
-
}
|
2050
|
-
}
|
2051
|
-
}
|
2052
|
-
} })
|
2053
|
-
}
|
2054
|
-
};
|
2055
1924
|
const KeyPhraseResult = {
|
2056
1925
|
type: {
|
2057
1926
|
name: "Composite",
|
@@ -2109,29 +1978,10 @@ const CustomEntitiesResult = {
|
|
2109
1978
|
} })
|
2110
1979
|
}
|
2111
1980
|
};
|
2112
|
-
const
|
2113
|
-
type: {
|
2114
|
-
name: "Composite",
|
2115
|
-
className: "CustomSingleLabelClassificationResult",
|
2116
|
-
modelProperties: Object.assign(Object.assign({}, CustomResult.type.modelProperties), { documents: {
|
2117
|
-
serializedName: "documents",
|
2118
|
-
required: true,
|
2119
|
-
type: {
|
2120
|
-
name: "Sequence",
|
2121
|
-
element: {
|
2122
|
-
type: {
|
2123
|
-
name: "Composite",
|
2124
|
-
className: "CustomSingleLabelClassificationResultDocumentsItem"
|
2125
|
-
}
|
2126
|
-
}
|
2127
|
-
}
|
2128
|
-
} })
|
2129
|
-
}
|
2130
|
-
};
|
2131
|
-
const CustomMultiLabelClassificationResult = {
|
1981
|
+
const CustomLabelClassificationResult = {
|
2132
1982
|
type: {
|
2133
1983
|
name: "Composite",
|
2134
|
-
className: "
|
1984
|
+
className: "CustomLabelClassificationResult",
|
2135
1985
|
modelProperties: Object.assign(Object.assign({}, CustomResult.type.modelProperties), { documents: {
|
2136
1986
|
serializedName: "documents",
|
2137
1987
|
required: true,
|
@@ -2140,7 +1990,7 @@ const CustomMultiLabelClassificationResult = {
|
|
2140
1990
|
element: {
|
2141
1991
|
type: {
|
2142
1992
|
name: "Composite",
|
2143
|
-
className: "
|
1993
|
+
className: "CustomLabelClassificationResultDocumentsItem"
|
2144
1994
|
}
|
2145
1995
|
}
|
2146
1996
|
}
|
@@ -2166,24 +2016,11 @@ const EntitiesDocumentResult = {
|
|
2166
2016
|
} })
|
2167
2017
|
}
|
2168
2018
|
};
|
2169
|
-
const
|
2019
|
+
const ClassificationDocumentResult = {
|
2170
2020
|
type: {
|
2171
2021
|
name: "Composite",
|
2172
|
-
className: "
|
2173
|
-
modelProperties: Object.assign(Object.assign({}, DocumentResult.type.modelProperties), {
|
2174
|
-
serializedName: "class",
|
2175
|
-
type: {
|
2176
|
-
name: "Composite",
|
2177
|
-
className: "ClassificationCategory"
|
2178
|
-
}
|
2179
|
-
} })
|
2180
|
-
}
|
2181
|
-
};
|
2182
|
-
const MultiClassificationDocumentResult = {
|
2183
|
-
type: {
|
2184
|
-
name: "Composite",
|
2185
|
-
className: "MultiClassificationDocumentResult",
|
2186
|
-
modelProperties: Object.assign(Object.assign({}, DocumentResult.type.modelProperties), { classifications: {
|
2022
|
+
className: "ClassificationDocumentResult",
|
2023
|
+
modelProperties: Object.assign(Object.assign({}, DocumentResult.type.modelProperties), { class: {
|
2187
2024
|
serializedName: "class",
|
2188
2025
|
required: true,
|
2189
2026
|
type: {
|
@@ -2226,12 +2063,6 @@ const HealthcareEntitiesDocumentResult = {
|
|
2226
2063
|
}
|
2227
2064
|
}
|
2228
2065
|
}
|
2229
|
-
}, fhirBundle: {
|
2230
|
-
serializedName: "fhirBundle",
|
2231
|
-
type: {
|
2232
|
-
name: "Dictionary",
|
2233
|
-
value: { type: { name: "any" } }
|
2234
|
-
}
|
2235
2066
|
} })
|
2236
2067
|
}
|
2237
2068
|
};
|
@@ -2311,25 +2142,6 @@ const PiiEntitiesDocumentResult = {
|
|
2311
2142
|
} })
|
2312
2143
|
}
|
2313
2144
|
};
|
2314
|
-
const ExtractedSummaryDocumentResult = {
|
2315
|
-
type: {
|
2316
|
-
name: "Composite",
|
2317
|
-
className: "ExtractedSummaryDocumentResult",
|
2318
|
-
modelProperties: Object.assign(Object.assign({}, DocumentResult.type.modelProperties), { sentences: {
|
2319
|
-
serializedName: "sentences",
|
2320
|
-
required: true,
|
2321
|
-
type: {
|
2322
|
-
name: "Sequence",
|
2323
|
-
element: {
|
2324
|
-
type: {
|
2325
|
-
name: "Composite",
|
2326
|
-
className: "SummarySentence"
|
2327
|
-
}
|
2328
|
-
}
|
2329
|
-
}
|
2330
|
-
} })
|
2331
|
-
}
|
2332
|
-
};
|
2333
2145
|
const KeyPhrasesDocumentResult = {
|
2334
2146
|
type: {
|
2335
2147
|
name: "Composite",
|
@@ -2489,22 +2301,6 @@ const PiiLROTask = {
|
|
2489
2301
|
} })
|
2490
2302
|
}
|
2491
2303
|
};
|
2492
|
-
const ExtractiveSummarizationLROTask = {
|
2493
|
-
serializedName: "ExtractiveSummarization",
|
2494
|
-
type: {
|
2495
|
-
name: "Composite",
|
2496
|
-
className: "ExtractiveSummarizationLROTask",
|
2497
|
-
uberParent: "BatchActionState",
|
2498
|
-
polymorphicDiscriminator: BatchActionState.type.polymorphicDiscriminator,
|
2499
|
-
modelProperties: Object.assign(Object.assign({}, AnalyzeBatchAction.type.modelProperties), { parameters: {
|
2500
|
-
serializedName: "parameters",
|
2501
|
-
type: {
|
2502
|
-
name: "Composite",
|
2503
|
-
className: "ExtractiveSummarizationAction"
|
2504
|
-
}
|
2505
|
-
} })
|
2506
|
-
}
|
2507
|
-
};
|
2508
2304
|
const KeyPhraseLROTask = {
|
2509
2305
|
serializedName: "KeyPhraseExtraction",
|
2510
2306
|
type: {
|
@@ -2564,7 +2360,7 @@ const CustomSingleLabelClassificationLROResult = {
|
|
2564
2360
|
serializedName: "results",
|
2565
2361
|
type: {
|
2566
2362
|
name: "Composite",
|
2567
|
-
className: "
|
2363
|
+
className: "CustomLabelClassificationResult"
|
2568
2364
|
}
|
2569
2365
|
} })
|
2570
2366
|
}
|
@@ -2580,7 +2376,7 @@ const CustomMultiLabelClassificationLROResult = {
|
|
2580
2376
|
serializedName: "results",
|
2581
2377
|
type: {
|
2582
2378
|
name: "Composite",
|
2583
|
-
className: "
|
2379
|
+
className: "CustomLabelClassificationResult"
|
2584
2380
|
}
|
2585
2381
|
} })
|
2586
2382
|
}
|
@@ -2617,22 +2413,6 @@ const PiiEntityRecognitionLROResult = {
|
|
2617
2413
|
} })
|
2618
2414
|
}
|
2619
2415
|
};
|
2620
|
-
const ExtractiveSummarizationLROResult = {
|
2621
|
-
serializedName: "ExtractiveSummarizationLROResults",
|
2622
|
-
type: {
|
2623
|
-
name: "Composite",
|
2624
|
-
className: "ExtractiveSummarizationLROResult",
|
2625
|
-
uberParent: "TaskState",
|
2626
|
-
polymorphicDiscriminator: TaskState.type.polymorphicDiscriminator,
|
2627
|
-
modelProperties: Object.assign(Object.assign({}, AnalyzeTextLROResult.type.modelProperties), { results: {
|
2628
|
-
serializedName: "results",
|
2629
|
-
type: {
|
2630
|
-
name: "Composite",
|
2631
|
-
className: "ExtractiveSummarizationResult"
|
2632
|
-
}
|
2633
|
-
} })
|
2634
|
-
}
|
2635
|
-
};
|
2636
2416
|
const HealthcareLROResult = {
|
2637
2417
|
serializedName: "HealthcareLROResults",
|
2638
2418
|
type: {
|
@@ -2776,37 +2556,7 @@ const HealthcareAction = {
|
|
2776
2556
|
type: {
|
2777
2557
|
name: "Composite",
|
2778
2558
|
className: "HealthcareAction",
|
2779
|
-
modelProperties: Object.assign(Object.assign({}, ActionPrebuilt.type.modelProperties), {
|
2780
|
-
serializedName: "fhirVersion",
|
2781
|
-
type: {
|
2782
|
-
name: "String"
|
2783
|
-
}
|
2784
|
-
}, stringIndexType: {
|
2785
|
-
defaultValue: "Utf16CodeUnit",
|
2786
|
-
serializedName: "stringIndexType",
|
2787
|
-
type: {
|
2788
|
-
name: "String"
|
2789
|
-
}
|
2790
|
-
} })
|
2791
|
-
}
|
2792
|
-
};
|
2793
|
-
const ExtractiveSummarizationAction = {
|
2794
|
-
type: {
|
2795
|
-
name: "Composite",
|
2796
|
-
className: "ExtractiveSummarizationAction",
|
2797
|
-
modelProperties: Object.assign(Object.assign({}, ActionPrebuilt.type.modelProperties), { maxSentenceCount: {
|
2798
|
-
defaultValue: 3,
|
2799
|
-
serializedName: "sentenceCount",
|
2800
|
-
type: {
|
2801
|
-
name: "Number"
|
2802
|
-
}
|
2803
|
-
}, orderBy: {
|
2804
|
-
defaultValue: "Offset",
|
2805
|
-
serializedName: "sortBy",
|
2806
|
-
type: {
|
2807
|
-
name: "String"
|
2808
|
-
}
|
2809
|
-
}, stringIndexType: {
|
2559
|
+
modelProperties: Object.assign(Object.assign({}, ActionPrebuilt.type.modelProperties), { stringIndexType: {
|
2810
2560
|
defaultValue: "Utf16CodeUnit",
|
2811
2561
|
serializedName: "stringIndexType",
|
2812
2562
|
type: {
|
@@ -2856,18 +2606,11 @@ const EntitiesResultDocumentsItem = {
|
|
2856
2606
|
modelProperties: Object.assign({}, EntitiesDocumentResult.type.modelProperties)
|
2857
2607
|
}
|
2858
2608
|
};
|
2859
|
-
const
|
2609
|
+
const CustomLabelClassificationResultDocumentsItem = {
|
2860
2610
|
type: {
|
2861
2611
|
name: "Composite",
|
2862
|
-
className: "
|
2863
|
-
modelProperties: Object.assign({},
|
2864
|
-
}
|
2865
|
-
};
|
2866
|
-
const CustomMultiLabelClassificationResultDocumentsItem = {
|
2867
|
-
type: {
|
2868
|
-
name: "Composite",
|
2869
|
-
className: "CustomMultiLabelClassificationResultDocumentsItem",
|
2870
|
-
modelProperties: Object.assign({}, MultiClassificationDocumentResult.type.modelProperties)
|
2612
|
+
className: "CustomLabelClassificationResultDocumentsItem",
|
2613
|
+
modelProperties: Object.assign({}, ClassificationDocumentResult.type.modelProperties)
|
2871
2614
|
}
|
2872
2615
|
};
|
2873
2616
|
const HealthcareResultDocumentsItem = {
|
@@ -2898,13 +2641,6 @@ const PiiResultDocumentsItem = {
|
|
2898
2641
|
modelProperties: Object.assign({}, PiiEntitiesDocumentResult.type.modelProperties)
|
2899
2642
|
}
|
2900
2643
|
};
|
2901
|
-
const ExtractiveSummarizationResultDocumentsItem = {
|
2902
|
-
type: {
|
2903
|
-
name: "Composite",
|
2904
|
-
className: "ExtractiveSummarizationResultDocumentsItem",
|
2905
|
-
modelProperties: Object.assign({}, ExtractedSummaryDocumentResult.type.modelProperties)
|
2906
|
-
}
|
2907
|
-
};
|
2908
2644
|
const KeyPhraseResultDocumentsItem = {
|
2909
2645
|
type: {
|
2910
2646
|
name: "Composite",
|
@@ -2965,7 +2701,6 @@ let discriminators = {
|
|
2965
2701
|
"BatchActionState.EntityRecognition": EntitiesLROTask,
|
2966
2702
|
"BatchActionState.EntityLinking": EntityLinkingLROTask,
|
2967
2703
|
"BatchActionState.PiiEntityRecognition": PiiLROTask,
|
2968
|
-
"BatchActionState.ExtractiveSummarization": ExtractiveSummarizationLROTask,
|
2969
2704
|
"BatchActionState.KeyPhraseExtraction": KeyPhraseLROTask,
|
2970
2705
|
"TaskState.EntityRecognitionLROResults": EntityRecognitionLROResult,
|
2971
2706
|
"TaskState.CustomEntityRecognitionLROResults": CustomEntityRecognitionLROResult,
|
@@ -2973,7 +2708,6 @@ let discriminators = {
|
|
2973
2708
|
"TaskState.CustomMultiLabelClassificationLROResults": CustomMultiLabelClassificationLROResult,
|
2974
2709
|
"TaskState.EntityLinkingLROResults": EntityLinkingLROResult,
|
2975
2710
|
"TaskState.PiiEntityRecognitionLROResults": PiiEntityRecognitionLROResult,
|
2976
|
-
"TaskState.ExtractiveSummarizationLROResults": ExtractiveSummarizationLROResult,
|
2977
2711
|
"TaskState.HealthcareLROResults": HealthcareLROResult,
|
2978
2712
|
"TaskState.SentimentAnalysisLROResults": SentimentLROResult,
|
2979
2713
|
"TaskState.KeyPhraseExtractionLROResults": KeyPhraseExtractionLROResult
|
@@ -3020,10 +2754,8 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
3020
2754
|
AssessmentSentiment: AssessmentSentiment,
|
3021
2755
|
LinkedEntity: LinkedEntity,
|
3022
2756
|
Match: Match,
|
3023
|
-
SummarySentence: SummarySentence,
|
3024
2757
|
DetectedLanguage: DetectedLanguage,
|
3025
2758
|
Pagination: Pagination,
|
3026
|
-
JobMetadata: JobMetadata,
|
3027
2759
|
JobErrors: JobErrors,
|
3028
2760
|
AnalyzeTextEntityLinkingInput: AnalyzeTextEntityLinkingInput,
|
3029
2761
|
AnalyzeTextEntityRecognitionInput: AnalyzeTextEntityRecognitionInput,
|
@@ -3047,20 +2779,16 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
3047
2779
|
EntitiesResult: EntitiesResult,
|
3048
2780
|
EntityLinkingResult: EntityLinkingResult,
|
3049
2781
|
PiiResult: PiiResult,
|
3050
|
-
ExtractiveSummarizationResult: ExtractiveSummarizationResult,
|
3051
2782
|
KeyPhraseResult: KeyPhraseResult,
|
3052
2783
|
LanguageDetectionResult: LanguageDetectionResult,
|
3053
2784
|
CustomEntitiesResult: CustomEntitiesResult,
|
3054
|
-
|
3055
|
-
CustomMultiLabelClassificationResult: CustomMultiLabelClassificationResult,
|
2785
|
+
CustomLabelClassificationResult: CustomLabelClassificationResult,
|
3056
2786
|
EntitiesDocumentResult: EntitiesDocumentResult,
|
3057
|
-
|
3058
|
-
MultiClassificationDocumentResult: MultiClassificationDocumentResult,
|
2787
|
+
ClassificationDocumentResult: ClassificationDocumentResult,
|
3059
2788
|
HealthcareEntitiesDocumentResult: HealthcareEntitiesDocumentResult,
|
3060
2789
|
SentimentDocumentResult: SentimentDocumentResult,
|
3061
2790
|
LinkedEntitiesDocumentResult: LinkedEntitiesDocumentResult,
|
3062
2791
|
PiiEntitiesDocumentResult: PiiEntitiesDocumentResult,
|
3063
|
-
ExtractedSummaryDocumentResult: ExtractedSummaryDocumentResult,
|
3064
2792
|
KeyPhrasesDocumentResult: KeyPhrasesDocumentResult,
|
3065
2793
|
LanguageDetectionDocumentResult: LanguageDetectionDocumentResult,
|
3066
2794
|
CustomEntitiesLROTask: CustomEntitiesLROTask,
|
@@ -3071,7 +2799,6 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
3071
2799
|
EntitiesLROTask: EntitiesLROTask,
|
3072
2800
|
EntityLinkingLROTask: EntityLinkingLROTask,
|
3073
2801
|
PiiLROTask: PiiLROTask,
|
3074
|
-
ExtractiveSummarizationLROTask: ExtractiveSummarizationLROTask,
|
3075
2802
|
KeyPhraseLROTask: KeyPhraseLROTask,
|
3076
2803
|
EntityRecognitionLROResult: EntityRecognitionLROResult,
|
3077
2804
|
CustomEntityRecognitionLROResult: CustomEntityRecognitionLROResult,
|
@@ -3079,7 +2806,6 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
3079
2806
|
CustomMultiLabelClassificationLROResult: CustomMultiLabelClassificationLROResult,
|
3080
2807
|
EntityLinkingLROResult: EntityLinkingLROResult,
|
3081
2808
|
PiiEntityRecognitionLROResult: PiiEntityRecognitionLROResult,
|
3082
|
-
ExtractiveSummarizationLROResult: ExtractiveSummarizationLROResult,
|
3083
2809
|
HealthcareLROResult: HealthcareLROResult,
|
3084
2810
|
SentimentLROResult: SentimentLROResult,
|
3085
2811
|
KeyPhraseExtractionLROResult: KeyPhraseExtractionLROResult,
|
@@ -3090,19 +2816,16 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
3090
2816
|
LanguageDetectionAction: LanguageDetectionAction,
|
3091
2817
|
SentimentAnalysisAction: SentimentAnalysisAction,
|
3092
2818
|
HealthcareAction: HealthcareAction,
|
3093
|
-
ExtractiveSummarizationAction: ExtractiveSummarizationAction,
|
3094
2819
|
CustomEntityRecognitionAction: CustomEntityRecognitionAction,
|
3095
2820
|
CustomSingleLabelClassificationAction: CustomSingleLabelClassificationAction,
|
3096
2821
|
CustomMultiLabelClassificationAction: CustomMultiLabelClassificationAction,
|
3097
2822
|
CustomEntitiesResultDocumentsItem: CustomEntitiesResultDocumentsItem,
|
3098
2823
|
EntitiesResultDocumentsItem: EntitiesResultDocumentsItem,
|
3099
|
-
|
3100
|
-
CustomMultiLabelClassificationResultDocumentsItem: CustomMultiLabelClassificationResultDocumentsItem,
|
2824
|
+
CustomLabelClassificationResultDocumentsItem: CustomLabelClassificationResultDocumentsItem,
|
3101
2825
|
HealthcareResultDocumentsItem: HealthcareResultDocumentsItem,
|
3102
2826
|
SentimentResponseDocumentsItem: SentimentResponseDocumentsItem,
|
3103
2827
|
EntityLinkingResultDocumentsItem: EntityLinkingResultDocumentsItem,
|
3104
2828
|
PiiResultDocumentsItem: PiiResultDocumentsItem,
|
3105
|
-
ExtractiveSummarizationResultDocumentsItem: ExtractiveSummarizationResultDocumentsItem,
|
3106
2829
|
KeyPhraseResultDocumentsItem: KeyPhraseResultDocumentsItem,
|
3107
2830
|
AnalyzeTextSubmitJobHeaders: AnalyzeTextSubmitJobHeaders,
|
3108
2831
|
AnalyzeTextCancelJobHeaders: AnalyzeTextCancelJobHeaders,
|
@@ -3156,7 +2879,7 @@ const endpoint = {
|
|
3156
2879
|
const apiVersion = {
|
3157
2880
|
parameterPath: "apiVersion",
|
3158
2881
|
mapper: {
|
3159
|
-
defaultValue: "2022-
|
2882
|
+
defaultValue: "2022-05-01",
|
3160
2883
|
isConstant: true,
|
3161
2884
|
serializedName: "api-version",
|
3162
2885
|
type: {
|
@@ -3227,31 +2950,31 @@ function makeTextAnalysisErrorResult(id, error) {
|
|
3227
2950
|
/**
|
3228
2951
|
* combines successful and erroneous results into a single array of results and
|
3229
2952
|
* sort them so that the IDs order match that of the input documents array.
|
3230
|
-
* @param
|
2953
|
+
* @param ids - the array of input document IDs.
|
3231
2954
|
* @param response - the response received from the service.
|
3232
2955
|
* @param options - an options bag that includes functions to process the results.
|
3233
2956
|
*/
|
3234
|
-
function transformDocumentResults(
|
2957
|
+
function transformDocumentResults(ids, response, options) {
|
3235
2958
|
const { processError = makeTextAnalysisErrorResult, processSuccess } = options || {};
|
3236
2959
|
const successResults = processSuccess
|
3237
2960
|
? response.documents.map(processSuccess)
|
3238
2961
|
: response.documents;
|
3239
2962
|
const unsortedResults = successResults.concat(response.errors.map((error) => processError(error.id, error.error)));
|
3240
|
-
return sortResponseIdObjects(
|
2963
|
+
return sortResponseIdObjects(ids, unsortedResults);
|
3241
2964
|
}
|
3242
|
-
function toLanguageDetectionResult(
|
3243
|
-
return transformDocumentResults(
|
2965
|
+
function toLanguageDetectionResult(docIds, results) {
|
2966
|
+
return transformDocumentResults(docIds, results, {
|
3244
2967
|
processSuccess: (_a) => {
|
3245
2968
|
var { detectedLanguage } = _a, rest = tslib.__rest(_a, ["detectedLanguage"]);
|
3246
2969
|
return (Object.assign({ primaryLanguage: detectedLanguage }, rest));
|
3247
2970
|
},
|
3248
2971
|
});
|
3249
2972
|
}
|
3250
|
-
function toPiiEntityRecognitionResult(
|
3251
|
-
return transformDocumentResults(
|
2973
|
+
function toPiiEntityRecognitionResult(docIds, results) {
|
2974
|
+
return transformDocumentResults(docIds, results);
|
3252
2975
|
}
|
3253
|
-
function toSentimentAnalysisResult(
|
3254
|
-
return transformDocumentResults(
|
2976
|
+
function toSentimentAnalysisResult(docIds, results) {
|
2977
|
+
return transformDocumentResults(docIds, results, {
|
3255
2978
|
processSuccess: (_a) => {
|
3256
2979
|
var { sentences } = _a, rest = tslib.__rest(_a, ["sentences"]);
|
3257
2980
|
return (Object.assign(Object.assign({}, rest), { sentences: sentences.map((sentence) => convertGeneratedSentenceSentiment(sentence, sentences)) }));
|
@@ -3304,37 +3027,37 @@ function convertTargetRelationToAssessmentSentiment(targetRelation, sentences) {
|
|
3304
3027
|
throw new Error(`Pointer "${assessmentPtr}" is not a valid Assessment pointer`);
|
3305
3028
|
}
|
3306
3029
|
}
|
3307
|
-
function toEntityLinkingResult(
|
3308
|
-
return transformDocumentResults(
|
3030
|
+
function toEntityLinkingResult(docIds, results) {
|
3031
|
+
return transformDocumentResults(docIds, results);
|
3309
3032
|
}
|
3310
|
-
function toKeyPhraseExtractionResult(
|
3311
|
-
return transformDocumentResults(
|
3033
|
+
function toKeyPhraseExtractionResult(docIds, results) {
|
3034
|
+
return transformDocumentResults(docIds, results);
|
3312
3035
|
}
|
3313
|
-
function toEntityRecognitionResult(
|
3314
|
-
return transformDocumentResults(
|
3036
|
+
function toEntityRecognitionResult(docIds, results) {
|
3037
|
+
return transformDocumentResults(docIds, results);
|
3315
3038
|
}
|
3316
3039
|
/**
|
3317
3040
|
* @internal
|
3318
3041
|
*/
|
3319
|
-
function transformActionResult(actionName,
|
3042
|
+
function transformActionResult(actionName, docIds, response) {
|
3320
3043
|
switch (response.kind) {
|
3321
3044
|
case "EntityLinkingResults": {
|
3322
|
-
return toEntityLinkingResult(
|
3045
|
+
return toEntityLinkingResult(docIds, response.results);
|
3323
3046
|
}
|
3324
3047
|
case "EntityRecognitionResults": {
|
3325
|
-
return toEntityRecognitionResult(
|
3048
|
+
return toEntityRecognitionResult(docIds, response.results);
|
3326
3049
|
}
|
3327
3050
|
case "KeyPhraseExtractionResults": {
|
3328
|
-
return toKeyPhraseExtractionResult(
|
3051
|
+
return toKeyPhraseExtractionResult(docIds, response.results);
|
3329
3052
|
}
|
3330
3053
|
case "PiiEntityRecognitionResults": {
|
3331
|
-
return toPiiEntityRecognitionResult(
|
3054
|
+
return toPiiEntityRecognitionResult(docIds, response.results);
|
3332
3055
|
}
|
3333
3056
|
case "SentimentAnalysisResults": {
|
3334
|
-
return toSentimentAnalysisResult(
|
3057
|
+
return toSentimentAnalysisResult(docIds, response.results);
|
3335
3058
|
}
|
3336
3059
|
case "LanguageDetectionResults": {
|
3337
|
-
return toLanguageDetectionResult(
|
3060
|
+
return toLanguageDetectionResult(docIds, response.results);
|
3338
3061
|
}
|
3339
3062
|
default: {
|
3340
3063
|
const __exhaust = response;
|
@@ -3392,7 +3115,7 @@ async function throwError(p) {
|
|
3392
3115
|
throw transformError(e);
|
3393
3116
|
}
|
3394
3117
|
}
|
3395
|
-
function toHealthcareResult(
|
3118
|
+
function toHealthcareResult(docIds, results) {
|
3396
3119
|
function makeHealthcareEntity(entity) {
|
3397
3120
|
const { dataSources } = entity, rest = tslib.__rest(entity, ["dataSources"]);
|
3398
3121
|
return Object.assign({ dataSources: dataSources !== null && dataSources !== void 0 ? dataSources : [] }, rest);
|
@@ -3406,7 +3129,7 @@ function toHealthcareResult(documents, results) {
|
|
3406
3129
|
})),
|
3407
3130
|
});
|
3408
3131
|
}
|
3409
|
-
return transformDocumentResults(
|
3132
|
+
return transformDocumentResults(docIds, results, {
|
3410
3133
|
processSuccess: (_a) => {
|
3411
3134
|
var { entities, relations } = _a, rest = tslib.__rest(_a, ["entities", "relations"]);
|
3412
3135
|
const newEntities = entities.map(makeHealthcareEntity);
|
@@ -3414,74 +3137,69 @@ function toHealthcareResult(documents, results) {
|
|
3414
3137
|
},
|
3415
3138
|
});
|
3416
3139
|
}
|
3417
|
-
function toCustomSingleLabelClassificationResult(
|
3418
|
-
return transformDocumentResults(
|
3140
|
+
function toCustomSingleLabelClassificationResult(docIds, results) {
|
3141
|
+
return transformDocumentResults(docIds, results, {
|
3419
3142
|
processSuccess: (_a) => {
|
3420
|
-
var { classification } = _a, rest = tslib.__rest(_a, ["
|
3421
|
-
return Object.assign({ classifications:
|
3143
|
+
var { class: classification } = _a, rest = tslib.__rest(_a, ["class"]);
|
3144
|
+
return Object.assign({ classifications: classification }, rest);
|
3422
3145
|
},
|
3423
3146
|
});
|
3424
3147
|
}
|
3425
3148
|
/**
|
3426
3149
|
* @internal
|
3427
3150
|
*/
|
3428
|
-
function transformAnalyzeBatchResults(
|
3151
|
+
function transformAnalyzeBatchResults(docIds, response = []) {
|
3429
3152
|
return response.map((actionData) => {
|
3430
3153
|
const { lastUpdateDateTime: completedOn, actionName, kind } = actionData;
|
3431
3154
|
switch (kind) {
|
3432
3155
|
case "SentimentAnalysisLROResults": {
|
3433
3156
|
const { results } = actionData;
|
3434
3157
|
const { modelVersion, statistics } = results;
|
3435
|
-
return Object.assign(Object.assign(Object.assign({ kind: "SentimentAnalysis", results: toSentimentAnalysisResult(
|
3158
|
+
return Object.assign(Object.assign(Object.assign({ kind: "SentimentAnalysis", results: toSentimentAnalysisResult(docIds, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { modelVersion });
|
3436
3159
|
}
|
3437
3160
|
case "EntityRecognitionLROResults": {
|
3438
3161
|
const { results } = actionData;
|
3439
3162
|
const { modelVersion, statistics } = results;
|
3440
|
-
return Object.assign(Object.assign(Object.assign({ kind: "EntityRecognition", results: toEntityRecognitionResult(
|
3163
|
+
return Object.assign(Object.assign(Object.assign({ kind: "EntityRecognition", results: toEntityRecognitionResult(docIds, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { modelVersion });
|
3441
3164
|
}
|
3442
3165
|
case "PiiEntityRecognitionLROResults": {
|
3443
3166
|
const { results } = actionData;
|
3444
3167
|
const { modelVersion, statistics } = results;
|
3445
|
-
return Object.assign(Object.assign(Object.assign({ kind: "PiiEntityRecognition", results: toPiiEntityRecognitionResult(
|
3168
|
+
return Object.assign(Object.assign(Object.assign({ kind: "PiiEntityRecognition", results: toPiiEntityRecognitionResult(docIds, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { modelVersion });
|
3446
3169
|
}
|
3447
3170
|
case "KeyPhraseExtractionLROResults": {
|
3448
3171
|
const { results } = actionData;
|
3449
3172
|
const { modelVersion, statistics } = results;
|
3450
|
-
return Object.assign(Object.assign(Object.assign({ kind: "KeyPhraseExtraction", results: toKeyPhraseExtractionResult(
|
3173
|
+
return Object.assign(Object.assign(Object.assign({ kind: "KeyPhraseExtraction", results: toKeyPhraseExtractionResult(docIds, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { modelVersion });
|
3451
3174
|
}
|
3452
3175
|
case "EntityLinkingLROResults": {
|
3453
3176
|
const { results } = actionData;
|
3454
3177
|
const { modelVersion, statistics } = results;
|
3455
|
-
return Object.assign(Object.assign(Object.assign({ kind: "EntityLinking", results: toEntityLinkingResult(
|
3178
|
+
return Object.assign(Object.assign(Object.assign({ kind: "EntityLinking", results: toEntityLinkingResult(docIds, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { modelVersion });
|
3456
3179
|
}
|
3457
3180
|
case "HealthcareLROResults": {
|
3458
3181
|
const { results } = actionData;
|
3459
3182
|
const { modelVersion, statistics } = results;
|
3460
|
-
return Object.assign(Object.assign(Object.assign({ kind: "Healthcare", results: toHealthcareResult(
|
3183
|
+
return Object.assign(Object.assign(Object.assign({ kind: "Healthcare", results: toHealthcareResult(docIds, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { modelVersion });
|
3461
3184
|
}
|
3462
3185
|
case "CustomEntityRecognitionLROResults": {
|
3463
3186
|
const { results } = actionData;
|
3464
3187
|
const { deploymentName, projectName, statistics } = results;
|
3465
|
-
return Object.assign(Object.assign(Object.assign({ kind: "CustomEntityRecognition", results: transformDocumentResults(
|
3188
|
+
return Object.assign(Object.assign(Object.assign({ kind: "CustomEntityRecognition", results: transformDocumentResults(docIds, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { deploymentName,
|
3466
3189
|
projectName });
|
3467
3190
|
}
|
3468
3191
|
case "CustomSingleLabelClassificationLROResults": {
|
3469
3192
|
const { results } = actionData;
|
3470
3193
|
const { deploymentName, projectName, statistics } = results;
|
3471
|
-
return Object.assign(Object.assign(Object.assign({ kind: "CustomSingleLabelClassification", results: toCustomSingleLabelClassificationResult(
|
3194
|
+
return Object.assign(Object.assign(Object.assign({ kind: "CustomSingleLabelClassification", results: toCustomSingleLabelClassificationResult(docIds, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { deploymentName,
|
3472
3195
|
projectName });
|
3473
3196
|
}
|
3474
3197
|
case "CustomMultiLabelClassificationLROResults": {
|
3475
3198
|
const { results } = actionData;
|
3476
3199
|
const { deploymentName, projectName, statistics } = results;
|
3477
|
-
return Object.assign(Object.assign(Object.assign({ kind: "CustomMultiLabelClassification", results:
|
3200
|
+
return Object.assign(Object.assign(Object.assign({ kind: "CustomMultiLabelClassification", results: toCustomSingleLabelClassificationResult(docIds, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { deploymentName,
|
3478
3201
|
projectName });
|
3479
3202
|
}
|
3480
|
-
case "ExtractiveSummarizationLROResults": {
|
3481
|
-
const { results } = actionData;
|
3482
|
-
const { modelVersion, statistics } = results;
|
3483
|
-
return Object.assign(Object.assign(Object.assign({ kind: "ExtractiveSummarization", results: transformDocumentResults(documents, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { modelVersion });
|
3484
|
-
}
|
3485
3203
|
default: {
|
3486
3204
|
throw new Error(`Unsupported results kind: ${kind}`);
|
3487
3205
|
}
|
@@ -3507,7 +3225,7 @@ const jobStatusOperationSpec$1 = {
|
|
3507
3225
|
};
|
3508
3226
|
async function getRawResponse(getResponse, options) {
|
3509
3227
|
const { onResponse } = options || {};
|
3510
|
-
let rawResponse
|
3228
|
+
let rawResponse;
|
3511
3229
|
const flatResponse = await getResponse(Object.assign(Object.assign({}, options), { onResponse: (response, flatResponseParam) => {
|
3512
3230
|
rawResponse = response;
|
3513
3231
|
onResponse === null || onResponse === void 0 ? void 0 : onResponse(response, flatResponseParam);
|
@@ -3548,8 +3266,6 @@ function createSendPollRequest(settings) {
|
|
3548
3266
|
function createAnalyzeBatchLro(settings) {
|
3549
3267
|
const { client, commonOptions, documents, initialRequestOptions, pollRequestOptions, tasks, tracing, } = settings;
|
3550
3268
|
return {
|
3551
|
-
requestMethod: "POST",
|
3552
|
-
requestPath: "/analyze-text/jobs",
|
3553
3269
|
async sendInitialRequest() {
|
3554
3270
|
return tracing.withSpan(`${clientName}.beginAnalyzeBatch`, Object.assign(Object.assign({}, commonOptions), initialRequestOptions), async (finalOptions) => throwError(getRawResponse((paramOptions) => client.analyzeText.submitJob({
|
3555
3271
|
tasks,
|
@@ -3570,13 +3286,13 @@ function createAnalyzeBatchLro(settings) {
|
|
3570
3286
|
/**
|
3571
3287
|
* @internal
|
3572
3288
|
*/
|
3573
|
-
function
|
3289
|
+
function getDocIDsFromState(serializedState) {
|
3574
3290
|
try {
|
3575
|
-
const {
|
3576
|
-
return
|
3291
|
+
const { docIds } = JSON.parse(serializedState).state;
|
3292
|
+
return docIds;
|
3577
3293
|
}
|
3578
3294
|
catch (e) {
|
3579
|
-
logger.error(`
|
3295
|
+
logger.error(`Document IDs are not found in the LRO's state. The results may not be ordered correctly.`);
|
3580
3296
|
return [];
|
3581
3297
|
}
|
3582
3298
|
}
|
@@ -3586,8 +3302,6 @@ function getDocsFromState(serializedState) {
|
|
3586
3302
|
function createCreateAnalyzeBatchPollerLro(settings) {
|
3587
3303
|
const { client, options, tracing } = settings;
|
3588
3304
|
return {
|
3589
|
-
requestMethod: "POST",
|
3590
|
-
requestPath: "/analyze-text/jobs",
|
3591
3305
|
async sendInitialRequest() {
|
3592
3306
|
throw new Error(`The operation has already started`);
|
3593
3307
|
},
|
@@ -3603,9 +3317,9 @@ function createCreateAnalyzeBatchPollerLro(settings) {
|
|
3603
3317
|
* @internal
|
3604
3318
|
*/
|
3605
3319
|
function processAnalyzeResult(options) {
|
3606
|
-
return (
|
3607
|
-
const { client,
|
3608
|
-
const pageURL =
|
3320
|
+
return () => {
|
3321
|
+
const { client, docIds, opOptions, tracing, state } = options;
|
3322
|
+
const pageURL = state.continuationToken;
|
3609
3323
|
const pagedResult = {
|
3610
3324
|
firstPageLink: pageURL,
|
3611
3325
|
getPage: async (pageLink, maxPageSize) => {
|
@@ -3621,7 +3335,7 @@ function processAnalyzeResult(options) {
|
|
3621
3335
|
});
|
3622
3336
|
const flatResponse = response.flatResponse;
|
3623
3337
|
return {
|
3624
|
-
page: transformAnalyzeBatchResults(
|
3338
|
+
page: transformAnalyzeBatchResults(docIds, flatResponse.tasks.items),
|
3625
3339
|
nextPageLink: flatResponse.nextLink,
|
3626
3340
|
};
|
3627
3341
|
},
|
@@ -3632,32 +3346,31 @@ function processAnalyzeResult(options) {
|
|
3632
3346
|
/**
|
3633
3347
|
* @internal
|
3634
3348
|
*/
|
3635
|
-
function createUpdateAnalyzeState(
|
3349
|
+
function createUpdateAnalyzeState(docIds) {
|
3636
3350
|
return (state, lastResponse) => {
|
3637
|
-
const { createdOn, modifiedOn, id,
|
3351
|
+
const { createdOn, modifiedOn, id, displayName, expiresOn, tasks } = lastResponse.flatResponse;
|
3638
3352
|
const mutableState = state;
|
3639
3353
|
mutableState.createdOn = createdOn;
|
3640
3354
|
mutableState.modifiedOn = modifiedOn;
|
3641
3355
|
mutableState.expiresOn = expiresOn;
|
3642
3356
|
mutableState.displayName = displayName;
|
3643
3357
|
mutableState.id = id;
|
3644
|
-
mutableState.status = status;
|
3645
3358
|
mutableState.actionSucceededCount = tasks.completed;
|
3646
3359
|
mutableState.actionFailedCount = tasks.failed;
|
3647
3360
|
mutableState.actionInProgressCount = tasks.inProgress;
|
3648
|
-
if (mutableState.
|
3649
|
-
mutableState.
|
3361
|
+
if (mutableState.docIds === undefined && docIds !== undefined) {
|
3362
|
+
mutableState.docIds = docIds;
|
3650
3363
|
}
|
3651
3364
|
};
|
3652
3365
|
}
|
3653
3366
|
/**
|
3654
3367
|
* @internal
|
3655
3368
|
*/
|
3656
|
-
function
|
3657
|
-
|
3658
|
-
|
3659
|
-
|
3660
|
-
|
3369
|
+
function createPollerWithCancellation(settings) {
|
3370
|
+
const { client, options, poller, id, tracing } = settings;
|
3371
|
+
return Object.assign(Object.assign({}, poller), { sendCancellationRequest: async () => {
|
3372
|
+
await tracing.withSpan(`${clientName}.beginAnalyzeBatch`, options, async (finalOptions) => throwError(getRawResponse((paramOptions) => client.analyzeText.cancelJob(id, paramOptions), finalOptions)));
|
3373
|
+
} });
|
3661
3374
|
}
|
3662
3375
|
|
3663
3376
|
/*
|
@@ -3789,7 +3502,7 @@ class GeneratedClient extends coreClient__namespace.ServiceClient {
|
|
3789
3502
|
const defaults = {
|
3790
3503
|
requestContentType: "application/json; charset=utf-8"
|
3791
3504
|
};
|
3792
|
-
const packageDetails = `azsdk-js-ai-language-text/1.0.0
|
3505
|
+
const packageDetails = `azsdk-js-ai-language-text/1.0.0`;
|
3793
3506
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
3794
3507
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
3795
3508
|
: `${packageDetails}`;
|
@@ -3816,7 +3529,7 @@ class GeneratedClient extends coreClient__namespace.ServiceClient {
|
|
3816
3529
|
// Parameter assignments
|
3817
3530
|
this.endpoint = endpoint;
|
3818
3531
|
// Assigning values to Constant parameters
|
3819
|
-
this.apiVersion = options.apiVersion || "2022-
|
3532
|
+
this.apiVersion = options.apiVersion || "2022-05-01";
|
3820
3533
|
this.analyzeText = new AnalyzeTextImpl(this);
|
3821
3534
|
this.addCustomApiVersionPolicy(options.apiVersion);
|
3822
3535
|
}
|
@@ -3938,15 +3651,15 @@ function textAnalyticsAzureKeyCredentialPolicy(credential) {
|
|
3938
3651
|
*/
|
3939
3652
|
class TextAnalysisClient {
|
3940
3653
|
constructor(endpointUrl, credential, options = {}) {
|
3941
|
-
const { defaultCountryHint = "us", defaultLanguage = "en" } = options, pipelineOptions = tslib.__rest(options, ["defaultCountryHint", "defaultLanguage"]);
|
3654
|
+
const { defaultCountryHint = "us", defaultLanguage = "en", serviceVersion } = options, pipelineOptions = tslib.__rest(options, ["defaultCountryHint", "defaultLanguage", "serviceVersion"]);
|
3942
3655
|
this.defaultCountryHint = defaultCountryHint;
|
3943
3656
|
this.defaultLanguage = defaultLanguage;
|
3944
|
-
const internalPipelineOptions = Object.assign(Object.assign({}, pipelineOptions), {
|
3657
|
+
const internalPipelineOptions = Object.assign(Object.assign(Object.assign({}, pipelineOptions), {
|
3945
3658
|
loggingOptions: {
|
3946
3659
|
logger: logger.info,
|
3947
3660
|
additionalAllowedHeaderNames: ["x-ms-correlation-request-id", "x-ms-request-id"],
|
3948
3661
|
},
|
3949
|
-
});
|
3662
|
+
}), { apiVersion: serviceVersion });
|
3950
3663
|
this._client = new GeneratedClient(endpointUrl, internalPipelineOptions);
|
3951
3664
|
const authPolicy = coreAuth.isTokenCredential(credential)
|
3952
3665
|
? coreRestPipeline.bearerTokenAuthenticationPolicy({ credential, scopes: DEFAULT_COGNITIVE_SCOPE })
|
@@ -3992,7 +3705,7 @@ class TextAnalysisClient {
|
|
3992
3705
|
},
|
3993
3706
|
parameters: action,
|
3994
3707
|
}, updatedOptions)
|
3995
|
-
.then((result) => transformActionResult(actionName, realInputs, result))));
|
3708
|
+
.then((result) => transformActionResult(actionName, realInputs.map(({ id }) => id), result))));
|
3996
3709
|
}
|
3997
3710
|
// implementation
|
3998
3711
|
async beginAnalyzeBatch(actions, documents, languageOrOptions, options = {}) {
|
@@ -4028,51 +3741,66 @@ class TextAnalysisClient {
|
|
4028
3741
|
tasks: realActions,
|
4029
3742
|
tracing: this._tracing,
|
4030
3743
|
});
|
4031
|
-
const
|
3744
|
+
const docIds = realInputs.map(({ id }) => id);
|
3745
|
+
const state = { continuationToken: "" };
|
3746
|
+
const poller = await coreLro.createHttpPoller(lro, {
|
4032
3747
|
intervalInMs: updateIntervalInMs,
|
4033
3748
|
processResult: processAnalyzeResult({
|
4034
3749
|
client: this._client,
|
4035
3750
|
tracing: this._tracing,
|
4036
|
-
|
3751
|
+
docIds,
|
4037
3752
|
opOptions: Object.assign(Object.assign({}, rest), { includeStatistics }),
|
3753
|
+
state,
|
4038
3754
|
}),
|
4039
|
-
updateState: createUpdateAnalyzeState(
|
4040
|
-
|
4041
|
-
|
4042
|
-
|
4043
|
-
options: rest,
|
4044
|
-
}),
|
3755
|
+
updateState: createUpdateAnalyzeState(docIds),
|
3756
|
+
withOperationLocation(operationLocation) {
|
3757
|
+
state.continuationToken = operationLocation;
|
3758
|
+
},
|
4045
3759
|
});
|
4046
3760
|
await poller.poll();
|
4047
|
-
|
3761
|
+
const id = poller.getOperationState().id;
|
3762
|
+
return createPollerWithCancellation({
|
3763
|
+
id,
|
3764
|
+
client: this._client,
|
3765
|
+
options,
|
3766
|
+
poller,
|
3767
|
+
tracing: this._tracing,
|
3768
|
+
});
|
4048
3769
|
}
|
4049
3770
|
// implementation
|
4050
3771
|
async restoreAnalyzeBatchPoller(serializedState, options = {}) {
|
4051
3772
|
const { includeStatistics, updateIntervalInMs } = options, rest = tslib.__rest(options, ["includeStatistics", "updateIntervalInMs"]);
|
4052
|
-
const
|
3773
|
+
const docIds = getDocIDsFromState(serializedState);
|
4053
3774
|
const lro = createCreateAnalyzeBatchPollerLro({
|
4054
3775
|
client: this._client,
|
4055
3776
|
options: Object.assign(Object.assign({}, rest), { includeStatistics }),
|
4056
3777
|
tracing: this._tracing,
|
4057
3778
|
});
|
4058
|
-
const
|
3779
|
+
const state = { continuationToken: "" };
|
3780
|
+
const poller = await coreLro.createHttpPoller(lro, {
|
4059
3781
|
intervalInMs: updateIntervalInMs,
|
4060
|
-
|
3782
|
+
restoreFrom: serializedState,
|
4061
3783
|
processResult: processAnalyzeResult({
|
4062
3784
|
client: this._client,
|
4063
3785
|
tracing: this._tracing,
|
4064
|
-
|
3786
|
+
docIds,
|
4065
3787
|
opOptions: Object.assign(Object.assign({}, rest), { includeStatistics }),
|
3788
|
+
state,
|
4066
3789
|
}),
|
4067
3790
|
updateState: createUpdateAnalyzeState(),
|
4068
|
-
|
4069
|
-
|
4070
|
-
|
4071
|
-
options: rest,
|
4072
|
-
}),
|
3791
|
+
withOperationLocation(operationLocation) {
|
3792
|
+
state.continuationToken = operationLocation;
|
3793
|
+
},
|
4073
3794
|
});
|
4074
3795
|
await poller.poll();
|
4075
|
-
|
3796
|
+
const id = poller.getOperationState().id;
|
3797
|
+
return createPollerWithCancellation({
|
3798
|
+
id,
|
3799
|
+
client: this._client,
|
3800
|
+
options,
|
3801
|
+
poller,
|
3802
|
+
tracing: this._tracing,
|
3803
|
+
});
|
4076
3804
|
}
|
4077
3805
|
}
|
4078
3806
|
|
@@ -4146,6 +3874,14 @@ exports.KnownErrorCode = void 0;
|
|
4146
3874
|
KnownErrorCode["InternalServerError"] = "InternalServerError";
|
4147
3875
|
/** ServiceUnavailable */
|
4148
3876
|
KnownErrorCode["ServiceUnavailable"] = "ServiceUnavailable";
|
3877
|
+
/** Timeout */
|
3878
|
+
KnownErrorCode["Timeout"] = "Timeout";
|
3879
|
+
/** QuotaExceeded */
|
3880
|
+
KnownErrorCode["QuotaExceeded"] = "QuotaExceeded";
|
3881
|
+
/** Conflict */
|
3882
|
+
KnownErrorCode["Conflict"] = "Conflict";
|
3883
|
+
/** Warning */
|
3884
|
+
KnownErrorCode["Warning"] = "Warning";
|
4149
3885
|
})(exports.KnownErrorCode || (exports.KnownErrorCode = {}));
|
4150
3886
|
/** Known values of {@link InnerErrorCode} that the service accepts. */
|
4151
3887
|
exports.KnownInnerErrorCode = void 0;
|
@@ -4194,8 +3930,6 @@ var KnownAnalyzeTextLROTaskKind;
|
|
4194
3930
|
KnownAnalyzeTextLROTaskKind["EntityLinking"] = "EntityLinking";
|
4195
3931
|
/** Healthcare */
|
4196
3932
|
KnownAnalyzeTextLROTaskKind["Healthcare"] = "Healthcare";
|
4197
|
-
/** ExtractiveSummarization */
|
4198
|
-
KnownAnalyzeTextLROTaskKind["ExtractiveSummarization"] = "ExtractiveSummarization";
|
4199
3933
|
/** CustomEntityRecognition */
|
4200
3934
|
KnownAnalyzeTextLROTaskKind["CustomEntityRecognition"] = "CustomEntityRecognition";
|
4201
3935
|
/** CustomSingleLabelClassification */
|
@@ -4203,6 +3937,24 @@ var KnownAnalyzeTextLROTaskKind;
|
|
4203
3937
|
/** CustomMultiLabelClassification */
|
4204
3938
|
KnownAnalyzeTextLROTaskKind["CustomMultiLabelClassification"] = "CustomMultiLabelClassification";
|
4205
3939
|
})(KnownAnalyzeTextLROTaskKind || (KnownAnalyzeTextLROTaskKind = {}));
|
3940
|
+
/** Known values of {@link OperationStatus} that the service accepts. */
|
3941
|
+
var KnownOperationStatus;
|
3942
|
+
(function (KnownOperationStatus) {
|
3943
|
+
/** NotStarted */
|
3944
|
+
KnownOperationStatus["NotStarted"] = "notStarted";
|
3945
|
+
/** Running */
|
3946
|
+
KnownOperationStatus["Running"] = "running";
|
3947
|
+
/** Succeeded */
|
3948
|
+
KnownOperationStatus["Succeeded"] = "succeeded";
|
3949
|
+
/** PartiallyCompleted */
|
3950
|
+
KnownOperationStatus["PartiallyCompleted"] = "partiallyCompleted";
|
3951
|
+
/** Failed */
|
3952
|
+
KnownOperationStatus["Failed"] = "failed";
|
3953
|
+
/** Cancelled */
|
3954
|
+
KnownOperationStatus["Cancelled"] = "cancelled";
|
3955
|
+
/** Cancelling */
|
3956
|
+
KnownOperationStatus["Cancelling"] = "cancelling";
|
3957
|
+
})(KnownOperationStatus || (KnownOperationStatus = {}));
|
4206
3958
|
/** Known values of {@link AnalyzeTextLROResultsKind} that the service accepts. */
|
4207
3959
|
var KnownAnalyzeTextLROResultsKind;
|
4208
3960
|
(function (KnownAnalyzeTextLROResultsKind) {
|
@@ -4218,8 +3970,6 @@ var KnownAnalyzeTextLROResultsKind;
|
|
4218
3970
|
KnownAnalyzeTextLROResultsKind["EntityLinkingLROResults"] = "EntityLinkingLROResults";
|
4219
3971
|
/** HealthcareLROResults */
|
4220
3972
|
KnownAnalyzeTextLROResultsKind["HealthcareLROResults"] = "HealthcareLROResults";
|
4221
|
-
/** ExtractiveSummarizationLROResults */
|
4222
|
-
KnownAnalyzeTextLROResultsKind["ExtractiveSummarizationLROResults"] = "ExtractiveSummarizationLROResults";
|
4223
3973
|
/** CustomEntityRecognitionLROResults */
|
4224
3974
|
KnownAnalyzeTextLROResultsKind["CustomEntityRecognitionLROResults"] = "CustomEntityRecognitionLROResults";
|
4225
3975
|
/** CustomSingleLabelClassificationLROResults */
|
@@ -4227,6 +3977,22 @@ var KnownAnalyzeTextLROResultsKind;
|
|
4227
3977
|
/** CustomMultiLabelClassificationLROResults */
|
4228
3978
|
KnownAnalyzeTextLROResultsKind["CustomMultiLabelClassificationLROResults"] = "CustomMultiLabelClassificationLROResults";
|
4229
3979
|
})(KnownAnalyzeTextLROResultsKind || (KnownAnalyzeTextLROResultsKind = {}));
|
3980
|
+
/** Known values of {@link State} that the service accepts. */
|
3981
|
+
var KnownState;
|
3982
|
+
(function (KnownState) {
|
3983
|
+
/** NotStarted */
|
3984
|
+
KnownState["NotStarted"] = "notStarted";
|
3985
|
+
/** Running */
|
3986
|
+
KnownState["Running"] = "running";
|
3987
|
+
/** Succeeded */
|
3988
|
+
KnownState["Succeeded"] = "succeeded";
|
3989
|
+
/** Failed */
|
3990
|
+
KnownState["Failed"] = "failed";
|
3991
|
+
/** Cancelled */
|
3992
|
+
KnownState["Cancelled"] = "cancelled";
|
3993
|
+
/** Cancelling */
|
3994
|
+
KnownState["Cancelling"] = "cancelling";
|
3995
|
+
})(KnownState || (KnownState = {}));
|
4230
3996
|
/** Known values of {@link StringIndexType} that the service accepts. */
|
4231
3997
|
exports.KnownStringIndexType = void 0;
|
4232
3998
|
(function (KnownStringIndexType) {
|
@@ -4603,67 +4369,61 @@ var KnownWarningCode;
|
|
4603
4369
|
/** DocumentTruncated */
|
4604
4370
|
KnownWarningCode["DocumentTruncated"] = "DocumentTruncated";
|
4605
4371
|
})(KnownWarningCode || (KnownWarningCode = {}));
|
4606
|
-
/** Known values of {@link FhirVersion} that the service accepts. */
|
4607
|
-
var KnownFhirVersion;
|
4608
|
-
(function (KnownFhirVersion) {
|
4609
|
-
/** Four01 */
|
4610
|
-
KnownFhirVersion["Four01"] = "4.0.1";
|
4611
|
-
})(KnownFhirVersion || (KnownFhirVersion = {}));
|
4612
4372
|
/** Known values of {@link HealthcareEntityCategory} that the service accepts. */
|
4613
4373
|
var KnownHealthcareEntityCategory;
|
4614
4374
|
(function (KnownHealthcareEntityCategory) {
|
4615
4375
|
/** BodyStructure */
|
4616
|
-
KnownHealthcareEntityCategory["BodyStructure"] = "
|
4617
|
-
/**
|
4618
|
-
KnownHealthcareEntityCategory["
|
4376
|
+
KnownHealthcareEntityCategory["BodyStructure"] = "BodyStructure";
|
4377
|
+
/** Age */
|
4378
|
+
KnownHealthcareEntityCategory["Age"] = "Age";
|
4619
4379
|
/** Gender */
|
4620
|
-
KnownHealthcareEntityCategory["Gender"] = "
|
4380
|
+
KnownHealthcareEntityCategory["Gender"] = "Gender";
|
4621
4381
|
/** ExaminationName */
|
4622
|
-
KnownHealthcareEntityCategory["ExaminationName"] = "
|
4382
|
+
KnownHealthcareEntityCategory["ExaminationName"] = "ExaminationName";
|
4623
4383
|
/** Date */
|
4624
|
-
KnownHealthcareEntityCategory["Date"] = "
|
4384
|
+
KnownHealthcareEntityCategory["Date"] = "Date";
|
4625
4385
|
/** Direction */
|
4626
|
-
KnownHealthcareEntityCategory["Direction"] = "
|
4386
|
+
KnownHealthcareEntityCategory["Direction"] = "Direction";
|
4627
4387
|
/** Frequency */
|
4628
|
-
KnownHealthcareEntityCategory["Frequency"] = "
|
4388
|
+
KnownHealthcareEntityCategory["Frequency"] = "Frequency";
|
4629
4389
|
/** MeasurementValue */
|
4630
|
-
KnownHealthcareEntityCategory["MeasurementValue"] = "
|
4390
|
+
KnownHealthcareEntityCategory["MeasurementValue"] = "MeasurementValue";
|
4631
4391
|
/** MeasurementUnit */
|
4632
|
-
KnownHealthcareEntityCategory["MeasurementUnit"] = "
|
4392
|
+
KnownHealthcareEntityCategory["MeasurementUnit"] = "MeasurementUnit";
|
4633
4393
|
/** RelationalOperator */
|
4634
|
-
KnownHealthcareEntityCategory["RelationalOperator"] = "
|
4394
|
+
KnownHealthcareEntityCategory["RelationalOperator"] = "RelationalOperator";
|
4635
4395
|
/** Time */
|
4636
|
-
KnownHealthcareEntityCategory["Time"] = "
|
4637
|
-
/**
|
4638
|
-
KnownHealthcareEntityCategory["
|
4396
|
+
KnownHealthcareEntityCategory["Time"] = "Time";
|
4397
|
+
/** GeneOrProtein */
|
4398
|
+
KnownHealthcareEntityCategory["GeneOrProtein"] = "GeneOrProtein";
|
4639
4399
|
/** Variant */
|
4640
|
-
KnownHealthcareEntityCategory["Variant"] = "
|
4400
|
+
KnownHealthcareEntityCategory["Variant"] = "Variant";
|
4641
4401
|
/** AdministrativeEvent */
|
4642
|
-
KnownHealthcareEntityCategory["AdministrativeEvent"] = "
|
4402
|
+
KnownHealthcareEntityCategory["AdministrativeEvent"] = "AdministrativeEvent";
|
4643
4403
|
/** CareEnvironment */
|
4644
|
-
KnownHealthcareEntityCategory["CareEnvironment"] = "
|
4404
|
+
KnownHealthcareEntityCategory["CareEnvironment"] = "CareEnvironment";
|
4645
4405
|
/** HealthcareProfession */
|
4646
|
-
KnownHealthcareEntityCategory["HealthcareProfession"] = "
|
4406
|
+
KnownHealthcareEntityCategory["HealthcareProfession"] = "HealthcareProfession";
|
4647
4407
|
/** Diagnosis */
|
4648
|
-
KnownHealthcareEntityCategory["Diagnosis"] = "
|
4649
|
-
/**
|
4650
|
-
KnownHealthcareEntityCategory["
|
4408
|
+
KnownHealthcareEntityCategory["Diagnosis"] = "Diagnosis";
|
4409
|
+
/** SymptomOrSign */
|
4410
|
+
KnownHealthcareEntityCategory["SymptomOrSign"] = "SymptomOrSign";
|
4651
4411
|
/** ConditionQualifier */
|
4652
|
-
KnownHealthcareEntityCategory["ConditionQualifier"] = "
|
4412
|
+
KnownHealthcareEntityCategory["ConditionQualifier"] = "ConditionQualifier";
|
4653
4413
|
/** MedicationClass */
|
4654
|
-
KnownHealthcareEntityCategory["MedicationClass"] = "
|
4414
|
+
KnownHealthcareEntityCategory["MedicationClass"] = "MedicationClass";
|
4655
4415
|
/** MedicationName */
|
4656
|
-
KnownHealthcareEntityCategory["MedicationName"] = "
|
4416
|
+
KnownHealthcareEntityCategory["MedicationName"] = "MedicationName";
|
4657
4417
|
/** Dosage */
|
4658
|
-
KnownHealthcareEntityCategory["Dosage"] = "
|
4418
|
+
KnownHealthcareEntityCategory["Dosage"] = "Dosage";
|
4659
4419
|
/** MedicationForm */
|
4660
|
-
KnownHealthcareEntityCategory["MedicationForm"] = "
|
4420
|
+
KnownHealthcareEntityCategory["MedicationForm"] = "MedicationForm";
|
4661
4421
|
/** MedicationRoute */
|
4662
|
-
KnownHealthcareEntityCategory["MedicationRoute"] = "
|
4422
|
+
KnownHealthcareEntityCategory["MedicationRoute"] = "MedicationRoute";
|
4663
4423
|
/** FamilyRelation */
|
4664
|
-
KnownHealthcareEntityCategory["FamilyRelation"] = "
|
4424
|
+
KnownHealthcareEntityCategory["FamilyRelation"] = "FamilyRelation";
|
4665
4425
|
/** TreatmentName */
|
4666
|
-
KnownHealthcareEntityCategory["TreatmentName"] = "
|
4426
|
+
KnownHealthcareEntityCategory["TreatmentName"] = "TreatmentName";
|
4667
4427
|
})(KnownHealthcareEntityCategory || (KnownHealthcareEntityCategory = {}));
|
4668
4428
|
/** Known values of {@link RelationType} that the service accepts. */
|
4669
4429
|
var KnownRelationType;
|
@@ -4711,14 +4471,6 @@ var KnownRelationType;
|
|
4711
4471
|
/** ValueOfExamination */
|
4712
4472
|
KnownRelationType["ValueOfExamination"] = "ValueOfExamination";
|
4713
4473
|
})(KnownRelationType || (KnownRelationType = {}));
|
4714
|
-
/** Known values of {@link ExtractiveSummarizationOrderingCriteria} that the service accepts. */
|
4715
|
-
exports.KnownExtractiveSummarizationOrderingCriteria = void 0;
|
4716
|
-
(function (KnownExtractiveSummarizationOrderingCriteria) {
|
4717
|
-
/** Indicates that results should be sorted in order of appearance in the text. */
|
4718
|
-
KnownExtractiveSummarizationOrderingCriteria["Offset"] = "Offset";
|
4719
|
-
/** Indicates that results should be sorted in order of importance (i.e. rank score) according to the model. */
|
4720
|
-
KnownExtractiveSummarizationOrderingCriteria["Rank"] = "Rank";
|
4721
|
-
})(exports.KnownExtractiveSummarizationOrderingCriteria || (exports.KnownExtractiveSummarizationOrderingCriteria = {}));
|
4722
4474
|
|
4723
4475
|
// Copyright (c) Microsoft Corporation.
|
4724
4476
|
/**
|
@@ -4742,19 +4494,10 @@ const AnalyzeBatchActionNames = {
|
|
4742
4494
|
KeyPhraseExtraction: "KeyPhraseExtraction",
|
4743
4495
|
EntityLinking: "EntityLinking",
|
4744
4496
|
Healthcare: "Healthcare",
|
4745
|
-
ExtractiveSummarization: "ExtractiveSummarization",
|
4746
4497
|
CustomEntityRecognition: "CustomEntityRecognition",
|
4747
4498
|
CustomSingleLabelClassification: "CustomSingleLabelClassification",
|
4748
4499
|
CustomMultiLabelClassification: "CustomMultiLabelClassification",
|
4749
4500
|
};
|
4750
|
-
/**
|
4751
|
-
* Known values of the {@link HealthcareAction.fhirVersion} parameter.
|
4752
|
-
*/
|
4753
|
-
exports.KnownFhirVersion = void 0;
|
4754
|
-
(function (KnownFhirVersion) {
|
4755
|
-
/** 4.0.1 */
|
4756
|
-
KnownFhirVersion["4.0.1"] = "4.0.1";
|
4757
|
-
})(exports.KnownFhirVersion || (exports.KnownFhirVersion = {}));
|
4758
4501
|
/**
|
4759
4502
|
* Enum of possible error codes of a {@link TextAnalysisError}.
|
4760
4503
|
*/
|