@azure/ai-text-analytics 5.2.0-alpha.20211026.2 → 5.2.0-alpha.20211027.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/README.md +3 -1
- package/dist/index.js +803 -111
- package/dist/index.js.map +1 -1
- package/dist-esm/src/analyzeActionsResult.js +35 -5
- package/dist-esm/src/analyzeActionsResult.js.map +1 -1
- package/dist-esm/src/generated/generatedClientContext.js +1 -1
- 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 +559 -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/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 +5 -2
- 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/package.json +1 -1
- package/types/ai-text-analytics.d.ts +293 -2
package/dist/index.js
CHANGED
|
@@ -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
|
}
|
|
@@ -220,6 +256,7 @@ const EntitiesTaskParameters = {
|
|
|
220
256
|
}
|
|
221
257
|
},
|
|
222
258
|
loggingOptOut: {
|
|
259
|
+
defaultValue: false,
|
|
223
260
|
serializedName: "loggingOptOut",
|
|
224
261
|
type: {
|
|
225
262
|
name: "Boolean"
|
|
@@ -326,6 +363,7 @@ const KeyPhrasesTaskParameters = {
|
|
|
326
363
|
}
|
|
327
364
|
},
|
|
328
365
|
loggingOptOut: {
|
|
366
|
+
defaultValue: false,
|
|
329
367
|
serializedName: "loggingOptOut",
|
|
330
368
|
type: {
|
|
331
369
|
name: "Boolean"
|
|
@@ -362,6 +400,7 @@ const EntityLinkingTaskParameters = {
|
|
|
362
400
|
}
|
|
363
401
|
},
|
|
364
402
|
loggingOptOut: {
|
|
403
|
+
defaultValue: false,
|
|
365
404
|
serializedName: "loggingOptOut",
|
|
366
405
|
type: {
|
|
367
406
|
name: "Boolean"
|
|
@@ -404,12 +443,14 @@ const SentimentAnalysisTaskParameters = {
|
|
|
404
443
|
}
|
|
405
444
|
},
|
|
406
445
|
loggingOptOut: {
|
|
446
|
+
defaultValue: false,
|
|
407
447
|
serializedName: "loggingOptOut",
|
|
408
448
|
type: {
|
|
409
449
|
name: "Boolean"
|
|
410
450
|
}
|
|
411
451
|
},
|
|
412
452
|
opinionMining: {
|
|
453
|
+
defaultValue: false,
|
|
413
454
|
serializedName: "opinionMining",
|
|
414
455
|
type: {
|
|
415
456
|
name: "Boolean"
|
|
@@ -452,7 +493,7 @@ const ExtractiveSummarizationTaskParameters = {
|
|
|
452
493
|
}
|
|
453
494
|
},
|
|
454
495
|
loggingOptOut: {
|
|
455
|
-
defaultValue:
|
|
496
|
+
defaultValue: false,
|
|
456
497
|
serializedName: "loggingOptOut",
|
|
457
498
|
type: {
|
|
458
499
|
name: "Boolean"
|
|
@@ -481,6 +522,144 @@ const ExtractiveSummarizationTaskParameters = {
|
|
|
481
522
|
}
|
|
482
523
|
}
|
|
483
524
|
};
|
|
525
|
+
const CustomEntitiesTask = {
|
|
526
|
+
type: {
|
|
527
|
+
name: "Composite",
|
|
528
|
+
className: "CustomEntitiesTask",
|
|
529
|
+
modelProperties: {
|
|
530
|
+
parameters: {
|
|
531
|
+
serializedName: "parameters",
|
|
532
|
+
type: {
|
|
533
|
+
name: "Composite",
|
|
534
|
+
className: "CustomEntitiesTaskParameters"
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
const CustomEntitiesTaskParameters = {
|
|
541
|
+
type: {
|
|
542
|
+
name: "Composite",
|
|
543
|
+
className: "CustomEntitiesTaskParameters",
|
|
544
|
+
modelProperties: {
|
|
545
|
+
projectName: {
|
|
546
|
+
serializedName: "project-name",
|
|
547
|
+
required: true,
|
|
548
|
+
type: {
|
|
549
|
+
name: "String"
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
deploymentName: {
|
|
553
|
+
serializedName: "deployment-name",
|
|
554
|
+
required: true,
|
|
555
|
+
type: {
|
|
556
|
+
name: "String"
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
loggingOptOut: {
|
|
560
|
+
defaultValue: false,
|
|
561
|
+
serializedName: "loggingOptOut",
|
|
562
|
+
type: {
|
|
563
|
+
name: "Boolean"
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
stringIndexType: {
|
|
567
|
+
serializedName: "stringIndexType",
|
|
568
|
+
type: {
|
|
569
|
+
name: "String"
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
};
|
|
575
|
+
const CustomSingleClassificationTask = {
|
|
576
|
+
type: {
|
|
577
|
+
name: "Composite",
|
|
578
|
+
className: "CustomSingleClassificationTask",
|
|
579
|
+
modelProperties: {
|
|
580
|
+
parameters: {
|
|
581
|
+
serializedName: "parameters",
|
|
582
|
+
type: {
|
|
583
|
+
name: "Composite",
|
|
584
|
+
className: "CustomSingleClassificationTaskParameters"
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
};
|
|
590
|
+
const CustomSingleClassificationTaskParameters = {
|
|
591
|
+
type: {
|
|
592
|
+
name: "Composite",
|
|
593
|
+
className: "CustomSingleClassificationTaskParameters",
|
|
594
|
+
modelProperties: {
|
|
595
|
+
projectName: {
|
|
596
|
+
serializedName: "project-name",
|
|
597
|
+
required: true,
|
|
598
|
+
type: {
|
|
599
|
+
name: "String"
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
deploymentName: {
|
|
603
|
+
serializedName: "deployment-name",
|
|
604
|
+
required: true,
|
|
605
|
+
type: {
|
|
606
|
+
name: "String"
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
loggingOptOut: {
|
|
610
|
+
defaultValue: false,
|
|
611
|
+
serializedName: "loggingOptOut",
|
|
612
|
+
type: {
|
|
613
|
+
name: "Boolean"
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
};
|
|
619
|
+
const CustomMultiClassificationTask = {
|
|
620
|
+
type: {
|
|
621
|
+
name: "Composite",
|
|
622
|
+
className: "CustomMultiClassificationTask",
|
|
623
|
+
modelProperties: {
|
|
624
|
+
parameters: {
|
|
625
|
+
serializedName: "parameters",
|
|
626
|
+
type: {
|
|
627
|
+
name: "Composite",
|
|
628
|
+
className: "CustomMultiClassificationTaskParameters"
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
};
|
|
634
|
+
const CustomMultiClassificationTaskParameters = {
|
|
635
|
+
type: {
|
|
636
|
+
name: "Composite",
|
|
637
|
+
className: "CustomMultiClassificationTaskParameters",
|
|
638
|
+
modelProperties: {
|
|
639
|
+
projectName: {
|
|
640
|
+
serializedName: "project-name",
|
|
641
|
+
required: true,
|
|
642
|
+
type: {
|
|
643
|
+
name: "String"
|
|
644
|
+
}
|
|
645
|
+
},
|
|
646
|
+
deploymentName: {
|
|
647
|
+
serializedName: "deployment-name",
|
|
648
|
+
required: true,
|
|
649
|
+
type: {
|
|
650
|
+
name: "String"
|
|
651
|
+
}
|
|
652
|
+
},
|
|
653
|
+
loggingOptOut: {
|
|
654
|
+
defaultValue: false,
|
|
655
|
+
serializedName: "loggingOptOut",
|
|
656
|
+
type: {
|
|
657
|
+
name: "Boolean"
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
};
|
|
484
663
|
const ErrorResponse = {
|
|
485
664
|
type: {
|
|
486
665
|
name: "Composite",
|
|
@@ -769,6 +948,42 @@ const TasksStateTasks = {
|
|
|
769
948
|
}
|
|
770
949
|
}
|
|
771
950
|
}
|
|
951
|
+
},
|
|
952
|
+
customEntityRecognitionTasks: {
|
|
953
|
+
serializedName: "customEntityRecognitionTasks",
|
|
954
|
+
type: {
|
|
955
|
+
name: "Sequence",
|
|
956
|
+
element: {
|
|
957
|
+
type: {
|
|
958
|
+
name: "Composite",
|
|
959
|
+
className: "TasksStateTasksCustomEntityRecognitionTasksItem"
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
},
|
|
964
|
+
customSingleClassificationTasks: {
|
|
965
|
+
serializedName: "customSingleClassificationTasks",
|
|
966
|
+
type: {
|
|
967
|
+
name: "Sequence",
|
|
968
|
+
element: {
|
|
969
|
+
type: {
|
|
970
|
+
name: "Composite",
|
|
971
|
+
className: "TasksStateTasksCustomSingleClassificationTasksItem"
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
},
|
|
976
|
+
customMultiClassificationTasks: {
|
|
977
|
+
serializedName: "customMultiClassificationTasks",
|
|
978
|
+
type: {
|
|
979
|
+
name: "Sequence",
|
|
980
|
+
element: {
|
|
981
|
+
type: {
|
|
982
|
+
name: "Composite",
|
|
983
|
+
className: "TasksStateTasksCustomMultiClassificationTasksItem"
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
}
|
|
772
987
|
}
|
|
773
988
|
}
|
|
774
989
|
}
|
|
@@ -1766,59 +1981,397 @@ const SentenceTarget = {
|
|
|
1766
1981
|
name: "String"
|
|
1767
1982
|
}
|
|
1768
1983
|
},
|
|
1769
|
-
relations: {
|
|
1770
|
-
serializedName: "relations",
|
|
1984
|
+
relations: {
|
|
1985
|
+
serializedName: "relations",
|
|
1986
|
+
required: true,
|
|
1987
|
+
type: {
|
|
1988
|
+
name: "Sequence",
|
|
1989
|
+
element: {
|
|
1990
|
+
type: {
|
|
1991
|
+
name: "Composite",
|
|
1992
|
+
className: "TargetRelation"
|
|
1993
|
+
}
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
}
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
};
|
|
2000
|
+
const TargetConfidenceScoreLabel = {
|
|
2001
|
+
type: {
|
|
2002
|
+
name: "Composite",
|
|
2003
|
+
className: "TargetConfidenceScoreLabel",
|
|
2004
|
+
modelProperties: {
|
|
2005
|
+
positive: {
|
|
2006
|
+
serializedName: "positive",
|
|
2007
|
+
required: true,
|
|
2008
|
+
type: {
|
|
2009
|
+
name: "Number"
|
|
2010
|
+
}
|
|
2011
|
+
},
|
|
2012
|
+
negative: {
|
|
2013
|
+
serializedName: "negative",
|
|
2014
|
+
required: true,
|
|
2015
|
+
type: {
|
|
2016
|
+
name: "Number"
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
};
|
|
2022
|
+
const TargetRelation = {
|
|
2023
|
+
type: {
|
|
2024
|
+
name: "Composite",
|
|
2025
|
+
className: "TargetRelation",
|
|
2026
|
+
modelProperties: {
|
|
2027
|
+
relationType: {
|
|
2028
|
+
serializedName: "relationType",
|
|
2029
|
+
required: true,
|
|
2030
|
+
type: {
|
|
2031
|
+
name: "Enum",
|
|
2032
|
+
allowedValues: ["assessment", "target"]
|
|
2033
|
+
}
|
|
2034
|
+
},
|
|
2035
|
+
ref: {
|
|
2036
|
+
serializedName: "ref",
|
|
2037
|
+
required: true,
|
|
2038
|
+
type: {
|
|
2039
|
+
name: "String"
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
};
|
|
2045
|
+
const SentenceAssessment = {
|
|
2046
|
+
type: {
|
|
2047
|
+
name: "Composite",
|
|
2048
|
+
className: "SentenceAssessment",
|
|
2049
|
+
modelProperties: {
|
|
2050
|
+
sentiment: {
|
|
2051
|
+
serializedName: "sentiment",
|
|
2052
|
+
required: true,
|
|
2053
|
+
type: {
|
|
2054
|
+
name: "Enum",
|
|
2055
|
+
allowedValues: ["positive", "mixed", "negative"]
|
|
2056
|
+
}
|
|
2057
|
+
},
|
|
2058
|
+
confidenceScores: {
|
|
2059
|
+
serializedName: "confidenceScores",
|
|
2060
|
+
type: {
|
|
2061
|
+
name: "Composite",
|
|
2062
|
+
className: "TargetConfidenceScoreLabel"
|
|
2063
|
+
}
|
|
2064
|
+
},
|
|
2065
|
+
offset: {
|
|
2066
|
+
serializedName: "offset",
|
|
2067
|
+
required: true,
|
|
2068
|
+
type: {
|
|
2069
|
+
name: "Number"
|
|
2070
|
+
}
|
|
2071
|
+
},
|
|
2072
|
+
length: {
|
|
2073
|
+
serializedName: "length",
|
|
2074
|
+
required: true,
|
|
2075
|
+
type: {
|
|
2076
|
+
name: "Number"
|
|
2077
|
+
}
|
|
2078
|
+
},
|
|
2079
|
+
text: {
|
|
2080
|
+
serializedName: "text",
|
|
2081
|
+
required: true,
|
|
2082
|
+
type: {
|
|
2083
|
+
name: "String"
|
|
2084
|
+
}
|
|
2085
|
+
},
|
|
2086
|
+
isNegated: {
|
|
2087
|
+
serializedName: "isNegated",
|
|
2088
|
+
required: true,
|
|
2089
|
+
type: {
|
|
2090
|
+
name: "Boolean"
|
|
2091
|
+
}
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
};
|
|
2096
|
+
const ExtractiveSummarizationTaskResult = {
|
|
2097
|
+
type: {
|
|
2098
|
+
name: "Composite",
|
|
2099
|
+
className: "ExtractiveSummarizationTaskResult",
|
|
2100
|
+
modelProperties: {
|
|
2101
|
+
results: {
|
|
2102
|
+
serializedName: "results",
|
|
2103
|
+
type: {
|
|
2104
|
+
name: "Composite",
|
|
2105
|
+
className: "ExtractiveSummarizationResult"
|
|
2106
|
+
}
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
}
|
|
2110
|
+
};
|
|
2111
|
+
const ExtractiveSummarizationResult = {
|
|
2112
|
+
type: {
|
|
2113
|
+
name: "Composite",
|
|
2114
|
+
className: "ExtractiveSummarizationResult",
|
|
2115
|
+
modelProperties: {
|
|
2116
|
+
documents: {
|
|
2117
|
+
serializedName: "documents",
|
|
2118
|
+
required: true,
|
|
2119
|
+
type: {
|
|
2120
|
+
name: "Sequence",
|
|
2121
|
+
element: {
|
|
2122
|
+
type: {
|
|
2123
|
+
name: "Composite",
|
|
2124
|
+
className: "ExtractedDocumentSummary"
|
|
2125
|
+
}
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
},
|
|
2129
|
+
errors: {
|
|
2130
|
+
serializedName: "errors",
|
|
2131
|
+
required: true,
|
|
2132
|
+
type: {
|
|
2133
|
+
name: "Sequence",
|
|
2134
|
+
element: {
|
|
2135
|
+
type: {
|
|
2136
|
+
name: "Composite",
|
|
2137
|
+
className: "DocumentError"
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
},
|
|
2142
|
+
statistics: {
|
|
2143
|
+
serializedName: "statistics",
|
|
2144
|
+
type: {
|
|
2145
|
+
name: "Composite",
|
|
2146
|
+
className: "TextDocumentBatchStatistics"
|
|
2147
|
+
}
|
|
2148
|
+
},
|
|
2149
|
+
modelVersion: {
|
|
2150
|
+
serializedName: "modelVersion",
|
|
2151
|
+
required: true,
|
|
2152
|
+
type: {
|
|
2153
|
+
name: "String"
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
};
|
|
2159
|
+
const ExtractedDocumentSummary = {
|
|
2160
|
+
type: {
|
|
2161
|
+
name: "Composite",
|
|
2162
|
+
className: "ExtractedDocumentSummary",
|
|
2163
|
+
modelProperties: {
|
|
2164
|
+
id: {
|
|
2165
|
+
serializedName: "id",
|
|
2166
|
+
required: true,
|
|
2167
|
+
type: {
|
|
2168
|
+
name: "String"
|
|
2169
|
+
}
|
|
2170
|
+
},
|
|
2171
|
+
sentences: {
|
|
2172
|
+
serializedName: "sentences",
|
|
2173
|
+
required: true,
|
|
2174
|
+
type: {
|
|
2175
|
+
name: "Sequence",
|
|
2176
|
+
element: {
|
|
2177
|
+
type: {
|
|
2178
|
+
name: "Composite",
|
|
2179
|
+
className: "ExtractedSummarySentence"
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
},
|
|
2184
|
+
warnings: {
|
|
2185
|
+
serializedName: "warnings",
|
|
2186
|
+
required: true,
|
|
2187
|
+
type: {
|
|
2188
|
+
name: "Sequence",
|
|
2189
|
+
element: {
|
|
2190
|
+
type: {
|
|
2191
|
+
name: "Composite",
|
|
2192
|
+
className: "TextAnalyticsWarning"
|
|
2193
|
+
}
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2196
|
+
},
|
|
2197
|
+
statistics: {
|
|
2198
|
+
serializedName: "statistics",
|
|
2199
|
+
type: {
|
|
2200
|
+
name: "Composite",
|
|
2201
|
+
className: "TextDocumentStatistics"
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
};
|
|
2207
|
+
const ExtractedSummarySentence = {
|
|
2208
|
+
type: {
|
|
2209
|
+
name: "Composite",
|
|
2210
|
+
className: "ExtractedSummarySentence",
|
|
2211
|
+
modelProperties: {
|
|
2212
|
+
text: {
|
|
2213
|
+
serializedName: "text",
|
|
2214
|
+
required: true,
|
|
2215
|
+
type: {
|
|
2216
|
+
name: "String"
|
|
2217
|
+
}
|
|
2218
|
+
},
|
|
2219
|
+
rankScore: {
|
|
2220
|
+
serializedName: "rankScore",
|
|
2221
|
+
required: true,
|
|
2222
|
+
type: {
|
|
2223
|
+
name: "Number"
|
|
2224
|
+
}
|
|
2225
|
+
},
|
|
2226
|
+
offset: {
|
|
2227
|
+
serializedName: "offset",
|
|
2228
|
+
required: true,
|
|
2229
|
+
type: {
|
|
2230
|
+
name: "Number"
|
|
2231
|
+
}
|
|
2232
|
+
},
|
|
2233
|
+
length: {
|
|
2234
|
+
serializedName: "length",
|
|
2235
|
+
required: true,
|
|
2236
|
+
type: {
|
|
2237
|
+
name: "Number"
|
|
2238
|
+
}
|
|
2239
|
+
}
|
|
2240
|
+
}
|
|
2241
|
+
}
|
|
2242
|
+
};
|
|
2243
|
+
const CustomEntitiesTaskResult = {
|
|
2244
|
+
type: {
|
|
2245
|
+
name: "Composite",
|
|
2246
|
+
className: "CustomEntitiesTaskResult",
|
|
2247
|
+
modelProperties: {
|
|
2248
|
+
results: {
|
|
2249
|
+
serializedName: "results",
|
|
2250
|
+
type: {
|
|
2251
|
+
name: "Composite",
|
|
2252
|
+
className: "CustomEntitiesResult"
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2257
|
+
};
|
|
2258
|
+
const CustomEntitiesResult = {
|
|
2259
|
+
type: {
|
|
2260
|
+
name: "Composite",
|
|
2261
|
+
className: "CustomEntitiesResult",
|
|
2262
|
+
modelProperties: {
|
|
2263
|
+
documents: {
|
|
2264
|
+
serializedName: "documents",
|
|
2265
|
+
required: true,
|
|
2266
|
+
type: {
|
|
2267
|
+
name: "Sequence",
|
|
2268
|
+
element: {
|
|
2269
|
+
type: {
|
|
2270
|
+
name: "Composite",
|
|
2271
|
+
className: "DocumentEntities"
|
|
2272
|
+
}
|
|
2273
|
+
}
|
|
2274
|
+
}
|
|
2275
|
+
},
|
|
2276
|
+
errors: {
|
|
2277
|
+
serializedName: "errors",
|
|
2278
|
+
required: true,
|
|
2279
|
+
type: {
|
|
2280
|
+
name: "Sequence",
|
|
2281
|
+
element: {
|
|
2282
|
+
type: {
|
|
2283
|
+
name: "Composite",
|
|
2284
|
+
className: "DocumentError"
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
},
|
|
2289
|
+
statistics: {
|
|
2290
|
+
serializedName: "statistics",
|
|
2291
|
+
type: {
|
|
2292
|
+
name: "Composite",
|
|
2293
|
+
className: "TextDocumentBatchStatistics"
|
|
2294
|
+
}
|
|
2295
|
+
},
|
|
2296
|
+
projectName: {
|
|
2297
|
+
serializedName: "projectName",
|
|
2298
|
+
required: true,
|
|
2299
|
+
type: {
|
|
2300
|
+
name: "String"
|
|
2301
|
+
}
|
|
2302
|
+
},
|
|
2303
|
+
deploymentName: {
|
|
2304
|
+
serializedName: "deploymentName",
|
|
1771
2305
|
required: true,
|
|
1772
2306
|
type: {
|
|
1773
|
-
name: "
|
|
1774
|
-
element: {
|
|
1775
|
-
type: {
|
|
1776
|
-
name: "Composite",
|
|
1777
|
-
className: "TargetRelation"
|
|
1778
|
-
}
|
|
1779
|
-
}
|
|
2307
|
+
name: "String"
|
|
1780
2308
|
}
|
|
1781
2309
|
}
|
|
1782
2310
|
}
|
|
1783
2311
|
}
|
|
1784
2312
|
};
|
|
1785
|
-
const
|
|
2313
|
+
const CustomSingleClassificationTaskResult = {
|
|
1786
2314
|
type: {
|
|
1787
2315
|
name: "Composite",
|
|
1788
|
-
className: "
|
|
2316
|
+
className: "CustomSingleClassificationTaskResult",
|
|
1789
2317
|
modelProperties: {
|
|
1790
|
-
|
|
1791
|
-
serializedName: "
|
|
1792
|
-
required: true,
|
|
1793
|
-
type: {
|
|
1794
|
-
name: "Number"
|
|
1795
|
-
}
|
|
1796
|
-
},
|
|
1797
|
-
negative: {
|
|
1798
|
-
serializedName: "negative",
|
|
1799
|
-
required: true,
|
|
2318
|
+
results: {
|
|
2319
|
+
serializedName: "results",
|
|
1800
2320
|
type: {
|
|
1801
|
-
name: "
|
|
2321
|
+
name: "Composite",
|
|
2322
|
+
className: "CustomSingleClassificationResult"
|
|
1802
2323
|
}
|
|
1803
2324
|
}
|
|
1804
2325
|
}
|
|
1805
2326
|
}
|
|
1806
2327
|
};
|
|
1807
|
-
const
|
|
2328
|
+
const CustomSingleClassificationResult = {
|
|
1808
2329
|
type: {
|
|
1809
2330
|
name: "Composite",
|
|
1810
|
-
className: "
|
|
2331
|
+
className: "CustomSingleClassificationResult",
|
|
1811
2332
|
modelProperties: {
|
|
1812
|
-
|
|
1813
|
-
serializedName: "
|
|
2333
|
+
documents: {
|
|
2334
|
+
serializedName: "documents",
|
|
1814
2335
|
required: true,
|
|
1815
2336
|
type: {
|
|
1816
|
-
name: "
|
|
1817
|
-
|
|
2337
|
+
name: "Sequence",
|
|
2338
|
+
element: {
|
|
2339
|
+
type: {
|
|
2340
|
+
name: "Composite",
|
|
2341
|
+
className: "SingleClassificationDocument"
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
1818
2344
|
}
|
|
1819
2345
|
},
|
|
1820
|
-
|
|
1821
|
-
serializedName: "
|
|
2346
|
+
errors: {
|
|
2347
|
+
serializedName: "errors",
|
|
2348
|
+
required: true,
|
|
2349
|
+
type: {
|
|
2350
|
+
name: "Sequence",
|
|
2351
|
+
element: {
|
|
2352
|
+
type: {
|
|
2353
|
+
name: "Composite",
|
|
2354
|
+
className: "DocumentError"
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2358
|
+
},
|
|
2359
|
+
statistics: {
|
|
2360
|
+
serializedName: "statistics",
|
|
2361
|
+
type: {
|
|
2362
|
+
name: "Composite",
|
|
2363
|
+
className: "TextDocumentBatchStatistics"
|
|
2364
|
+
}
|
|
2365
|
+
},
|
|
2366
|
+
projectName: {
|
|
2367
|
+
serializedName: "projectName",
|
|
2368
|
+
required: true,
|
|
2369
|
+
type: {
|
|
2370
|
+
name: "String"
|
|
2371
|
+
}
|
|
2372
|
+
},
|
|
2373
|
+
deploymentName: {
|
|
2374
|
+
serializedName: "deploymentName",
|
|
1822
2375
|
required: true,
|
|
1823
2376
|
type: {
|
|
1824
2377
|
name: "String"
|
|
@@ -1827,76 +2380,89 @@ const TargetRelation = {
|
|
|
1827
2380
|
}
|
|
1828
2381
|
}
|
|
1829
2382
|
};
|
|
1830
|
-
const
|
|
2383
|
+
const SingleClassificationDocument = {
|
|
1831
2384
|
type: {
|
|
1832
2385
|
name: "Composite",
|
|
1833
|
-
className: "
|
|
2386
|
+
className: "SingleClassificationDocument",
|
|
1834
2387
|
modelProperties: {
|
|
1835
|
-
|
|
1836
|
-
serializedName: "
|
|
2388
|
+
id: {
|
|
2389
|
+
serializedName: "id",
|
|
1837
2390
|
required: true,
|
|
1838
2391
|
type: {
|
|
1839
|
-
name: "
|
|
1840
|
-
allowedValues: ["positive", "mixed", "negative"]
|
|
2392
|
+
name: "String"
|
|
1841
2393
|
}
|
|
1842
2394
|
},
|
|
1843
|
-
|
|
1844
|
-
serializedName: "
|
|
2395
|
+
classification: {
|
|
2396
|
+
serializedName: "classification",
|
|
1845
2397
|
type: {
|
|
1846
2398
|
name: "Composite",
|
|
1847
|
-
className: "
|
|
2399
|
+
className: "ClassificationResult"
|
|
1848
2400
|
}
|
|
1849
2401
|
},
|
|
1850
|
-
|
|
1851
|
-
serializedName: "
|
|
2402
|
+
warnings: {
|
|
2403
|
+
serializedName: "warnings",
|
|
1852
2404
|
required: true,
|
|
1853
2405
|
type: {
|
|
1854
|
-
name: "
|
|
2406
|
+
name: "Sequence",
|
|
2407
|
+
element: {
|
|
2408
|
+
type: {
|
|
2409
|
+
name: "Composite",
|
|
2410
|
+
className: "TextAnalyticsWarning"
|
|
2411
|
+
}
|
|
2412
|
+
}
|
|
1855
2413
|
}
|
|
1856
2414
|
},
|
|
1857
|
-
|
|
1858
|
-
serializedName: "
|
|
1859
|
-
required: true,
|
|
2415
|
+
statistics: {
|
|
2416
|
+
serializedName: "statistics",
|
|
1860
2417
|
type: {
|
|
1861
|
-
name: "
|
|
2418
|
+
name: "Composite",
|
|
2419
|
+
className: "TextDocumentStatistics"
|
|
1862
2420
|
}
|
|
1863
|
-
}
|
|
1864
|
-
|
|
1865
|
-
|
|
2421
|
+
}
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2424
|
+
};
|
|
2425
|
+
const ClassificationResult = {
|
|
2426
|
+
type: {
|
|
2427
|
+
name: "Composite",
|
|
2428
|
+
className: "ClassificationResult",
|
|
2429
|
+
modelProperties: {
|
|
2430
|
+
category: {
|
|
2431
|
+
serializedName: "category",
|
|
1866
2432
|
required: true,
|
|
1867
2433
|
type: {
|
|
1868
2434
|
name: "String"
|
|
1869
2435
|
}
|
|
1870
2436
|
},
|
|
1871
|
-
|
|
1872
|
-
serializedName: "
|
|
2437
|
+
confidenceScore: {
|
|
2438
|
+
serializedName: "confidenceScore",
|
|
1873
2439
|
required: true,
|
|
1874
2440
|
type: {
|
|
1875
|
-
name: "
|
|
2441
|
+
name: "Number"
|
|
1876
2442
|
}
|
|
1877
2443
|
}
|
|
1878
2444
|
}
|
|
1879
2445
|
}
|
|
1880
2446
|
};
|
|
1881
|
-
const
|
|
2447
|
+
const CustomMultiClassificationTaskResult = {
|
|
1882
2448
|
type: {
|
|
1883
2449
|
name: "Composite",
|
|
1884
|
-
className: "
|
|
2450
|
+
className: "CustomMultiClassificationTaskResult",
|
|
1885
2451
|
modelProperties: {
|
|
1886
2452
|
results: {
|
|
1887
2453
|
serializedName: "results",
|
|
1888
2454
|
type: {
|
|
1889
2455
|
name: "Composite",
|
|
1890
|
-
className: "
|
|
2456
|
+
className: "CustomMultiClassificationResult"
|
|
1891
2457
|
}
|
|
1892
2458
|
}
|
|
1893
2459
|
}
|
|
1894
2460
|
}
|
|
1895
2461
|
};
|
|
1896
|
-
const
|
|
2462
|
+
const CustomMultiClassificationResult = {
|
|
1897
2463
|
type: {
|
|
1898
2464
|
name: "Composite",
|
|
1899
|
-
className: "
|
|
2465
|
+
className: "CustomMultiClassificationResult",
|
|
1900
2466
|
modelProperties: {
|
|
1901
2467
|
documents: {
|
|
1902
2468
|
serializedName: "documents",
|
|
@@ -1906,7 +2472,7 @@ const ExtractiveSummarizationResult = {
|
|
|
1906
2472
|
element: {
|
|
1907
2473
|
type: {
|
|
1908
2474
|
name: "Composite",
|
|
1909
|
-
className: "
|
|
2475
|
+
className: "MultiClassificationDocument"
|
|
1910
2476
|
}
|
|
1911
2477
|
}
|
|
1912
2478
|
}
|
|
@@ -1931,8 +2497,15 @@ const ExtractiveSummarizationResult = {
|
|
|
1931
2497
|
className: "TextDocumentBatchStatistics"
|
|
1932
2498
|
}
|
|
1933
2499
|
},
|
|
1934
|
-
|
|
1935
|
-
serializedName: "
|
|
2500
|
+
projectName: {
|
|
2501
|
+
serializedName: "projectName",
|
|
2502
|
+
required: true,
|
|
2503
|
+
type: {
|
|
2504
|
+
name: "String"
|
|
2505
|
+
}
|
|
2506
|
+
},
|
|
2507
|
+
deploymentName: {
|
|
2508
|
+
serializedName: "deploymentName",
|
|
1936
2509
|
required: true,
|
|
1937
2510
|
type: {
|
|
1938
2511
|
name: "String"
|
|
@@ -1941,10 +2514,10 @@ const ExtractiveSummarizationResult = {
|
|
|
1941
2514
|
}
|
|
1942
2515
|
}
|
|
1943
2516
|
};
|
|
1944
|
-
const
|
|
2517
|
+
const MultiClassificationDocument = {
|
|
1945
2518
|
type: {
|
|
1946
2519
|
name: "Composite",
|
|
1947
|
-
className: "
|
|
2520
|
+
className: "MultiClassificationDocument",
|
|
1948
2521
|
modelProperties: {
|
|
1949
2522
|
id: {
|
|
1950
2523
|
serializedName: "id",
|
|
@@ -1953,15 +2526,15 @@ const ExtractedDocumentSummary = {
|
|
|
1953
2526
|
name: "String"
|
|
1954
2527
|
}
|
|
1955
2528
|
},
|
|
1956
|
-
|
|
1957
|
-
serializedName: "
|
|
2529
|
+
classifications: {
|
|
2530
|
+
serializedName: "classifications",
|
|
1958
2531
|
required: true,
|
|
1959
2532
|
type: {
|
|
1960
2533
|
name: "Sequence",
|
|
1961
2534
|
element: {
|
|
1962
2535
|
type: {
|
|
1963
2536
|
name: "Composite",
|
|
1964
|
-
className: "
|
|
2537
|
+
className: "ClassificationResult"
|
|
1965
2538
|
}
|
|
1966
2539
|
}
|
|
1967
2540
|
}
|
|
@@ -1989,42 +2562,6 @@ const ExtractedDocumentSummary = {
|
|
|
1989
2562
|
}
|
|
1990
2563
|
}
|
|
1991
2564
|
};
|
|
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
2565
|
const AnalyzeJobErrorsAndStatistics = {
|
|
2029
2566
|
type: {
|
|
2030
2567
|
name: "Composite",
|
|
@@ -2629,6 +3166,27 @@ const TasksStateTasksExtractiveSummarizationTasksItem = {
|
|
|
2629
3166
|
modelProperties: Object.assign(Object.assign({}, TaskState.type.modelProperties), ExtractiveSummarizationTaskResult.type.modelProperties)
|
|
2630
3167
|
}
|
|
2631
3168
|
};
|
|
3169
|
+
const TasksStateTasksCustomEntityRecognitionTasksItem = {
|
|
3170
|
+
type: {
|
|
3171
|
+
name: "Composite",
|
|
3172
|
+
className: "TasksStateTasksCustomEntityRecognitionTasksItem",
|
|
3173
|
+
modelProperties: Object.assign(Object.assign({}, TaskState.type.modelProperties), CustomEntitiesTaskResult.type.modelProperties)
|
|
3174
|
+
}
|
|
3175
|
+
};
|
|
3176
|
+
const TasksStateTasksCustomSingleClassificationTasksItem = {
|
|
3177
|
+
type: {
|
|
3178
|
+
name: "Composite",
|
|
3179
|
+
className: "TasksStateTasksCustomSingleClassificationTasksItem",
|
|
3180
|
+
modelProperties: Object.assign(Object.assign({}, TaskState.type.modelProperties), CustomSingleClassificationTaskResult.type.modelProperties)
|
|
3181
|
+
}
|
|
3182
|
+
};
|
|
3183
|
+
const TasksStateTasksCustomMultiClassificationTasksItem = {
|
|
3184
|
+
type: {
|
|
3185
|
+
name: "Composite",
|
|
3186
|
+
className: "TasksStateTasksCustomMultiClassificationTasksItem",
|
|
3187
|
+
modelProperties: Object.assign(Object.assign({}, TaskState.type.modelProperties), CustomMultiClassificationTaskResult.type.modelProperties)
|
|
3188
|
+
}
|
|
3189
|
+
};
|
|
2632
3190
|
const HealthcareEntity = {
|
|
2633
3191
|
type: {
|
|
2634
3192
|
name: "Composite",
|
|
@@ -2699,6 +3257,12 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
|
2699
3257
|
SentimentAnalysisTaskParameters: SentimentAnalysisTaskParameters,
|
|
2700
3258
|
ExtractiveSummarizationTask: ExtractiveSummarizationTask,
|
|
2701
3259
|
ExtractiveSummarizationTaskParameters: ExtractiveSummarizationTaskParameters,
|
|
3260
|
+
CustomEntitiesTask: CustomEntitiesTask,
|
|
3261
|
+
CustomEntitiesTaskParameters: CustomEntitiesTaskParameters,
|
|
3262
|
+
CustomSingleClassificationTask: CustomSingleClassificationTask,
|
|
3263
|
+
CustomSingleClassificationTaskParameters: CustomSingleClassificationTaskParameters,
|
|
3264
|
+
CustomMultiClassificationTask: CustomMultiClassificationTask,
|
|
3265
|
+
CustomMultiClassificationTaskParameters: CustomMultiClassificationTaskParameters,
|
|
2702
3266
|
ErrorResponse: ErrorResponse,
|
|
2703
3267
|
TextAnalyticsError: TextAnalyticsError,
|
|
2704
3268
|
InnerError: InnerError,
|
|
@@ -2739,6 +3303,15 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
|
2739
3303
|
ExtractiveSummarizationResult: ExtractiveSummarizationResult,
|
|
2740
3304
|
ExtractedDocumentSummary: ExtractedDocumentSummary,
|
|
2741
3305
|
ExtractedSummarySentence: ExtractedSummarySentence,
|
|
3306
|
+
CustomEntitiesTaskResult: CustomEntitiesTaskResult,
|
|
3307
|
+
CustomEntitiesResult: CustomEntitiesResult,
|
|
3308
|
+
CustomSingleClassificationTaskResult: CustomSingleClassificationTaskResult,
|
|
3309
|
+
CustomSingleClassificationResult: CustomSingleClassificationResult,
|
|
3310
|
+
SingleClassificationDocument: SingleClassificationDocument,
|
|
3311
|
+
ClassificationResult: ClassificationResult,
|
|
3312
|
+
CustomMultiClassificationTaskResult: CustomMultiClassificationTaskResult,
|
|
3313
|
+
CustomMultiClassificationResult: CustomMultiClassificationResult,
|
|
3314
|
+
MultiClassificationDocument: MultiClassificationDocument,
|
|
2742
3315
|
AnalyzeJobErrorsAndStatistics: AnalyzeJobErrorsAndStatistics,
|
|
2743
3316
|
Pagination: Pagination,
|
|
2744
3317
|
HealthcareTaskResult: HealthcareTaskResult,
|
|
@@ -2765,6 +3338,9 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
|
2765
3338
|
TasksStateTasksEntityLinkingTasksItem: TasksStateTasksEntityLinkingTasksItem,
|
|
2766
3339
|
TasksStateTasksSentimentAnalysisTasksItem: TasksStateTasksSentimentAnalysisTasksItem,
|
|
2767
3340
|
TasksStateTasksExtractiveSummarizationTasksItem: TasksStateTasksExtractiveSummarizationTasksItem,
|
|
3341
|
+
TasksStateTasksCustomEntityRecognitionTasksItem: TasksStateTasksCustomEntityRecognitionTasksItem,
|
|
3342
|
+
TasksStateTasksCustomSingleClassificationTasksItem: TasksStateTasksCustomSingleClassificationTasksItem,
|
|
3343
|
+
TasksStateTasksCustomMultiClassificationTasksItem: TasksStateTasksCustomMultiClassificationTasksItem,
|
|
2768
3344
|
HealthcareEntity: HealthcareEntity,
|
|
2769
3345
|
GeneratedClientAnalyzeHeaders: GeneratedClientAnalyzeHeaders,
|
|
2770
3346
|
GeneratedClientCancelHealthJobHeaders: GeneratedClientCancelHealthJobHeaders,
|
|
@@ -2818,7 +3394,7 @@ const endpoint = {
|
|
|
2818
3394
|
const apiVersion = {
|
|
2819
3395
|
parameterPath: "apiVersion",
|
|
2820
3396
|
mapper: {
|
|
2821
|
-
defaultValue: "v3.2-preview.
|
|
3397
|
+
defaultValue: "v3.2-preview.2",
|
|
2822
3398
|
isConstant: true,
|
|
2823
3399
|
serializedName: "ApiVersion",
|
|
2824
3400
|
type: {
|
|
@@ -2863,6 +3439,7 @@ const top = {
|
|
|
2863
3439
|
const skip = {
|
|
2864
3440
|
parameterPath: ["options", "skip"],
|
|
2865
3441
|
mapper: {
|
|
3442
|
+
defaultValue: 0,
|
|
2866
3443
|
constraints: {
|
|
2867
3444
|
InclusiveMinimum: 0
|
|
2868
3445
|
},
|
|
@@ -2991,7 +3568,7 @@ class GeneratedClientContext extends coreClient.ServiceClient {
|
|
|
2991
3568
|
// Parameter assignments
|
|
2992
3569
|
this.endpoint = endpoint;
|
|
2993
3570
|
// Assigning values to Constant parameters
|
|
2994
|
-
this.apiVersion = options.apiVersion || "v3.2-preview.
|
|
3571
|
+
this.apiVersion = options.apiVersion || "v3.2-preview.2";
|
|
2995
3572
|
}
|
|
2996
3573
|
}
|
|
2997
3574
|
|
|
@@ -3629,6 +4206,22 @@ function combineSuccessfulAndErroneousDocumentsWithStatisticsAndModelVersion(inp
|
|
|
3629
4206
|
modelVersion: response.modelVersion
|
|
3630
4207
|
});
|
|
3631
4208
|
}
|
|
4209
|
+
/**
|
|
4210
|
+
* @internal
|
|
4211
|
+
* combines successful and erroneous results into a single array of results and
|
|
4212
|
+
* sort them so that the IDs order match that of the input documents array. It
|
|
4213
|
+
* also attaches statistics, projectName, and deploymentName to the returned array.
|
|
4214
|
+
* @param input - the array of documents sent to the service for processing.
|
|
4215
|
+
* @param response - the response received from the service.
|
|
4216
|
+
*/
|
|
4217
|
+
function combineSuccessfulAndErroneousDocumentsWithStatisticsAndCustomProjectInfo(input, response, processSuccess, processError) {
|
|
4218
|
+
const sorted = processAndCombineSuccessfulAndErroneousDocuments(input, response, processSuccess, processError);
|
|
4219
|
+
return Object.assign(sorted, {
|
|
4220
|
+
statistics: response.statistics,
|
|
4221
|
+
projectName: response.projectName,
|
|
4222
|
+
deploymentName: response.deploymentName
|
|
4223
|
+
});
|
|
4224
|
+
}
|
|
3632
4225
|
|
|
3633
4226
|
// Copyright (c) Microsoft Corporation.
|
|
3634
4227
|
/**
|
|
@@ -4026,6 +4619,52 @@ function updateHealthState(state, lastResponse) {
|
|
|
4026
4619
|
state.status = response.status;
|
|
4027
4620
|
}
|
|
4028
4621
|
|
|
4622
|
+
// Copyright (c) Microsoft Corporation.
|
|
4623
|
+
/**
|
|
4624
|
+
* @internal
|
|
4625
|
+
*/
|
|
4626
|
+
function makeMultiCategoryClassifyResult(result) {
|
|
4627
|
+
const { id, warnings, statistics, classifications } = result;
|
|
4628
|
+
return Object.assign(Object.assign({}, makeTextAnalyticsSuccessResult(id, warnings, statistics)), { classifications });
|
|
4629
|
+
}
|
|
4630
|
+
/**
|
|
4631
|
+
* @internal
|
|
4632
|
+
*/
|
|
4633
|
+
function makeMultiCategoryClassifyErrorResult(id, error) {
|
|
4634
|
+
return makeTextAnalyticsErrorResult(id, error);
|
|
4635
|
+
}
|
|
4636
|
+
|
|
4637
|
+
// Copyright (c) Microsoft Corporation.
|
|
4638
|
+
/**
|
|
4639
|
+
* @internal
|
|
4640
|
+
*/
|
|
4641
|
+
function makeMultiCategoryClassifyResultArray(input, response) {
|
|
4642
|
+
return combineSuccessfulAndErroneousDocumentsWithStatisticsAndCustomProjectInfo(input, response, makeMultiCategoryClassifyResult, makeMultiCategoryClassifyErrorResult);
|
|
4643
|
+
}
|
|
4644
|
+
|
|
4645
|
+
// Copyright (c) Microsoft Corporation.
|
|
4646
|
+
/**
|
|
4647
|
+
* @internal
|
|
4648
|
+
*/
|
|
4649
|
+
function makeSingleCategoryClassifyResult(result) {
|
|
4650
|
+
const { id, warnings, statistics, classification } = result;
|
|
4651
|
+
return Object.assign(Object.assign({}, makeTextAnalyticsSuccessResult(id, warnings, statistics)), { classification });
|
|
4652
|
+
}
|
|
4653
|
+
/**
|
|
4654
|
+
* @internal
|
|
4655
|
+
*/
|
|
4656
|
+
function makeSingleCategoryClassifyErrorResult(id, error) {
|
|
4657
|
+
return makeTextAnalyticsErrorResult(id, error);
|
|
4658
|
+
}
|
|
4659
|
+
|
|
4660
|
+
// Copyright (c) Microsoft Corporation.
|
|
4661
|
+
/**
|
|
4662
|
+
* @internal
|
|
4663
|
+
*/
|
|
4664
|
+
function makeSingleCategoryClassifyResultArray(input, response) {
|
|
4665
|
+
return combineSuccessfulAndErroneousDocumentsWithStatisticsAndCustomProjectInfo(input, response, makeSingleCategoryClassifyResult, makeSingleCategoryClassifyErrorResult);
|
|
4666
|
+
}
|
|
4667
|
+
|
|
4029
4668
|
// Copyright (c) Microsoft Corporation.
|
|
4030
4669
|
/**
|
|
4031
4670
|
* @internal
|
|
@@ -4049,6 +4688,29 @@ function makeExtractSummaryResultArray(input, response) {
|
|
|
4049
4688
|
return combineSuccessfulAndErroneousDocumentsWithStatisticsAndModelVersion(input, response, makeExtractSummaryResult, makeExtractSummaryErrorResult);
|
|
4050
4689
|
}
|
|
4051
4690
|
|
|
4691
|
+
// Copyright (c) Microsoft Corporation.
|
|
4692
|
+
/**
|
|
4693
|
+
* @internal
|
|
4694
|
+
*/
|
|
4695
|
+
function makeRecognizeCustomEntitiesResult(result) {
|
|
4696
|
+
const { id, warnings, statistics, entities } = result;
|
|
4697
|
+
return Object.assign(Object.assign({}, makeTextAnalyticsSuccessResult(id, warnings, statistics)), { entities });
|
|
4698
|
+
}
|
|
4699
|
+
/**
|
|
4700
|
+
* @internal
|
|
4701
|
+
*/
|
|
4702
|
+
function makeRecognizeCustomEntitiesErrorResult(id, error) {
|
|
4703
|
+
return makeTextAnalyticsErrorResult(id, error);
|
|
4704
|
+
}
|
|
4705
|
+
|
|
4706
|
+
// Copyright (c) Microsoft Corporation.
|
|
4707
|
+
/**
|
|
4708
|
+
* @internal
|
|
4709
|
+
*/
|
|
4710
|
+
function makeRecognizeCustomEntitiesResultArray(input, response) {
|
|
4711
|
+
return combineSuccessfulAndErroneousDocumentsWithStatisticsAndCustomProjectInfo(input, response, makeRecognizeCustomEntitiesResult, makeRecognizeCustomEntitiesErrorResult);
|
|
4712
|
+
}
|
|
4713
|
+
|
|
4052
4714
|
// Copyright (c) Microsoft Corporation.
|
|
4053
4715
|
/**
|
|
4054
4716
|
* Converts the service task name (in the JSON pointer in an action error) to an action type name.
|
|
@@ -4076,6 +4738,15 @@ function convertTaskTypeToActionType(taskType) {
|
|
|
4076
4738
|
case "extractiveSummarizationTasks": {
|
|
4077
4739
|
return "ExtractSummary";
|
|
4078
4740
|
}
|
|
4741
|
+
case "customEntityRecognitionTasks": {
|
|
4742
|
+
return "RecognizeCustomEntities";
|
|
4743
|
+
}
|
|
4744
|
+
case "customSingleClassificationTasks": {
|
|
4745
|
+
return "SingleCategoryClassify";
|
|
4746
|
+
}
|
|
4747
|
+
case "customMultiClassificationTasks": {
|
|
4748
|
+
return "MultiCategoryClassify";
|
|
4749
|
+
}
|
|
4079
4750
|
default: {
|
|
4080
4751
|
throw new Error(`unexpected action type from the service: ${taskType}`);
|
|
4081
4752
|
}
|
|
@@ -4089,7 +4760,7 @@ function convertTaskTypeToActionType(taskType) {
|
|
|
4089
4760
|
*/
|
|
4090
4761
|
function parseActionError(erredActions) {
|
|
4091
4762
|
if (erredActions.target) {
|
|
4092
|
-
const regex = new RegExp(/#\/tasks\/(entityRecognitionTasks|entityRecognitionPiiTasks|keyPhraseExtractionTasks|entityLinkingTasks|sentimentAnalysisTasks|extractiveSummarizationTasks)\/(\d+)/);
|
|
4763
|
+
const regex = new RegExp(/#\/tasks\/(entityRecognitionTasks|entityRecognitionPiiTasks|keyPhraseExtractionTasks|entityLinkingTasks|sentimentAnalysisTasks|extractiveSummarizationTasks|customEntityRecognitionTasks|customSingleClassificationTasks|customMultiClassificationTasks)\/(\d+)/);
|
|
4093
4764
|
const result = regex.exec(erredActions.target);
|
|
4094
4765
|
if (result !== null) {
|
|
4095
4766
|
return {
|
|
@@ -4115,7 +4786,7 @@ function parseActionError(erredActions) {
|
|
|
4115
4786
|
* @param extractKeyPhrasesActionErrors - a list of extract key phrases action errors to be filled from the errors list
|
|
4116
4787
|
* @internal
|
|
4117
4788
|
*/
|
|
4118
|
-
function categorizeActionErrors(erredActions, recognizeEntitiesActionErrors, recognizePiiEntitiesActionErrors, extractKeyPhrasesActionErrors, recognizeLinkedEntitiesActionErrors, analyzeSentimentActionErrors, extractSummarySentencesActionErrors) {
|
|
4789
|
+
function categorizeActionErrors(erredActions, recognizeEntitiesActionErrors, recognizePiiEntitiesActionErrors, extractKeyPhrasesActionErrors, recognizeLinkedEntitiesActionErrors, analyzeSentimentActionErrors, extractSummarySentencesActionErrors, recognizeCustomEntitiesActionErrors, singleCategoryClassifyActionErrors, multiCategoryClassifyActionErrors) {
|
|
4119
4790
|
for (const error of erredActions) {
|
|
4120
4791
|
const actionError = parseActionError(error);
|
|
4121
4792
|
switch (actionError.type) {
|
|
@@ -4143,6 +4814,18 @@ function categorizeActionErrors(erredActions, recognizeEntitiesActionErrors, rec
|
|
|
4143
4814
|
extractSummarySentencesActionErrors.push(actionError);
|
|
4144
4815
|
break;
|
|
4145
4816
|
}
|
|
4817
|
+
case "RecognizeCustomEntities": {
|
|
4818
|
+
recognizeCustomEntitiesActionErrors.push(actionError);
|
|
4819
|
+
break;
|
|
4820
|
+
}
|
|
4821
|
+
case "SingleCategoryClassify": {
|
|
4822
|
+
singleCategoryClassifyActionErrors.push(actionError);
|
|
4823
|
+
break;
|
|
4824
|
+
}
|
|
4825
|
+
case "MultiCategoryClassify": {
|
|
4826
|
+
multiCategoryClassifyActionErrors.push(actionError);
|
|
4827
|
+
break;
|
|
4828
|
+
}
|
|
4146
4829
|
}
|
|
4147
4830
|
}
|
|
4148
4831
|
}
|
|
@@ -4190,21 +4873,27 @@ function makeActionResult(documents, makeResultsArray, succeededTasks, erredActi
|
|
|
4190
4873
|
* @internal
|
|
4191
4874
|
*/
|
|
4192
4875
|
function createAnalyzeActionsResult(response, documents) {
|
|
4193
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
4876
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
4194
4877
|
const recognizeEntitiesActionErrors = [];
|
|
4195
4878
|
const recognizePiiEntitiesActionErrors = [];
|
|
4196
4879
|
const extractKeyPhrasesActionErrors = [];
|
|
4197
4880
|
const recognizeLinkedEntitiesActionErrors = [];
|
|
4198
4881
|
const analyzeSentimentActionErrors = [];
|
|
4199
4882
|
const extractSummarySentencesActionErrors = [];
|
|
4200
|
-
|
|
4883
|
+
const recognizeCustomEntitiesActionErrors = [];
|
|
4884
|
+
const singleCategoryClassifyActionErrors = [];
|
|
4885
|
+
const multiCategoryClassifyActionErrors = [];
|
|
4886
|
+
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);
|
|
4201
4887
|
return {
|
|
4202
4888
|
recognizeEntitiesResults: makeActionResult(documents, makeRecognizeCategorizedEntitiesResultArray, (_b = response.tasks.entityRecognitionTasks) !== null && _b !== void 0 ? _b : [], recognizeEntitiesActionErrors),
|
|
4203
4889
|
recognizePiiEntitiesResults: makeActionResult(documents, makeRecognizePiiEntitiesResultArray, (_c = response.tasks.entityRecognitionPiiTasks) !== null && _c !== void 0 ? _c : [], recognizePiiEntitiesActionErrors),
|
|
4204
4890
|
extractKeyPhrasesResults: makeActionResult(documents, makeExtractKeyPhrasesResultArray, (_d = response.tasks.keyPhraseExtractionTasks) !== null && _d !== void 0 ? _d : [], extractKeyPhrasesActionErrors),
|
|
4205
4891
|
recognizeLinkedEntitiesResults: makeActionResult(documents, makeRecognizeLinkedEntitiesResultArray, (_e = response.tasks.entityLinkingTasks) !== null && _e !== void 0 ? _e : [], recognizeLinkedEntitiesActionErrors),
|
|
4206
4892
|
analyzeSentimentResults: makeActionResult(documents, makeAnalyzeSentimentResultArray, (_f = response.tasks.sentimentAnalysisTasks) !== null && _f !== void 0 ? _f : [], analyzeSentimentActionErrors),
|
|
4207
|
-
extractSummaryResults: makeActionResult(documents, makeExtractSummaryResultArray, (_g = response.tasks.extractiveSummarizationTasks) !== null && _g !== void 0 ? _g : [], extractSummarySentencesActionErrors)
|
|
4893
|
+
extractSummaryResults: makeActionResult(documents, makeExtractSummaryResultArray, (_g = response.tasks.extractiveSummarizationTasks) !== null && _g !== void 0 ? _g : [], extractSummarySentencesActionErrors),
|
|
4894
|
+
recognizeCustomEntitiesResults: makeActionResult(documents, makeRecognizeCustomEntitiesResultArray, (_h = response.tasks.customEntityRecognitionTasks) !== null && _h !== void 0 ? _h : [], recognizeCustomEntitiesActionErrors),
|
|
4895
|
+
singleCategoryClassifyResults: makeActionResult(documents, makeSingleCategoryClassifyResultArray, (_j = response.tasks.customSingleClassificationTasks) !== null && _j !== void 0 ? _j : [], singleCategoryClassifyActionErrors),
|
|
4896
|
+
multiCategoryClassifyResults: makeActionResult(documents, makeMultiCategoryClassifyResultArray, (_k = response.tasks.customMultiClassificationTasks) !== null && _k !== void 0 ? _k : [], multiCategoryClassifyActionErrors)
|
|
4208
4897
|
};
|
|
4209
4898
|
}
|
|
4210
4899
|
|
|
@@ -4681,14 +5370,17 @@ function validateActions(actions) {
|
|
|
4681
5370
|
* @internal
|
|
4682
5371
|
*/
|
|
4683
5372
|
function compileAnalyzeInput(actions) {
|
|
4684
|
-
var _a, _b, _c, _d, _e, _f;
|
|
5373
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
4685
5374
|
return {
|
|
4686
5375
|
entityRecognitionPiiTasks: (_a = actions.recognizePiiEntitiesActions) === null || _a === void 0 ? void 0 : _a.map(compose(setStrEncodingParam, compose(setCategoriesFilter, addParamsToTask))),
|
|
4687
5376
|
entityRecognitionTasks: (_b = actions.recognizeEntitiesActions) === null || _b === void 0 ? void 0 : _b.map(compose(setStrEncodingParam, addParamsToTask)),
|
|
4688
5377
|
keyPhraseExtractionTasks: (_c = actions.extractKeyPhrasesActions) === null || _c === void 0 ? void 0 : _c.map(addParamsToTask),
|
|
4689
5378
|
entityLinkingTasks: (_d = actions.recognizeLinkedEntitiesActions) === null || _d === void 0 ? void 0 : _d.map(compose(setStrEncodingParam, addParamsToTask)),
|
|
4690
5379
|
sentimentAnalysisTasks: (_e = actions.analyzeSentimentActions) === null || _e === void 0 ? void 0 : _e.map(compose(setStrEncodingParam, compose(setOpinionMining, addParamsToTask))),
|
|
4691
|
-
extractiveSummarizationTasks: (_f = actions.extractSummaryActions) === null || _f === void 0 ? void 0 : _f.map(compose(setStrEncodingParam, compose(setSentenceCount, compose(setOrderBy, addParamsToTask))))
|
|
5380
|
+
extractiveSummarizationTasks: (_f = actions.extractSummaryActions) === null || _f === void 0 ? void 0 : _f.map(compose(setStrEncodingParam, compose(setSentenceCount, compose(setOrderBy, addParamsToTask)))),
|
|
5381
|
+
customEntityRecognitionTasks: (_g = actions.recognizeCustomEntitiesActions) === null || _g === void 0 ? void 0 : _g.map(compose(setStrEncodingParam, addParamsToTask)),
|
|
5382
|
+
customSingleClassificationTasks: (_h = actions.singleCategoryClassifyActions) === null || _h === void 0 ? void 0 : _h.map(addParamsToTask),
|
|
5383
|
+
customMultiClassificationTasks: (_j = actions.multiCategoryClassifyActions) === null || _j === void 0 ? void 0 : _j.map(addParamsToTask)
|
|
4692
5384
|
};
|
|
4693
5385
|
}
|
|
4694
5386
|
function isStringArray(documents) {
|