@azure/ai-text-analytics 5.2.0-beta.1 → 5.2.0-beta.2
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/CHANGELOG.md +19 -0
- package/README.md +3 -1
- package/dist/index.js +919 -234
- package/dist/index.js.map +1 -1
- package/dist-esm/src/analyzeActionsResult.js +48 -10
- package/dist-esm/src/analyzeActionsResult.js.map +1 -1
- package/dist-esm/src/analyzeLro.js +18 -16
- package/dist-esm/src/analyzeLro.js.map +1 -1
- package/dist-esm/src/generated/generatedClientContext.js +2 -2
- package/dist-esm/src/generated/generatedClientContext.js.map +1 -1
- package/dist-esm/src/generated/models/index.js.map +1 -1
- package/dist-esm/src/generated/models/mappers.js +620 -1
- package/dist-esm/src/generated/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/models/parameters.js +2 -1
- package/dist-esm/src/generated/models/parameters.js.map +1 -1
- package/dist-esm/src/healthLro.js +23 -15
- package/dist-esm/src/healthLro.js.map +1 -1
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/multiCategoryClassifyResult.js +17 -0
- package/dist-esm/src/multiCategoryClassifyResult.js.map +1 -0
- package/dist-esm/src/multiCategoryClassifyResultArray.js +11 -0
- package/dist-esm/src/multiCategoryClassifyResultArray.js.map +1 -0
- package/dist-esm/src/recognizeCustomEntitiesResult.js +17 -0
- package/dist-esm/src/recognizeCustomEntitiesResult.js.map +1 -0
- package/dist-esm/src/recognizeCustomEntitiesResultArray.js +11 -0
- package/dist-esm/src/recognizeCustomEntitiesResultArray.js.map +1 -0
- package/dist-esm/src/singleCategoryClassifyResult.js +17 -0
- package/dist-esm/src/singleCategoryClassifyResult.js.map +1 -0
- package/dist-esm/src/singleCategoryClassifyResultArray.js +11 -0
- package/dist-esm/src/singleCategoryClassifyResultArray.js.map +1 -0
- package/dist-esm/src/textAnalyticsAction.js.map +1 -1
- package/dist-esm/src/textAnalyticsClient.js +7 -19
- package/dist-esm/src/textAnalyticsClient.js.map +1 -1
- package/dist-esm/src/textAnalyticsResult.js +16 -0
- package/dist-esm/src/textAnalyticsResult.js.map +1 -1
- package/dist-esm/src/util.js +28 -44
- package/dist-esm/src/util.js.map +1 -1
- package/package.json +7 -9
- package/types/ai-text-analytics.d.ts +348 -40
- package/dist-esm/src/paging.js +0 -83
- package/dist-esm/src/paging.js.map +0 -1
- package/dist-esm/src/utils/url.browser.js +0 -6
- package/dist-esm/src/utils/url.browser.js.map +0 -1
- package/dist-esm/src/utils/url.js +0 -4
- package/dist-esm/src/utils/url.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
|
9
9
|
var coreClient = require('@azure/core-client');
|
|
10
10
|
var logger$1 = require('@azure/logger');
|
|
11
11
|
var coreTracing = require('@azure/core-tracing');
|
|
12
|
-
require('
|
|
12
|
+
var corePaging = require('@azure/core-paging');
|
|
13
13
|
var coreLro = require('@azure/core-lro');
|
|
14
14
|
|
|
15
15
|
/*
|
|
@@ -188,6 +188,42 @@ const JobManifestTasks = {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
+
},
|
|
192
|
+
customEntityRecognitionTasks: {
|
|
193
|
+
serializedName: "customEntityRecognitionTasks",
|
|
194
|
+
type: {
|
|
195
|
+
name: "Sequence",
|
|
196
|
+
element: {
|
|
197
|
+
type: {
|
|
198
|
+
name: "Composite",
|
|
199
|
+
className: "CustomEntitiesTask"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
customSingleClassificationTasks: {
|
|
205
|
+
serializedName: "customSingleClassificationTasks",
|
|
206
|
+
type: {
|
|
207
|
+
name: "Sequence",
|
|
208
|
+
element: {
|
|
209
|
+
type: {
|
|
210
|
+
name: "Composite",
|
|
211
|
+
className: "CustomSingleClassificationTask"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
customMultiClassificationTasks: {
|
|
217
|
+
serializedName: "customMultiClassificationTasks",
|
|
218
|
+
type: {
|
|
219
|
+
name: "Sequence",
|
|
220
|
+
element: {
|
|
221
|
+
type: {
|
|
222
|
+
name: "Composite",
|
|
223
|
+
className: "CustomMultiClassificationTask"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
191
227
|
}
|
|
192
228
|
}
|
|
193
229
|
}
|
|
@@ -203,6 +239,12 @@ const EntitiesTask = {
|
|
|
203
239
|
name: "Composite",
|
|
204
240
|
className: "EntitiesTaskParameters"
|
|
205
241
|
}
|
|
242
|
+
},
|
|
243
|
+
taskName: {
|
|
244
|
+
serializedName: "taskName",
|
|
245
|
+
type: {
|
|
246
|
+
name: "String"
|
|
247
|
+
}
|
|
206
248
|
}
|
|
207
249
|
}
|
|
208
250
|
}
|
|
@@ -220,6 +262,7 @@ const EntitiesTaskParameters = {
|
|
|
220
262
|
}
|
|
221
263
|
},
|
|
222
264
|
loggingOptOut: {
|
|
265
|
+
defaultValue: false,
|
|
223
266
|
serializedName: "loggingOptOut",
|
|
224
267
|
type: {
|
|
225
268
|
name: "Boolean"
|
|
@@ -245,6 +288,12 @@ const PiiTask = {
|
|
|
245
288
|
name: "Composite",
|
|
246
289
|
className: "PiiTaskParameters"
|
|
247
290
|
}
|
|
291
|
+
},
|
|
292
|
+
taskName: {
|
|
293
|
+
serializedName: "taskName",
|
|
294
|
+
type: {
|
|
295
|
+
name: "String"
|
|
296
|
+
}
|
|
248
297
|
}
|
|
249
298
|
}
|
|
250
299
|
}
|
|
@@ -309,6 +358,12 @@ const KeyPhrasesTask = {
|
|
|
309
358
|
name: "Composite",
|
|
310
359
|
className: "KeyPhrasesTaskParameters"
|
|
311
360
|
}
|
|
361
|
+
},
|
|
362
|
+
taskName: {
|
|
363
|
+
serializedName: "taskName",
|
|
364
|
+
type: {
|
|
365
|
+
name: "String"
|
|
366
|
+
}
|
|
312
367
|
}
|
|
313
368
|
}
|
|
314
369
|
}
|
|
@@ -326,6 +381,7 @@ const KeyPhrasesTaskParameters = {
|
|
|
326
381
|
}
|
|
327
382
|
},
|
|
328
383
|
loggingOptOut: {
|
|
384
|
+
defaultValue: false,
|
|
329
385
|
serializedName: "loggingOptOut",
|
|
330
386
|
type: {
|
|
331
387
|
name: "Boolean"
|
|
@@ -345,6 +401,12 @@ const EntityLinkingTask = {
|
|
|
345
401
|
name: "Composite",
|
|
346
402
|
className: "EntityLinkingTaskParameters"
|
|
347
403
|
}
|
|
404
|
+
},
|
|
405
|
+
taskName: {
|
|
406
|
+
serializedName: "taskName",
|
|
407
|
+
type: {
|
|
408
|
+
name: "String"
|
|
409
|
+
}
|
|
348
410
|
}
|
|
349
411
|
}
|
|
350
412
|
}
|
|
@@ -362,6 +424,7 @@ const EntityLinkingTaskParameters = {
|
|
|
362
424
|
}
|
|
363
425
|
},
|
|
364
426
|
loggingOptOut: {
|
|
427
|
+
defaultValue: false,
|
|
365
428
|
serializedName: "loggingOptOut",
|
|
366
429
|
type: {
|
|
367
430
|
name: "Boolean"
|
|
@@ -387,6 +450,12 @@ const SentimentAnalysisTask = {
|
|
|
387
450
|
name: "Composite",
|
|
388
451
|
className: "SentimentAnalysisTaskParameters"
|
|
389
452
|
}
|
|
453
|
+
},
|
|
454
|
+
taskName: {
|
|
455
|
+
serializedName: "taskName",
|
|
456
|
+
type: {
|
|
457
|
+
name: "String"
|
|
458
|
+
}
|
|
390
459
|
}
|
|
391
460
|
}
|
|
392
461
|
}
|
|
@@ -404,12 +473,14 @@ const SentimentAnalysisTaskParameters = {
|
|
|
404
473
|
}
|
|
405
474
|
},
|
|
406
475
|
loggingOptOut: {
|
|
476
|
+
defaultValue: false,
|
|
407
477
|
serializedName: "loggingOptOut",
|
|
408
478
|
type: {
|
|
409
479
|
name: "Boolean"
|
|
410
480
|
}
|
|
411
481
|
},
|
|
412
482
|
opinionMining: {
|
|
483
|
+
defaultValue: false,
|
|
413
484
|
serializedName: "opinionMining",
|
|
414
485
|
type: {
|
|
415
486
|
name: "Boolean"
|
|
@@ -435,6 +506,12 @@ const ExtractiveSummarizationTask = {
|
|
|
435
506
|
name: "Composite",
|
|
436
507
|
className: "ExtractiveSummarizationTaskParameters"
|
|
437
508
|
}
|
|
509
|
+
},
|
|
510
|
+
taskName: {
|
|
511
|
+
serializedName: "taskName",
|
|
512
|
+
type: {
|
|
513
|
+
name: "String"
|
|
514
|
+
}
|
|
438
515
|
}
|
|
439
516
|
}
|
|
440
517
|
}
|
|
@@ -452,7 +529,7 @@ const ExtractiveSummarizationTaskParameters = {
|
|
|
452
529
|
}
|
|
453
530
|
},
|
|
454
531
|
loggingOptOut: {
|
|
455
|
-
defaultValue:
|
|
532
|
+
defaultValue: false,
|
|
456
533
|
serializedName: "loggingOptOut",
|
|
457
534
|
type: {
|
|
458
535
|
name: "Boolean"
|
|
@@ -481,6 +558,162 @@ const ExtractiveSummarizationTaskParameters = {
|
|
|
481
558
|
}
|
|
482
559
|
}
|
|
483
560
|
};
|
|
561
|
+
const CustomEntitiesTask = {
|
|
562
|
+
type: {
|
|
563
|
+
name: "Composite",
|
|
564
|
+
className: "CustomEntitiesTask",
|
|
565
|
+
modelProperties: {
|
|
566
|
+
parameters: {
|
|
567
|
+
serializedName: "parameters",
|
|
568
|
+
type: {
|
|
569
|
+
name: "Composite",
|
|
570
|
+
className: "CustomEntitiesTaskParameters"
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
taskName: {
|
|
574
|
+
serializedName: "taskName",
|
|
575
|
+
type: {
|
|
576
|
+
name: "String"
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
};
|
|
582
|
+
const CustomEntitiesTaskParameters = {
|
|
583
|
+
type: {
|
|
584
|
+
name: "Composite",
|
|
585
|
+
className: "CustomEntitiesTaskParameters",
|
|
586
|
+
modelProperties: {
|
|
587
|
+
projectName: {
|
|
588
|
+
serializedName: "project-name",
|
|
589
|
+
required: true,
|
|
590
|
+
type: {
|
|
591
|
+
name: "String"
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
deploymentName: {
|
|
595
|
+
serializedName: "deployment-name",
|
|
596
|
+
required: true,
|
|
597
|
+
type: {
|
|
598
|
+
name: "String"
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
loggingOptOut: {
|
|
602
|
+
defaultValue: false,
|
|
603
|
+
serializedName: "loggingOptOut",
|
|
604
|
+
type: {
|
|
605
|
+
name: "Boolean"
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
stringIndexType: {
|
|
609
|
+
serializedName: "stringIndexType",
|
|
610
|
+
type: {
|
|
611
|
+
name: "String"
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
};
|
|
617
|
+
const CustomSingleClassificationTask = {
|
|
618
|
+
type: {
|
|
619
|
+
name: "Composite",
|
|
620
|
+
className: "CustomSingleClassificationTask",
|
|
621
|
+
modelProperties: {
|
|
622
|
+
parameters: {
|
|
623
|
+
serializedName: "parameters",
|
|
624
|
+
type: {
|
|
625
|
+
name: "Composite",
|
|
626
|
+
className: "CustomSingleClassificationTaskParameters"
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
taskName: {
|
|
630
|
+
serializedName: "taskName",
|
|
631
|
+
type: {
|
|
632
|
+
name: "String"
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
};
|
|
638
|
+
const CustomSingleClassificationTaskParameters = {
|
|
639
|
+
type: {
|
|
640
|
+
name: "Composite",
|
|
641
|
+
className: "CustomSingleClassificationTaskParameters",
|
|
642
|
+
modelProperties: {
|
|
643
|
+
projectName: {
|
|
644
|
+
serializedName: "project-name",
|
|
645
|
+
required: true,
|
|
646
|
+
type: {
|
|
647
|
+
name: "String"
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
deploymentName: {
|
|
651
|
+
serializedName: "deployment-name",
|
|
652
|
+
required: true,
|
|
653
|
+
type: {
|
|
654
|
+
name: "String"
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
loggingOptOut: {
|
|
658
|
+
defaultValue: false,
|
|
659
|
+
serializedName: "loggingOptOut",
|
|
660
|
+
type: {
|
|
661
|
+
name: "Boolean"
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
};
|
|
667
|
+
const CustomMultiClassificationTask = {
|
|
668
|
+
type: {
|
|
669
|
+
name: "Composite",
|
|
670
|
+
className: "CustomMultiClassificationTask",
|
|
671
|
+
modelProperties: {
|
|
672
|
+
parameters: {
|
|
673
|
+
serializedName: "parameters",
|
|
674
|
+
type: {
|
|
675
|
+
name: "Composite",
|
|
676
|
+
className: "CustomMultiClassificationTaskParameters"
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
taskName: {
|
|
680
|
+
serializedName: "taskName",
|
|
681
|
+
type: {
|
|
682
|
+
name: "String"
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
};
|
|
688
|
+
const CustomMultiClassificationTaskParameters = {
|
|
689
|
+
type: {
|
|
690
|
+
name: "Composite",
|
|
691
|
+
className: "CustomMultiClassificationTaskParameters",
|
|
692
|
+
modelProperties: {
|
|
693
|
+
projectName: {
|
|
694
|
+
serializedName: "project-name",
|
|
695
|
+
required: true,
|
|
696
|
+
type: {
|
|
697
|
+
name: "String"
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
deploymentName: {
|
|
701
|
+
serializedName: "deployment-name",
|
|
702
|
+
required: true,
|
|
703
|
+
type: {
|
|
704
|
+
name: "String"
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
loggingOptOut: {
|
|
708
|
+
defaultValue: false,
|
|
709
|
+
serializedName: "loggingOptOut",
|
|
710
|
+
type: {
|
|
711
|
+
name: "Boolean"
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
};
|
|
484
717
|
const ErrorResponse = {
|
|
485
718
|
type: {
|
|
486
719
|
name: "Composite",
|
|
@@ -769,6 +1002,42 @@ const TasksStateTasks = {
|
|
|
769
1002
|
}
|
|
770
1003
|
}
|
|
771
1004
|
}
|
|
1005
|
+
},
|
|
1006
|
+
customEntityRecognitionTasks: {
|
|
1007
|
+
serializedName: "customEntityRecognitionTasks",
|
|
1008
|
+
type: {
|
|
1009
|
+
name: "Sequence",
|
|
1010
|
+
element: {
|
|
1011
|
+
type: {
|
|
1012
|
+
name: "Composite",
|
|
1013
|
+
className: "TasksStateTasksCustomEntityRecognitionTasksItem"
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
},
|
|
1018
|
+
customSingleClassificationTasks: {
|
|
1019
|
+
serializedName: "customSingleClassificationTasks",
|
|
1020
|
+
type: {
|
|
1021
|
+
name: "Sequence",
|
|
1022
|
+
element: {
|
|
1023
|
+
type: {
|
|
1024
|
+
name: "Composite",
|
|
1025
|
+
className: "TasksStateTasksCustomSingleClassificationTasksItem"
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
},
|
|
1030
|
+
customMultiClassificationTasks: {
|
|
1031
|
+
serializedName: "customMultiClassificationTasks",
|
|
1032
|
+
type: {
|
|
1033
|
+
name: "Sequence",
|
|
1034
|
+
element: {
|
|
1035
|
+
type: {
|
|
1036
|
+
name: "Composite",
|
|
1037
|
+
className: "TasksStateTasksCustomMultiClassificationTasksItem"
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
772
1041
|
}
|
|
773
1042
|
}
|
|
774
1043
|
}
|
|
@@ -785,6 +1054,13 @@ const TaskState = {
|
|
|
785
1054
|
name: "DateTime"
|
|
786
1055
|
}
|
|
787
1056
|
},
|
|
1057
|
+
taskName: {
|
|
1058
|
+
serializedName: "taskName",
|
|
1059
|
+
required: true,
|
|
1060
|
+
type: {
|
|
1061
|
+
name: "String"
|
|
1062
|
+
}
|
|
1063
|
+
},
|
|
788
1064
|
status: {
|
|
789
1065
|
serializedName: "status",
|
|
790
1066
|
required: true,
|
|
@@ -1813,12 +2089,350 @@ const TargetRelation = {
|
|
|
1813
2089
|
serializedName: "relationType",
|
|
1814
2090
|
required: true,
|
|
1815
2091
|
type: {
|
|
1816
|
-
name: "Enum",
|
|
1817
|
-
allowedValues: ["assessment", "target"]
|
|
2092
|
+
name: "Enum",
|
|
2093
|
+
allowedValues: ["assessment", "target"]
|
|
2094
|
+
}
|
|
2095
|
+
},
|
|
2096
|
+
ref: {
|
|
2097
|
+
serializedName: "ref",
|
|
2098
|
+
required: true,
|
|
2099
|
+
type: {
|
|
2100
|
+
name: "String"
|
|
2101
|
+
}
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
};
|
|
2106
|
+
const SentenceAssessment = {
|
|
2107
|
+
type: {
|
|
2108
|
+
name: "Composite",
|
|
2109
|
+
className: "SentenceAssessment",
|
|
2110
|
+
modelProperties: {
|
|
2111
|
+
sentiment: {
|
|
2112
|
+
serializedName: "sentiment",
|
|
2113
|
+
required: true,
|
|
2114
|
+
type: {
|
|
2115
|
+
name: "Enum",
|
|
2116
|
+
allowedValues: ["positive", "mixed", "negative"]
|
|
2117
|
+
}
|
|
2118
|
+
},
|
|
2119
|
+
confidenceScores: {
|
|
2120
|
+
serializedName: "confidenceScores",
|
|
2121
|
+
type: {
|
|
2122
|
+
name: "Composite",
|
|
2123
|
+
className: "TargetConfidenceScoreLabel"
|
|
2124
|
+
}
|
|
2125
|
+
},
|
|
2126
|
+
offset: {
|
|
2127
|
+
serializedName: "offset",
|
|
2128
|
+
required: true,
|
|
2129
|
+
type: {
|
|
2130
|
+
name: "Number"
|
|
2131
|
+
}
|
|
2132
|
+
},
|
|
2133
|
+
length: {
|
|
2134
|
+
serializedName: "length",
|
|
2135
|
+
required: true,
|
|
2136
|
+
type: {
|
|
2137
|
+
name: "Number"
|
|
2138
|
+
}
|
|
2139
|
+
},
|
|
2140
|
+
text: {
|
|
2141
|
+
serializedName: "text",
|
|
2142
|
+
required: true,
|
|
2143
|
+
type: {
|
|
2144
|
+
name: "String"
|
|
2145
|
+
}
|
|
2146
|
+
},
|
|
2147
|
+
isNegated: {
|
|
2148
|
+
serializedName: "isNegated",
|
|
2149
|
+
required: true,
|
|
2150
|
+
type: {
|
|
2151
|
+
name: "Boolean"
|
|
2152
|
+
}
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2156
|
+
};
|
|
2157
|
+
const ExtractiveSummarizationTaskResult = {
|
|
2158
|
+
type: {
|
|
2159
|
+
name: "Composite",
|
|
2160
|
+
className: "ExtractiveSummarizationTaskResult",
|
|
2161
|
+
modelProperties: {
|
|
2162
|
+
results: {
|
|
2163
|
+
serializedName: "results",
|
|
2164
|
+
type: {
|
|
2165
|
+
name: "Composite",
|
|
2166
|
+
className: "ExtractiveSummarizationResult"
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
}
|
|
2171
|
+
};
|
|
2172
|
+
const ExtractiveSummarizationResult = {
|
|
2173
|
+
type: {
|
|
2174
|
+
name: "Composite",
|
|
2175
|
+
className: "ExtractiveSummarizationResult",
|
|
2176
|
+
modelProperties: {
|
|
2177
|
+
documents: {
|
|
2178
|
+
serializedName: "documents",
|
|
2179
|
+
required: true,
|
|
2180
|
+
type: {
|
|
2181
|
+
name: "Sequence",
|
|
2182
|
+
element: {
|
|
2183
|
+
type: {
|
|
2184
|
+
name: "Composite",
|
|
2185
|
+
className: "ExtractedDocumentSummary"
|
|
2186
|
+
}
|
|
2187
|
+
}
|
|
2188
|
+
}
|
|
2189
|
+
},
|
|
2190
|
+
errors: {
|
|
2191
|
+
serializedName: "errors",
|
|
2192
|
+
required: true,
|
|
2193
|
+
type: {
|
|
2194
|
+
name: "Sequence",
|
|
2195
|
+
element: {
|
|
2196
|
+
type: {
|
|
2197
|
+
name: "Composite",
|
|
2198
|
+
className: "DocumentError"
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
},
|
|
2203
|
+
statistics: {
|
|
2204
|
+
serializedName: "statistics",
|
|
2205
|
+
type: {
|
|
2206
|
+
name: "Composite",
|
|
2207
|
+
className: "TextDocumentBatchStatistics"
|
|
2208
|
+
}
|
|
2209
|
+
},
|
|
2210
|
+
modelVersion: {
|
|
2211
|
+
serializedName: "modelVersion",
|
|
2212
|
+
required: true,
|
|
2213
|
+
type: {
|
|
2214
|
+
name: "String"
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
}
|
|
2218
|
+
}
|
|
2219
|
+
};
|
|
2220
|
+
const ExtractedDocumentSummary = {
|
|
2221
|
+
type: {
|
|
2222
|
+
name: "Composite",
|
|
2223
|
+
className: "ExtractedDocumentSummary",
|
|
2224
|
+
modelProperties: {
|
|
2225
|
+
id: {
|
|
2226
|
+
serializedName: "id",
|
|
2227
|
+
required: true,
|
|
2228
|
+
type: {
|
|
2229
|
+
name: "String"
|
|
2230
|
+
}
|
|
2231
|
+
},
|
|
2232
|
+
sentences: {
|
|
2233
|
+
serializedName: "sentences",
|
|
2234
|
+
required: true,
|
|
2235
|
+
type: {
|
|
2236
|
+
name: "Sequence",
|
|
2237
|
+
element: {
|
|
2238
|
+
type: {
|
|
2239
|
+
name: "Composite",
|
|
2240
|
+
className: "ExtractedSummarySentence"
|
|
2241
|
+
}
|
|
2242
|
+
}
|
|
2243
|
+
}
|
|
2244
|
+
},
|
|
2245
|
+
warnings: {
|
|
2246
|
+
serializedName: "warnings",
|
|
2247
|
+
required: true,
|
|
2248
|
+
type: {
|
|
2249
|
+
name: "Sequence",
|
|
2250
|
+
element: {
|
|
2251
|
+
type: {
|
|
2252
|
+
name: "Composite",
|
|
2253
|
+
className: "TextAnalyticsWarning"
|
|
2254
|
+
}
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2257
|
+
},
|
|
2258
|
+
statistics: {
|
|
2259
|
+
serializedName: "statistics",
|
|
2260
|
+
type: {
|
|
2261
|
+
name: "Composite",
|
|
2262
|
+
className: "TextDocumentStatistics"
|
|
2263
|
+
}
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
};
|
|
2268
|
+
const ExtractedSummarySentence = {
|
|
2269
|
+
type: {
|
|
2270
|
+
name: "Composite",
|
|
2271
|
+
className: "ExtractedSummarySentence",
|
|
2272
|
+
modelProperties: {
|
|
2273
|
+
text: {
|
|
2274
|
+
serializedName: "text",
|
|
2275
|
+
required: true,
|
|
2276
|
+
type: {
|
|
2277
|
+
name: "String"
|
|
2278
|
+
}
|
|
2279
|
+
},
|
|
2280
|
+
rankScore: {
|
|
2281
|
+
serializedName: "rankScore",
|
|
2282
|
+
required: true,
|
|
2283
|
+
type: {
|
|
2284
|
+
name: "Number"
|
|
2285
|
+
}
|
|
2286
|
+
},
|
|
2287
|
+
offset: {
|
|
2288
|
+
serializedName: "offset",
|
|
2289
|
+
required: true,
|
|
2290
|
+
type: {
|
|
2291
|
+
name: "Number"
|
|
2292
|
+
}
|
|
2293
|
+
},
|
|
2294
|
+
length: {
|
|
2295
|
+
serializedName: "length",
|
|
2296
|
+
required: true,
|
|
2297
|
+
type: {
|
|
2298
|
+
name: "Number"
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
}
|
|
2303
|
+
};
|
|
2304
|
+
const CustomEntitiesTaskResult = {
|
|
2305
|
+
type: {
|
|
2306
|
+
name: "Composite",
|
|
2307
|
+
className: "CustomEntitiesTaskResult",
|
|
2308
|
+
modelProperties: {
|
|
2309
|
+
results: {
|
|
2310
|
+
serializedName: "results",
|
|
2311
|
+
type: {
|
|
2312
|
+
name: "Composite",
|
|
2313
|
+
className: "CustomEntitiesResult"
|
|
2314
|
+
}
|
|
2315
|
+
}
|
|
2316
|
+
}
|
|
2317
|
+
}
|
|
2318
|
+
};
|
|
2319
|
+
const CustomEntitiesResult = {
|
|
2320
|
+
type: {
|
|
2321
|
+
name: "Composite",
|
|
2322
|
+
className: "CustomEntitiesResult",
|
|
2323
|
+
modelProperties: {
|
|
2324
|
+
documents: {
|
|
2325
|
+
serializedName: "documents",
|
|
2326
|
+
required: true,
|
|
2327
|
+
type: {
|
|
2328
|
+
name: "Sequence",
|
|
2329
|
+
element: {
|
|
2330
|
+
type: {
|
|
2331
|
+
name: "Composite",
|
|
2332
|
+
className: "DocumentEntities"
|
|
2333
|
+
}
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
},
|
|
2337
|
+
errors: {
|
|
2338
|
+
serializedName: "errors",
|
|
2339
|
+
required: true,
|
|
2340
|
+
type: {
|
|
2341
|
+
name: "Sequence",
|
|
2342
|
+
element: {
|
|
2343
|
+
type: {
|
|
2344
|
+
name: "Composite",
|
|
2345
|
+
className: "DocumentError"
|
|
2346
|
+
}
|
|
2347
|
+
}
|
|
2348
|
+
}
|
|
2349
|
+
},
|
|
2350
|
+
statistics: {
|
|
2351
|
+
serializedName: "statistics",
|
|
2352
|
+
type: {
|
|
2353
|
+
name: "Composite",
|
|
2354
|
+
className: "TextDocumentBatchStatistics"
|
|
2355
|
+
}
|
|
2356
|
+
},
|
|
2357
|
+
projectName: {
|
|
2358
|
+
serializedName: "projectName",
|
|
2359
|
+
required: true,
|
|
2360
|
+
type: {
|
|
2361
|
+
name: "String"
|
|
2362
|
+
}
|
|
2363
|
+
},
|
|
2364
|
+
deploymentName: {
|
|
2365
|
+
serializedName: "deploymentName",
|
|
2366
|
+
required: true,
|
|
2367
|
+
type: {
|
|
2368
|
+
name: "String"
|
|
2369
|
+
}
|
|
2370
|
+
}
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
};
|
|
2374
|
+
const CustomSingleClassificationTaskResult = {
|
|
2375
|
+
type: {
|
|
2376
|
+
name: "Composite",
|
|
2377
|
+
className: "CustomSingleClassificationTaskResult",
|
|
2378
|
+
modelProperties: {
|
|
2379
|
+
results: {
|
|
2380
|
+
serializedName: "results",
|
|
2381
|
+
type: {
|
|
2382
|
+
name: "Composite",
|
|
2383
|
+
className: "CustomSingleClassificationResult"
|
|
2384
|
+
}
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
}
|
|
2388
|
+
};
|
|
2389
|
+
const CustomSingleClassificationResult = {
|
|
2390
|
+
type: {
|
|
2391
|
+
name: "Composite",
|
|
2392
|
+
className: "CustomSingleClassificationResult",
|
|
2393
|
+
modelProperties: {
|
|
2394
|
+
documents: {
|
|
2395
|
+
serializedName: "documents",
|
|
2396
|
+
required: true,
|
|
2397
|
+
type: {
|
|
2398
|
+
name: "Sequence",
|
|
2399
|
+
element: {
|
|
2400
|
+
type: {
|
|
2401
|
+
name: "Composite",
|
|
2402
|
+
className: "SingleClassificationDocument"
|
|
2403
|
+
}
|
|
2404
|
+
}
|
|
2405
|
+
}
|
|
2406
|
+
},
|
|
2407
|
+
errors: {
|
|
2408
|
+
serializedName: "errors",
|
|
2409
|
+
required: true,
|
|
2410
|
+
type: {
|
|
2411
|
+
name: "Sequence",
|
|
2412
|
+
element: {
|
|
2413
|
+
type: {
|
|
2414
|
+
name: "Composite",
|
|
2415
|
+
className: "DocumentError"
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
},
|
|
2420
|
+
statistics: {
|
|
2421
|
+
serializedName: "statistics",
|
|
2422
|
+
type: {
|
|
2423
|
+
name: "Composite",
|
|
2424
|
+
className: "TextDocumentBatchStatistics"
|
|
2425
|
+
}
|
|
2426
|
+
},
|
|
2427
|
+
projectName: {
|
|
2428
|
+
serializedName: "projectName",
|
|
2429
|
+
required: true,
|
|
2430
|
+
type: {
|
|
2431
|
+
name: "String"
|
|
1818
2432
|
}
|
|
1819
2433
|
},
|
|
1820
|
-
|
|
1821
|
-
serializedName: "
|
|
2434
|
+
deploymentName: {
|
|
2435
|
+
serializedName: "deploymentName",
|
|
1822
2436
|
required: true,
|
|
1823
2437
|
type: {
|
|
1824
2438
|
name: "String"
|
|
@@ -1827,76 +2441,89 @@ const TargetRelation = {
|
|
|
1827
2441
|
}
|
|
1828
2442
|
}
|
|
1829
2443
|
};
|
|
1830
|
-
const
|
|
2444
|
+
const SingleClassificationDocument = {
|
|
1831
2445
|
type: {
|
|
1832
2446
|
name: "Composite",
|
|
1833
|
-
className: "
|
|
2447
|
+
className: "SingleClassificationDocument",
|
|
1834
2448
|
modelProperties: {
|
|
1835
|
-
|
|
1836
|
-
serializedName: "
|
|
2449
|
+
id: {
|
|
2450
|
+
serializedName: "id",
|
|
1837
2451
|
required: true,
|
|
1838
2452
|
type: {
|
|
1839
|
-
name: "
|
|
1840
|
-
allowedValues: ["positive", "mixed", "negative"]
|
|
2453
|
+
name: "String"
|
|
1841
2454
|
}
|
|
1842
2455
|
},
|
|
1843
|
-
|
|
1844
|
-
serializedName: "
|
|
2456
|
+
classification: {
|
|
2457
|
+
serializedName: "classification",
|
|
1845
2458
|
type: {
|
|
1846
2459
|
name: "Composite",
|
|
1847
|
-
className: "
|
|
2460
|
+
className: "ClassificationResult"
|
|
1848
2461
|
}
|
|
1849
2462
|
},
|
|
1850
|
-
|
|
1851
|
-
serializedName: "
|
|
2463
|
+
warnings: {
|
|
2464
|
+
serializedName: "warnings",
|
|
1852
2465
|
required: true,
|
|
1853
2466
|
type: {
|
|
1854
|
-
name: "
|
|
2467
|
+
name: "Sequence",
|
|
2468
|
+
element: {
|
|
2469
|
+
type: {
|
|
2470
|
+
name: "Composite",
|
|
2471
|
+
className: "TextAnalyticsWarning"
|
|
2472
|
+
}
|
|
2473
|
+
}
|
|
1855
2474
|
}
|
|
1856
2475
|
},
|
|
1857
|
-
|
|
1858
|
-
serializedName: "
|
|
1859
|
-
required: true,
|
|
2476
|
+
statistics: {
|
|
2477
|
+
serializedName: "statistics",
|
|
1860
2478
|
type: {
|
|
1861
|
-
name: "
|
|
2479
|
+
name: "Composite",
|
|
2480
|
+
className: "TextDocumentStatistics"
|
|
1862
2481
|
}
|
|
1863
|
-
}
|
|
1864
|
-
|
|
1865
|
-
|
|
2482
|
+
}
|
|
2483
|
+
}
|
|
2484
|
+
}
|
|
2485
|
+
};
|
|
2486
|
+
const ClassificationResult = {
|
|
2487
|
+
type: {
|
|
2488
|
+
name: "Composite",
|
|
2489
|
+
className: "ClassificationResult",
|
|
2490
|
+
modelProperties: {
|
|
2491
|
+
category: {
|
|
2492
|
+
serializedName: "category",
|
|
1866
2493
|
required: true,
|
|
1867
2494
|
type: {
|
|
1868
2495
|
name: "String"
|
|
1869
2496
|
}
|
|
1870
2497
|
},
|
|
1871
|
-
|
|
1872
|
-
serializedName: "
|
|
2498
|
+
confidenceScore: {
|
|
2499
|
+
serializedName: "confidenceScore",
|
|
1873
2500
|
required: true,
|
|
1874
2501
|
type: {
|
|
1875
|
-
name: "
|
|
2502
|
+
name: "Number"
|
|
1876
2503
|
}
|
|
1877
2504
|
}
|
|
1878
2505
|
}
|
|
1879
2506
|
}
|
|
1880
2507
|
};
|
|
1881
|
-
const
|
|
2508
|
+
const CustomMultiClassificationTaskResult = {
|
|
1882
2509
|
type: {
|
|
1883
2510
|
name: "Composite",
|
|
1884
|
-
className: "
|
|
2511
|
+
className: "CustomMultiClassificationTaskResult",
|
|
1885
2512
|
modelProperties: {
|
|
1886
2513
|
results: {
|
|
1887
2514
|
serializedName: "results",
|
|
1888
2515
|
type: {
|
|
1889
2516
|
name: "Composite",
|
|
1890
|
-
className: "
|
|
2517
|
+
className: "CustomMultiClassificationResult"
|
|
1891
2518
|
}
|
|
1892
2519
|
}
|
|
1893
2520
|
}
|
|
1894
2521
|
}
|
|
1895
2522
|
};
|
|
1896
|
-
const
|
|
2523
|
+
const CustomMultiClassificationResult = {
|
|
1897
2524
|
type: {
|
|
1898
2525
|
name: "Composite",
|
|
1899
|
-
className: "
|
|
2526
|
+
className: "CustomMultiClassificationResult",
|
|
1900
2527
|
modelProperties: {
|
|
1901
2528
|
documents: {
|
|
1902
2529
|
serializedName: "documents",
|
|
@@ -1906,7 +2533,7 @@ const ExtractiveSummarizationResult = {
|
|
|
1906
2533
|
element: {
|
|
1907
2534
|
type: {
|
|
1908
2535
|
name: "Composite",
|
|
1909
|
-
className: "
|
|
2536
|
+
className: "MultiClassificationDocument"
|
|
1910
2537
|
}
|
|
1911
2538
|
}
|
|
1912
2539
|
}
|
|
@@ -1931,8 +2558,15 @@ const ExtractiveSummarizationResult = {
|
|
|
1931
2558
|
className: "TextDocumentBatchStatistics"
|
|
1932
2559
|
}
|
|
1933
2560
|
},
|
|
1934
|
-
|
|
1935
|
-
serializedName: "
|
|
2561
|
+
projectName: {
|
|
2562
|
+
serializedName: "projectName",
|
|
2563
|
+
required: true,
|
|
2564
|
+
type: {
|
|
2565
|
+
name: "String"
|
|
2566
|
+
}
|
|
2567
|
+
},
|
|
2568
|
+
deploymentName: {
|
|
2569
|
+
serializedName: "deploymentName",
|
|
1936
2570
|
required: true,
|
|
1937
2571
|
type: {
|
|
1938
2572
|
name: "String"
|
|
@@ -1941,10 +2575,10 @@ const ExtractiveSummarizationResult = {
|
|
|
1941
2575
|
}
|
|
1942
2576
|
}
|
|
1943
2577
|
};
|
|
1944
|
-
const
|
|
2578
|
+
const MultiClassificationDocument = {
|
|
1945
2579
|
type: {
|
|
1946
2580
|
name: "Composite",
|
|
1947
|
-
className: "
|
|
2581
|
+
className: "MultiClassificationDocument",
|
|
1948
2582
|
modelProperties: {
|
|
1949
2583
|
id: {
|
|
1950
2584
|
serializedName: "id",
|
|
@@ -1953,15 +2587,15 @@ const ExtractedDocumentSummary = {
|
|
|
1953
2587
|
name: "String"
|
|
1954
2588
|
}
|
|
1955
2589
|
},
|
|
1956
|
-
|
|
1957
|
-
serializedName: "
|
|
2590
|
+
classifications: {
|
|
2591
|
+
serializedName: "classifications",
|
|
1958
2592
|
required: true,
|
|
1959
2593
|
type: {
|
|
1960
2594
|
name: "Sequence",
|
|
1961
2595
|
element: {
|
|
1962
2596
|
type: {
|
|
1963
2597
|
name: "Composite",
|
|
1964
|
-
className: "
|
|
2598
|
+
className: "ClassificationResult"
|
|
1965
2599
|
}
|
|
1966
2600
|
}
|
|
1967
2601
|
}
|
|
@@ -1989,42 +2623,6 @@ const ExtractedDocumentSummary = {
|
|
|
1989
2623
|
}
|
|
1990
2624
|
}
|
|
1991
2625
|
};
|
|
1992
|
-
const ExtractedSummarySentence = {
|
|
1993
|
-
type: {
|
|
1994
|
-
name: "Composite",
|
|
1995
|
-
className: "ExtractedSummarySentence",
|
|
1996
|
-
modelProperties: {
|
|
1997
|
-
text: {
|
|
1998
|
-
serializedName: "text",
|
|
1999
|
-
required: true,
|
|
2000
|
-
type: {
|
|
2001
|
-
name: "String"
|
|
2002
|
-
}
|
|
2003
|
-
},
|
|
2004
|
-
rankScore: {
|
|
2005
|
-
serializedName: "rankScore",
|
|
2006
|
-
required: true,
|
|
2007
|
-
type: {
|
|
2008
|
-
name: "Number"
|
|
2009
|
-
}
|
|
2010
|
-
},
|
|
2011
|
-
offset: {
|
|
2012
|
-
serializedName: "offset",
|
|
2013
|
-
required: true,
|
|
2014
|
-
type: {
|
|
2015
|
-
name: "Number"
|
|
2016
|
-
}
|
|
2017
|
-
},
|
|
2018
|
-
length: {
|
|
2019
|
-
serializedName: "length",
|
|
2020
|
-
required: true,
|
|
2021
|
-
type: {
|
|
2022
|
-
name: "Number"
|
|
2023
|
-
}
|
|
2024
|
-
}
|
|
2025
|
-
}
|
|
2026
|
-
}
|
|
2027
|
-
};
|
|
2028
2626
|
const AnalyzeJobErrorsAndStatistics = {
|
|
2029
2627
|
type: {
|
|
2030
2628
|
name: "Composite",
|
|
@@ -2629,6 +3227,27 @@ const TasksStateTasksExtractiveSummarizationTasksItem = {
|
|
|
2629
3227
|
modelProperties: Object.assign(Object.assign({}, TaskState.type.modelProperties), ExtractiveSummarizationTaskResult.type.modelProperties)
|
|
2630
3228
|
}
|
|
2631
3229
|
};
|
|
3230
|
+
const TasksStateTasksCustomEntityRecognitionTasksItem = {
|
|
3231
|
+
type: {
|
|
3232
|
+
name: "Composite",
|
|
3233
|
+
className: "TasksStateTasksCustomEntityRecognitionTasksItem",
|
|
3234
|
+
modelProperties: Object.assign(Object.assign({}, TaskState.type.modelProperties), CustomEntitiesTaskResult.type.modelProperties)
|
|
3235
|
+
}
|
|
3236
|
+
};
|
|
3237
|
+
const TasksStateTasksCustomSingleClassificationTasksItem = {
|
|
3238
|
+
type: {
|
|
3239
|
+
name: "Composite",
|
|
3240
|
+
className: "TasksStateTasksCustomSingleClassificationTasksItem",
|
|
3241
|
+
modelProperties: Object.assign(Object.assign({}, TaskState.type.modelProperties), CustomSingleClassificationTaskResult.type.modelProperties)
|
|
3242
|
+
}
|
|
3243
|
+
};
|
|
3244
|
+
const TasksStateTasksCustomMultiClassificationTasksItem = {
|
|
3245
|
+
type: {
|
|
3246
|
+
name: "Composite",
|
|
3247
|
+
className: "TasksStateTasksCustomMultiClassificationTasksItem",
|
|
3248
|
+
modelProperties: Object.assign(Object.assign({}, TaskState.type.modelProperties), CustomMultiClassificationTaskResult.type.modelProperties)
|
|
3249
|
+
}
|
|
3250
|
+
};
|
|
2632
3251
|
const HealthcareEntity = {
|
|
2633
3252
|
type: {
|
|
2634
3253
|
name: "Composite",
|
|
@@ -2699,6 +3318,12 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
|
2699
3318
|
SentimentAnalysisTaskParameters: SentimentAnalysisTaskParameters,
|
|
2700
3319
|
ExtractiveSummarizationTask: ExtractiveSummarizationTask,
|
|
2701
3320
|
ExtractiveSummarizationTaskParameters: ExtractiveSummarizationTaskParameters,
|
|
3321
|
+
CustomEntitiesTask: CustomEntitiesTask,
|
|
3322
|
+
CustomEntitiesTaskParameters: CustomEntitiesTaskParameters,
|
|
3323
|
+
CustomSingleClassificationTask: CustomSingleClassificationTask,
|
|
3324
|
+
CustomSingleClassificationTaskParameters: CustomSingleClassificationTaskParameters,
|
|
3325
|
+
CustomMultiClassificationTask: CustomMultiClassificationTask,
|
|
3326
|
+
CustomMultiClassificationTaskParameters: CustomMultiClassificationTaskParameters,
|
|
2702
3327
|
ErrorResponse: ErrorResponse,
|
|
2703
3328
|
TextAnalyticsError: TextAnalyticsError,
|
|
2704
3329
|
InnerError: InnerError,
|
|
@@ -2739,6 +3364,15 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
|
2739
3364
|
ExtractiveSummarizationResult: ExtractiveSummarizationResult,
|
|
2740
3365
|
ExtractedDocumentSummary: ExtractedDocumentSummary,
|
|
2741
3366
|
ExtractedSummarySentence: ExtractedSummarySentence,
|
|
3367
|
+
CustomEntitiesTaskResult: CustomEntitiesTaskResult,
|
|
3368
|
+
CustomEntitiesResult: CustomEntitiesResult,
|
|
3369
|
+
CustomSingleClassificationTaskResult: CustomSingleClassificationTaskResult,
|
|
3370
|
+
CustomSingleClassificationResult: CustomSingleClassificationResult,
|
|
3371
|
+
SingleClassificationDocument: SingleClassificationDocument,
|
|
3372
|
+
ClassificationResult: ClassificationResult,
|
|
3373
|
+
CustomMultiClassificationTaskResult: CustomMultiClassificationTaskResult,
|
|
3374
|
+
CustomMultiClassificationResult: CustomMultiClassificationResult,
|
|
3375
|
+
MultiClassificationDocument: MultiClassificationDocument,
|
|
2742
3376
|
AnalyzeJobErrorsAndStatistics: AnalyzeJobErrorsAndStatistics,
|
|
2743
3377
|
Pagination: Pagination,
|
|
2744
3378
|
HealthcareTaskResult: HealthcareTaskResult,
|
|
@@ -2765,6 +3399,9 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
|
2765
3399
|
TasksStateTasksEntityLinkingTasksItem: TasksStateTasksEntityLinkingTasksItem,
|
|
2766
3400
|
TasksStateTasksSentimentAnalysisTasksItem: TasksStateTasksSentimentAnalysisTasksItem,
|
|
2767
3401
|
TasksStateTasksExtractiveSummarizationTasksItem: TasksStateTasksExtractiveSummarizationTasksItem,
|
|
3402
|
+
TasksStateTasksCustomEntityRecognitionTasksItem: TasksStateTasksCustomEntityRecognitionTasksItem,
|
|
3403
|
+
TasksStateTasksCustomSingleClassificationTasksItem: TasksStateTasksCustomSingleClassificationTasksItem,
|
|
3404
|
+
TasksStateTasksCustomMultiClassificationTasksItem: TasksStateTasksCustomMultiClassificationTasksItem,
|
|
2768
3405
|
HealthcareEntity: HealthcareEntity,
|
|
2769
3406
|
GeneratedClientAnalyzeHeaders: GeneratedClientAnalyzeHeaders,
|
|
2770
3407
|
GeneratedClientCancelHealthJobHeaders: GeneratedClientCancelHealthJobHeaders,
|
|
@@ -2818,7 +3455,7 @@ const endpoint = {
|
|
|
2818
3455
|
const apiVersion = {
|
|
2819
3456
|
parameterPath: "apiVersion",
|
|
2820
3457
|
mapper: {
|
|
2821
|
-
defaultValue: "v3.2-preview.
|
|
3458
|
+
defaultValue: "v3.2-preview.2",
|
|
2822
3459
|
isConstant: true,
|
|
2823
3460
|
serializedName: "ApiVersion",
|
|
2824
3461
|
type: {
|
|
@@ -2863,6 +3500,7 @@ const top = {
|
|
|
2863
3500
|
const skip = {
|
|
2864
3501
|
parameterPath: ["options", "skip"],
|
|
2865
3502
|
mapper: {
|
|
3503
|
+
defaultValue: 0,
|
|
2866
3504
|
constraints: {
|
|
2867
3505
|
InclusiveMinimum: 0
|
|
2868
3506
|
},
|
|
@@ -2980,7 +3618,7 @@ class GeneratedClientContext extends coreClient.ServiceClient {
|
|
|
2980
3618
|
const defaults = {
|
|
2981
3619
|
requestContentType: "application/json; charset=utf-8"
|
|
2982
3620
|
};
|
|
2983
|
-
const packageDetails = `azsdk-js-ai-text-analytics/5.2.0-beta.
|
|
3621
|
+
const packageDetails = `azsdk-js-ai-text-analytics/5.2.0-beta.2`;
|
|
2984
3622
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
2985
3623
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
2986
3624
|
: `${packageDetails}`;
|
|
@@ -2991,7 +3629,7 @@ class GeneratedClientContext extends coreClient.ServiceClient {
|
|
|
2991
3629
|
// Parameter assignments
|
|
2992
3630
|
this.endpoint = endpoint;
|
|
2993
3631
|
// Assigning values to Constant parameters
|
|
2994
|
-
this.apiVersion = options.apiVersion || "v3.2-preview.
|
|
3632
|
+
this.apiVersion = options.apiVersion || "v3.2-preview.2";
|
|
2995
3633
|
}
|
|
2996
3634
|
}
|
|
2997
3635
|
|
|
@@ -3486,32 +4124,42 @@ function addParamsToTask(action) {
|
|
|
3486
4124
|
const { actionName } = action, params = tslib.__rest(action, ["actionName"]);
|
|
3487
4125
|
return { parameters: params, taskName: actionName };
|
|
3488
4126
|
}
|
|
4127
|
+
function appendReadableErrorMessage(currentMessage, innerMessage) {
|
|
4128
|
+
let message = currentMessage;
|
|
4129
|
+
if (message.slice(-1) !== ".") {
|
|
4130
|
+
message = message + ".";
|
|
4131
|
+
}
|
|
4132
|
+
return message + " " + innerMessage;
|
|
4133
|
+
}
|
|
3489
4134
|
/**
|
|
3490
4135
|
* @internal
|
|
3491
4136
|
* parses incoming errors from the service and if the inner error code is
|
|
3492
4137
|
* InvalidDocumentBatch, it exposes that as the statusCode instead.
|
|
3493
4138
|
* @param error - the incoming error
|
|
3494
4139
|
*/
|
|
3495
|
-
function
|
|
3496
|
-
var _a
|
|
3497
|
-
const
|
|
3498
|
-
const
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
// );
|
|
3512
|
-
logger.warning(`The error coming from the service does not follow the expected structure: ${error}`);
|
|
4140
|
+
function compileError(errorResponse) {
|
|
4141
|
+
var _a;
|
|
4142
|
+
const castErrorResponse = errorResponse;
|
|
4143
|
+
const topLevelError = (_a = castErrorResponse.response.parsedBody) === null || _a === void 0 ? void 0 : _a.error;
|
|
4144
|
+
if (!topLevelError)
|
|
4145
|
+
return errorResponse;
|
|
4146
|
+
let errorMessage = topLevelError.message || "";
|
|
4147
|
+
let invalidDocumentBatchCode = false;
|
|
4148
|
+
function unwrap(error) {
|
|
4149
|
+
if ((error === null || error === void 0 ? void 0 : error.innererror) !== undefined && error.innererror.message !== undefined) {
|
|
4150
|
+
if (error.innererror.code === "InvalidDocumentBatch") {
|
|
4151
|
+
invalidDocumentBatchCode = true;
|
|
4152
|
+
}
|
|
4153
|
+
errorMessage = appendReadableErrorMessage(errorMessage, error.innererror.message);
|
|
4154
|
+
return unwrap(error.innererror);
|
|
4155
|
+
}
|
|
3513
4156
|
return error;
|
|
3514
4157
|
}
|
|
4158
|
+
unwrap(topLevelError);
|
|
4159
|
+
return new coreRestPipeline.RestError(errorMessage, {
|
|
4160
|
+
code: invalidDocumentBatchCode ? "InvalidDocumentBatch" : topLevelError.code,
|
|
4161
|
+
statusCode: castErrorResponse.statusCode
|
|
4162
|
+
});
|
|
3515
4163
|
}
|
|
3516
4164
|
/**
|
|
3517
4165
|
* @internal
|
|
@@ -3629,6 +4277,22 @@ function combineSuccessfulAndErroneousDocumentsWithStatisticsAndModelVersion(inp
|
|
|
3629
4277
|
modelVersion: response.modelVersion
|
|
3630
4278
|
});
|
|
3631
4279
|
}
|
|
4280
|
+
/**
|
|
4281
|
+
* @internal
|
|
4282
|
+
* combines successful and erroneous results into a single array of results and
|
|
4283
|
+
* sort them so that the IDs order match that of the input documents array. It
|
|
4284
|
+
* also attaches statistics, projectName, and deploymentName to the returned array.
|
|
4285
|
+
* @param input - the array of documents sent to the service for processing.
|
|
4286
|
+
* @param response - the response received from the service.
|
|
4287
|
+
*/
|
|
4288
|
+
function combineSuccessfulAndErroneousDocumentsWithStatisticsAndCustomProjectInfo(input, response, processSuccess, processError) {
|
|
4289
|
+
const sorted = processAndCombineSuccessfulAndErroneousDocuments(input, response, processSuccess, processError);
|
|
4290
|
+
return Object.assign(sorted, {
|
|
4291
|
+
statistics: response.statistics,
|
|
4292
|
+
projectName: response.projectName,
|
|
4293
|
+
deploymentName: response.deploymentName
|
|
4294
|
+
});
|
|
4295
|
+
}
|
|
3632
4296
|
|
|
3633
4297
|
// Copyright (c) Microsoft Corporation.
|
|
3634
4298
|
/**
|
|
@@ -3897,87 +4561,6 @@ function makeHealthcareEntitiesErrorResult(id, error) {
|
|
|
3897
4561
|
return makeTextAnalyticsErrorResult(id, error);
|
|
3898
4562
|
}
|
|
3899
4563
|
|
|
3900
|
-
// Copyright (c) Microsoft Corporation.
|
|
3901
|
-
/**
|
|
3902
|
-
* @internal
|
|
3903
|
-
*
|
|
3904
|
-
* returns an async iterator that will retrieve items from the server. It also has a `byPage`
|
|
3905
|
-
* method that can return pages of items at once.
|
|
3906
|
-
*
|
|
3907
|
-
* @param pagedResult - an object that describes how to communicate with the service and how to build a page of items.
|
|
3908
|
-
* @param path - the path to the resource to retrieve
|
|
3909
|
-
* @param options - the options to pass to the service
|
|
3910
|
-
* @returns a paged async iterator that will retrieve items from the server.
|
|
3911
|
-
*/
|
|
3912
|
-
function getPagedAsyncIterator(pagedResult, path, options) {
|
|
3913
|
-
const iter = getItemAsyncIterator(pagedResult, path, options);
|
|
3914
|
-
return {
|
|
3915
|
-
next() {
|
|
3916
|
-
return iter.next();
|
|
3917
|
-
},
|
|
3918
|
-
[Symbol.asyncIterator]() {
|
|
3919
|
-
return this;
|
|
3920
|
-
},
|
|
3921
|
-
byPage: (settings) => {
|
|
3922
|
-
const pageOptions = Object.assign(Object.assign({}, options), { top: settings === null || settings === void 0 ? void 0 : settings.maxPageSize });
|
|
3923
|
-
return getPageAsyncIterator(pagedResult, path, pageOptions);
|
|
3924
|
-
}
|
|
3925
|
-
};
|
|
3926
|
-
}
|
|
3927
|
-
function getItemAsyncIterator(pagedResult, path, options) {
|
|
3928
|
-
return tslib.__asyncGenerator(this, arguments, function* getItemAsyncIterator_1() {
|
|
3929
|
-
var e_1, _a;
|
|
3930
|
-
const metaInfo = { isArray: false };
|
|
3931
|
-
const pages = getPageAsyncIterator(pagedResult, path, options, metaInfo);
|
|
3932
|
-
const firstVal = yield tslib.__await(pages.next());
|
|
3933
|
-
// if the result does not have an array shape, i.e. TPage = TElement, then we return it as is
|
|
3934
|
-
if (!metaInfo.isArray) {
|
|
3935
|
-
yield yield tslib.__await(firstVal.value);
|
|
3936
|
-
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(pages)));
|
|
3937
|
-
}
|
|
3938
|
-
else {
|
|
3939
|
-
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(firstVal.value)));
|
|
3940
|
-
try {
|
|
3941
|
-
for (var pages_1 = tslib.__asyncValues(pages), pages_1_1; pages_1_1 = yield tslib.__await(pages_1.next()), !pages_1_1.done;) {
|
|
3942
|
-
const page = pages_1_1.value;
|
|
3943
|
-
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
3944
|
-
}
|
|
3945
|
-
}
|
|
3946
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3947
|
-
finally {
|
|
3948
|
-
try {
|
|
3949
|
-
if (pages_1_1 && !pages_1_1.done && (_a = pages_1.return)) yield tslib.__await(_a.call(pages_1));
|
|
3950
|
-
}
|
|
3951
|
-
finally { if (e_1) throw e_1.error; }
|
|
3952
|
-
}
|
|
3953
|
-
}
|
|
3954
|
-
});
|
|
3955
|
-
}
|
|
3956
|
-
function getPageAsyncIterator(pagedResult, path, options, metaInfo = { isArray: true }) {
|
|
3957
|
-
return tslib.__asyncGenerator(this, arguments, function* getPageAsyncIterator_1() {
|
|
3958
|
-
let response = yield tslib.__await(retrievePage(pagedResult, path, options));
|
|
3959
|
-
metaInfo.isArray = Array.isArray(response.result);
|
|
3960
|
-
yield yield tslib.__await(response.result);
|
|
3961
|
-
while (response.nextLink) {
|
|
3962
|
-
response = yield tslib.__await(retrievePage(pagedResult, response.nextLink, options));
|
|
3963
|
-
yield yield tslib.__await(response.result);
|
|
3964
|
-
}
|
|
3965
|
-
});
|
|
3966
|
-
}
|
|
3967
|
-
function getDefaultNextLink(response) {
|
|
3968
|
-
return response.nextLink;
|
|
3969
|
-
}
|
|
3970
|
-
async function retrievePage(pagedResult, path, options) {
|
|
3971
|
-
var _a, _b, _c;
|
|
3972
|
-
const response = await pagedResult.sendGetRequest(path, options);
|
|
3973
|
-
const result = (_b = (_a = pagedResult.buildPage) === null || _a === void 0 ? void 0 : _a.call(pagedResult, response)) !== null && _b !== void 0 ? _b : response.results;
|
|
3974
|
-
const getNextLink = (_c = pagedResult.getNextLink) !== null && _c !== void 0 ? _c : getDefaultNextLink;
|
|
3975
|
-
return {
|
|
3976
|
-
result,
|
|
3977
|
-
nextLink: getNextLink(response)
|
|
3978
|
-
};
|
|
3979
|
-
}
|
|
3980
|
-
|
|
3981
4564
|
// Copyright (c) Microsoft Corporation.
|
|
3982
4565
|
const serializer$1 = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
3983
4566
|
// Consider whether the spec can be exported by code gen
|
|
@@ -4022,7 +4605,7 @@ class HealthLro {
|
|
|
4022
4605
|
};
|
|
4023
4606
|
}
|
|
4024
4607
|
catch (e) {
|
|
4025
|
-
const exception =
|
|
4608
|
+
const exception = compileError(e);
|
|
4026
4609
|
span.setStatus({
|
|
4027
4610
|
code: coreTracing.SpanStatusCode.ERROR,
|
|
4028
4611
|
message: exception.message
|
|
@@ -4068,20 +4651,28 @@ function isHealthDone(response) {
|
|
|
4068
4651
|
function processHealthResult(
|
|
4069
4652
|
// eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters
|
|
4070
4653
|
client, documents, options) {
|
|
4071
|
-
const pagedResult = {
|
|
4072
|
-
sendGetRequest: (path, optionsParam) => sendGetRequest(client, healthStatusOperationSpec$1, "HealthStatus", optionsParam, path).then((response) => response.flatResponse),
|
|
4073
|
-
buildPage: (flatResponse) => {
|
|
4074
|
-
if (flatResponse.results) {
|
|
4075
|
-
return processAndCombineSuccessfulAndErroneousDocuments(documents, flatResponse.results, makeHealthcareEntitiesResult, makeHealthcareEntitiesErrorResult);
|
|
4076
|
-
}
|
|
4077
|
-
else {
|
|
4078
|
-
throw new Error("Healthcare action has succeeded but there are no results!");
|
|
4079
|
-
}
|
|
4080
|
-
}
|
|
4081
|
-
};
|
|
4082
4654
|
return (result, state) => {
|
|
4083
4655
|
const pollingURL = state.pollingURL;
|
|
4084
|
-
const
|
|
4656
|
+
const pagedResult = {
|
|
4657
|
+
firstPageLink: pollingURL,
|
|
4658
|
+
getPage: async (pageLink, maxPageSize) => {
|
|
4659
|
+
const response = await sendGetRequest(client, healthStatusOperationSpec$1, "HealthStatus",
|
|
4660
|
+
// if `top` is set to `undefined`, the default value will not be sent
|
|
4661
|
+
// as part of the request.
|
|
4662
|
+
maxPageSize ? Object.assign(Object.assign({}, options), { top: maxPageSize }) : options, pageLink);
|
|
4663
|
+
const flatResponse = response.flatResponse;
|
|
4664
|
+
if (flatResponse.results) {
|
|
4665
|
+
return {
|
|
4666
|
+
page: processAndCombineSuccessfulAndErroneousDocuments(documents, flatResponse.results, makeHealthcareEntitiesResult, makeHealthcareEntitiesErrorResult),
|
|
4667
|
+
nextPageLink: flatResponse.nextLink
|
|
4668
|
+
};
|
|
4669
|
+
}
|
|
4670
|
+
else {
|
|
4671
|
+
throw new Error("Healthcare action has succeeded but there are no results!");
|
|
4672
|
+
}
|
|
4673
|
+
}
|
|
4674
|
+
};
|
|
4675
|
+
const pagedIterator = corePaging.getPagedAsyncIterator(pagedResult);
|
|
4085
4676
|
return Object.assign(pagedIterator, {
|
|
4086
4677
|
statistics: result.results.statistics,
|
|
4087
4678
|
modelVersion: result.results.modelVersion
|
|
@@ -4099,6 +4690,52 @@ function updateHealthState(state, lastResponse) {
|
|
|
4099
4690
|
state.status = response.status;
|
|
4100
4691
|
}
|
|
4101
4692
|
|
|
4693
|
+
// Copyright (c) Microsoft Corporation.
|
|
4694
|
+
/**
|
|
4695
|
+
* @internal
|
|
4696
|
+
*/
|
|
4697
|
+
function makeMultiCategoryClassifyResult(result) {
|
|
4698
|
+
const { id, warnings, statistics, classifications } = result;
|
|
4699
|
+
return Object.assign(Object.assign({}, makeTextAnalyticsSuccessResult(id, warnings, statistics)), { classifications });
|
|
4700
|
+
}
|
|
4701
|
+
/**
|
|
4702
|
+
* @internal
|
|
4703
|
+
*/
|
|
4704
|
+
function makeMultiCategoryClassifyErrorResult(id, error) {
|
|
4705
|
+
return makeTextAnalyticsErrorResult(id, error);
|
|
4706
|
+
}
|
|
4707
|
+
|
|
4708
|
+
// Copyright (c) Microsoft Corporation.
|
|
4709
|
+
/**
|
|
4710
|
+
* @internal
|
|
4711
|
+
*/
|
|
4712
|
+
function makeMultiCategoryClassifyResultArray(input, response) {
|
|
4713
|
+
return combineSuccessfulAndErroneousDocumentsWithStatisticsAndCustomProjectInfo(input, response, makeMultiCategoryClassifyResult, makeMultiCategoryClassifyErrorResult);
|
|
4714
|
+
}
|
|
4715
|
+
|
|
4716
|
+
// Copyright (c) Microsoft Corporation.
|
|
4717
|
+
/**
|
|
4718
|
+
* @internal
|
|
4719
|
+
*/
|
|
4720
|
+
function makeSingleCategoryClassifyResult(result) {
|
|
4721
|
+
const { id, warnings, statistics, classification } = result;
|
|
4722
|
+
return Object.assign(Object.assign({}, makeTextAnalyticsSuccessResult(id, warnings, statistics)), { classification });
|
|
4723
|
+
}
|
|
4724
|
+
/**
|
|
4725
|
+
* @internal
|
|
4726
|
+
*/
|
|
4727
|
+
function makeSingleCategoryClassifyErrorResult(id, error) {
|
|
4728
|
+
return makeTextAnalyticsErrorResult(id, error);
|
|
4729
|
+
}
|
|
4730
|
+
|
|
4731
|
+
// Copyright (c) Microsoft Corporation.
|
|
4732
|
+
/**
|
|
4733
|
+
* @internal
|
|
4734
|
+
*/
|
|
4735
|
+
function makeSingleCategoryClassifyResultArray(input, response) {
|
|
4736
|
+
return combineSuccessfulAndErroneousDocumentsWithStatisticsAndCustomProjectInfo(input, response, makeSingleCategoryClassifyResult, makeSingleCategoryClassifyErrorResult);
|
|
4737
|
+
}
|
|
4738
|
+
|
|
4102
4739
|
// Copyright (c) Microsoft Corporation.
|
|
4103
4740
|
/**
|
|
4104
4741
|
* @internal
|
|
@@ -4122,6 +4759,29 @@ function makeExtractSummaryResultArray(input, response) {
|
|
|
4122
4759
|
return combineSuccessfulAndErroneousDocumentsWithStatisticsAndModelVersion(input, response, makeExtractSummaryResult, makeExtractSummaryErrorResult);
|
|
4123
4760
|
}
|
|
4124
4761
|
|
|
4762
|
+
// Copyright (c) Microsoft Corporation.
|
|
4763
|
+
/**
|
|
4764
|
+
* @internal
|
|
4765
|
+
*/
|
|
4766
|
+
function makeRecognizeCustomEntitiesResult(result) {
|
|
4767
|
+
const { id, warnings, statistics, entities } = result;
|
|
4768
|
+
return Object.assign(Object.assign({}, makeTextAnalyticsSuccessResult(id, warnings, statistics)), { entities });
|
|
4769
|
+
}
|
|
4770
|
+
/**
|
|
4771
|
+
* @internal
|
|
4772
|
+
*/
|
|
4773
|
+
function makeRecognizeCustomEntitiesErrorResult(id, error) {
|
|
4774
|
+
return makeTextAnalyticsErrorResult(id, error);
|
|
4775
|
+
}
|
|
4776
|
+
|
|
4777
|
+
// Copyright (c) Microsoft Corporation.
|
|
4778
|
+
/**
|
|
4779
|
+
* @internal
|
|
4780
|
+
*/
|
|
4781
|
+
function makeRecognizeCustomEntitiesResultArray(input, response) {
|
|
4782
|
+
return combineSuccessfulAndErroneousDocumentsWithStatisticsAndCustomProjectInfo(input, response, makeRecognizeCustomEntitiesResult, makeRecognizeCustomEntitiesErrorResult);
|
|
4783
|
+
}
|
|
4784
|
+
|
|
4125
4785
|
// Copyright (c) Microsoft Corporation.
|
|
4126
4786
|
/**
|
|
4127
4787
|
* Converts the service task name (in the JSON pointer in an action error) to an action type name.
|
|
@@ -4149,6 +4809,15 @@ function convertTaskTypeToActionType(taskType) {
|
|
|
4149
4809
|
case "extractiveSummarizationTasks": {
|
|
4150
4810
|
return "ExtractSummary";
|
|
4151
4811
|
}
|
|
4812
|
+
case "customEntityRecognitionTasks": {
|
|
4813
|
+
return "RecognizeCustomEntities";
|
|
4814
|
+
}
|
|
4815
|
+
case "customSingleClassificationTasks": {
|
|
4816
|
+
return "SingleCategoryClassify";
|
|
4817
|
+
}
|
|
4818
|
+
case "customMultiClassificationTasks": {
|
|
4819
|
+
return "MultiCategoryClassify";
|
|
4820
|
+
}
|
|
4152
4821
|
default: {
|
|
4153
4822
|
throw new Error(`unexpected action type from the service: ${taskType}`);
|
|
4154
4823
|
}
|
|
@@ -4162,7 +4831,7 @@ function convertTaskTypeToActionType(taskType) {
|
|
|
4162
4831
|
*/
|
|
4163
4832
|
function parseActionError(erredActions) {
|
|
4164
4833
|
if (erredActions.target) {
|
|
4165
|
-
const regex = new RegExp(/#\/tasks\/(entityRecognitionTasks|entityRecognitionPiiTasks|keyPhraseExtractionTasks|entityLinkingTasks|sentimentAnalysisTasks|extractiveSummarizationTasks)\/(\d+)/);
|
|
4834
|
+
const regex = new RegExp(/#\/tasks\/(entityRecognitionTasks|entityRecognitionPiiTasks|keyPhraseExtractionTasks|entityLinkingTasks|sentimentAnalysisTasks|extractiveSummarizationTasks|customEntityRecognitionTasks|customSingleClassificationTasks|customMultiClassificationTasks)\/(\d+)/);
|
|
4166
4835
|
const result = regex.exec(erredActions.target);
|
|
4167
4836
|
if (result !== null) {
|
|
4168
4837
|
return {
|
|
@@ -4188,7 +4857,7 @@ function parseActionError(erredActions) {
|
|
|
4188
4857
|
* @param extractKeyPhrasesActionErrors - a list of extract key phrases action errors to be filled from the errors list
|
|
4189
4858
|
* @internal
|
|
4190
4859
|
*/
|
|
4191
|
-
function categorizeActionErrors(erredActions, recognizeEntitiesActionErrors, recognizePiiEntitiesActionErrors, extractKeyPhrasesActionErrors, recognizeLinkedEntitiesActionErrors, analyzeSentimentActionErrors, extractSummarySentencesActionErrors) {
|
|
4860
|
+
function categorizeActionErrors(erredActions, recognizeEntitiesActionErrors, recognizePiiEntitiesActionErrors, extractKeyPhrasesActionErrors, recognizeLinkedEntitiesActionErrors, analyzeSentimentActionErrors, extractSummarySentencesActionErrors, recognizeCustomEntitiesActionErrors, singleCategoryClassifyActionErrors, multiCategoryClassifyActionErrors) {
|
|
4192
4861
|
for (const error of erredActions) {
|
|
4193
4862
|
const actionError = parseActionError(error);
|
|
4194
4863
|
switch (actionError.type) {
|
|
@@ -4216,6 +4885,18 @@ function categorizeActionErrors(erredActions, recognizeEntitiesActionErrors, rec
|
|
|
4216
4885
|
extractSummarySentencesActionErrors.push(actionError);
|
|
4217
4886
|
break;
|
|
4218
4887
|
}
|
|
4888
|
+
case "RecognizeCustomEntities": {
|
|
4889
|
+
recognizeCustomEntitiesActionErrors.push(actionError);
|
|
4890
|
+
break;
|
|
4891
|
+
}
|
|
4892
|
+
case "SingleCategoryClassify": {
|
|
4893
|
+
singleCategoryClassifyActionErrors.push(actionError);
|
|
4894
|
+
break;
|
|
4895
|
+
}
|
|
4896
|
+
case "MultiCategoryClassify": {
|
|
4897
|
+
multiCategoryClassifyActionErrors.push(actionError);
|
|
4898
|
+
break;
|
|
4899
|
+
}
|
|
4219
4900
|
}
|
|
4220
4901
|
}
|
|
4221
4902
|
}
|
|
@@ -4224,8 +4905,12 @@ function categorizeActionErrors(erredActions, recognizeEntitiesActionErrors, rec
|
|
|
4224
4905
|
* @param error - the error the service sent for a task
|
|
4225
4906
|
* @param lastUpdateDateTime - the time when this task failed
|
|
4226
4907
|
*/
|
|
4227
|
-
function createErredAction(error, lastUpdateDateTime) {
|
|
4228
|
-
return {
|
|
4908
|
+
function createErredAction(error, lastUpdateDateTime, taskName) {
|
|
4909
|
+
return {
|
|
4910
|
+
error: intoTextAnalyticsError(error),
|
|
4911
|
+
failedOn: lastUpdateDateTime,
|
|
4912
|
+
actionName: taskName
|
|
4913
|
+
};
|
|
4229
4914
|
}
|
|
4230
4915
|
/**
|
|
4231
4916
|
* Creates a list of results for any action.
|
|
@@ -4238,19 +4923,23 @@ function createErredAction(error, lastUpdateDateTime) {
|
|
|
4238
4923
|
function makeActionResult(documents, makeResultsArray, succeededTasks, erredActions) {
|
|
4239
4924
|
let errorIndex = 0;
|
|
4240
4925
|
function convertTasksToActions(actions, task) {
|
|
4241
|
-
const { results: actionResults, lastUpdateDateTime } = task;
|
|
4926
|
+
const { results: actionResults, lastUpdateDateTime, taskName } = task;
|
|
4242
4927
|
if (actionResults !== undefined) {
|
|
4243
4928
|
const recognizeEntitiesResults = makeResultsArray(documents, actionResults);
|
|
4244
4929
|
return [
|
|
4245
4930
|
...actions,
|
|
4246
4931
|
{
|
|
4247
4932
|
results: recognizeEntitiesResults,
|
|
4248
|
-
completedOn: lastUpdateDateTime
|
|
4933
|
+
completedOn: lastUpdateDateTime,
|
|
4934
|
+
actionName: taskName
|
|
4249
4935
|
}
|
|
4250
4936
|
];
|
|
4251
4937
|
}
|
|
4252
4938
|
else {
|
|
4253
|
-
return [
|
|
4939
|
+
return [
|
|
4940
|
+
...actions,
|
|
4941
|
+
createErredAction(erredActions[errorIndex++], lastUpdateDateTime, taskName)
|
|
4942
|
+
];
|
|
4254
4943
|
}
|
|
4255
4944
|
}
|
|
4256
4945
|
return succeededTasks.reduce(convertTasksToActions, []);
|
|
@@ -4263,21 +4952,27 @@ function makeActionResult(documents, makeResultsArray, succeededTasks, erredActi
|
|
|
4263
4952
|
* @internal
|
|
4264
4953
|
*/
|
|
4265
4954
|
function createAnalyzeActionsResult(response, documents) {
|
|
4266
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
4955
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
4267
4956
|
const recognizeEntitiesActionErrors = [];
|
|
4268
4957
|
const recognizePiiEntitiesActionErrors = [];
|
|
4269
4958
|
const extractKeyPhrasesActionErrors = [];
|
|
4270
4959
|
const recognizeLinkedEntitiesActionErrors = [];
|
|
4271
4960
|
const analyzeSentimentActionErrors = [];
|
|
4272
4961
|
const extractSummarySentencesActionErrors = [];
|
|
4273
|
-
|
|
4962
|
+
const recognizeCustomEntitiesActionErrors = [];
|
|
4963
|
+
const singleCategoryClassifyActionErrors = [];
|
|
4964
|
+
const multiCategoryClassifyActionErrors = [];
|
|
4965
|
+
categorizeActionErrors((_a = response === null || response === void 0 ? void 0 : response.errors) !== null && _a !== void 0 ? _a : [], recognizeEntitiesActionErrors, recognizePiiEntitiesActionErrors, extractKeyPhrasesActionErrors, recognizeLinkedEntitiesActionErrors, analyzeSentimentActionErrors, extractSummarySentencesActionErrors, recognizeCustomEntitiesActionErrors, singleCategoryClassifyActionErrors, multiCategoryClassifyActionErrors);
|
|
4274
4966
|
return {
|
|
4275
4967
|
recognizeEntitiesResults: makeActionResult(documents, makeRecognizeCategorizedEntitiesResultArray, (_b = response.tasks.entityRecognitionTasks) !== null && _b !== void 0 ? _b : [], recognizeEntitiesActionErrors),
|
|
4276
4968
|
recognizePiiEntitiesResults: makeActionResult(documents, makeRecognizePiiEntitiesResultArray, (_c = response.tasks.entityRecognitionPiiTasks) !== null && _c !== void 0 ? _c : [], recognizePiiEntitiesActionErrors),
|
|
4277
4969
|
extractKeyPhrasesResults: makeActionResult(documents, makeExtractKeyPhrasesResultArray, (_d = response.tasks.keyPhraseExtractionTasks) !== null && _d !== void 0 ? _d : [], extractKeyPhrasesActionErrors),
|
|
4278
4970
|
recognizeLinkedEntitiesResults: makeActionResult(documents, makeRecognizeLinkedEntitiesResultArray, (_e = response.tasks.entityLinkingTasks) !== null && _e !== void 0 ? _e : [], recognizeLinkedEntitiesActionErrors),
|
|
4279
4971
|
analyzeSentimentResults: makeActionResult(documents, makeAnalyzeSentimentResultArray, (_f = response.tasks.sentimentAnalysisTasks) !== null && _f !== void 0 ? _f : [], analyzeSentimentActionErrors),
|
|
4280
|
-
extractSummaryResults: makeActionResult(documents, makeExtractSummaryResultArray, (_g = response.tasks.extractiveSummarizationTasks) !== null && _g !== void 0 ? _g : [], extractSummarySentencesActionErrors)
|
|
4972
|
+
extractSummaryResults: makeActionResult(documents, makeExtractSummaryResultArray, (_g = response.tasks.extractiveSummarizationTasks) !== null && _g !== void 0 ? _g : [], extractSummarySentencesActionErrors),
|
|
4973
|
+
recognizeCustomEntitiesResults: makeActionResult(documents, makeRecognizeCustomEntitiesResultArray, (_h = response.tasks.customEntityRecognitionTasks) !== null && _h !== void 0 ? _h : [], recognizeCustomEntitiesActionErrors),
|
|
4974
|
+
singleCategoryClassifyResults: makeActionResult(documents, makeSingleCategoryClassifyResultArray, (_j = response.tasks.customSingleClassificationTasks) !== null && _j !== void 0 ? _j : [], singleCategoryClassifyActionErrors),
|
|
4975
|
+
multiCategoryClassifyResults: makeActionResult(documents, makeMultiCategoryClassifyResultArray, (_k = response.tasks.customMultiClassificationTasks) !== null && _k !== void 0 ? _k : [], multiCategoryClassifyActionErrors)
|
|
4281
4976
|
};
|
|
4282
4977
|
}
|
|
4283
4978
|
|
|
@@ -4285,7 +4980,6 @@ function createAnalyzeActionsResult(response, documents) {
|
|
|
4285
4980
|
const serializer$2 = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
4286
4981
|
// Consider whether the spec can be exported by code gen
|
|
4287
4982
|
const analyzeStatusOperationSpec$1 = {
|
|
4288
|
-
path: "/analyze/jobs/{jobId}",
|
|
4289
4983
|
httpMethod: "GET",
|
|
4290
4984
|
responses: {
|
|
4291
4985
|
200: {
|
|
@@ -4330,7 +5024,7 @@ class AnalyzeLro {
|
|
|
4330
5024
|
};
|
|
4331
5025
|
}
|
|
4332
5026
|
catch (e) {
|
|
4333
|
-
const exception =
|
|
5027
|
+
const exception = compileError(e);
|
|
4334
5028
|
span.setStatus({
|
|
4335
5029
|
code: coreTracing.SpanStatusCode.ERROR,
|
|
4336
5030
|
message: exception.message
|
|
@@ -4365,20 +5059,23 @@ function isAnalyzeDone(response) {
|
|
|
4365
5059
|
function processAnalyzeResult(
|
|
4366
5060
|
// eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters
|
|
4367
5061
|
client, documents, options) {
|
|
4368
|
-
const pagedResult = {
|
|
4369
|
-
sendGetRequest: (path, optionsParam) => sendGetRequest(client, analyzeStatusOperationSpec$1, "AnalyzeStatus", optionsParam, path).then((response) => response.flatResponse),
|
|
4370
|
-
buildPage: (flatResponse) => {
|
|
4371
|
-
if (flatResponse) {
|
|
4372
|
-
return createAnalyzeActionsResult(flatResponse, documents);
|
|
4373
|
-
}
|
|
4374
|
-
else {
|
|
4375
|
-
throw new Error("Analyze action has succeeded but there are no results!");
|
|
4376
|
-
}
|
|
4377
|
-
}
|
|
4378
|
-
};
|
|
4379
5062
|
return (_result, state) => {
|
|
4380
5063
|
const pollingURL = state.pollingURL;
|
|
4381
|
-
const
|
|
5064
|
+
const pagedResult = {
|
|
5065
|
+
firstPageLink: pollingURL,
|
|
5066
|
+
getPage: async (pageLink, maxPageSize) => {
|
|
5067
|
+
const response = await sendGetRequest(client, analyzeStatusOperationSpec$1, "AnalyzeStatus",
|
|
5068
|
+
// if `top` is set to `undefined`, the default value will not be sent
|
|
5069
|
+
// as part of the request.
|
|
5070
|
+
maxPageSize ? Object.assign(Object.assign({}, options), { top: maxPageSize }) : options, pageLink);
|
|
5071
|
+
const flatResponse = response.flatResponse;
|
|
5072
|
+
return {
|
|
5073
|
+
page: createAnalyzeActionsResult(flatResponse, documents),
|
|
5074
|
+
nextPageLink: flatResponse.nextLink
|
|
5075
|
+
};
|
|
5076
|
+
}
|
|
5077
|
+
};
|
|
5078
|
+
const pagedIterator = corePaging.getPagedAsyncIterator(pagedResult);
|
|
4382
5079
|
// Attach stats if the service starts to return them
|
|
4383
5080
|
// https://github.com/Azure/azure-sdk-for-js/issues/14139
|
|
4384
5081
|
// state.result = Object.assign(pagedIterator, {
|
|
@@ -4514,7 +5211,7 @@ class TextAnalyticsClient {
|
|
|
4514
5211
|
* earlier versions were throwing an exception that included the inner
|
|
4515
5212
|
* code only.
|
|
4516
5213
|
*/
|
|
4517
|
-
const backwardCompatibleException =
|
|
5214
|
+
const backwardCompatibleException = compileError(e);
|
|
4518
5215
|
span.setStatus({
|
|
4519
5216
|
code: coreTracing.SpanStatusCode.ERROR,
|
|
4520
5217
|
message: backwardCompatibleException.message
|
|
@@ -4706,7 +5403,6 @@ class TextAnalyticsClient {
|
|
|
4706
5403
|
realInputs = documents;
|
|
4707
5404
|
realOptions = languageOrOptions || {};
|
|
4708
5405
|
}
|
|
4709
|
-
validateActions(actions);
|
|
4710
5406
|
const compiledActions = compileAnalyzeInput(actions);
|
|
4711
5407
|
const { updateIntervalInMs, resumeFrom, displayName, includeStatistics, onResponse, requestOptions, serializerOptions, abortSignal, tracingOptions } = realOptions;
|
|
4712
5408
|
const lro = new AnalyzeLro(this.client, {
|
|
@@ -4734,32 +5430,21 @@ class TextAnalyticsClient {
|
|
|
4734
5430
|
return poller;
|
|
4735
5431
|
}
|
|
4736
5432
|
}
|
|
4737
|
-
function validateActions(actions) {
|
|
4738
|
-
function validateActionType(actionList, actionType) {
|
|
4739
|
-
var _a;
|
|
4740
|
-
if (((_a = actionList === null || actionList === void 0 ? void 0 : actionList.length) !== null && _a !== void 0 ? _a : 0) > 1) {
|
|
4741
|
-
throw new Error(`beginAnalyzeActions: Currently, the service can accept up to one action only for ${actionType} actions.`);
|
|
4742
|
-
}
|
|
4743
|
-
}
|
|
4744
|
-
validateActionType(actions.analyzeSentimentActions, `analyzeSentiment`);
|
|
4745
|
-
validateActionType(actions.extractKeyPhrasesActions, `extractKeyPhrases`);
|
|
4746
|
-
validateActionType(actions.recognizeEntitiesActions, `recognizeEntities`);
|
|
4747
|
-
validateActionType(actions.recognizeLinkedEntitiesActions, `recognizeLinkedEntities`);
|
|
4748
|
-
validateActionType(actions.recognizePiiEntitiesActions, `recognizePiiEntities`);
|
|
4749
|
-
validateActionType(actions.extractSummaryActions, `extractSummary`);
|
|
4750
|
-
}
|
|
4751
5433
|
/**
|
|
4752
5434
|
* @internal
|
|
4753
5435
|
*/
|
|
4754
5436
|
function compileAnalyzeInput(actions) {
|
|
4755
|
-
var _a, _b, _c, _d, _e, _f;
|
|
5437
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
4756
5438
|
return {
|
|
4757
5439
|
entityRecognitionPiiTasks: (_a = actions.recognizePiiEntitiesActions) === null || _a === void 0 ? void 0 : _a.map(compose(setStrEncodingParam, compose(setCategoriesFilter, addParamsToTask))),
|
|
4758
5440
|
entityRecognitionTasks: (_b = actions.recognizeEntitiesActions) === null || _b === void 0 ? void 0 : _b.map(compose(setStrEncodingParam, addParamsToTask)),
|
|
4759
5441
|
keyPhraseExtractionTasks: (_c = actions.extractKeyPhrasesActions) === null || _c === void 0 ? void 0 : _c.map(addParamsToTask),
|
|
4760
5442
|
entityLinkingTasks: (_d = actions.recognizeLinkedEntitiesActions) === null || _d === void 0 ? void 0 : _d.map(compose(setStrEncodingParam, addParamsToTask)),
|
|
4761
5443
|
sentimentAnalysisTasks: (_e = actions.analyzeSentimentActions) === null || _e === void 0 ? void 0 : _e.map(compose(setStrEncodingParam, compose(setOpinionMining, addParamsToTask))),
|
|
4762
|
-
extractiveSummarizationTasks: (_f = actions.extractSummaryActions) === null || _f === void 0 ? void 0 : _f.map(compose(setStrEncodingParam, compose(setSentenceCount, compose(setOrderBy, addParamsToTask))))
|
|
5444
|
+
extractiveSummarizationTasks: (_f = actions.extractSummaryActions) === null || _f === void 0 ? void 0 : _f.map(compose(setStrEncodingParam, compose(setSentenceCount, compose(setOrderBy, addParamsToTask)))),
|
|
5445
|
+
customEntityRecognitionTasks: (_g = actions.recognizeCustomEntitiesActions) === null || _g === void 0 ? void 0 : _g.map(compose(setStrEncodingParam, addParamsToTask)),
|
|
5446
|
+
customSingleClassificationTasks: (_h = actions.singleCategoryClassifyActions) === null || _h === void 0 ? void 0 : _h.map(addParamsToTask),
|
|
5447
|
+
customMultiClassificationTasks: (_j = actions.multiCategoryClassifyActions) === null || _j === void 0 ? void 0 : _j.map(addParamsToTask)
|
|
4763
5448
|
};
|
|
4764
5449
|
}
|
|
4765
5450
|
function isStringArray(documents) {
|