azure-ai-textanalytics 5.3.0b2__py3-none-any.whl → 6.0.0b1__py3-none-any.whl
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.
Potentially problematic release.
This version of azure-ai-textanalytics might be problematic. Click here for more details.
- azure/ai/textanalytics/__init__.py +26 -193
- azure/ai/textanalytics/_client.py +111 -0
- azure/ai/textanalytics/_configuration.py +73 -0
- azure/ai/textanalytics/{_generated/v2022_05_01/operations → _operations}/__init__.py +13 -8
- azure/ai/textanalytics/_operations/_operations.py +716 -0
- azure/ai/textanalytics/{_generated/v2022_05_01/models → _operations}/_patch.py +8 -6
- azure/ai/textanalytics/_patch.py +350 -0
- azure/ai/textanalytics/{_generated/aio → _utils}/__init__.py +1 -5
- azure/ai/textanalytics/_utils/model_base.py +1237 -0
- azure/ai/textanalytics/{_generated/_serialization.py → _utils/serialization.py} +640 -616
- azure/ai/textanalytics/{_generated/v2022_05_01/aio/_vendor.py → _utils/utils.py} +10 -12
- azure/ai/textanalytics/_version.py +8 -7
- azure/ai/textanalytics/aio/__init__.py +25 -14
- azure/ai/textanalytics/aio/_client.py +115 -0
- azure/ai/textanalytics/aio/_configuration.py +75 -0
- azure/ai/textanalytics/{_generated/v2022_10_01_preview/aio/operations → aio/_operations}/__init__.py +13 -8
- azure/ai/textanalytics/aio/_operations/_operations.py +623 -0
- azure/ai/textanalytics/{_generated/v2022_05_01 → aio/_operations}/_patch.py +8 -6
- azure/ai/textanalytics/aio/_patch.py +344 -0
- azure/ai/textanalytics/models/__init__.py +402 -0
- azure/ai/textanalytics/models/_enums.py +1979 -0
- azure/ai/textanalytics/models/_models.py +6641 -0
- azure/ai/textanalytics/{_generated/v2022_05_01/aio → models}/_patch.py +8 -6
- azure/ai/textanalytics/py.typed +1 -0
- {azure_ai_textanalytics-5.3.0b2.dist-info → azure_ai_textanalytics-6.0.0b1.dist-info}/METADATA +668 -403
- azure_ai_textanalytics-6.0.0b1.dist-info/RECORD +29 -0
- {azure_ai_textanalytics-5.3.0b2.dist-info → azure_ai_textanalytics-6.0.0b1.dist-info}/WHEEL +1 -1
- azure/ai/textanalytics/_base_client.py +0 -113
- azure/ai/textanalytics/_check.py +0 -22
- azure/ai/textanalytics/_dict_mixin.py +0 -57
- azure/ai/textanalytics/_generated/__init__.py +0 -16
- azure/ai/textanalytics/_generated/_configuration.py +0 -70
- azure/ai/textanalytics/_generated/_operations_mixin.py +0 -795
- azure/ai/textanalytics/_generated/_text_analytics_client.py +0 -126
- azure/ai/textanalytics/_generated/_version.py +0 -8
- azure/ai/textanalytics/_generated/aio/_configuration.py +0 -66
- azure/ai/textanalytics/_generated/aio/_operations_mixin.py +0 -776
- azure/ai/textanalytics/_generated/aio/_text_analytics_client.py +0 -124
- azure/ai/textanalytics/_generated/models.py +0 -8
- azure/ai/textanalytics/_generated/v2022_05_01/__init__.py +0 -20
- azure/ai/textanalytics/_generated/v2022_05_01/_configuration.py +0 -72
- azure/ai/textanalytics/_generated/v2022_05_01/_text_analytics_client.py +0 -100
- azure/ai/textanalytics/_generated/v2022_05_01/_vendor.py +0 -45
- azure/ai/textanalytics/_generated/v2022_05_01/aio/__init__.py +0 -20
- azure/ai/textanalytics/_generated/v2022_05_01/aio/_configuration.py +0 -71
- azure/ai/textanalytics/_generated/v2022_05_01/aio/_text_analytics_client.py +0 -97
- azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/__init__.py +0 -18
- azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/_patch.py +0 -121
- azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/_text_analytics_client_operations.py +0 -603
- azure/ai/textanalytics/_generated/v2022_05_01/models/__init__.py +0 -281
- azure/ai/textanalytics/_generated/v2022_05_01/models/_models_py3.py +0 -5722
- azure/ai/textanalytics/_generated/v2022_05_01/models/_text_analytics_client_enums.py +0 -439
- azure/ai/textanalytics/_generated/v2022_05_01/operations/_patch.py +0 -120
- azure/ai/textanalytics/_generated/v2022_05_01/operations/_text_analytics_client_operations.py +0 -744
- azure/ai/textanalytics/_generated/v2022_10_01_preview/__init__.py +0 -20
- azure/ai/textanalytics/_generated/v2022_10_01_preview/_configuration.py +0 -72
- azure/ai/textanalytics/_generated/v2022_10_01_preview/_patch.py +0 -19
- azure/ai/textanalytics/_generated/v2022_10_01_preview/_text_analytics_client.py +0 -100
- azure/ai/textanalytics/_generated/v2022_10_01_preview/_vendor.py +0 -45
- azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/__init__.py +0 -20
- azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/_configuration.py +0 -71
- azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/_patch.py +0 -19
- azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/_text_analytics_client.py +0 -97
- azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/_vendor.py +0 -27
- azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/operations/_patch.py +0 -121
- azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/operations/_text_analytics_client_operations.py +0 -603
- azure/ai/textanalytics/_generated/v2022_10_01_preview/models/__init__.py +0 -405
- azure/ai/textanalytics/_generated/v2022_10_01_preview/models/_models_py3.py +0 -8420
- azure/ai/textanalytics/_generated/v2022_10_01_preview/models/_patch.py +0 -486
- azure/ai/textanalytics/_generated/v2022_10_01_preview/models/_text_analytics_client_enums.py +0 -729
- azure/ai/textanalytics/_generated/v2022_10_01_preview/operations/__init__.py +0 -18
- azure/ai/textanalytics/_generated/v2022_10_01_preview/operations/_patch.py +0 -120
- azure/ai/textanalytics/_generated/v2022_10_01_preview/operations/_text_analytics_client_operations.py +0 -744
- azure/ai/textanalytics/_generated/v3_0/__init__.py +0 -20
- azure/ai/textanalytics/_generated/v3_0/_configuration.py +0 -66
- azure/ai/textanalytics/_generated/v3_0/_patch.py +0 -31
- azure/ai/textanalytics/_generated/v3_0/_text_analytics_client.py +0 -96
- azure/ai/textanalytics/_generated/v3_0/_vendor.py +0 -33
- azure/ai/textanalytics/_generated/v3_0/aio/__init__.py +0 -20
- azure/ai/textanalytics/_generated/v3_0/aio/_configuration.py +0 -65
- azure/ai/textanalytics/_generated/v3_0/aio/_patch.py +0 -31
- azure/ai/textanalytics/_generated/v3_0/aio/_text_analytics_client.py +0 -93
- azure/ai/textanalytics/_generated/v3_0/aio/_vendor.py +0 -27
- azure/ai/textanalytics/_generated/v3_0/aio/operations/__init__.py +0 -18
- azure/ai/textanalytics/_generated/v3_0/aio/operations/_patch.py +0 -19
- azure/ai/textanalytics/_generated/v3_0/aio/operations/_text_analytics_client_operations.py +0 -428
- azure/ai/textanalytics/_generated/v3_0/models/__init__.py +0 -81
- azure/ai/textanalytics/_generated/v3_0/models/_models_py3.py +0 -1467
- azure/ai/textanalytics/_generated/v3_0/models/_patch.py +0 -19
- azure/ai/textanalytics/_generated/v3_0/models/_text_analytics_client_enums.py +0 -58
- azure/ai/textanalytics/_generated/v3_0/operations/__init__.py +0 -18
- azure/ai/textanalytics/_generated/v3_0/operations/_patch.py +0 -19
- azure/ai/textanalytics/_generated/v3_0/operations/_text_analytics_client_operations.py +0 -604
- azure/ai/textanalytics/_generated/v3_1/__init__.py +0 -20
- azure/ai/textanalytics/_generated/v3_1/_configuration.py +0 -66
- azure/ai/textanalytics/_generated/v3_1/_patch.py +0 -31
- azure/ai/textanalytics/_generated/v3_1/_text_analytics_client.py +0 -98
- azure/ai/textanalytics/_generated/v3_1/_vendor.py +0 -45
- azure/ai/textanalytics/_generated/v3_1/aio/__init__.py +0 -20
- azure/ai/textanalytics/_generated/v3_1/aio/_configuration.py +0 -65
- azure/ai/textanalytics/_generated/v3_1/aio/_patch.py +0 -31
- azure/ai/textanalytics/_generated/v3_1/aio/_text_analytics_client.py +0 -95
- azure/ai/textanalytics/_generated/v3_1/aio/_vendor.py +0 -27
- azure/ai/textanalytics/_generated/v3_1/aio/operations/__init__.py +0 -18
- azure/ai/textanalytics/_generated/v3_1/aio/operations/_patch.py +0 -19
- azure/ai/textanalytics/_generated/v3_1/aio/operations/_text_analytics_client_operations.py +0 -1291
- azure/ai/textanalytics/_generated/v3_1/models/__init__.py +0 -205
- azure/ai/textanalytics/_generated/v3_1/models/_models_py3.py +0 -3976
- azure/ai/textanalytics/_generated/v3_1/models/_patch.py +0 -19
- azure/ai/textanalytics/_generated/v3_1/models/_text_analytics_client_enums.py +0 -367
- azure/ai/textanalytics/_generated/v3_1/operations/__init__.py +0 -18
- azure/ai/textanalytics/_generated/v3_1/operations/_patch.py +0 -19
- azure/ai/textanalytics/_generated/v3_1/operations/_text_analytics_client_operations.py +0 -1709
- azure/ai/textanalytics/_lro.py +0 -553
- azure/ai/textanalytics/_models.py +0 -3158
- azure/ai/textanalytics/_policies.py +0 -66
- azure/ai/textanalytics/_request_handlers.py +0 -104
- azure/ai/textanalytics/_response_handlers.py +0 -583
- azure/ai/textanalytics/_text_analytics_client.py +0 -2081
- azure/ai/textanalytics/_user_agent.py +0 -8
- azure/ai/textanalytics/_validate.py +0 -113
- azure/ai/textanalytics/aio/_base_client_async.py +0 -98
- azure/ai/textanalytics/aio/_lro_async.py +0 -503
- azure/ai/textanalytics/aio/_response_handlers_async.py +0 -94
- azure/ai/textanalytics/aio/_text_analytics_client_async.py +0 -2077
- azure_ai_textanalytics-5.3.0b2.dist-info/RECORD +0 -115
- {azure_ai_textanalytics-5.3.0b2.dist-info → azure_ai_textanalytics-6.0.0b1.dist-info/licenses}/LICENSE +0 -0
- {azure_ai_textanalytics-5.3.0b2.dist-info → azure_ai_textanalytics-6.0.0b1.dist-info}/top_level.txt +0 -0
|
@@ -1,3976 +0,0 @@
|
|
|
1
|
-
# coding=utf-8
|
|
2
|
-
# pylint: disable=too-many-lines
|
|
3
|
-
# --------------------------------------------------------------------------
|
|
4
|
-
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
|
-
# Licensed under the MIT License. See License.txt in the project root for license information.
|
|
6
|
-
# Code generated by Microsoft (R) AutoRest Code Generator.
|
|
7
|
-
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
8
|
-
# --------------------------------------------------------------------------
|
|
9
|
-
|
|
10
|
-
import datetime
|
|
11
|
-
from typing import Dict, List, Optional, TYPE_CHECKING, Union
|
|
12
|
-
|
|
13
|
-
from ... import _serialization
|
|
14
|
-
|
|
15
|
-
if TYPE_CHECKING:
|
|
16
|
-
# pylint: disable=unused-import,ungrouped-imports
|
|
17
|
-
from .. import models as _models
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class AnalysisInput(_serialization.Model):
|
|
21
|
-
"""AnalysisInput.
|
|
22
|
-
|
|
23
|
-
All required parameters must be populated in order to send to Azure.
|
|
24
|
-
|
|
25
|
-
:ivar analysis_input: Contains a set of input documents to be analyzed by the service.
|
|
26
|
-
Required.
|
|
27
|
-
:vartype analysis_input: ~azure.ai.textanalytics.v3_1.models.MultiLanguageBatchInput
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
_validation = {
|
|
31
|
-
'analysis_input': {'required': True},
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
_attribute_map = {
|
|
35
|
-
"analysis_input": {"key": "analysisInput", "type": "MultiLanguageBatchInput"},
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
def __init__(
|
|
39
|
-
self,
|
|
40
|
-
*,
|
|
41
|
-
analysis_input: "_models.MultiLanguageBatchInput",
|
|
42
|
-
**kwargs
|
|
43
|
-
):
|
|
44
|
-
"""
|
|
45
|
-
:keyword analysis_input: Contains a set of input documents to be analyzed by the service.
|
|
46
|
-
Required.
|
|
47
|
-
:paramtype analysis_input: ~azure.ai.textanalytics.v3_1.models.MultiLanguageBatchInput
|
|
48
|
-
"""
|
|
49
|
-
super().__init__(**kwargs)
|
|
50
|
-
self.analysis_input = analysis_input
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
class JobManifest(_serialization.Model):
|
|
54
|
-
"""JobManifest.
|
|
55
|
-
|
|
56
|
-
All required parameters must be populated in order to send to Azure.
|
|
57
|
-
|
|
58
|
-
:ivar tasks: The set of tasks to execute on the input documents. Cannot specify the same task
|
|
59
|
-
more than once. Required.
|
|
60
|
-
:vartype tasks: ~azure.ai.textanalytics.v3_1.models.JobManifestTasks
|
|
61
|
-
"""
|
|
62
|
-
|
|
63
|
-
_validation = {
|
|
64
|
-
'tasks': {'required': True},
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
_attribute_map = {
|
|
68
|
-
"tasks": {"key": "tasks", "type": "JobManifestTasks"},
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
def __init__(
|
|
72
|
-
self,
|
|
73
|
-
*,
|
|
74
|
-
tasks: "_models.JobManifestTasks",
|
|
75
|
-
**kwargs
|
|
76
|
-
):
|
|
77
|
-
"""
|
|
78
|
-
:keyword tasks: The set of tasks to execute on the input documents. Cannot specify the same
|
|
79
|
-
task more than once. Required.
|
|
80
|
-
:paramtype tasks: ~azure.ai.textanalytics.v3_1.models.JobManifestTasks
|
|
81
|
-
"""
|
|
82
|
-
super().__init__(**kwargs)
|
|
83
|
-
self.tasks = tasks
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
class JobDescriptor(_serialization.Model):
|
|
87
|
-
"""JobDescriptor.
|
|
88
|
-
|
|
89
|
-
:ivar display_name: Optional display name for the analysis job.
|
|
90
|
-
:vartype display_name: str
|
|
91
|
-
"""
|
|
92
|
-
|
|
93
|
-
_attribute_map = {
|
|
94
|
-
"display_name": {"key": "displayName", "type": "str"},
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
def __init__(
|
|
98
|
-
self,
|
|
99
|
-
*,
|
|
100
|
-
display_name: Optional[str] = None,
|
|
101
|
-
**kwargs
|
|
102
|
-
):
|
|
103
|
-
"""
|
|
104
|
-
:keyword display_name: Optional display name for the analysis job.
|
|
105
|
-
:paramtype display_name: str
|
|
106
|
-
"""
|
|
107
|
-
super().__init__(**kwargs)
|
|
108
|
-
self.display_name = display_name
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
class AnalyzeBatchInput(JobDescriptor, AnalysisInput, JobManifest):
|
|
112
|
-
"""AnalyzeBatchInput.
|
|
113
|
-
|
|
114
|
-
All required parameters must be populated in order to send to Azure.
|
|
115
|
-
|
|
116
|
-
:ivar tasks: The set of tasks to execute on the input documents. Cannot specify the same task
|
|
117
|
-
more than once. Required.
|
|
118
|
-
:vartype tasks: ~azure.ai.textanalytics.v3_1.models.JobManifestTasks
|
|
119
|
-
:ivar analysis_input: Contains a set of input documents to be analyzed by the service.
|
|
120
|
-
Required.
|
|
121
|
-
:vartype analysis_input: ~azure.ai.textanalytics.v3_1.models.MultiLanguageBatchInput
|
|
122
|
-
:ivar display_name: Optional display name for the analysis job.
|
|
123
|
-
:vartype display_name: str
|
|
124
|
-
"""
|
|
125
|
-
|
|
126
|
-
_validation = {
|
|
127
|
-
'tasks': {'required': True},
|
|
128
|
-
'analysis_input': {'required': True},
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
_attribute_map = {
|
|
132
|
-
"tasks": {"key": "tasks", "type": "JobManifestTasks"},
|
|
133
|
-
"analysis_input": {"key": "analysisInput", "type": "MultiLanguageBatchInput"},
|
|
134
|
-
"display_name": {"key": "displayName", "type": "str"},
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
def __init__(
|
|
138
|
-
self,
|
|
139
|
-
*,
|
|
140
|
-
tasks: "_models.JobManifestTasks",
|
|
141
|
-
analysis_input: "_models.MultiLanguageBatchInput",
|
|
142
|
-
display_name: Optional[str] = None,
|
|
143
|
-
**kwargs
|
|
144
|
-
):
|
|
145
|
-
"""
|
|
146
|
-
:keyword tasks: The set of tasks to execute on the input documents. Cannot specify the same
|
|
147
|
-
task more than once. Required.
|
|
148
|
-
:paramtype tasks: ~azure.ai.textanalytics.v3_1.models.JobManifestTasks
|
|
149
|
-
:keyword analysis_input: Contains a set of input documents to be analyzed by the service.
|
|
150
|
-
Required.
|
|
151
|
-
:paramtype analysis_input: ~azure.ai.textanalytics.v3_1.models.MultiLanguageBatchInput
|
|
152
|
-
:keyword display_name: Optional display name for the analysis job.
|
|
153
|
-
:paramtype display_name: str
|
|
154
|
-
"""
|
|
155
|
-
super().__init__(display_name=display_name, analysis_input=analysis_input, tasks=tasks, **kwargs)
|
|
156
|
-
self.tasks = tasks
|
|
157
|
-
self.analysis_input = analysis_input
|
|
158
|
-
self.display_name = display_name
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
class AnalyzeJobDisplayName(_serialization.Model):
|
|
162
|
-
"""AnalyzeJobDisplayName.
|
|
163
|
-
|
|
164
|
-
:ivar display_name:
|
|
165
|
-
:vartype display_name: str
|
|
166
|
-
"""
|
|
167
|
-
|
|
168
|
-
_attribute_map = {
|
|
169
|
-
"display_name": {"key": "displayName", "type": "str"},
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
def __init__(
|
|
173
|
-
self,
|
|
174
|
-
*,
|
|
175
|
-
display_name: Optional[str] = None,
|
|
176
|
-
**kwargs
|
|
177
|
-
):
|
|
178
|
-
"""
|
|
179
|
-
:keyword display_name:
|
|
180
|
-
:paramtype display_name: str
|
|
181
|
-
"""
|
|
182
|
-
super().__init__(**kwargs)
|
|
183
|
-
self.display_name = display_name
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
class AnalyzeJobErrorsAndStatistics(_serialization.Model):
|
|
187
|
-
"""AnalyzeJobErrorsAndStatistics.
|
|
188
|
-
|
|
189
|
-
:ivar errors:
|
|
190
|
-
:vartype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError]
|
|
191
|
-
:ivar statistics: if showStats=true was specified in the request this field will contain
|
|
192
|
-
information about the request payload.
|
|
193
|
-
:vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics
|
|
194
|
-
"""
|
|
195
|
-
|
|
196
|
-
_attribute_map = {
|
|
197
|
-
"errors": {"key": "errors", "type": "[TextAnalyticsError]"},
|
|
198
|
-
"statistics": {"key": "statistics", "type": "RequestStatistics"},
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
def __init__(
|
|
202
|
-
self,
|
|
203
|
-
*,
|
|
204
|
-
errors: Optional[List["_models.TextAnalyticsError"]] = None,
|
|
205
|
-
statistics: Optional["_models.RequestStatistics"] = None,
|
|
206
|
-
**kwargs
|
|
207
|
-
):
|
|
208
|
-
"""
|
|
209
|
-
:keyword errors:
|
|
210
|
-
:paramtype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError]
|
|
211
|
-
:keyword statistics: if showStats=true was specified in the request this field will contain
|
|
212
|
-
information about the request payload.
|
|
213
|
-
:paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics
|
|
214
|
-
"""
|
|
215
|
-
super().__init__(**kwargs)
|
|
216
|
-
self.errors = errors
|
|
217
|
-
self.statistics = statistics
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
class JobMetadata(_serialization.Model):
|
|
221
|
-
"""JobMetadata.
|
|
222
|
-
|
|
223
|
-
All required parameters must be populated in order to send to Azure.
|
|
224
|
-
|
|
225
|
-
:ivar created_date_time: Required.
|
|
226
|
-
:vartype created_date_time: ~datetime.datetime
|
|
227
|
-
:ivar expiration_date_time:
|
|
228
|
-
:vartype expiration_date_time: ~datetime.datetime
|
|
229
|
-
:ivar job_id: Required.
|
|
230
|
-
:vartype job_id: str
|
|
231
|
-
:ivar last_update_date_time: Required.
|
|
232
|
-
:vartype last_update_date_time: ~datetime.datetime
|
|
233
|
-
:ivar status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
234
|
-
"rejected", "cancelled", and "cancelling".
|
|
235
|
-
:vartype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
236
|
-
"""
|
|
237
|
-
|
|
238
|
-
_validation = {
|
|
239
|
-
'created_date_time': {'required': True},
|
|
240
|
-
'job_id': {'required': True},
|
|
241
|
-
'last_update_date_time': {'required': True},
|
|
242
|
-
'status': {'required': True},
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
_attribute_map = {
|
|
246
|
-
"created_date_time": {"key": "createdDateTime", "type": "iso-8601"},
|
|
247
|
-
"expiration_date_time": {"key": "expirationDateTime", "type": "iso-8601"},
|
|
248
|
-
"job_id": {"key": "jobId", "type": "str"},
|
|
249
|
-
"last_update_date_time": {"key": "lastUpdateDateTime", "type": "iso-8601"},
|
|
250
|
-
"status": {"key": "status", "type": "str"},
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
def __init__(
|
|
254
|
-
self,
|
|
255
|
-
*,
|
|
256
|
-
created_date_time: datetime.datetime,
|
|
257
|
-
job_id: str,
|
|
258
|
-
last_update_date_time: datetime.datetime,
|
|
259
|
-
status: Union[str, "_models.State"],
|
|
260
|
-
expiration_date_time: Optional[datetime.datetime] = None,
|
|
261
|
-
**kwargs
|
|
262
|
-
):
|
|
263
|
-
"""
|
|
264
|
-
:keyword created_date_time: Required.
|
|
265
|
-
:paramtype created_date_time: ~datetime.datetime
|
|
266
|
-
:keyword expiration_date_time:
|
|
267
|
-
:paramtype expiration_date_time: ~datetime.datetime
|
|
268
|
-
:keyword job_id: Required.
|
|
269
|
-
:paramtype job_id: str
|
|
270
|
-
:keyword last_update_date_time: Required.
|
|
271
|
-
:paramtype last_update_date_time: ~datetime.datetime
|
|
272
|
-
:keyword status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
273
|
-
"rejected", "cancelled", and "cancelling".
|
|
274
|
-
:paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
275
|
-
"""
|
|
276
|
-
super().__init__(**kwargs)
|
|
277
|
-
self.created_date_time = created_date_time
|
|
278
|
-
self.expiration_date_time = expiration_date_time
|
|
279
|
-
self.job_id = job_id
|
|
280
|
-
self.last_update_date_time = last_update_date_time
|
|
281
|
-
self.status = status
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
class AnalyzeJobMetadata(JobMetadata, AnalyzeJobDisplayName):
|
|
285
|
-
"""AnalyzeJobMetadata.
|
|
286
|
-
|
|
287
|
-
All required parameters must be populated in order to send to Azure.
|
|
288
|
-
|
|
289
|
-
:ivar display_name:
|
|
290
|
-
:vartype display_name: str
|
|
291
|
-
:ivar created_date_time: Required.
|
|
292
|
-
:vartype created_date_time: ~datetime.datetime
|
|
293
|
-
:ivar expiration_date_time:
|
|
294
|
-
:vartype expiration_date_time: ~datetime.datetime
|
|
295
|
-
:ivar job_id: Required.
|
|
296
|
-
:vartype job_id: str
|
|
297
|
-
:ivar last_update_date_time: Required.
|
|
298
|
-
:vartype last_update_date_time: ~datetime.datetime
|
|
299
|
-
:ivar status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
300
|
-
"rejected", "cancelled", and "cancelling".
|
|
301
|
-
:vartype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
302
|
-
"""
|
|
303
|
-
|
|
304
|
-
_validation = {
|
|
305
|
-
'created_date_time': {'required': True},
|
|
306
|
-
'job_id': {'required': True},
|
|
307
|
-
'last_update_date_time': {'required': True},
|
|
308
|
-
'status': {'required': True},
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
_attribute_map = {
|
|
312
|
-
"display_name": {"key": "displayName", "type": "str"},
|
|
313
|
-
"created_date_time": {"key": "createdDateTime", "type": "iso-8601"},
|
|
314
|
-
"expiration_date_time": {"key": "expirationDateTime", "type": "iso-8601"},
|
|
315
|
-
"job_id": {"key": "jobId", "type": "str"},
|
|
316
|
-
"last_update_date_time": {"key": "lastUpdateDateTime", "type": "iso-8601"},
|
|
317
|
-
"status": {"key": "status", "type": "str"},
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
def __init__(
|
|
321
|
-
self,
|
|
322
|
-
*,
|
|
323
|
-
created_date_time: datetime.datetime,
|
|
324
|
-
job_id: str,
|
|
325
|
-
last_update_date_time: datetime.datetime,
|
|
326
|
-
status: Union[str, "_models.State"],
|
|
327
|
-
display_name: Optional[str] = None,
|
|
328
|
-
expiration_date_time: Optional[datetime.datetime] = None,
|
|
329
|
-
**kwargs
|
|
330
|
-
):
|
|
331
|
-
"""
|
|
332
|
-
:keyword display_name:
|
|
333
|
-
:paramtype display_name: str
|
|
334
|
-
:keyword created_date_time: Required.
|
|
335
|
-
:paramtype created_date_time: ~datetime.datetime
|
|
336
|
-
:keyword expiration_date_time:
|
|
337
|
-
:paramtype expiration_date_time: ~datetime.datetime
|
|
338
|
-
:keyword job_id: Required.
|
|
339
|
-
:paramtype job_id: str
|
|
340
|
-
:keyword last_update_date_time: Required.
|
|
341
|
-
:paramtype last_update_date_time: ~datetime.datetime
|
|
342
|
-
:keyword status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
343
|
-
"rejected", "cancelled", and "cancelling".
|
|
344
|
-
:paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
345
|
-
"""
|
|
346
|
-
super().__init__(created_date_time=created_date_time, expiration_date_time=expiration_date_time, job_id=job_id, last_update_date_time=last_update_date_time, status=status, display_name=display_name, **kwargs)
|
|
347
|
-
self.display_name = display_name
|
|
348
|
-
self.created_date_time = created_date_time
|
|
349
|
-
self.expiration_date_time = expiration_date_time
|
|
350
|
-
self.job_id = job_id
|
|
351
|
-
self.last_update_date_time = last_update_date_time
|
|
352
|
-
self.status = status
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
class Pagination(_serialization.Model):
|
|
356
|
-
"""Pagination.
|
|
357
|
-
|
|
358
|
-
:ivar next_link:
|
|
359
|
-
:vartype next_link: str
|
|
360
|
-
"""
|
|
361
|
-
|
|
362
|
-
_attribute_map = {
|
|
363
|
-
"next_link": {"key": "@nextLink", "type": "str"},
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
def __init__(
|
|
367
|
-
self,
|
|
368
|
-
*,
|
|
369
|
-
next_link: Optional[str] = None,
|
|
370
|
-
**kwargs
|
|
371
|
-
):
|
|
372
|
-
"""
|
|
373
|
-
:keyword next_link:
|
|
374
|
-
:paramtype next_link: str
|
|
375
|
-
"""
|
|
376
|
-
super().__init__(**kwargs)
|
|
377
|
-
self.next_link = next_link
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
class TasksState(_serialization.Model):
|
|
381
|
-
"""TasksState.
|
|
382
|
-
|
|
383
|
-
All required parameters must be populated in order to send to Azure.
|
|
384
|
-
|
|
385
|
-
:ivar tasks: Required.
|
|
386
|
-
:vartype tasks: ~azure.ai.textanalytics.v3_1.models.TasksStateTasks
|
|
387
|
-
"""
|
|
388
|
-
|
|
389
|
-
_validation = {
|
|
390
|
-
'tasks': {'required': True},
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
_attribute_map = {
|
|
394
|
-
"tasks": {"key": "tasks", "type": "TasksStateTasks"},
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
def __init__(
|
|
398
|
-
self,
|
|
399
|
-
*,
|
|
400
|
-
tasks: "_models.TasksStateTasks",
|
|
401
|
-
**kwargs
|
|
402
|
-
):
|
|
403
|
-
"""
|
|
404
|
-
:keyword tasks: Required.
|
|
405
|
-
:paramtype tasks: ~azure.ai.textanalytics.v3_1.models.TasksStateTasks
|
|
406
|
-
"""
|
|
407
|
-
super().__init__(**kwargs)
|
|
408
|
-
self.tasks = tasks
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
class AnalyzeJobState(AnalyzeJobMetadata, TasksState, AnalyzeJobErrorsAndStatistics, Pagination):
|
|
412
|
-
"""AnalyzeJobState.
|
|
413
|
-
|
|
414
|
-
All required parameters must be populated in order to send to Azure.
|
|
415
|
-
|
|
416
|
-
:ivar next_link:
|
|
417
|
-
:vartype next_link: str
|
|
418
|
-
:ivar errors:
|
|
419
|
-
:vartype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError]
|
|
420
|
-
:ivar statistics: if showStats=true was specified in the request this field will contain
|
|
421
|
-
information about the request payload.
|
|
422
|
-
:vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics
|
|
423
|
-
:ivar tasks: Required.
|
|
424
|
-
:vartype tasks: ~azure.ai.textanalytics.v3_1.models.TasksStateTasks
|
|
425
|
-
:ivar display_name:
|
|
426
|
-
:vartype display_name: str
|
|
427
|
-
:ivar created_date_time: Required.
|
|
428
|
-
:vartype created_date_time: ~datetime.datetime
|
|
429
|
-
:ivar expiration_date_time:
|
|
430
|
-
:vartype expiration_date_time: ~datetime.datetime
|
|
431
|
-
:ivar job_id: Required.
|
|
432
|
-
:vartype job_id: str
|
|
433
|
-
:ivar last_update_date_time: Required.
|
|
434
|
-
:vartype last_update_date_time: ~datetime.datetime
|
|
435
|
-
:ivar status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
436
|
-
"rejected", "cancelled", and "cancelling".
|
|
437
|
-
:vartype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
438
|
-
"""
|
|
439
|
-
|
|
440
|
-
_validation = {
|
|
441
|
-
'tasks': {'required': True},
|
|
442
|
-
'created_date_time': {'required': True},
|
|
443
|
-
'job_id': {'required': True},
|
|
444
|
-
'last_update_date_time': {'required': True},
|
|
445
|
-
'status': {'required': True},
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
_attribute_map = {
|
|
449
|
-
"next_link": {"key": "@nextLink", "type": "str"},
|
|
450
|
-
"errors": {"key": "errors", "type": "[TextAnalyticsError]"},
|
|
451
|
-
"statistics": {"key": "statistics", "type": "RequestStatistics"},
|
|
452
|
-
"tasks": {"key": "tasks", "type": "TasksStateTasks"},
|
|
453
|
-
"display_name": {"key": "displayName", "type": "str"},
|
|
454
|
-
"created_date_time": {"key": "createdDateTime", "type": "iso-8601"},
|
|
455
|
-
"expiration_date_time": {"key": "expirationDateTime", "type": "iso-8601"},
|
|
456
|
-
"job_id": {"key": "jobId", "type": "str"},
|
|
457
|
-
"last_update_date_time": {"key": "lastUpdateDateTime", "type": "iso-8601"},
|
|
458
|
-
"status": {"key": "status", "type": "str"},
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
def __init__(
|
|
462
|
-
self,
|
|
463
|
-
*,
|
|
464
|
-
tasks: "_models.TasksStateTasks",
|
|
465
|
-
created_date_time: datetime.datetime,
|
|
466
|
-
job_id: str,
|
|
467
|
-
last_update_date_time: datetime.datetime,
|
|
468
|
-
status: Union[str, "_models.State"],
|
|
469
|
-
next_link: Optional[str] = None,
|
|
470
|
-
errors: Optional[List["_models.TextAnalyticsError"]] = None,
|
|
471
|
-
statistics: Optional["_models.RequestStatistics"] = None,
|
|
472
|
-
display_name: Optional[str] = None,
|
|
473
|
-
expiration_date_time: Optional[datetime.datetime] = None,
|
|
474
|
-
**kwargs
|
|
475
|
-
):
|
|
476
|
-
"""
|
|
477
|
-
:keyword next_link:
|
|
478
|
-
:paramtype next_link: str
|
|
479
|
-
:keyword errors:
|
|
480
|
-
:paramtype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError]
|
|
481
|
-
:keyword statistics: if showStats=true was specified in the request this field will contain
|
|
482
|
-
information about the request payload.
|
|
483
|
-
:paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics
|
|
484
|
-
:keyword tasks: Required.
|
|
485
|
-
:paramtype tasks: ~azure.ai.textanalytics.v3_1.models.TasksStateTasks
|
|
486
|
-
:keyword display_name:
|
|
487
|
-
:paramtype display_name: str
|
|
488
|
-
:keyword created_date_time: Required.
|
|
489
|
-
:paramtype created_date_time: ~datetime.datetime
|
|
490
|
-
:keyword expiration_date_time:
|
|
491
|
-
:paramtype expiration_date_time: ~datetime.datetime
|
|
492
|
-
:keyword job_id: Required.
|
|
493
|
-
:paramtype job_id: str
|
|
494
|
-
:keyword last_update_date_time: Required.
|
|
495
|
-
:paramtype last_update_date_time: ~datetime.datetime
|
|
496
|
-
:keyword status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
497
|
-
"rejected", "cancelled", and "cancelling".
|
|
498
|
-
:paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
499
|
-
"""
|
|
500
|
-
super().__init__(display_name=display_name, created_date_time=created_date_time, expiration_date_time=expiration_date_time, job_id=job_id, last_update_date_time=last_update_date_time, status=status, tasks=tasks, errors=errors, statistics=statistics, next_link=next_link, **kwargs)
|
|
501
|
-
self.next_link = next_link
|
|
502
|
-
self.errors = errors
|
|
503
|
-
self.statistics = statistics
|
|
504
|
-
self.tasks = tasks
|
|
505
|
-
self.display_name = display_name
|
|
506
|
-
self.created_date_time = created_date_time
|
|
507
|
-
self.expiration_date_time = expiration_date_time
|
|
508
|
-
self.job_id = job_id
|
|
509
|
-
self.last_update_date_time = last_update_date_time
|
|
510
|
-
self.status = status
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
class DetectedLanguage(_serialization.Model):
|
|
514
|
-
"""DetectedLanguage.
|
|
515
|
-
|
|
516
|
-
All required parameters must be populated in order to send to Azure.
|
|
517
|
-
|
|
518
|
-
:ivar name: Long name of a detected language (e.g. English, French). Required.
|
|
519
|
-
:vartype name: str
|
|
520
|
-
:ivar iso6391_name: A two letter representation of the detected language according to the ISO
|
|
521
|
-
639-1 standard (e.g. en, fr). Required.
|
|
522
|
-
:vartype iso6391_name: str
|
|
523
|
-
:ivar confidence_score: A confidence score between 0 and 1. Scores close to 1 indicate 100%
|
|
524
|
-
certainty that the identified language is true. Required.
|
|
525
|
-
:vartype confidence_score: float
|
|
526
|
-
"""
|
|
527
|
-
|
|
528
|
-
_validation = {
|
|
529
|
-
'name': {'required': True},
|
|
530
|
-
'iso6391_name': {'required': True},
|
|
531
|
-
'confidence_score': {'required': True},
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
_attribute_map = {
|
|
535
|
-
"name": {"key": "name", "type": "str"},
|
|
536
|
-
"iso6391_name": {"key": "iso6391Name", "type": "str"},
|
|
537
|
-
"confidence_score": {"key": "confidenceScore", "type": "float"},
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
def __init__(
|
|
541
|
-
self,
|
|
542
|
-
*,
|
|
543
|
-
name: str,
|
|
544
|
-
iso6391_name: str,
|
|
545
|
-
confidence_score: float,
|
|
546
|
-
**kwargs
|
|
547
|
-
):
|
|
548
|
-
"""
|
|
549
|
-
:keyword name: Long name of a detected language (e.g. English, French). Required.
|
|
550
|
-
:paramtype name: str
|
|
551
|
-
:keyword iso6391_name: A two letter representation of the detected language according to the
|
|
552
|
-
ISO 639-1 standard (e.g. en, fr). Required.
|
|
553
|
-
:paramtype iso6391_name: str
|
|
554
|
-
:keyword confidence_score: A confidence score between 0 and 1. Scores close to 1 indicate 100%
|
|
555
|
-
certainty that the identified language is true. Required.
|
|
556
|
-
:paramtype confidence_score: float
|
|
557
|
-
"""
|
|
558
|
-
super().__init__(**kwargs)
|
|
559
|
-
self.name = name
|
|
560
|
-
self.iso6391_name = iso6391_name
|
|
561
|
-
self.confidence_score = confidence_score
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
class DocumentEntities(_serialization.Model):
|
|
565
|
-
"""DocumentEntities.
|
|
566
|
-
|
|
567
|
-
All required parameters must be populated in order to send to Azure.
|
|
568
|
-
|
|
569
|
-
:ivar id: Unique, non-empty document identifier. Required.
|
|
570
|
-
:vartype id: str
|
|
571
|
-
:ivar entities: Recognized entities in the document. Required.
|
|
572
|
-
:vartype entities: list[~azure.ai.textanalytics.v3_1.models.Entity]
|
|
573
|
-
:ivar warnings: Warnings encountered while processing document. Required.
|
|
574
|
-
:vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning]
|
|
575
|
-
:ivar statistics: if showStats=true was specified in the request this field will contain
|
|
576
|
-
information about the document payload.
|
|
577
|
-
:vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics
|
|
578
|
-
"""
|
|
579
|
-
|
|
580
|
-
_validation = {
|
|
581
|
-
'id': {'required': True},
|
|
582
|
-
'entities': {'required': True},
|
|
583
|
-
'warnings': {'required': True},
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
_attribute_map = {
|
|
587
|
-
"id": {"key": "id", "type": "str"},
|
|
588
|
-
"entities": {"key": "entities", "type": "[Entity]"},
|
|
589
|
-
"warnings": {"key": "warnings", "type": "[TextAnalyticsWarning]"},
|
|
590
|
-
"statistics": {"key": "statistics", "type": "DocumentStatistics"},
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
def __init__(
|
|
594
|
-
self,
|
|
595
|
-
*,
|
|
596
|
-
id: str, # pylint: disable=redefined-builtin
|
|
597
|
-
entities: List["_models.Entity"],
|
|
598
|
-
warnings: List["_models.TextAnalyticsWarning"],
|
|
599
|
-
statistics: Optional["_models.DocumentStatistics"] = None,
|
|
600
|
-
**kwargs
|
|
601
|
-
):
|
|
602
|
-
"""
|
|
603
|
-
:keyword id: Unique, non-empty document identifier. Required.
|
|
604
|
-
:paramtype id: str
|
|
605
|
-
:keyword entities: Recognized entities in the document. Required.
|
|
606
|
-
:paramtype entities: list[~azure.ai.textanalytics.v3_1.models.Entity]
|
|
607
|
-
:keyword warnings: Warnings encountered while processing document. Required.
|
|
608
|
-
:paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning]
|
|
609
|
-
:keyword statistics: if showStats=true was specified in the request this field will contain
|
|
610
|
-
information about the document payload.
|
|
611
|
-
:paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics
|
|
612
|
-
"""
|
|
613
|
-
super().__init__(**kwargs)
|
|
614
|
-
self.id = id
|
|
615
|
-
self.entities = entities
|
|
616
|
-
self.warnings = warnings
|
|
617
|
-
self.statistics = statistics
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
class DocumentError(_serialization.Model):
|
|
621
|
-
"""DocumentError.
|
|
622
|
-
|
|
623
|
-
All required parameters must be populated in order to send to Azure.
|
|
624
|
-
|
|
625
|
-
:ivar id: Document Id. Required.
|
|
626
|
-
:vartype id: str
|
|
627
|
-
:ivar error: Document Error. Required.
|
|
628
|
-
:vartype error: ~azure.ai.textanalytics.v3_1.models.TextAnalyticsError
|
|
629
|
-
"""
|
|
630
|
-
|
|
631
|
-
_validation = {
|
|
632
|
-
'id': {'required': True},
|
|
633
|
-
'error': {'required': True},
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
_attribute_map = {
|
|
637
|
-
"id": {"key": "id", "type": "str"},
|
|
638
|
-
"error": {"key": "error", "type": "TextAnalyticsError"},
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
def __init__(
|
|
642
|
-
self,
|
|
643
|
-
*,
|
|
644
|
-
id: str, # pylint: disable=redefined-builtin
|
|
645
|
-
error: "_models.TextAnalyticsError",
|
|
646
|
-
**kwargs
|
|
647
|
-
):
|
|
648
|
-
"""
|
|
649
|
-
:keyword id: Document Id. Required.
|
|
650
|
-
:paramtype id: str
|
|
651
|
-
:keyword error: Document Error. Required.
|
|
652
|
-
:paramtype error: ~azure.ai.textanalytics.v3_1.models.TextAnalyticsError
|
|
653
|
-
"""
|
|
654
|
-
super().__init__(**kwargs)
|
|
655
|
-
self.id = id
|
|
656
|
-
self.error = error
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
class DocumentHealthcareEntities(_serialization.Model):
|
|
660
|
-
"""DocumentHealthcareEntities.
|
|
661
|
-
|
|
662
|
-
All required parameters must be populated in order to send to Azure.
|
|
663
|
-
|
|
664
|
-
:ivar id: Unique, non-empty document identifier. Required.
|
|
665
|
-
:vartype id: str
|
|
666
|
-
:ivar entities: Healthcare entities. Required.
|
|
667
|
-
:vartype entities: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntity]
|
|
668
|
-
:ivar relations: Healthcare entity relations. Required.
|
|
669
|
-
:vartype relations: list[~azure.ai.textanalytics.v3_1.models.HealthcareRelation]
|
|
670
|
-
:ivar warnings: Warnings encountered while processing document. Required.
|
|
671
|
-
:vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning]
|
|
672
|
-
:ivar statistics: if showStats=true was specified in the request this field will contain
|
|
673
|
-
information about the document payload.
|
|
674
|
-
:vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics
|
|
675
|
-
"""
|
|
676
|
-
|
|
677
|
-
_validation = {
|
|
678
|
-
'id': {'required': True},
|
|
679
|
-
'entities': {'required': True},
|
|
680
|
-
'relations': {'required': True},
|
|
681
|
-
'warnings': {'required': True},
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
_attribute_map = {
|
|
685
|
-
"id": {"key": "id", "type": "str"},
|
|
686
|
-
"entities": {"key": "entities", "type": "[HealthcareEntity]"},
|
|
687
|
-
"relations": {"key": "relations", "type": "[HealthcareRelation]"},
|
|
688
|
-
"warnings": {"key": "warnings", "type": "[TextAnalyticsWarning]"},
|
|
689
|
-
"statistics": {"key": "statistics", "type": "DocumentStatistics"},
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
def __init__(
|
|
693
|
-
self,
|
|
694
|
-
*,
|
|
695
|
-
id: str, # pylint: disable=redefined-builtin
|
|
696
|
-
entities: List["_models.HealthcareEntity"],
|
|
697
|
-
relations: List["_models.HealthcareRelation"],
|
|
698
|
-
warnings: List["_models.TextAnalyticsWarning"],
|
|
699
|
-
statistics: Optional["_models.DocumentStatistics"] = None,
|
|
700
|
-
**kwargs
|
|
701
|
-
):
|
|
702
|
-
"""
|
|
703
|
-
:keyword id: Unique, non-empty document identifier. Required.
|
|
704
|
-
:paramtype id: str
|
|
705
|
-
:keyword entities: Healthcare entities. Required.
|
|
706
|
-
:paramtype entities: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntity]
|
|
707
|
-
:keyword relations: Healthcare entity relations. Required.
|
|
708
|
-
:paramtype relations: list[~azure.ai.textanalytics.v3_1.models.HealthcareRelation]
|
|
709
|
-
:keyword warnings: Warnings encountered while processing document. Required.
|
|
710
|
-
:paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning]
|
|
711
|
-
:keyword statistics: if showStats=true was specified in the request this field will contain
|
|
712
|
-
information about the document payload.
|
|
713
|
-
:paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics
|
|
714
|
-
"""
|
|
715
|
-
super().__init__(**kwargs)
|
|
716
|
-
self.id = id
|
|
717
|
-
self.entities = entities
|
|
718
|
-
self.relations = relations
|
|
719
|
-
self.warnings = warnings
|
|
720
|
-
self.statistics = statistics
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
class DocumentKeyPhrases(_serialization.Model):
|
|
724
|
-
"""DocumentKeyPhrases.
|
|
725
|
-
|
|
726
|
-
All required parameters must be populated in order to send to Azure.
|
|
727
|
-
|
|
728
|
-
:ivar id: Unique, non-empty document identifier. Required.
|
|
729
|
-
:vartype id: str
|
|
730
|
-
:ivar key_phrases: A list of representative words or phrases. The number of key phrases
|
|
731
|
-
returned is proportional to the number of words in the input document. Required.
|
|
732
|
-
:vartype key_phrases: list[str]
|
|
733
|
-
:ivar warnings: Warnings encountered while processing document. Required.
|
|
734
|
-
:vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning]
|
|
735
|
-
:ivar statistics: if showStats=true was specified in the request this field will contain
|
|
736
|
-
information about the document payload.
|
|
737
|
-
:vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics
|
|
738
|
-
"""
|
|
739
|
-
|
|
740
|
-
_validation = {
|
|
741
|
-
'id': {'required': True},
|
|
742
|
-
'key_phrases': {'required': True},
|
|
743
|
-
'warnings': {'required': True},
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
_attribute_map = {
|
|
747
|
-
"id": {"key": "id", "type": "str"},
|
|
748
|
-
"key_phrases": {"key": "keyPhrases", "type": "[str]"},
|
|
749
|
-
"warnings": {"key": "warnings", "type": "[TextAnalyticsWarning]"},
|
|
750
|
-
"statistics": {"key": "statistics", "type": "DocumentStatistics"},
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
def __init__(
|
|
754
|
-
self,
|
|
755
|
-
*,
|
|
756
|
-
id: str, # pylint: disable=redefined-builtin
|
|
757
|
-
key_phrases: List[str],
|
|
758
|
-
warnings: List["_models.TextAnalyticsWarning"],
|
|
759
|
-
statistics: Optional["_models.DocumentStatistics"] = None,
|
|
760
|
-
**kwargs
|
|
761
|
-
):
|
|
762
|
-
"""
|
|
763
|
-
:keyword id: Unique, non-empty document identifier. Required.
|
|
764
|
-
:paramtype id: str
|
|
765
|
-
:keyword key_phrases: A list of representative words or phrases. The number of key phrases
|
|
766
|
-
returned is proportional to the number of words in the input document. Required.
|
|
767
|
-
:paramtype key_phrases: list[str]
|
|
768
|
-
:keyword warnings: Warnings encountered while processing document. Required.
|
|
769
|
-
:paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning]
|
|
770
|
-
:keyword statistics: if showStats=true was specified in the request this field will contain
|
|
771
|
-
information about the document payload.
|
|
772
|
-
:paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics
|
|
773
|
-
"""
|
|
774
|
-
super().__init__(**kwargs)
|
|
775
|
-
self.id = id
|
|
776
|
-
self.key_phrases = key_phrases
|
|
777
|
-
self.warnings = warnings
|
|
778
|
-
self.statistics = statistics
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
class DocumentLanguage(_serialization.Model):
|
|
782
|
-
"""DocumentLanguage.
|
|
783
|
-
|
|
784
|
-
All required parameters must be populated in order to send to Azure.
|
|
785
|
-
|
|
786
|
-
:ivar id: Unique, non-empty document identifier. Required.
|
|
787
|
-
:vartype id: str
|
|
788
|
-
:ivar detected_language: Detected Language. Required.
|
|
789
|
-
:vartype detected_language: ~azure.ai.textanalytics.v3_1.models.DetectedLanguage
|
|
790
|
-
:ivar warnings: Warnings encountered while processing document. Required.
|
|
791
|
-
:vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning]
|
|
792
|
-
:ivar statistics: if showStats=true was specified in the request this field will contain
|
|
793
|
-
information about the document payload.
|
|
794
|
-
:vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics
|
|
795
|
-
"""
|
|
796
|
-
|
|
797
|
-
_validation = {
|
|
798
|
-
'id': {'required': True},
|
|
799
|
-
'detected_language': {'required': True},
|
|
800
|
-
'warnings': {'required': True},
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
_attribute_map = {
|
|
804
|
-
"id": {"key": "id", "type": "str"},
|
|
805
|
-
"detected_language": {"key": "detectedLanguage", "type": "DetectedLanguage"},
|
|
806
|
-
"warnings": {"key": "warnings", "type": "[TextAnalyticsWarning]"},
|
|
807
|
-
"statistics": {"key": "statistics", "type": "DocumentStatistics"},
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
def __init__(
|
|
811
|
-
self,
|
|
812
|
-
*,
|
|
813
|
-
id: str, # pylint: disable=redefined-builtin
|
|
814
|
-
detected_language: "_models.DetectedLanguage",
|
|
815
|
-
warnings: List["_models.TextAnalyticsWarning"],
|
|
816
|
-
statistics: Optional["_models.DocumentStatistics"] = None,
|
|
817
|
-
**kwargs
|
|
818
|
-
):
|
|
819
|
-
"""
|
|
820
|
-
:keyword id: Unique, non-empty document identifier. Required.
|
|
821
|
-
:paramtype id: str
|
|
822
|
-
:keyword detected_language: Detected Language. Required.
|
|
823
|
-
:paramtype detected_language: ~azure.ai.textanalytics.v3_1.models.DetectedLanguage
|
|
824
|
-
:keyword warnings: Warnings encountered while processing document. Required.
|
|
825
|
-
:paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning]
|
|
826
|
-
:keyword statistics: if showStats=true was specified in the request this field will contain
|
|
827
|
-
information about the document payload.
|
|
828
|
-
:paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics
|
|
829
|
-
"""
|
|
830
|
-
super().__init__(**kwargs)
|
|
831
|
-
self.id = id
|
|
832
|
-
self.detected_language = detected_language
|
|
833
|
-
self.warnings = warnings
|
|
834
|
-
self.statistics = statistics
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
class DocumentLinkedEntities(_serialization.Model):
|
|
838
|
-
"""DocumentLinkedEntities.
|
|
839
|
-
|
|
840
|
-
All required parameters must be populated in order to send to Azure.
|
|
841
|
-
|
|
842
|
-
:ivar id: Unique, non-empty document identifier. Required.
|
|
843
|
-
:vartype id: str
|
|
844
|
-
:ivar entities: Recognized well known entities in the document. Required.
|
|
845
|
-
:vartype entities: list[~azure.ai.textanalytics.v3_1.models.LinkedEntity]
|
|
846
|
-
:ivar warnings: Warnings encountered while processing document. Required.
|
|
847
|
-
:vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning]
|
|
848
|
-
:ivar statistics: if showStats=true was specified in the request this field will contain
|
|
849
|
-
information about the document payload.
|
|
850
|
-
:vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics
|
|
851
|
-
"""
|
|
852
|
-
|
|
853
|
-
_validation = {
|
|
854
|
-
'id': {'required': True},
|
|
855
|
-
'entities': {'required': True},
|
|
856
|
-
'warnings': {'required': True},
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
_attribute_map = {
|
|
860
|
-
"id": {"key": "id", "type": "str"},
|
|
861
|
-
"entities": {"key": "entities", "type": "[LinkedEntity]"},
|
|
862
|
-
"warnings": {"key": "warnings", "type": "[TextAnalyticsWarning]"},
|
|
863
|
-
"statistics": {"key": "statistics", "type": "DocumentStatistics"},
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
def __init__(
|
|
867
|
-
self,
|
|
868
|
-
*,
|
|
869
|
-
id: str, # pylint: disable=redefined-builtin
|
|
870
|
-
entities: List["_models.LinkedEntity"],
|
|
871
|
-
warnings: List["_models.TextAnalyticsWarning"],
|
|
872
|
-
statistics: Optional["_models.DocumentStatistics"] = None,
|
|
873
|
-
**kwargs
|
|
874
|
-
):
|
|
875
|
-
"""
|
|
876
|
-
:keyword id: Unique, non-empty document identifier. Required.
|
|
877
|
-
:paramtype id: str
|
|
878
|
-
:keyword entities: Recognized well known entities in the document. Required.
|
|
879
|
-
:paramtype entities: list[~azure.ai.textanalytics.v3_1.models.LinkedEntity]
|
|
880
|
-
:keyword warnings: Warnings encountered while processing document. Required.
|
|
881
|
-
:paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning]
|
|
882
|
-
:keyword statistics: if showStats=true was specified in the request this field will contain
|
|
883
|
-
information about the document payload.
|
|
884
|
-
:paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics
|
|
885
|
-
"""
|
|
886
|
-
super().__init__(**kwargs)
|
|
887
|
-
self.id = id
|
|
888
|
-
self.entities = entities
|
|
889
|
-
self.warnings = warnings
|
|
890
|
-
self.statistics = statistics
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
class DocumentSentiment(_serialization.Model):
|
|
894
|
-
"""DocumentSentiment.
|
|
895
|
-
|
|
896
|
-
All required parameters must be populated in order to send to Azure.
|
|
897
|
-
|
|
898
|
-
:ivar id: Unique, non-empty document identifier. Required.
|
|
899
|
-
:vartype id: str
|
|
900
|
-
:ivar sentiment: Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).
|
|
901
|
-
Required. Known values are: "positive", "neutral", "negative", and "mixed".
|
|
902
|
-
:vartype sentiment: str or ~azure.ai.textanalytics.v3_1.models.DocumentSentimentValue
|
|
903
|
-
:ivar statistics: if showStats=true was specified in the request this field will contain
|
|
904
|
-
information about the document payload.
|
|
905
|
-
:vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics
|
|
906
|
-
:ivar confidence_scores: Document level sentiment confidence scores between 0 and 1 for each
|
|
907
|
-
sentiment class. Required.
|
|
908
|
-
:vartype confidence_scores:
|
|
909
|
-
~azure.ai.textanalytics.v3_1.models.SentimentConfidenceScorePerLabel
|
|
910
|
-
:ivar sentences: Sentence level sentiment analysis. Required.
|
|
911
|
-
:vartype sentences: list[~azure.ai.textanalytics.v3_1.models.SentenceSentiment]
|
|
912
|
-
:ivar warnings: Warnings encountered while processing document. Required.
|
|
913
|
-
:vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning]
|
|
914
|
-
"""
|
|
915
|
-
|
|
916
|
-
_validation = {
|
|
917
|
-
'id': {'required': True},
|
|
918
|
-
'sentiment': {'required': True},
|
|
919
|
-
'confidence_scores': {'required': True},
|
|
920
|
-
'sentences': {'required': True},
|
|
921
|
-
'warnings': {'required': True},
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
_attribute_map = {
|
|
925
|
-
"id": {"key": "id", "type": "str"},
|
|
926
|
-
"sentiment": {"key": "sentiment", "type": "str"},
|
|
927
|
-
"statistics": {"key": "statistics", "type": "DocumentStatistics"},
|
|
928
|
-
"confidence_scores": {"key": "confidenceScores", "type": "SentimentConfidenceScorePerLabel"},
|
|
929
|
-
"sentences": {"key": "sentences", "type": "[SentenceSentiment]"},
|
|
930
|
-
"warnings": {"key": "warnings", "type": "[TextAnalyticsWarning]"},
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
def __init__(
|
|
934
|
-
self,
|
|
935
|
-
*,
|
|
936
|
-
id: str, # pylint: disable=redefined-builtin
|
|
937
|
-
sentiment: Union[str, "_models.DocumentSentimentValue"],
|
|
938
|
-
confidence_scores: "_models.SentimentConfidenceScorePerLabel",
|
|
939
|
-
sentences: List["_models.SentenceSentiment"],
|
|
940
|
-
warnings: List["_models.TextAnalyticsWarning"],
|
|
941
|
-
statistics: Optional["_models.DocumentStatistics"] = None,
|
|
942
|
-
**kwargs
|
|
943
|
-
):
|
|
944
|
-
"""
|
|
945
|
-
:keyword id: Unique, non-empty document identifier. Required.
|
|
946
|
-
:paramtype id: str
|
|
947
|
-
:keyword sentiment: Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).
|
|
948
|
-
Required. Known values are: "positive", "neutral", "negative", and "mixed".
|
|
949
|
-
:paramtype sentiment: str or ~azure.ai.textanalytics.v3_1.models.DocumentSentimentValue
|
|
950
|
-
:keyword statistics: if showStats=true was specified in the request this field will contain
|
|
951
|
-
information about the document payload.
|
|
952
|
-
:paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics
|
|
953
|
-
:keyword confidence_scores: Document level sentiment confidence scores between 0 and 1 for each
|
|
954
|
-
sentiment class. Required.
|
|
955
|
-
:paramtype confidence_scores:
|
|
956
|
-
~azure.ai.textanalytics.v3_1.models.SentimentConfidenceScorePerLabel
|
|
957
|
-
:keyword sentences: Sentence level sentiment analysis. Required.
|
|
958
|
-
:paramtype sentences: list[~azure.ai.textanalytics.v3_1.models.SentenceSentiment]
|
|
959
|
-
:keyword warnings: Warnings encountered while processing document. Required.
|
|
960
|
-
:paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning]
|
|
961
|
-
"""
|
|
962
|
-
super().__init__(**kwargs)
|
|
963
|
-
self.id = id
|
|
964
|
-
self.sentiment = sentiment
|
|
965
|
-
self.statistics = statistics
|
|
966
|
-
self.confidence_scores = confidence_scores
|
|
967
|
-
self.sentences = sentences
|
|
968
|
-
self.warnings = warnings
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
class DocumentStatistics(_serialization.Model):
|
|
972
|
-
"""if showStats=true was specified in the request this field will contain information about the document payload.
|
|
973
|
-
|
|
974
|
-
All required parameters must be populated in order to send to Azure.
|
|
975
|
-
|
|
976
|
-
:ivar characters_count: Number of text elements recognized in the document. Required.
|
|
977
|
-
:vartype characters_count: int
|
|
978
|
-
:ivar transactions_count: Number of transactions for the document. Required.
|
|
979
|
-
:vartype transactions_count: int
|
|
980
|
-
"""
|
|
981
|
-
|
|
982
|
-
_validation = {
|
|
983
|
-
'characters_count': {'required': True},
|
|
984
|
-
'transactions_count': {'required': True},
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
_attribute_map = {
|
|
988
|
-
"characters_count": {"key": "charactersCount", "type": "int"},
|
|
989
|
-
"transactions_count": {"key": "transactionsCount", "type": "int"},
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
def __init__(
|
|
993
|
-
self,
|
|
994
|
-
*,
|
|
995
|
-
characters_count: int,
|
|
996
|
-
transactions_count: int,
|
|
997
|
-
**kwargs
|
|
998
|
-
):
|
|
999
|
-
"""
|
|
1000
|
-
:keyword characters_count: Number of text elements recognized in the document. Required.
|
|
1001
|
-
:paramtype characters_count: int
|
|
1002
|
-
:keyword transactions_count: Number of transactions for the document. Required.
|
|
1003
|
-
:paramtype transactions_count: int
|
|
1004
|
-
"""
|
|
1005
|
-
super().__init__(**kwargs)
|
|
1006
|
-
self.characters_count = characters_count
|
|
1007
|
-
self.transactions_count = transactions_count
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
class EntitiesResult(_serialization.Model):
|
|
1011
|
-
"""EntitiesResult.
|
|
1012
|
-
|
|
1013
|
-
All required parameters must be populated in order to send to Azure.
|
|
1014
|
-
|
|
1015
|
-
:ivar documents: Response by document. Required.
|
|
1016
|
-
:vartype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentEntities]
|
|
1017
|
-
:ivar errors: Errors by document id. Required.
|
|
1018
|
-
:vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError]
|
|
1019
|
-
:ivar statistics: if showStats=true was specified in the request this field will contain
|
|
1020
|
-
information about the request payload.
|
|
1021
|
-
:vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics
|
|
1022
|
-
:ivar model_version: This field indicates which model is used for scoring. Required.
|
|
1023
|
-
:vartype model_version: str
|
|
1024
|
-
"""
|
|
1025
|
-
|
|
1026
|
-
_validation = {
|
|
1027
|
-
'documents': {'required': True},
|
|
1028
|
-
'errors': {'required': True},
|
|
1029
|
-
'model_version': {'required': True},
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
_attribute_map = {
|
|
1033
|
-
"documents": {"key": "documents", "type": "[DocumentEntities]"},
|
|
1034
|
-
"errors": {"key": "errors", "type": "[DocumentError]"},
|
|
1035
|
-
"statistics": {"key": "statistics", "type": "RequestStatistics"},
|
|
1036
|
-
"model_version": {"key": "modelVersion", "type": "str"},
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
def __init__(
|
|
1040
|
-
self,
|
|
1041
|
-
*,
|
|
1042
|
-
documents: List["_models.DocumentEntities"],
|
|
1043
|
-
errors: List["_models.DocumentError"],
|
|
1044
|
-
model_version: str,
|
|
1045
|
-
statistics: Optional["_models.RequestStatistics"] = None,
|
|
1046
|
-
**kwargs
|
|
1047
|
-
):
|
|
1048
|
-
"""
|
|
1049
|
-
:keyword documents: Response by document. Required.
|
|
1050
|
-
:paramtype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentEntities]
|
|
1051
|
-
:keyword errors: Errors by document id. Required.
|
|
1052
|
-
:paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError]
|
|
1053
|
-
:keyword statistics: if showStats=true was specified in the request this field will contain
|
|
1054
|
-
information about the request payload.
|
|
1055
|
-
:paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics
|
|
1056
|
-
:keyword model_version: This field indicates which model is used for scoring. Required.
|
|
1057
|
-
:paramtype model_version: str
|
|
1058
|
-
"""
|
|
1059
|
-
super().__init__(**kwargs)
|
|
1060
|
-
self.documents = documents
|
|
1061
|
-
self.errors = errors
|
|
1062
|
-
self.statistics = statistics
|
|
1063
|
-
self.model_version = model_version
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
class EntitiesTask(_serialization.Model):
|
|
1067
|
-
"""EntitiesTask.
|
|
1068
|
-
|
|
1069
|
-
:ivar parameters:
|
|
1070
|
-
:vartype parameters: ~azure.ai.textanalytics.v3_1.models.EntitiesTaskParameters
|
|
1071
|
-
:ivar task_name:
|
|
1072
|
-
:vartype task_name: str
|
|
1073
|
-
"""
|
|
1074
|
-
|
|
1075
|
-
_attribute_map = {
|
|
1076
|
-
"parameters": {"key": "parameters", "type": "EntitiesTaskParameters"},
|
|
1077
|
-
"task_name": {"key": "taskName", "type": "str"},
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
def __init__(
|
|
1081
|
-
self,
|
|
1082
|
-
*,
|
|
1083
|
-
parameters: Optional["_models.EntitiesTaskParameters"] = None,
|
|
1084
|
-
task_name: Optional[str] = None,
|
|
1085
|
-
**kwargs
|
|
1086
|
-
):
|
|
1087
|
-
"""
|
|
1088
|
-
:keyword parameters:
|
|
1089
|
-
:paramtype parameters: ~azure.ai.textanalytics.v3_1.models.EntitiesTaskParameters
|
|
1090
|
-
:keyword task_name:
|
|
1091
|
-
:paramtype task_name: str
|
|
1092
|
-
"""
|
|
1093
|
-
super().__init__(**kwargs)
|
|
1094
|
-
self.parameters = parameters
|
|
1095
|
-
self.task_name = task_name
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
class EntitiesTaskParameters(_serialization.Model):
|
|
1099
|
-
"""EntitiesTaskParameters.
|
|
1100
|
-
|
|
1101
|
-
:ivar model_version:
|
|
1102
|
-
:vartype model_version: str
|
|
1103
|
-
:ivar logging_opt_out:
|
|
1104
|
-
:vartype logging_opt_out: bool
|
|
1105
|
-
:ivar string_index_type: Known values are: "TextElement_v8", "UnicodeCodePoint", and
|
|
1106
|
-
"Utf16CodeUnit".
|
|
1107
|
-
:vartype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType
|
|
1108
|
-
"""
|
|
1109
|
-
|
|
1110
|
-
_attribute_map = {
|
|
1111
|
-
"model_version": {"key": "model-version", "type": "str"},
|
|
1112
|
-
"logging_opt_out": {"key": "loggingOptOut", "type": "bool"},
|
|
1113
|
-
"string_index_type": {"key": "stringIndexType", "type": "str"},
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
def __init__(
|
|
1117
|
-
self,
|
|
1118
|
-
*,
|
|
1119
|
-
model_version: str = "latest",
|
|
1120
|
-
logging_opt_out: bool = False,
|
|
1121
|
-
string_index_type: Optional[Union[str, "_models.StringIndexType"]] = None,
|
|
1122
|
-
**kwargs
|
|
1123
|
-
):
|
|
1124
|
-
"""
|
|
1125
|
-
:keyword model_version:
|
|
1126
|
-
:paramtype model_version: str
|
|
1127
|
-
:keyword logging_opt_out:
|
|
1128
|
-
:paramtype logging_opt_out: bool
|
|
1129
|
-
:keyword string_index_type: Known values are: "TextElement_v8", "UnicodeCodePoint", and
|
|
1130
|
-
"Utf16CodeUnit".
|
|
1131
|
-
:paramtype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType
|
|
1132
|
-
"""
|
|
1133
|
-
super().__init__(**kwargs)
|
|
1134
|
-
self.model_version = model_version
|
|
1135
|
-
self.logging_opt_out = logging_opt_out
|
|
1136
|
-
self.string_index_type = string_index_type
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
class EntitiesTaskResult(_serialization.Model):
|
|
1140
|
-
"""EntitiesTaskResult.
|
|
1141
|
-
|
|
1142
|
-
:ivar results:
|
|
1143
|
-
:vartype results: ~azure.ai.textanalytics.v3_1.models.EntitiesResult
|
|
1144
|
-
"""
|
|
1145
|
-
|
|
1146
|
-
_attribute_map = {
|
|
1147
|
-
"results": {"key": "results", "type": "EntitiesResult"},
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
def __init__(
|
|
1151
|
-
self,
|
|
1152
|
-
*,
|
|
1153
|
-
results: Optional["_models.EntitiesResult"] = None,
|
|
1154
|
-
**kwargs
|
|
1155
|
-
):
|
|
1156
|
-
"""
|
|
1157
|
-
:keyword results:
|
|
1158
|
-
:paramtype results: ~azure.ai.textanalytics.v3_1.models.EntitiesResult
|
|
1159
|
-
"""
|
|
1160
|
-
super().__init__(**kwargs)
|
|
1161
|
-
self.results = results
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
class Entity(_serialization.Model):
|
|
1165
|
-
"""Entity.
|
|
1166
|
-
|
|
1167
|
-
All required parameters must be populated in order to send to Azure.
|
|
1168
|
-
|
|
1169
|
-
:ivar text: Entity text as appears in the request. Required.
|
|
1170
|
-
:vartype text: str
|
|
1171
|
-
:ivar category: Entity type. Required.
|
|
1172
|
-
:vartype category: str
|
|
1173
|
-
:ivar subcategory: (Optional) Entity sub type.
|
|
1174
|
-
:vartype subcategory: str
|
|
1175
|
-
:ivar offset: Start position for the entity text. Use of different 'stringIndexType' values can
|
|
1176
|
-
affect the offset returned. Required.
|
|
1177
|
-
:vartype offset: int
|
|
1178
|
-
:ivar length: Length for the entity text. Use of different 'stringIndexType' values can affect
|
|
1179
|
-
the length returned. Required.
|
|
1180
|
-
:vartype length: int
|
|
1181
|
-
:ivar confidence_score: Confidence score between 0 and 1 of the extracted entity. Required.
|
|
1182
|
-
:vartype confidence_score: float
|
|
1183
|
-
"""
|
|
1184
|
-
|
|
1185
|
-
_validation = {
|
|
1186
|
-
'text': {'required': True},
|
|
1187
|
-
'category': {'required': True},
|
|
1188
|
-
'offset': {'required': True},
|
|
1189
|
-
'length': {'required': True},
|
|
1190
|
-
'confidence_score': {'required': True},
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
_attribute_map = {
|
|
1194
|
-
"text": {"key": "text", "type": "str"},
|
|
1195
|
-
"category": {"key": "category", "type": "str"},
|
|
1196
|
-
"subcategory": {"key": "subcategory", "type": "str"},
|
|
1197
|
-
"offset": {"key": "offset", "type": "int"},
|
|
1198
|
-
"length": {"key": "length", "type": "int"},
|
|
1199
|
-
"confidence_score": {"key": "confidenceScore", "type": "float"},
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
|
-
def __init__(
|
|
1203
|
-
self,
|
|
1204
|
-
*,
|
|
1205
|
-
text: str,
|
|
1206
|
-
category: str,
|
|
1207
|
-
offset: int,
|
|
1208
|
-
length: int,
|
|
1209
|
-
confidence_score: float,
|
|
1210
|
-
subcategory: Optional[str] = None,
|
|
1211
|
-
**kwargs
|
|
1212
|
-
):
|
|
1213
|
-
"""
|
|
1214
|
-
:keyword text: Entity text as appears in the request. Required.
|
|
1215
|
-
:paramtype text: str
|
|
1216
|
-
:keyword category: Entity type. Required.
|
|
1217
|
-
:paramtype category: str
|
|
1218
|
-
:keyword subcategory: (Optional) Entity sub type.
|
|
1219
|
-
:paramtype subcategory: str
|
|
1220
|
-
:keyword offset: Start position for the entity text. Use of different 'stringIndexType' values
|
|
1221
|
-
can affect the offset returned. Required.
|
|
1222
|
-
:paramtype offset: int
|
|
1223
|
-
:keyword length: Length for the entity text. Use of different 'stringIndexType' values can
|
|
1224
|
-
affect the length returned. Required.
|
|
1225
|
-
:paramtype length: int
|
|
1226
|
-
:keyword confidence_score: Confidence score between 0 and 1 of the extracted entity. Required.
|
|
1227
|
-
:paramtype confidence_score: float
|
|
1228
|
-
"""
|
|
1229
|
-
super().__init__(**kwargs)
|
|
1230
|
-
self.text = text
|
|
1231
|
-
self.category = category
|
|
1232
|
-
self.subcategory = subcategory
|
|
1233
|
-
self.offset = offset
|
|
1234
|
-
self.length = length
|
|
1235
|
-
self.confidence_score = confidence_score
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
class EntityLinkingResult(_serialization.Model):
|
|
1239
|
-
"""EntityLinkingResult.
|
|
1240
|
-
|
|
1241
|
-
All required parameters must be populated in order to send to Azure.
|
|
1242
|
-
|
|
1243
|
-
:ivar documents: Response by document. Required.
|
|
1244
|
-
:vartype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentLinkedEntities]
|
|
1245
|
-
:ivar errors: Errors by document id. Required.
|
|
1246
|
-
:vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError]
|
|
1247
|
-
:ivar statistics: if showStats=true was specified in the request this field will contain
|
|
1248
|
-
information about the request payload.
|
|
1249
|
-
:vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics
|
|
1250
|
-
:ivar model_version: This field indicates which model is used for scoring. Required.
|
|
1251
|
-
:vartype model_version: str
|
|
1252
|
-
"""
|
|
1253
|
-
|
|
1254
|
-
_validation = {
|
|
1255
|
-
'documents': {'required': True},
|
|
1256
|
-
'errors': {'required': True},
|
|
1257
|
-
'model_version': {'required': True},
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
_attribute_map = {
|
|
1261
|
-
"documents": {"key": "documents", "type": "[DocumentLinkedEntities]"},
|
|
1262
|
-
"errors": {"key": "errors", "type": "[DocumentError]"},
|
|
1263
|
-
"statistics": {"key": "statistics", "type": "RequestStatistics"},
|
|
1264
|
-
"model_version": {"key": "modelVersion", "type": "str"},
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1267
|
-
def __init__(
|
|
1268
|
-
self,
|
|
1269
|
-
*,
|
|
1270
|
-
documents: List["_models.DocumentLinkedEntities"],
|
|
1271
|
-
errors: List["_models.DocumentError"],
|
|
1272
|
-
model_version: str,
|
|
1273
|
-
statistics: Optional["_models.RequestStatistics"] = None,
|
|
1274
|
-
**kwargs
|
|
1275
|
-
):
|
|
1276
|
-
"""
|
|
1277
|
-
:keyword documents: Response by document. Required.
|
|
1278
|
-
:paramtype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentLinkedEntities]
|
|
1279
|
-
:keyword errors: Errors by document id. Required.
|
|
1280
|
-
:paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError]
|
|
1281
|
-
:keyword statistics: if showStats=true was specified in the request this field will contain
|
|
1282
|
-
information about the request payload.
|
|
1283
|
-
:paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics
|
|
1284
|
-
:keyword model_version: This field indicates which model is used for scoring. Required.
|
|
1285
|
-
:paramtype model_version: str
|
|
1286
|
-
"""
|
|
1287
|
-
super().__init__(**kwargs)
|
|
1288
|
-
self.documents = documents
|
|
1289
|
-
self.errors = errors
|
|
1290
|
-
self.statistics = statistics
|
|
1291
|
-
self.model_version = model_version
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
class EntityLinkingTask(_serialization.Model):
|
|
1295
|
-
"""EntityLinkingTask.
|
|
1296
|
-
|
|
1297
|
-
:ivar parameters:
|
|
1298
|
-
:vartype parameters: ~azure.ai.textanalytics.v3_1.models.EntityLinkingTaskParameters
|
|
1299
|
-
:ivar task_name:
|
|
1300
|
-
:vartype task_name: str
|
|
1301
|
-
"""
|
|
1302
|
-
|
|
1303
|
-
_attribute_map = {
|
|
1304
|
-
"parameters": {"key": "parameters", "type": "EntityLinkingTaskParameters"},
|
|
1305
|
-
"task_name": {"key": "taskName", "type": "str"},
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
def __init__(
|
|
1309
|
-
self,
|
|
1310
|
-
*,
|
|
1311
|
-
parameters: Optional["_models.EntityLinkingTaskParameters"] = None,
|
|
1312
|
-
task_name: Optional[str] = None,
|
|
1313
|
-
**kwargs
|
|
1314
|
-
):
|
|
1315
|
-
"""
|
|
1316
|
-
:keyword parameters:
|
|
1317
|
-
:paramtype parameters: ~azure.ai.textanalytics.v3_1.models.EntityLinkingTaskParameters
|
|
1318
|
-
:keyword task_name:
|
|
1319
|
-
:paramtype task_name: str
|
|
1320
|
-
"""
|
|
1321
|
-
super().__init__(**kwargs)
|
|
1322
|
-
self.parameters = parameters
|
|
1323
|
-
self.task_name = task_name
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
class EntityLinkingTaskParameters(_serialization.Model):
|
|
1327
|
-
"""EntityLinkingTaskParameters.
|
|
1328
|
-
|
|
1329
|
-
:ivar model_version:
|
|
1330
|
-
:vartype model_version: str
|
|
1331
|
-
:ivar logging_opt_out:
|
|
1332
|
-
:vartype logging_opt_out: bool
|
|
1333
|
-
:ivar string_index_type: Known values are: "TextElement_v8", "UnicodeCodePoint", and
|
|
1334
|
-
"Utf16CodeUnit".
|
|
1335
|
-
:vartype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType
|
|
1336
|
-
"""
|
|
1337
|
-
|
|
1338
|
-
_attribute_map = {
|
|
1339
|
-
"model_version": {"key": "model-version", "type": "str"},
|
|
1340
|
-
"logging_opt_out": {"key": "loggingOptOut", "type": "bool"},
|
|
1341
|
-
"string_index_type": {"key": "stringIndexType", "type": "str"},
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
def __init__(
|
|
1345
|
-
self,
|
|
1346
|
-
*,
|
|
1347
|
-
model_version: str = "latest",
|
|
1348
|
-
logging_opt_out: bool = False,
|
|
1349
|
-
string_index_type: Optional[Union[str, "_models.StringIndexType"]] = None,
|
|
1350
|
-
**kwargs
|
|
1351
|
-
):
|
|
1352
|
-
"""
|
|
1353
|
-
:keyword model_version:
|
|
1354
|
-
:paramtype model_version: str
|
|
1355
|
-
:keyword logging_opt_out:
|
|
1356
|
-
:paramtype logging_opt_out: bool
|
|
1357
|
-
:keyword string_index_type: Known values are: "TextElement_v8", "UnicodeCodePoint", and
|
|
1358
|
-
"Utf16CodeUnit".
|
|
1359
|
-
:paramtype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType
|
|
1360
|
-
"""
|
|
1361
|
-
super().__init__(**kwargs)
|
|
1362
|
-
self.model_version = model_version
|
|
1363
|
-
self.logging_opt_out = logging_opt_out
|
|
1364
|
-
self.string_index_type = string_index_type
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
class EntityLinkingTaskResult(_serialization.Model):
|
|
1368
|
-
"""EntityLinkingTaskResult.
|
|
1369
|
-
|
|
1370
|
-
:ivar results:
|
|
1371
|
-
:vartype results: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult
|
|
1372
|
-
"""
|
|
1373
|
-
|
|
1374
|
-
_attribute_map = {
|
|
1375
|
-
"results": {"key": "results", "type": "EntityLinkingResult"},
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
def __init__(
|
|
1379
|
-
self,
|
|
1380
|
-
*,
|
|
1381
|
-
results: Optional["_models.EntityLinkingResult"] = None,
|
|
1382
|
-
**kwargs
|
|
1383
|
-
):
|
|
1384
|
-
"""
|
|
1385
|
-
:keyword results:
|
|
1386
|
-
:paramtype results: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult
|
|
1387
|
-
"""
|
|
1388
|
-
super().__init__(**kwargs)
|
|
1389
|
-
self.results = results
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
class ErrorResponse(_serialization.Model):
|
|
1393
|
-
"""ErrorResponse.
|
|
1394
|
-
|
|
1395
|
-
All required parameters must be populated in order to send to Azure.
|
|
1396
|
-
|
|
1397
|
-
:ivar error: Document Error. Required.
|
|
1398
|
-
:vartype error: ~azure.ai.textanalytics.v3_1.models.TextAnalyticsError
|
|
1399
|
-
"""
|
|
1400
|
-
|
|
1401
|
-
_validation = {
|
|
1402
|
-
'error': {'required': True},
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
_attribute_map = {
|
|
1406
|
-
"error": {"key": "error", "type": "TextAnalyticsError"},
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
def __init__(
|
|
1410
|
-
self,
|
|
1411
|
-
*,
|
|
1412
|
-
error: "_models.TextAnalyticsError",
|
|
1413
|
-
**kwargs
|
|
1414
|
-
):
|
|
1415
|
-
"""
|
|
1416
|
-
:keyword error: Document Error. Required.
|
|
1417
|
-
:paramtype error: ~azure.ai.textanalytics.v3_1.models.TextAnalyticsError
|
|
1418
|
-
"""
|
|
1419
|
-
super().__init__(**kwargs)
|
|
1420
|
-
self.error = error
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
class HealthcareAssertion(_serialization.Model):
|
|
1424
|
-
"""HealthcareAssertion.
|
|
1425
|
-
|
|
1426
|
-
:ivar conditionality: Describes any conditionality on the entity. Known values are:
|
|
1427
|
-
"hypothetical" and "conditional".
|
|
1428
|
-
:vartype conditionality: str or ~azure.ai.textanalytics.v3_1.models.Conditionality
|
|
1429
|
-
:ivar certainty: Describes the entities certainty and polarity. Known values are: "positive",
|
|
1430
|
-
"positivePossible", "neutralPossible", "negativePossible", and "negative".
|
|
1431
|
-
:vartype certainty: str or ~azure.ai.textanalytics.v3_1.models.Certainty
|
|
1432
|
-
:ivar association: Describes if the entity is the subject of the text or if it describes
|
|
1433
|
-
someone else. Known values are: "subject" and "other".
|
|
1434
|
-
:vartype association: str or ~azure.ai.textanalytics.v3_1.models.Association
|
|
1435
|
-
"""
|
|
1436
|
-
|
|
1437
|
-
_attribute_map = {
|
|
1438
|
-
"conditionality": {"key": "conditionality", "type": "str"},
|
|
1439
|
-
"certainty": {"key": "certainty", "type": "str"},
|
|
1440
|
-
"association": {"key": "association", "type": "str"},
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
def __init__(
|
|
1444
|
-
self,
|
|
1445
|
-
*,
|
|
1446
|
-
conditionality: Optional[Union[str, "_models.Conditionality"]] = None,
|
|
1447
|
-
certainty: Optional[Union[str, "_models.Certainty"]] = None,
|
|
1448
|
-
association: Optional[Union[str, "_models.Association"]] = None,
|
|
1449
|
-
**kwargs
|
|
1450
|
-
):
|
|
1451
|
-
"""
|
|
1452
|
-
:keyword conditionality: Describes any conditionality on the entity. Known values are:
|
|
1453
|
-
"hypothetical" and "conditional".
|
|
1454
|
-
:paramtype conditionality: str or ~azure.ai.textanalytics.v3_1.models.Conditionality
|
|
1455
|
-
:keyword certainty: Describes the entities certainty and polarity. Known values are:
|
|
1456
|
-
"positive", "positivePossible", "neutralPossible", "negativePossible", and "negative".
|
|
1457
|
-
:paramtype certainty: str or ~azure.ai.textanalytics.v3_1.models.Certainty
|
|
1458
|
-
:keyword association: Describes if the entity is the subject of the text or if it describes
|
|
1459
|
-
someone else. Known values are: "subject" and "other".
|
|
1460
|
-
:paramtype association: str or ~azure.ai.textanalytics.v3_1.models.Association
|
|
1461
|
-
"""
|
|
1462
|
-
super().__init__(**kwargs)
|
|
1463
|
-
self.conditionality = conditionality
|
|
1464
|
-
self.certainty = certainty
|
|
1465
|
-
self.association = association
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
class HealthcareLinkingProperties(_serialization.Model):
|
|
1469
|
-
"""HealthcareLinkingProperties.
|
|
1470
|
-
|
|
1471
|
-
:ivar assertion:
|
|
1472
|
-
:vartype assertion: ~azure.ai.textanalytics.v3_1.models.HealthcareAssertion
|
|
1473
|
-
:ivar name: Preferred name for the entity. Example: 'histologically' would have a 'name' of
|
|
1474
|
-
'histologic'.
|
|
1475
|
-
:vartype name: str
|
|
1476
|
-
:ivar links: Entity references in known data sources.
|
|
1477
|
-
:vartype links: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntityLink]
|
|
1478
|
-
"""
|
|
1479
|
-
|
|
1480
|
-
_attribute_map = {
|
|
1481
|
-
"assertion": {"key": "assertion", "type": "HealthcareAssertion"},
|
|
1482
|
-
"name": {"key": "name", "type": "str"},
|
|
1483
|
-
"links": {"key": "links", "type": "[HealthcareEntityLink]"},
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
def __init__(
|
|
1487
|
-
self,
|
|
1488
|
-
*,
|
|
1489
|
-
assertion: Optional["_models.HealthcareAssertion"] = None,
|
|
1490
|
-
name: Optional[str] = None,
|
|
1491
|
-
links: Optional[List["_models.HealthcareEntityLink"]] = None,
|
|
1492
|
-
**kwargs
|
|
1493
|
-
):
|
|
1494
|
-
"""
|
|
1495
|
-
:keyword assertion:
|
|
1496
|
-
:paramtype assertion: ~azure.ai.textanalytics.v3_1.models.HealthcareAssertion
|
|
1497
|
-
:keyword name: Preferred name for the entity. Example: 'histologically' would have a 'name' of
|
|
1498
|
-
'histologic'.
|
|
1499
|
-
:paramtype name: str
|
|
1500
|
-
:keyword links: Entity references in known data sources.
|
|
1501
|
-
:paramtype links: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntityLink]
|
|
1502
|
-
"""
|
|
1503
|
-
super().__init__(**kwargs)
|
|
1504
|
-
self.assertion = assertion
|
|
1505
|
-
self.name = name
|
|
1506
|
-
self.links = links
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
class HealthcareEntityProperties(_serialization.Model):
|
|
1510
|
-
"""HealthcareEntityProperties.
|
|
1511
|
-
|
|
1512
|
-
All required parameters must be populated in order to send to Azure.
|
|
1513
|
-
|
|
1514
|
-
:ivar text: Entity text as appears in the request. Required.
|
|
1515
|
-
:vartype text: str
|
|
1516
|
-
:ivar category: Healthcare Entity Category. Required. Known values are: "BodyStructure", "Age",
|
|
1517
|
-
"Gender", "ExaminationName", "Date", "Direction", "Frequency", "MeasurementValue",
|
|
1518
|
-
"MeasurementUnit", "RelationalOperator", "Time", "GeneOrProtein", "Variant",
|
|
1519
|
-
"AdministrativeEvent", "CareEnvironment", "HealthcareProfession", "Diagnosis", "SymptomOrSign",
|
|
1520
|
-
"ConditionQualifier", "MedicationClass", "MedicationName", "Dosage", "MedicationForm",
|
|
1521
|
-
"MedicationRoute", "FamilyRelation", and "TreatmentName".
|
|
1522
|
-
:vartype category: str or ~azure.ai.textanalytics.v3_1.models.HealthcareEntityCategory
|
|
1523
|
-
:ivar subcategory: (Optional) Entity sub type.
|
|
1524
|
-
:vartype subcategory: str
|
|
1525
|
-
:ivar offset: Start position for the entity text. Use of different 'stringIndexType' values can
|
|
1526
|
-
affect the offset returned. Required.
|
|
1527
|
-
:vartype offset: int
|
|
1528
|
-
:ivar length: Length for the entity text. Use of different 'stringIndexType' values can affect
|
|
1529
|
-
the length returned. Required.
|
|
1530
|
-
:vartype length: int
|
|
1531
|
-
:ivar confidence_score: Confidence score between 0 and 1 of the extracted entity. Required.
|
|
1532
|
-
:vartype confidence_score: float
|
|
1533
|
-
"""
|
|
1534
|
-
|
|
1535
|
-
_validation = {
|
|
1536
|
-
'text': {'required': True},
|
|
1537
|
-
'category': {'required': True},
|
|
1538
|
-
'offset': {'required': True},
|
|
1539
|
-
'length': {'required': True},
|
|
1540
|
-
'confidence_score': {'required': True},
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
|
-
_attribute_map = {
|
|
1544
|
-
"text": {"key": "text", "type": "str"},
|
|
1545
|
-
"category": {"key": "category", "type": "str"},
|
|
1546
|
-
"subcategory": {"key": "subcategory", "type": "str"},
|
|
1547
|
-
"offset": {"key": "offset", "type": "int"},
|
|
1548
|
-
"length": {"key": "length", "type": "int"},
|
|
1549
|
-
"confidence_score": {"key": "confidenceScore", "type": "float"},
|
|
1550
|
-
}
|
|
1551
|
-
|
|
1552
|
-
def __init__(
|
|
1553
|
-
self,
|
|
1554
|
-
*,
|
|
1555
|
-
text: str,
|
|
1556
|
-
category: Union[str, "_models.HealthcareEntityCategory"],
|
|
1557
|
-
offset: int,
|
|
1558
|
-
length: int,
|
|
1559
|
-
confidence_score: float,
|
|
1560
|
-
subcategory: Optional[str] = None,
|
|
1561
|
-
**kwargs
|
|
1562
|
-
):
|
|
1563
|
-
"""
|
|
1564
|
-
:keyword text: Entity text as appears in the request. Required.
|
|
1565
|
-
:paramtype text: str
|
|
1566
|
-
:keyword category: Healthcare Entity Category. Required. Known values are: "BodyStructure",
|
|
1567
|
-
"Age", "Gender", "ExaminationName", "Date", "Direction", "Frequency", "MeasurementValue",
|
|
1568
|
-
"MeasurementUnit", "RelationalOperator", "Time", "GeneOrProtein", "Variant",
|
|
1569
|
-
"AdministrativeEvent", "CareEnvironment", "HealthcareProfession", "Diagnosis", "SymptomOrSign",
|
|
1570
|
-
"ConditionQualifier", "MedicationClass", "MedicationName", "Dosage", "MedicationForm",
|
|
1571
|
-
"MedicationRoute", "FamilyRelation", and "TreatmentName".
|
|
1572
|
-
:paramtype category: str or ~azure.ai.textanalytics.v3_1.models.HealthcareEntityCategory
|
|
1573
|
-
:keyword subcategory: (Optional) Entity sub type.
|
|
1574
|
-
:paramtype subcategory: str
|
|
1575
|
-
:keyword offset: Start position for the entity text. Use of different 'stringIndexType' values
|
|
1576
|
-
can affect the offset returned. Required.
|
|
1577
|
-
:paramtype offset: int
|
|
1578
|
-
:keyword length: Length for the entity text. Use of different 'stringIndexType' values can
|
|
1579
|
-
affect the length returned. Required.
|
|
1580
|
-
:paramtype length: int
|
|
1581
|
-
:keyword confidence_score: Confidence score between 0 and 1 of the extracted entity. Required.
|
|
1582
|
-
:paramtype confidence_score: float
|
|
1583
|
-
"""
|
|
1584
|
-
super().__init__(**kwargs)
|
|
1585
|
-
self.text = text
|
|
1586
|
-
self.category = category
|
|
1587
|
-
self.subcategory = subcategory
|
|
1588
|
-
self.offset = offset
|
|
1589
|
-
self.length = length
|
|
1590
|
-
self.confidence_score = confidence_score
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
class HealthcareEntity(HealthcareEntityProperties, HealthcareLinkingProperties):
|
|
1594
|
-
"""HealthcareEntity.
|
|
1595
|
-
|
|
1596
|
-
All required parameters must be populated in order to send to Azure.
|
|
1597
|
-
|
|
1598
|
-
:ivar assertion:
|
|
1599
|
-
:vartype assertion: ~azure.ai.textanalytics.v3_1.models.HealthcareAssertion
|
|
1600
|
-
:ivar name: Preferred name for the entity. Example: 'histologically' would have a 'name' of
|
|
1601
|
-
'histologic'.
|
|
1602
|
-
:vartype name: str
|
|
1603
|
-
:ivar links: Entity references in known data sources.
|
|
1604
|
-
:vartype links: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntityLink]
|
|
1605
|
-
:ivar text: Entity text as appears in the request. Required.
|
|
1606
|
-
:vartype text: str
|
|
1607
|
-
:ivar category: Healthcare Entity Category. Required. Known values are: "BodyStructure", "Age",
|
|
1608
|
-
"Gender", "ExaminationName", "Date", "Direction", "Frequency", "MeasurementValue",
|
|
1609
|
-
"MeasurementUnit", "RelationalOperator", "Time", "GeneOrProtein", "Variant",
|
|
1610
|
-
"AdministrativeEvent", "CareEnvironment", "HealthcareProfession", "Diagnosis", "SymptomOrSign",
|
|
1611
|
-
"ConditionQualifier", "MedicationClass", "MedicationName", "Dosage", "MedicationForm",
|
|
1612
|
-
"MedicationRoute", "FamilyRelation", and "TreatmentName".
|
|
1613
|
-
:vartype category: str or ~azure.ai.textanalytics.v3_1.models.HealthcareEntityCategory
|
|
1614
|
-
:ivar subcategory: (Optional) Entity sub type.
|
|
1615
|
-
:vartype subcategory: str
|
|
1616
|
-
:ivar offset: Start position for the entity text. Use of different 'stringIndexType' values can
|
|
1617
|
-
affect the offset returned. Required.
|
|
1618
|
-
:vartype offset: int
|
|
1619
|
-
:ivar length: Length for the entity text. Use of different 'stringIndexType' values can affect
|
|
1620
|
-
the length returned. Required.
|
|
1621
|
-
:vartype length: int
|
|
1622
|
-
:ivar confidence_score: Confidence score between 0 and 1 of the extracted entity. Required.
|
|
1623
|
-
:vartype confidence_score: float
|
|
1624
|
-
"""
|
|
1625
|
-
|
|
1626
|
-
_validation = {
|
|
1627
|
-
'text': {'required': True},
|
|
1628
|
-
'category': {'required': True},
|
|
1629
|
-
'offset': {'required': True},
|
|
1630
|
-
'length': {'required': True},
|
|
1631
|
-
'confidence_score': {'required': True},
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
_attribute_map = {
|
|
1635
|
-
"assertion": {"key": "assertion", "type": "HealthcareAssertion"},
|
|
1636
|
-
"name": {"key": "name", "type": "str"},
|
|
1637
|
-
"links": {"key": "links", "type": "[HealthcareEntityLink]"},
|
|
1638
|
-
"text": {"key": "text", "type": "str"},
|
|
1639
|
-
"category": {"key": "category", "type": "str"},
|
|
1640
|
-
"subcategory": {"key": "subcategory", "type": "str"},
|
|
1641
|
-
"offset": {"key": "offset", "type": "int"},
|
|
1642
|
-
"length": {"key": "length", "type": "int"},
|
|
1643
|
-
"confidence_score": {"key": "confidenceScore", "type": "float"},
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
|
-
def __init__(
|
|
1647
|
-
self,
|
|
1648
|
-
*,
|
|
1649
|
-
text: str,
|
|
1650
|
-
category: Union[str, "_models.HealthcareEntityCategory"],
|
|
1651
|
-
offset: int,
|
|
1652
|
-
length: int,
|
|
1653
|
-
confidence_score: float,
|
|
1654
|
-
assertion: Optional["_models.HealthcareAssertion"] = None,
|
|
1655
|
-
name: Optional[str] = None,
|
|
1656
|
-
links: Optional[List["_models.HealthcareEntityLink"]] = None,
|
|
1657
|
-
subcategory: Optional[str] = None,
|
|
1658
|
-
**kwargs
|
|
1659
|
-
):
|
|
1660
|
-
"""
|
|
1661
|
-
:keyword assertion:
|
|
1662
|
-
:paramtype assertion: ~azure.ai.textanalytics.v3_1.models.HealthcareAssertion
|
|
1663
|
-
:keyword name: Preferred name for the entity. Example: 'histologically' would have a 'name' of
|
|
1664
|
-
'histologic'.
|
|
1665
|
-
:paramtype name: str
|
|
1666
|
-
:keyword links: Entity references in known data sources.
|
|
1667
|
-
:paramtype links: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntityLink]
|
|
1668
|
-
:keyword text: Entity text as appears in the request. Required.
|
|
1669
|
-
:paramtype text: str
|
|
1670
|
-
:keyword category: Healthcare Entity Category. Required. Known values are: "BodyStructure",
|
|
1671
|
-
"Age", "Gender", "ExaminationName", "Date", "Direction", "Frequency", "MeasurementValue",
|
|
1672
|
-
"MeasurementUnit", "RelationalOperator", "Time", "GeneOrProtein", "Variant",
|
|
1673
|
-
"AdministrativeEvent", "CareEnvironment", "HealthcareProfession", "Diagnosis", "SymptomOrSign",
|
|
1674
|
-
"ConditionQualifier", "MedicationClass", "MedicationName", "Dosage", "MedicationForm",
|
|
1675
|
-
"MedicationRoute", "FamilyRelation", and "TreatmentName".
|
|
1676
|
-
:paramtype category: str or ~azure.ai.textanalytics.v3_1.models.HealthcareEntityCategory
|
|
1677
|
-
:keyword subcategory: (Optional) Entity sub type.
|
|
1678
|
-
:paramtype subcategory: str
|
|
1679
|
-
:keyword offset: Start position for the entity text. Use of different 'stringIndexType' values
|
|
1680
|
-
can affect the offset returned. Required.
|
|
1681
|
-
:paramtype offset: int
|
|
1682
|
-
:keyword length: Length for the entity text. Use of different 'stringIndexType' values can
|
|
1683
|
-
affect the length returned. Required.
|
|
1684
|
-
:paramtype length: int
|
|
1685
|
-
:keyword confidence_score: Confidence score between 0 and 1 of the extracted entity. Required.
|
|
1686
|
-
:paramtype confidence_score: float
|
|
1687
|
-
"""
|
|
1688
|
-
super().__init__(text=text, category=category, subcategory=subcategory, offset=offset, length=length, confidence_score=confidence_score, assertion=assertion, name=name, links=links, **kwargs)
|
|
1689
|
-
self.assertion = assertion
|
|
1690
|
-
self.name = name
|
|
1691
|
-
self.links = links
|
|
1692
|
-
self.text = text
|
|
1693
|
-
self.category = category
|
|
1694
|
-
self.subcategory = subcategory
|
|
1695
|
-
self.offset = offset
|
|
1696
|
-
self.length = length
|
|
1697
|
-
self.confidence_score = confidence_score
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
class HealthcareEntityLink(_serialization.Model):
|
|
1701
|
-
"""HealthcareEntityLink.
|
|
1702
|
-
|
|
1703
|
-
All required parameters must be populated in order to send to Azure.
|
|
1704
|
-
|
|
1705
|
-
:ivar data_source: Entity Catalog. Examples include: UMLS, CHV, MSH, etc. Required.
|
|
1706
|
-
:vartype data_source: str
|
|
1707
|
-
:ivar id: Entity id in the given source catalog. Required.
|
|
1708
|
-
:vartype id: str
|
|
1709
|
-
"""
|
|
1710
|
-
|
|
1711
|
-
_validation = {
|
|
1712
|
-
'data_source': {'required': True},
|
|
1713
|
-
'id': {'required': True},
|
|
1714
|
-
}
|
|
1715
|
-
|
|
1716
|
-
_attribute_map = {
|
|
1717
|
-
"data_source": {"key": "dataSource", "type": "str"},
|
|
1718
|
-
"id": {"key": "id", "type": "str"},
|
|
1719
|
-
}
|
|
1720
|
-
|
|
1721
|
-
def __init__(
|
|
1722
|
-
self,
|
|
1723
|
-
*,
|
|
1724
|
-
data_source: str,
|
|
1725
|
-
id: str, # pylint: disable=redefined-builtin
|
|
1726
|
-
**kwargs
|
|
1727
|
-
):
|
|
1728
|
-
"""
|
|
1729
|
-
:keyword data_source: Entity Catalog. Examples include: UMLS, CHV, MSH, etc. Required.
|
|
1730
|
-
:paramtype data_source: str
|
|
1731
|
-
:keyword id: Entity id in the given source catalog. Required.
|
|
1732
|
-
:paramtype id: str
|
|
1733
|
-
"""
|
|
1734
|
-
super().__init__(**kwargs)
|
|
1735
|
-
self.data_source = data_source
|
|
1736
|
-
self.id = id
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
class HealthcareTaskResult(_serialization.Model):
|
|
1740
|
-
"""HealthcareTaskResult.
|
|
1741
|
-
|
|
1742
|
-
:ivar results:
|
|
1743
|
-
:vartype results: ~azure.ai.textanalytics.v3_1.models.HealthcareResult
|
|
1744
|
-
:ivar errors:
|
|
1745
|
-
:vartype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError]
|
|
1746
|
-
"""
|
|
1747
|
-
|
|
1748
|
-
_attribute_map = {
|
|
1749
|
-
"results": {"key": "results", "type": "HealthcareResult"},
|
|
1750
|
-
"errors": {"key": "errors", "type": "[TextAnalyticsError]"},
|
|
1751
|
-
}
|
|
1752
|
-
|
|
1753
|
-
def __init__(
|
|
1754
|
-
self,
|
|
1755
|
-
*,
|
|
1756
|
-
results: Optional["_models.HealthcareResult"] = None,
|
|
1757
|
-
errors: Optional[List["_models.TextAnalyticsError"]] = None,
|
|
1758
|
-
**kwargs
|
|
1759
|
-
):
|
|
1760
|
-
"""
|
|
1761
|
-
:keyword results:
|
|
1762
|
-
:paramtype results: ~azure.ai.textanalytics.v3_1.models.HealthcareResult
|
|
1763
|
-
:keyword errors:
|
|
1764
|
-
:paramtype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError]
|
|
1765
|
-
"""
|
|
1766
|
-
super().__init__(**kwargs)
|
|
1767
|
-
self.results = results
|
|
1768
|
-
self.errors = errors
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
class HealthcareJobState(JobMetadata, HealthcareTaskResult, Pagination):
|
|
1772
|
-
"""HealthcareJobState.
|
|
1773
|
-
|
|
1774
|
-
All required parameters must be populated in order to send to Azure.
|
|
1775
|
-
|
|
1776
|
-
:ivar next_link:
|
|
1777
|
-
:vartype next_link: str
|
|
1778
|
-
:ivar results:
|
|
1779
|
-
:vartype results: ~azure.ai.textanalytics.v3_1.models.HealthcareResult
|
|
1780
|
-
:ivar errors:
|
|
1781
|
-
:vartype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError]
|
|
1782
|
-
:ivar created_date_time: Required.
|
|
1783
|
-
:vartype created_date_time: ~datetime.datetime
|
|
1784
|
-
:ivar expiration_date_time:
|
|
1785
|
-
:vartype expiration_date_time: ~datetime.datetime
|
|
1786
|
-
:ivar job_id: Required.
|
|
1787
|
-
:vartype job_id: str
|
|
1788
|
-
:ivar last_update_date_time: Required.
|
|
1789
|
-
:vartype last_update_date_time: ~datetime.datetime
|
|
1790
|
-
:ivar status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
1791
|
-
"rejected", "cancelled", and "cancelling".
|
|
1792
|
-
:vartype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
1793
|
-
"""
|
|
1794
|
-
|
|
1795
|
-
_validation = {
|
|
1796
|
-
'created_date_time': {'required': True},
|
|
1797
|
-
'job_id': {'required': True},
|
|
1798
|
-
'last_update_date_time': {'required': True},
|
|
1799
|
-
'status': {'required': True},
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
_attribute_map = {
|
|
1803
|
-
"next_link": {"key": "@nextLink", "type": "str"},
|
|
1804
|
-
"results": {"key": "results", "type": "HealthcareResult"},
|
|
1805
|
-
"errors": {"key": "errors", "type": "[TextAnalyticsError]"},
|
|
1806
|
-
"created_date_time": {"key": "createdDateTime", "type": "iso-8601"},
|
|
1807
|
-
"expiration_date_time": {"key": "expirationDateTime", "type": "iso-8601"},
|
|
1808
|
-
"job_id": {"key": "jobId", "type": "str"},
|
|
1809
|
-
"last_update_date_time": {"key": "lastUpdateDateTime", "type": "iso-8601"},
|
|
1810
|
-
"status": {"key": "status", "type": "str"},
|
|
1811
|
-
}
|
|
1812
|
-
|
|
1813
|
-
def __init__(
|
|
1814
|
-
self,
|
|
1815
|
-
*,
|
|
1816
|
-
created_date_time: datetime.datetime,
|
|
1817
|
-
job_id: str,
|
|
1818
|
-
last_update_date_time: datetime.datetime,
|
|
1819
|
-
status: Union[str, "_models.State"],
|
|
1820
|
-
next_link: Optional[str] = None,
|
|
1821
|
-
results: Optional["_models.HealthcareResult"] = None,
|
|
1822
|
-
errors: Optional[List["_models.TextAnalyticsError"]] = None,
|
|
1823
|
-
expiration_date_time: Optional[datetime.datetime] = None,
|
|
1824
|
-
**kwargs
|
|
1825
|
-
):
|
|
1826
|
-
"""
|
|
1827
|
-
:keyword next_link:
|
|
1828
|
-
:paramtype next_link: str
|
|
1829
|
-
:keyword results:
|
|
1830
|
-
:paramtype results: ~azure.ai.textanalytics.v3_1.models.HealthcareResult
|
|
1831
|
-
:keyword errors:
|
|
1832
|
-
:paramtype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError]
|
|
1833
|
-
:keyword created_date_time: Required.
|
|
1834
|
-
:paramtype created_date_time: ~datetime.datetime
|
|
1835
|
-
:keyword expiration_date_time:
|
|
1836
|
-
:paramtype expiration_date_time: ~datetime.datetime
|
|
1837
|
-
:keyword job_id: Required.
|
|
1838
|
-
:paramtype job_id: str
|
|
1839
|
-
:keyword last_update_date_time: Required.
|
|
1840
|
-
:paramtype last_update_date_time: ~datetime.datetime
|
|
1841
|
-
:keyword status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
1842
|
-
"rejected", "cancelled", and "cancelling".
|
|
1843
|
-
:paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
1844
|
-
"""
|
|
1845
|
-
super().__init__(created_date_time=created_date_time, expiration_date_time=expiration_date_time, job_id=job_id, last_update_date_time=last_update_date_time, status=status, results=results, errors=errors, next_link=next_link, **kwargs)
|
|
1846
|
-
self.next_link = next_link
|
|
1847
|
-
self.results = results
|
|
1848
|
-
self.errors = errors
|
|
1849
|
-
self.created_date_time = created_date_time
|
|
1850
|
-
self.expiration_date_time = expiration_date_time
|
|
1851
|
-
self.job_id = job_id
|
|
1852
|
-
self.last_update_date_time = last_update_date_time
|
|
1853
|
-
self.status = status
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
class HealthcareRelation(_serialization.Model):
|
|
1857
|
-
"""Every relation is an entity graph of a certain relationType, where all entities are connected and have specific roles within the relation context.
|
|
1858
|
-
|
|
1859
|
-
All required parameters must be populated in order to send to Azure.
|
|
1860
|
-
|
|
1861
|
-
:ivar relation_type: Type of relation. Examples include: ``DosageOfMedication`` or
|
|
1862
|
-
'FrequencyOfMedication', etc. Required. Known values are: "Abbreviation",
|
|
1863
|
-
"DirectionOfBodyStructure", "DirectionOfCondition", "DirectionOfExamination",
|
|
1864
|
-
"DirectionOfTreatment", "DosageOfMedication", "FormOfMedication", "FrequencyOfMedication",
|
|
1865
|
-
"FrequencyOfTreatment", "QualifierOfCondition", "RelationOfExamination", "RouteOfMedication",
|
|
1866
|
-
"TimeOfCondition", "TimeOfEvent", "TimeOfExamination", "TimeOfMedication", "TimeOfTreatment",
|
|
1867
|
-
"UnitOfCondition", "UnitOfExamination", "ValueOfCondition", and "ValueOfExamination".
|
|
1868
|
-
:vartype relation_type: str or ~azure.ai.textanalytics.v3_1.models.RelationType
|
|
1869
|
-
:ivar entities: The entities in the relation. Required.
|
|
1870
|
-
:vartype entities: list[~azure.ai.textanalytics.v3_1.models.HealthcareRelationEntity]
|
|
1871
|
-
"""
|
|
1872
|
-
|
|
1873
|
-
_validation = {
|
|
1874
|
-
'relation_type': {'required': True},
|
|
1875
|
-
'entities': {'required': True},
|
|
1876
|
-
}
|
|
1877
|
-
|
|
1878
|
-
_attribute_map = {
|
|
1879
|
-
"relation_type": {"key": "relationType", "type": "str"},
|
|
1880
|
-
"entities": {"key": "entities", "type": "[HealthcareRelationEntity]"},
|
|
1881
|
-
}
|
|
1882
|
-
|
|
1883
|
-
def __init__(
|
|
1884
|
-
self,
|
|
1885
|
-
*,
|
|
1886
|
-
relation_type: Union[str, "_models.RelationType"],
|
|
1887
|
-
entities: List["_models.HealthcareRelationEntity"],
|
|
1888
|
-
**kwargs
|
|
1889
|
-
):
|
|
1890
|
-
"""
|
|
1891
|
-
:keyword relation_type: Type of relation. Examples include: ``DosageOfMedication`` or
|
|
1892
|
-
'FrequencyOfMedication', etc. Required. Known values are: "Abbreviation",
|
|
1893
|
-
"DirectionOfBodyStructure", "DirectionOfCondition", "DirectionOfExamination",
|
|
1894
|
-
"DirectionOfTreatment", "DosageOfMedication", "FormOfMedication", "FrequencyOfMedication",
|
|
1895
|
-
"FrequencyOfTreatment", "QualifierOfCondition", "RelationOfExamination", "RouteOfMedication",
|
|
1896
|
-
"TimeOfCondition", "TimeOfEvent", "TimeOfExamination", "TimeOfMedication", "TimeOfTreatment",
|
|
1897
|
-
"UnitOfCondition", "UnitOfExamination", "ValueOfCondition", and "ValueOfExamination".
|
|
1898
|
-
:paramtype relation_type: str or ~azure.ai.textanalytics.v3_1.models.RelationType
|
|
1899
|
-
:keyword entities: The entities in the relation. Required.
|
|
1900
|
-
:paramtype entities: list[~azure.ai.textanalytics.v3_1.models.HealthcareRelationEntity]
|
|
1901
|
-
"""
|
|
1902
|
-
super().__init__(**kwargs)
|
|
1903
|
-
self.relation_type = relation_type
|
|
1904
|
-
self.entities = entities
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
class HealthcareRelationEntity(_serialization.Model):
|
|
1908
|
-
"""HealthcareRelationEntity.
|
|
1909
|
-
|
|
1910
|
-
All required parameters must be populated in order to send to Azure.
|
|
1911
|
-
|
|
1912
|
-
:ivar ref: Reference link object, using a JSON pointer RFC 6901 (URI Fragment Identifier
|
|
1913
|
-
Representation), pointing to the entity . Required.
|
|
1914
|
-
:vartype ref: str
|
|
1915
|
-
:ivar role: Role of entity in the relationship. For example: 'CD20-positive diffuse large
|
|
1916
|
-
B-cell lymphoma' has the following entities with their roles in parenthesis: CD20
|
|
1917
|
-
(GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis). Required.
|
|
1918
|
-
:vartype role: str
|
|
1919
|
-
"""
|
|
1920
|
-
|
|
1921
|
-
_validation = {
|
|
1922
|
-
'ref': {'required': True},
|
|
1923
|
-
'role': {'required': True},
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
_attribute_map = {
|
|
1927
|
-
"ref": {"key": "ref", "type": "str"},
|
|
1928
|
-
"role": {"key": "role", "type": "str"},
|
|
1929
|
-
}
|
|
1930
|
-
|
|
1931
|
-
def __init__(
|
|
1932
|
-
self,
|
|
1933
|
-
*,
|
|
1934
|
-
ref: str,
|
|
1935
|
-
role: str,
|
|
1936
|
-
**kwargs
|
|
1937
|
-
):
|
|
1938
|
-
"""
|
|
1939
|
-
:keyword ref: Reference link object, using a JSON pointer RFC 6901 (URI Fragment Identifier
|
|
1940
|
-
Representation), pointing to the entity . Required.
|
|
1941
|
-
:paramtype ref: str
|
|
1942
|
-
:keyword role: Role of entity in the relationship. For example: 'CD20-positive diffuse large
|
|
1943
|
-
B-cell lymphoma' has the following entities with their roles in parenthesis: CD20
|
|
1944
|
-
(GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis). Required.
|
|
1945
|
-
:paramtype role: str
|
|
1946
|
-
"""
|
|
1947
|
-
super().__init__(**kwargs)
|
|
1948
|
-
self.ref = ref
|
|
1949
|
-
self.role = role
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
class HealthcareResult(_serialization.Model):
|
|
1953
|
-
"""HealthcareResult.
|
|
1954
|
-
|
|
1955
|
-
All required parameters must be populated in order to send to Azure.
|
|
1956
|
-
|
|
1957
|
-
:ivar documents: Response by document. Required.
|
|
1958
|
-
:vartype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentHealthcareEntities]
|
|
1959
|
-
:ivar errors: Errors by document id. Required.
|
|
1960
|
-
:vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError]
|
|
1961
|
-
:ivar statistics: if showStats=true was specified in the request this field will contain
|
|
1962
|
-
information about the request payload.
|
|
1963
|
-
:vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics
|
|
1964
|
-
:ivar model_version: This field indicates which model is used for scoring. Required.
|
|
1965
|
-
:vartype model_version: str
|
|
1966
|
-
"""
|
|
1967
|
-
|
|
1968
|
-
_validation = {
|
|
1969
|
-
'documents': {'required': True},
|
|
1970
|
-
'errors': {'required': True},
|
|
1971
|
-
'model_version': {'required': True},
|
|
1972
|
-
}
|
|
1973
|
-
|
|
1974
|
-
_attribute_map = {
|
|
1975
|
-
"documents": {"key": "documents", "type": "[DocumentHealthcareEntities]"},
|
|
1976
|
-
"errors": {"key": "errors", "type": "[DocumentError]"},
|
|
1977
|
-
"statistics": {"key": "statistics", "type": "RequestStatistics"},
|
|
1978
|
-
"model_version": {"key": "modelVersion", "type": "str"},
|
|
1979
|
-
}
|
|
1980
|
-
|
|
1981
|
-
def __init__(
|
|
1982
|
-
self,
|
|
1983
|
-
*,
|
|
1984
|
-
documents: List["_models.DocumentHealthcareEntities"],
|
|
1985
|
-
errors: List["_models.DocumentError"],
|
|
1986
|
-
model_version: str,
|
|
1987
|
-
statistics: Optional["_models.RequestStatistics"] = None,
|
|
1988
|
-
**kwargs
|
|
1989
|
-
):
|
|
1990
|
-
"""
|
|
1991
|
-
:keyword documents: Response by document. Required.
|
|
1992
|
-
:paramtype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentHealthcareEntities]
|
|
1993
|
-
:keyword errors: Errors by document id. Required.
|
|
1994
|
-
:paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError]
|
|
1995
|
-
:keyword statistics: if showStats=true was specified in the request this field will contain
|
|
1996
|
-
information about the request payload.
|
|
1997
|
-
:paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics
|
|
1998
|
-
:keyword model_version: This field indicates which model is used for scoring. Required.
|
|
1999
|
-
:paramtype model_version: str
|
|
2000
|
-
"""
|
|
2001
|
-
super().__init__(**kwargs)
|
|
2002
|
-
self.documents = documents
|
|
2003
|
-
self.errors = errors
|
|
2004
|
-
self.statistics = statistics
|
|
2005
|
-
self.model_version = model_version
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
class InnerError(_serialization.Model):
|
|
2009
|
-
"""InnerError.
|
|
2010
|
-
|
|
2011
|
-
All required parameters must be populated in order to send to Azure.
|
|
2012
|
-
|
|
2013
|
-
:ivar code: Error code. Required. Known values are: "InvalidParameterValue",
|
|
2014
|
-
"InvalidRequestBodyFormat", "EmptyRequest", "MissingInputRecords", "InvalidDocument",
|
|
2015
|
-
"ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", and
|
|
2016
|
-
"InvalidCountryHint".
|
|
2017
|
-
:vartype code: str or ~azure.ai.textanalytics.v3_1.models.InnerErrorCodeValue
|
|
2018
|
-
:ivar message: Error message. Required.
|
|
2019
|
-
:vartype message: str
|
|
2020
|
-
:ivar details: Error details.
|
|
2021
|
-
:vartype details: dict[str, str]
|
|
2022
|
-
:ivar target: Error target.
|
|
2023
|
-
:vartype target: str
|
|
2024
|
-
:ivar innererror: Inner error contains more specific information.
|
|
2025
|
-
:vartype innererror: ~azure.ai.textanalytics.v3_1.models.InnerError
|
|
2026
|
-
"""
|
|
2027
|
-
|
|
2028
|
-
_validation = {
|
|
2029
|
-
'code': {'required': True},
|
|
2030
|
-
'message': {'required': True},
|
|
2031
|
-
}
|
|
2032
|
-
|
|
2033
|
-
_attribute_map = {
|
|
2034
|
-
"code": {"key": "code", "type": "str"},
|
|
2035
|
-
"message": {"key": "message", "type": "str"},
|
|
2036
|
-
"details": {"key": "details", "type": "{str}"},
|
|
2037
|
-
"target": {"key": "target", "type": "str"},
|
|
2038
|
-
"innererror": {"key": "innererror", "type": "InnerError"},
|
|
2039
|
-
}
|
|
2040
|
-
|
|
2041
|
-
def __init__(
|
|
2042
|
-
self,
|
|
2043
|
-
*,
|
|
2044
|
-
code: Union[str, "_models.InnerErrorCodeValue"],
|
|
2045
|
-
message: str,
|
|
2046
|
-
details: Optional[Dict[str, str]] = None,
|
|
2047
|
-
target: Optional[str] = None,
|
|
2048
|
-
innererror: Optional["_models.InnerError"] = None,
|
|
2049
|
-
**kwargs
|
|
2050
|
-
):
|
|
2051
|
-
"""
|
|
2052
|
-
:keyword code: Error code. Required. Known values are: "InvalidParameterValue",
|
|
2053
|
-
"InvalidRequestBodyFormat", "EmptyRequest", "MissingInputRecords", "InvalidDocument",
|
|
2054
|
-
"ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", and
|
|
2055
|
-
"InvalidCountryHint".
|
|
2056
|
-
:paramtype code: str or ~azure.ai.textanalytics.v3_1.models.InnerErrorCodeValue
|
|
2057
|
-
:keyword message: Error message. Required.
|
|
2058
|
-
:paramtype message: str
|
|
2059
|
-
:keyword details: Error details.
|
|
2060
|
-
:paramtype details: dict[str, str]
|
|
2061
|
-
:keyword target: Error target.
|
|
2062
|
-
:paramtype target: str
|
|
2063
|
-
:keyword innererror: Inner error contains more specific information.
|
|
2064
|
-
:paramtype innererror: ~azure.ai.textanalytics.v3_1.models.InnerError
|
|
2065
|
-
"""
|
|
2066
|
-
super().__init__(**kwargs)
|
|
2067
|
-
self.code = code
|
|
2068
|
-
self.message = message
|
|
2069
|
-
self.details = details
|
|
2070
|
-
self.target = target
|
|
2071
|
-
self.innererror = innererror
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
class JobManifestTasks(_serialization.Model):
|
|
2075
|
-
"""The set of tasks to execute on the input documents. Cannot specify the same task more than once.
|
|
2076
|
-
|
|
2077
|
-
:ivar entity_recognition_tasks:
|
|
2078
|
-
:vartype entity_recognition_tasks: list[~azure.ai.textanalytics.v3_1.models.EntitiesTask]
|
|
2079
|
-
:ivar entity_recognition_pii_tasks:
|
|
2080
|
-
:vartype entity_recognition_pii_tasks: list[~azure.ai.textanalytics.v3_1.models.PiiTask]
|
|
2081
|
-
:ivar key_phrase_extraction_tasks:
|
|
2082
|
-
:vartype key_phrase_extraction_tasks: list[~azure.ai.textanalytics.v3_1.models.KeyPhrasesTask]
|
|
2083
|
-
:ivar entity_linking_tasks:
|
|
2084
|
-
:vartype entity_linking_tasks: list[~azure.ai.textanalytics.v3_1.models.EntityLinkingTask]
|
|
2085
|
-
:ivar sentiment_analysis_tasks:
|
|
2086
|
-
:vartype sentiment_analysis_tasks:
|
|
2087
|
-
list[~azure.ai.textanalytics.v3_1.models.SentimentAnalysisTask]
|
|
2088
|
-
"""
|
|
2089
|
-
|
|
2090
|
-
_attribute_map = {
|
|
2091
|
-
"entity_recognition_tasks": {"key": "entityRecognitionTasks", "type": "[EntitiesTask]"},
|
|
2092
|
-
"entity_recognition_pii_tasks": {"key": "entityRecognitionPiiTasks", "type": "[PiiTask]"},
|
|
2093
|
-
"key_phrase_extraction_tasks": {"key": "keyPhraseExtractionTasks", "type": "[KeyPhrasesTask]"},
|
|
2094
|
-
"entity_linking_tasks": {"key": "entityLinkingTasks", "type": "[EntityLinkingTask]"},
|
|
2095
|
-
"sentiment_analysis_tasks": {"key": "sentimentAnalysisTasks", "type": "[SentimentAnalysisTask]"},
|
|
2096
|
-
}
|
|
2097
|
-
|
|
2098
|
-
def __init__(
|
|
2099
|
-
self,
|
|
2100
|
-
*,
|
|
2101
|
-
entity_recognition_tasks: Optional[List["_models.EntitiesTask"]] = None,
|
|
2102
|
-
entity_recognition_pii_tasks: Optional[List["_models.PiiTask"]] = None,
|
|
2103
|
-
key_phrase_extraction_tasks: Optional[List["_models.KeyPhrasesTask"]] = None,
|
|
2104
|
-
entity_linking_tasks: Optional[List["_models.EntityLinkingTask"]] = None,
|
|
2105
|
-
sentiment_analysis_tasks: Optional[List["_models.SentimentAnalysisTask"]] = None,
|
|
2106
|
-
**kwargs
|
|
2107
|
-
):
|
|
2108
|
-
"""
|
|
2109
|
-
:keyword entity_recognition_tasks:
|
|
2110
|
-
:paramtype entity_recognition_tasks: list[~azure.ai.textanalytics.v3_1.models.EntitiesTask]
|
|
2111
|
-
:keyword entity_recognition_pii_tasks:
|
|
2112
|
-
:paramtype entity_recognition_pii_tasks: list[~azure.ai.textanalytics.v3_1.models.PiiTask]
|
|
2113
|
-
:keyword key_phrase_extraction_tasks:
|
|
2114
|
-
:paramtype key_phrase_extraction_tasks:
|
|
2115
|
-
list[~azure.ai.textanalytics.v3_1.models.KeyPhrasesTask]
|
|
2116
|
-
:keyword entity_linking_tasks:
|
|
2117
|
-
:paramtype entity_linking_tasks: list[~azure.ai.textanalytics.v3_1.models.EntityLinkingTask]
|
|
2118
|
-
:keyword sentiment_analysis_tasks:
|
|
2119
|
-
:paramtype sentiment_analysis_tasks:
|
|
2120
|
-
list[~azure.ai.textanalytics.v3_1.models.SentimentAnalysisTask]
|
|
2121
|
-
"""
|
|
2122
|
-
super().__init__(**kwargs)
|
|
2123
|
-
self.entity_recognition_tasks = entity_recognition_tasks
|
|
2124
|
-
self.entity_recognition_pii_tasks = entity_recognition_pii_tasks
|
|
2125
|
-
self.key_phrase_extraction_tasks = key_phrase_extraction_tasks
|
|
2126
|
-
self.entity_linking_tasks = entity_linking_tasks
|
|
2127
|
-
self.sentiment_analysis_tasks = sentiment_analysis_tasks
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
class KeyPhraseResult(_serialization.Model):
|
|
2131
|
-
"""KeyPhraseResult.
|
|
2132
|
-
|
|
2133
|
-
All required parameters must be populated in order to send to Azure.
|
|
2134
|
-
|
|
2135
|
-
:ivar documents: Response by document. Required.
|
|
2136
|
-
:vartype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentKeyPhrases]
|
|
2137
|
-
:ivar errors: Errors by document id. Required.
|
|
2138
|
-
:vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError]
|
|
2139
|
-
:ivar statistics: if showStats=true was specified in the request this field will contain
|
|
2140
|
-
information about the request payload.
|
|
2141
|
-
:vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics
|
|
2142
|
-
:ivar model_version: This field indicates which model is used for scoring. Required.
|
|
2143
|
-
:vartype model_version: str
|
|
2144
|
-
"""
|
|
2145
|
-
|
|
2146
|
-
_validation = {
|
|
2147
|
-
'documents': {'required': True},
|
|
2148
|
-
'errors': {'required': True},
|
|
2149
|
-
'model_version': {'required': True},
|
|
2150
|
-
}
|
|
2151
|
-
|
|
2152
|
-
_attribute_map = {
|
|
2153
|
-
"documents": {"key": "documents", "type": "[DocumentKeyPhrases]"},
|
|
2154
|
-
"errors": {"key": "errors", "type": "[DocumentError]"},
|
|
2155
|
-
"statistics": {"key": "statistics", "type": "RequestStatistics"},
|
|
2156
|
-
"model_version": {"key": "modelVersion", "type": "str"},
|
|
2157
|
-
}
|
|
2158
|
-
|
|
2159
|
-
def __init__(
|
|
2160
|
-
self,
|
|
2161
|
-
*,
|
|
2162
|
-
documents: List["_models.DocumentKeyPhrases"],
|
|
2163
|
-
errors: List["_models.DocumentError"],
|
|
2164
|
-
model_version: str,
|
|
2165
|
-
statistics: Optional["_models.RequestStatistics"] = None,
|
|
2166
|
-
**kwargs
|
|
2167
|
-
):
|
|
2168
|
-
"""
|
|
2169
|
-
:keyword documents: Response by document. Required.
|
|
2170
|
-
:paramtype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentKeyPhrases]
|
|
2171
|
-
:keyword errors: Errors by document id. Required.
|
|
2172
|
-
:paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError]
|
|
2173
|
-
:keyword statistics: if showStats=true was specified in the request this field will contain
|
|
2174
|
-
information about the request payload.
|
|
2175
|
-
:paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics
|
|
2176
|
-
:keyword model_version: This field indicates which model is used for scoring. Required.
|
|
2177
|
-
:paramtype model_version: str
|
|
2178
|
-
"""
|
|
2179
|
-
super().__init__(**kwargs)
|
|
2180
|
-
self.documents = documents
|
|
2181
|
-
self.errors = errors
|
|
2182
|
-
self.statistics = statistics
|
|
2183
|
-
self.model_version = model_version
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
class KeyPhrasesTask(_serialization.Model):
|
|
2187
|
-
"""KeyPhrasesTask.
|
|
2188
|
-
|
|
2189
|
-
:ivar parameters:
|
|
2190
|
-
:vartype parameters: ~azure.ai.textanalytics.v3_1.models.KeyPhrasesTaskParameters
|
|
2191
|
-
:ivar task_name:
|
|
2192
|
-
:vartype task_name: str
|
|
2193
|
-
"""
|
|
2194
|
-
|
|
2195
|
-
_attribute_map = {
|
|
2196
|
-
"parameters": {"key": "parameters", "type": "KeyPhrasesTaskParameters"},
|
|
2197
|
-
"task_name": {"key": "taskName", "type": "str"},
|
|
2198
|
-
}
|
|
2199
|
-
|
|
2200
|
-
def __init__(
|
|
2201
|
-
self,
|
|
2202
|
-
*,
|
|
2203
|
-
parameters: Optional["_models.KeyPhrasesTaskParameters"] = None,
|
|
2204
|
-
task_name: Optional[str] = None,
|
|
2205
|
-
**kwargs
|
|
2206
|
-
):
|
|
2207
|
-
"""
|
|
2208
|
-
:keyword parameters:
|
|
2209
|
-
:paramtype parameters: ~azure.ai.textanalytics.v3_1.models.KeyPhrasesTaskParameters
|
|
2210
|
-
:keyword task_name:
|
|
2211
|
-
:paramtype task_name: str
|
|
2212
|
-
"""
|
|
2213
|
-
super().__init__(**kwargs)
|
|
2214
|
-
self.parameters = parameters
|
|
2215
|
-
self.task_name = task_name
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
class KeyPhrasesTaskParameters(_serialization.Model):
|
|
2219
|
-
"""KeyPhrasesTaskParameters.
|
|
2220
|
-
|
|
2221
|
-
:ivar model_version:
|
|
2222
|
-
:vartype model_version: str
|
|
2223
|
-
:ivar logging_opt_out:
|
|
2224
|
-
:vartype logging_opt_out: bool
|
|
2225
|
-
"""
|
|
2226
|
-
|
|
2227
|
-
_attribute_map = {
|
|
2228
|
-
"model_version": {"key": "model-version", "type": "str"},
|
|
2229
|
-
"logging_opt_out": {"key": "loggingOptOut", "type": "bool"},
|
|
2230
|
-
}
|
|
2231
|
-
|
|
2232
|
-
def __init__(
|
|
2233
|
-
self,
|
|
2234
|
-
*,
|
|
2235
|
-
model_version: str = "latest",
|
|
2236
|
-
logging_opt_out: bool = False,
|
|
2237
|
-
**kwargs
|
|
2238
|
-
):
|
|
2239
|
-
"""
|
|
2240
|
-
:keyword model_version:
|
|
2241
|
-
:paramtype model_version: str
|
|
2242
|
-
:keyword logging_opt_out:
|
|
2243
|
-
:paramtype logging_opt_out: bool
|
|
2244
|
-
"""
|
|
2245
|
-
super().__init__(**kwargs)
|
|
2246
|
-
self.model_version = model_version
|
|
2247
|
-
self.logging_opt_out = logging_opt_out
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
class KeyPhraseTaskResult(_serialization.Model):
|
|
2251
|
-
"""KeyPhraseTaskResult.
|
|
2252
|
-
|
|
2253
|
-
:ivar results:
|
|
2254
|
-
:vartype results: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult
|
|
2255
|
-
"""
|
|
2256
|
-
|
|
2257
|
-
_attribute_map = {
|
|
2258
|
-
"results": {"key": "results", "type": "KeyPhraseResult"},
|
|
2259
|
-
}
|
|
2260
|
-
|
|
2261
|
-
def __init__(
|
|
2262
|
-
self,
|
|
2263
|
-
*,
|
|
2264
|
-
results: Optional["_models.KeyPhraseResult"] = None,
|
|
2265
|
-
**kwargs
|
|
2266
|
-
):
|
|
2267
|
-
"""
|
|
2268
|
-
:keyword results:
|
|
2269
|
-
:paramtype results: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult
|
|
2270
|
-
"""
|
|
2271
|
-
super().__init__(**kwargs)
|
|
2272
|
-
self.results = results
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
class LanguageBatchInput(_serialization.Model):
|
|
2276
|
-
"""LanguageBatchInput.
|
|
2277
|
-
|
|
2278
|
-
All required parameters must be populated in order to send to Azure.
|
|
2279
|
-
|
|
2280
|
-
:ivar documents: Required.
|
|
2281
|
-
:vartype documents: list[~azure.ai.textanalytics.v3_1.models.LanguageInput]
|
|
2282
|
-
"""
|
|
2283
|
-
|
|
2284
|
-
_validation = {
|
|
2285
|
-
'documents': {'required': True},
|
|
2286
|
-
}
|
|
2287
|
-
|
|
2288
|
-
_attribute_map = {
|
|
2289
|
-
"documents": {"key": "documents", "type": "[LanguageInput]"},
|
|
2290
|
-
}
|
|
2291
|
-
|
|
2292
|
-
def __init__(
|
|
2293
|
-
self,
|
|
2294
|
-
*,
|
|
2295
|
-
documents: List["_models.LanguageInput"],
|
|
2296
|
-
**kwargs
|
|
2297
|
-
):
|
|
2298
|
-
"""
|
|
2299
|
-
:keyword documents: Required.
|
|
2300
|
-
:paramtype documents: list[~azure.ai.textanalytics.v3_1.models.LanguageInput]
|
|
2301
|
-
"""
|
|
2302
|
-
super().__init__(**kwargs)
|
|
2303
|
-
self.documents = documents
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
class LanguageInput(_serialization.Model):
|
|
2307
|
-
"""LanguageInput.
|
|
2308
|
-
|
|
2309
|
-
All required parameters must be populated in order to send to Azure.
|
|
2310
|
-
|
|
2311
|
-
:ivar id: Unique, non-empty document identifier. Required.
|
|
2312
|
-
:vartype id: str
|
|
2313
|
-
:ivar text: Required.
|
|
2314
|
-
:vartype text: str
|
|
2315
|
-
:ivar country_hint:
|
|
2316
|
-
:vartype country_hint: str
|
|
2317
|
-
"""
|
|
2318
|
-
|
|
2319
|
-
_validation = {
|
|
2320
|
-
'id': {'required': True},
|
|
2321
|
-
'text': {'required': True},
|
|
2322
|
-
}
|
|
2323
|
-
|
|
2324
|
-
_attribute_map = {
|
|
2325
|
-
"id": {"key": "id", "type": "str"},
|
|
2326
|
-
"text": {"key": "text", "type": "str"},
|
|
2327
|
-
"country_hint": {"key": "countryHint", "type": "str"},
|
|
2328
|
-
}
|
|
2329
|
-
|
|
2330
|
-
def __init__(
|
|
2331
|
-
self,
|
|
2332
|
-
*,
|
|
2333
|
-
id: str, # pylint: disable=redefined-builtin
|
|
2334
|
-
text: str,
|
|
2335
|
-
country_hint: Optional[str] = None,
|
|
2336
|
-
**kwargs
|
|
2337
|
-
):
|
|
2338
|
-
"""
|
|
2339
|
-
:keyword id: Unique, non-empty document identifier. Required.
|
|
2340
|
-
:paramtype id: str
|
|
2341
|
-
:keyword text: Required.
|
|
2342
|
-
:paramtype text: str
|
|
2343
|
-
:keyword country_hint:
|
|
2344
|
-
:paramtype country_hint: str
|
|
2345
|
-
"""
|
|
2346
|
-
super().__init__(**kwargs)
|
|
2347
|
-
self.id = id
|
|
2348
|
-
self.text = text
|
|
2349
|
-
self.country_hint = country_hint
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
class LanguageResult(_serialization.Model):
|
|
2353
|
-
"""LanguageResult.
|
|
2354
|
-
|
|
2355
|
-
All required parameters must be populated in order to send to Azure.
|
|
2356
|
-
|
|
2357
|
-
:ivar documents: Response by document. Required.
|
|
2358
|
-
:vartype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentLanguage]
|
|
2359
|
-
:ivar errors: Errors by document id. Required.
|
|
2360
|
-
:vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError]
|
|
2361
|
-
:ivar statistics: if showStats=true was specified in the request this field will contain
|
|
2362
|
-
information about the request payload.
|
|
2363
|
-
:vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics
|
|
2364
|
-
:ivar model_version: This field indicates which model is used for scoring. Required.
|
|
2365
|
-
:vartype model_version: str
|
|
2366
|
-
"""
|
|
2367
|
-
|
|
2368
|
-
_validation = {
|
|
2369
|
-
'documents': {'required': True},
|
|
2370
|
-
'errors': {'required': True},
|
|
2371
|
-
'model_version': {'required': True},
|
|
2372
|
-
}
|
|
2373
|
-
|
|
2374
|
-
_attribute_map = {
|
|
2375
|
-
"documents": {"key": "documents", "type": "[DocumentLanguage]"},
|
|
2376
|
-
"errors": {"key": "errors", "type": "[DocumentError]"},
|
|
2377
|
-
"statistics": {"key": "statistics", "type": "RequestStatistics"},
|
|
2378
|
-
"model_version": {"key": "modelVersion", "type": "str"},
|
|
2379
|
-
}
|
|
2380
|
-
|
|
2381
|
-
def __init__(
|
|
2382
|
-
self,
|
|
2383
|
-
*,
|
|
2384
|
-
documents: List["_models.DocumentLanguage"],
|
|
2385
|
-
errors: List["_models.DocumentError"],
|
|
2386
|
-
model_version: str,
|
|
2387
|
-
statistics: Optional["_models.RequestStatistics"] = None,
|
|
2388
|
-
**kwargs
|
|
2389
|
-
):
|
|
2390
|
-
"""
|
|
2391
|
-
:keyword documents: Response by document. Required.
|
|
2392
|
-
:paramtype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentLanguage]
|
|
2393
|
-
:keyword errors: Errors by document id. Required.
|
|
2394
|
-
:paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError]
|
|
2395
|
-
:keyword statistics: if showStats=true was specified in the request this field will contain
|
|
2396
|
-
information about the request payload.
|
|
2397
|
-
:paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics
|
|
2398
|
-
:keyword model_version: This field indicates which model is used for scoring. Required.
|
|
2399
|
-
:paramtype model_version: str
|
|
2400
|
-
"""
|
|
2401
|
-
super().__init__(**kwargs)
|
|
2402
|
-
self.documents = documents
|
|
2403
|
-
self.errors = errors
|
|
2404
|
-
self.statistics = statistics
|
|
2405
|
-
self.model_version = model_version
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
class LinkedEntity(_serialization.Model):
|
|
2409
|
-
"""LinkedEntity.
|
|
2410
|
-
|
|
2411
|
-
All required parameters must be populated in order to send to Azure.
|
|
2412
|
-
|
|
2413
|
-
:ivar name: Entity Linking formal name. Required.
|
|
2414
|
-
:vartype name: str
|
|
2415
|
-
:ivar matches: List of instances this entity appears in the text. Required.
|
|
2416
|
-
:vartype matches: list[~azure.ai.textanalytics.v3_1.models.Match]
|
|
2417
|
-
:ivar language: Language used in the data source. Required.
|
|
2418
|
-
:vartype language: str
|
|
2419
|
-
:ivar id: Unique identifier of the recognized entity from the data source.
|
|
2420
|
-
:vartype id: str
|
|
2421
|
-
:ivar url: URL for the entity's page from the data source. Required.
|
|
2422
|
-
:vartype url: str
|
|
2423
|
-
:ivar data_source: Data source used to extract entity linking, such as Wiki/Bing etc. Required.
|
|
2424
|
-
:vartype data_source: str
|
|
2425
|
-
:ivar bing_id: Bing Entity Search API unique identifier of the recognized entity.
|
|
2426
|
-
:vartype bing_id: str
|
|
2427
|
-
"""
|
|
2428
|
-
|
|
2429
|
-
_validation = {
|
|
2430
|
-
'name': {'required': True},
|
|
2431
|
-
'matches': {'required': True},
|
|
2432
|
-
'language': {'required': True},
|
|
2433
|
-
'url': {'required': True},
|
|
2434
|
-
'data_source': {'required': True},
|
|
2435
|
-
}
|
|
2436
|
-
|
|
2437
|
-
_attribute_map = {
|
|
2438
|
-
"name": {"key": "name", "type": "str"},
|
|
2439
|
-
"matches": {"key": "matches", "type": "[Match]"},
|
|
2440
|
-
"language": {"key": "language", "type": "str"},
|
|
2441
|
-
"id": {"key": "id", "type": "str"},
|
|
2442
|
-
"url": {"key": "url", "type": "str"},
|
|
2443
|
-
"data_source": {"key": "dataSource", "type": "str"},
|
|
2444
|
-
"bing_id": {"key": "bingId", "type": "str"},
|
|
2445
|
-
}
|
|
2446
|
-
|
|
2447
|
-
def __init__(
|
|
2448
|
-
self,
|
|
2449
|
-
*,
|
|
2450
|
-
name: str,
|
|
2451
|
-
matches: List["_models.Match"],
|
|
2452
|
-
language: str,
|
|
2453
|
-
url: str,
|
|
2454
|
-
data_source: str,
|
|
2455
|
-
id: Optional[str] = None, # pylint: disable=redefined-builtin
|
|
2456
|
-
bing_id: Optional[str] = None,
|
|
2457
|
-
**kwargs
|
|
2458
|
-
):
|
|
2459
|
-
"""
|
|
2460
|
-
:keyword name: Entity Linking formal name. Required.
|
|
2461
|
-
:paramtype name: str
|
|
2462
|
-
:keyword matches: List of instances this entity appears in the text. Required.
|
|
2463
|
-
:paramtype matches: list[~azure.ai.textanalytics.v3_1.models.Match]
|
|
2464
|
-
:keyword language: Language used in the data source. Required.
|
|
2465
|
-
:paramtype language: str
|
|
2466
|
-
:keyword id: Unique identifier of the recognized entity from the data source.
|
|
2467
|
-
:paramtype id: str
|
|
2468
|
-
:keyword url: URL for the entity's page from the data source. Required.
|
|
2469
|
-
:paramtype url: str
|
|
2470
|
-
:keyword data_source: Data source used to extract entity linking, such as Wiki/Bing etc.
|
|
2471
|
-
Required.
|
|
2472
|
-
:paramtype data_source: str
|
|
2473
|
-
:keyword bing_id: Bing Entity Search API unique identifier of the recognized entity.
|
|
2474
|
-
:paramtype bing_id: str
|
|
2475
|
-
"""
|
|
2476
|
-
super().__init__(**kwargs)
|
|
2477
|
-
self.name = name
|
|
2478
|
-
self.matches = matches
|
|
2479
|
-
self.language = language
|
|
2480
|
-
self.id = id
|
|
2481
|
-
self.url = url
|
|
2482
|
-
self.data_source = data_source
|
|
2483
|
-
self.bing_id = bing_id
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
class Match(_serialization.Model):
|
|
2487
|
-
"""Match.
|
|
2488
|
-
|
|
2489
|
-
All required parameters must be populated in order to send to Azure.
|
|
2490
|
-
|
|
2491
|
-
:ivar confidence_score: If a well known item is recognized, a decimal number denoting the
|
|
2492
|
-
confidence level between 0 and 1 will be returned. Required.
|
|
2493
|
-
:vartype confidence_score: float
|
|
2494
|
-
:ivar text: Entity text as appears in the request. Required.
|
|
2495
|
-
:vartype text: str
|
|
2496
|
-
:ivar offset: Start position for the entity match text. Required.
|
|
2497
|
-
:vartype offset: int
|
|
2498
|
-
:ivar length: Length for the entity match text. Required.
|
|
2499
|
-
:vartype length: int
|
|
2500
|
-
"""
|
|
2501
|
-
|
|
2502
|
-
_validation = {
|
|
2503
|
-
'confidence_score': {'required': True},
|
|
2504
|
-
'text': {'required': True},
|
|
2505
|
-
'offset': {'required': True},
|
|
2506
|
-
'length': {'required': True},
|
|
2507
|
-
}
|
|
2508
|
-
|
|
2509
|
-
_attribute_map = {
|
|
2510
|
-
"confidence_score": {"key": "confidenceScore", "type": "float"},
|
|
2511
|
-
"text": {"key": "text", "type": "str"},
|
|
2512
|
-
"offset": {"key": "offset", "type": "int"},
|
|
2513
|
-
"length": {"key": "length", "type": "int"},
|
|
2514
|
-
}
|
|
2515
|
-
|
|
2516
|
-
def __init__(
|
|
2517
|
-
self,
|
|
2518
|
-
*,
|
|
2519
|
-
confidence_score: float,
|
|
2520
|
-
text: str,
|
|
2521
|
-
offset: int,
|
|
2522
|
-
length: int,
|
|
2523
|
-
**kwargs
|
|
2524
|
-
):
|
|
2525
|
-
"""
|
|
2526
|
-
:keyword confidence_score: If a well known item is recognized, a decimal number denoting the
|
|
2527
|
-
confidence level between 0 and 1 will be returned. Required.
|
|
2528
|
-
:paramtype confidence_score: float
|
|
2529
|
-
:keyword text: Entity text as appears in the request. Required.
|
|
2530
|
-
:paramtype text: str
|
|
2531
|
-
:keyword offset: Start position for the entity match text. Required.
|
|
2532
|
-
:paramtype offset: int
|
|
2533
|
-
:keyword length: Length for the entity match text. Required.
|
|
2534
|
-
:paramtype length: int
|
|
2535
|
-
"""
|
|
2536
|
-
super().__init__(**kwargs)
|
|
2537
|
-
self.confidence_score = confidence_score
|
|
2538
|
-
self.text = text
|
|
2539
|
-
self.offset = offset
|
|
2540
|
-
self.length = length
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
class MultiLanguageBatchInput(_serialization.Model):
|
|
2544
|
-
"""Contains a set of input documents to be analyzed by the service.
|
|
2545
|
-
|
|
2546
|
-
All required parameters must be populated in order to send to Azure.
|
|
2547
|
-
|
|
2548
|
-
:ivar documents: The set of documents to process as part of this batch. Required.
|
|
2549
|
-
:vartype documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput]
|
|
2550
|
-
"""
|
|
2551
|
-
|
|
2552
|
-
_validation = {
|
|
2553
|
-
'documents': {'required': True},
|
|
2554
|
-
}
|
|
2555
|
-
|
|
2556
|
-
_attribute_map = {
|
|
2557
|
-
"documents": {"key": "documents", "type": "[MultiLanguageInput]"},
|
|
2558
|
-
}
|
|
2559
|
-
|
|
2560
|
-
def __init__(
|
|
2561
|
-
self,
|
|
2562
|
-
*,
|
|
2563
|
-
documents: List["_models.MultiLanguageInput"],
|
|
2564
|
-
**kwargs
|
|
2565
|
-
):
|
|
2566
|
-
"""
|
|
2567
|
-
:keyword documents: The set of documents to process as part of this batch. Required.
|
|
2568
|
-
:paramtype documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput]
|
|
2569
|
-
"""
|
|
2570
|
-
super().__init__(**kwargs)
|
|
2571
|
-
self.documents = documents
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
class MultiLanguageInput(_serialization.Model):
|
|
2575
|
-
"""Contains an input document to be analyzed by the service.
|
|
2576
|
-
|
|
2577
|
-
All required parameters must be populated in order to send to Azure.
|
|
2578
|
-
|
|
2579
|
-
:ivar id: A unique, non-empty document identifier. Required.
|
|
2580
|
-
:vartype id: str
|
|
2581
|
-
:ivar text: The input text to process. Required.
|
|
2582
|
-
:vartype text: str
|
|
2583
|
-
:ivar language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For
|
|
2584
|
-
example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as
|
|
2585
|
-
default.
|
|
2586
|
-
:vartype language: str
|
|
2587
|
-
"""
|
|
2588
|
-
|
|
2589
|
-
_validation = {
|
|
2590
|
-
'id': {'required': True},
|
|
2591
|
-
'text': {'required': True},
|
|
2592
|
-
}
|
|
2593
|
-
|
|
2594
|
-
_attribute_map = {
|
|
2595
|
-
"id": {"key": "id", "type": "str"},
|
|
2596
|
-
"text": {"key": "text", "type": "str"},
|
|
2597
|
-
"language": {"key": "language", "type": "str"},
|
|
2598
|
-
}
|
|
2599
|
-
|
|
2600
|
-
def __init__(
|
|
2601
|
-
self,
|
|
2602
|
-
*,
|
|
2603
|
-
id: str, # pylint: disable=redefined-builtin
|
|
2604
|
-
text: str,
|
|
2605
|
-
language: Optional[str] = None,
|
|
2606
|
-
**kwargs
|
|
2607
|
-
):
|
|
2608
|
-
"""
|
|
2609
|
-
:keyword id: A unique, non-empty document identifier. Required.
|
|
2610
|
-
:paramtype id: str
|
|
2611
|
-
:keyword text: The input text to process. Required.
|
|
2612
|
-
:paramtype text: str
|
|
2613
|
-
:keyword language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For
|
|
2614
|
-
example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as
|
|
2615
|
-
default.
|
|
2616
|
-
:paramtype language: str
|
|
2617
|
-
"""
|
|
2618
|
-
super().__init__(**kwargs)
|
|
2619
|
-
self.id = id
|
|
2620
|
-
self.text = text
|
|
2621
|
-
self.language = language
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
class PiiDocumentEntities(_serialization.Model):
|
|
2625
|
-
"""PiiDocumentEntities.
|
|
2626
|
-
|
|
2627
|
-
All required parameters must be populated in order to send to Azure.
|
|
2628
|
-
|
|
2629
|
-
:ivar id: Unique, non-empty document identifier. Required.
|
|
2630
|
-
:vartype id: str
|
|
2631
|
-
:ivar redacted_text: Returns redacted text. Required.
|
|
2632
|
-
:vartype redacted_text: str
|
|
2633
|
-
:ivar entities: Recognized entities in the document. Required.
|
|
2634
|
-
:vartype entities: list[~azure.ai.textanalytics.v3_1.models.Entity]
|
|
2635
|
-
:ivar warnings: Warnings encountered while processing document. Required.
|
|
2636
|
-
:vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning]
|
|
2637
|
-
:ivar statistics: if showStats=true was specified in the request this field will contain
|
|
2638
|
-
information about the document payload.
|
|
2639
|
-
:vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics
|
|
2640
|
-
"""
|
|
2641
|
-
|
|
2642
|
-
_validation = {
|
|
2643
|
-
'id': {'required': True},
|
|
2644
|
-
'redacted_text': {'required': True},
|
|
2645
|
-
'entities': {'required': True},
|
|
2646
|
-
'warnings': {'required': True},
|
|
2647
|
-
}
|
|
2648
|
-
|
|
2649
|
-
_attribute_map = {
|
|
2650
|
-
"id": {"key": "id", "type": "str"},
|
|
2651
|
-
"redacted_text": {"key": "redactedText", "type": "str"},
|
|
2652
|
-
"entities": {"key": "entities", "type": "[Entity]"},
|
|
2653
|
-
"warnings": {"key": "warnings", "type": "[TextAnalyticsWarning]"},
|
|
2654
|
-
"statistics": {"key": "statistics", "type": "DocumentStatistics"},
|
|
2655
|
-
}
|
|
2656
|
-
|
|
2657
|
-
def __init__(
|
|
2658
|
-
self,
|
|
2659
|
-
*,
|
|
2660
|
-
id: str, # pylint: disable=redefined-builtin
|
|
2661
|
-
redacted_text: str,
|
|
2662
|
-
entities: List["_models.Entity"],
|
|
2663
|
-
warnings: List["_models.TextAnalyticsWarning"],
|
|
2664
|
-
statistics: Optional["_models.DocumentStatistics"] = None,
|
|
2665
|
-
**kwargs
|
|
2666
|
-
):
|
|
2667
|
-
"""
|
|
2668
|
-
:keyword id: Unique, non-empty document identifier. Required.
|
|
2669
|
-
:paramtype id: str
|
|
2670
|
-
:keyword redacted_text: Returns redacted text. Required.
|
|
2671
|
-
:paramtype redacted_text: str
|
|
2672
|
-
:keyword entities: Recognized entities in the document. Required.
|
|
2673
|
-
:paramtype entities: list[~azure.ai.textanalytics.v3_1.models.Entity]
|
|
2674
|
-
:keyword warnings: Warnings encountered while processing document. Required.
|
|
2675
|
-
:paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning]
|
|
2676
|
-
:keyword statistics: if showStats=true was specified in the request this field will contain
|
|
2677
|
-
information about the document payload.
|
|
2678
|
-
:paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics
|
|
2679
|
-
"""
|
|
2680
|
-
super().__init__(**kwargs)
|
|
2681
|
-
self.id = id
|
|
2682
|
-
self.redacted_text = redacted_text
|
|
2683
|
-
self.entities = entities
|
|
2684
|
-
self.warnings = warnings
|
|
2685
|
-
self.statistics = statistics
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
class PiiResult(_serialization.Model):
|
|
2689
|
-
"""PiiResult.
|
|
2690
|
-
|
|
2691
|
-
All required parameters must be populated in order to send to Azure.
|
|
2692
|
-
|
|
2693
|
-
:ivar documents: Response by document. Required.
|
|
2694
|
-
:vartype documents: list[~azure.ai.textanalytics.v3_1.models.PiiDocumentEntities]
|
|
2695
|
-
:ivar errors: Errors by document id. Required.
|
|
2696
|
-
:vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError]
|
|
2697
|
-
:ivar statistics: if showStats=true was specified in the request this field will contain
|
|
2698
|
-
information about the request payload.
|
|
2699
|
-
:vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics
|
|
2700
|
-
:ivar model_version: This field indicates which model is used for scoring. Required.
|
|
2701
|
-
:vartype model_version: str
|
|
2702
|
-
"""
|
|
2703
|
-
|
|
2704
|
-
_validation = {
|
|
2705
|
-
'documents': {'required': True},
|
|
2706
|
-
'errors': {'required': True},
|
|
2707
|
-
'model_version': {'required': True},
|
|
2708
|
-
}
|
|
2709
|
-
|
|
2710
|
-
_attribute_map = {
|
|
2711
|
-
"documents": {"key": "documents", "type": "[PiiDocumentEntities]"},
|
|
2712
|
-
"errors": {"key": "errors", "type": "[DocumentError]"},
|
|
2713
|
-
"statistics": {"key": "statistics", "type": "RequestStatistics"},
|
|
2714
|
-
"model_version": {"key": "modelVersion", "type": "str"},
|
|
2715
|
-
}
|
|
2716
|
-
|
|
2717
|
-
def __init__(
|
|
2718
|
-
self,
|
|
2719
|
-
*,
|
|
2720
|
-
documents: List["_models.PiiDocumentEntities"],
|
|
2721
|
-
errors: List["_models.DocumentError"],
|
|
2722
|
-
model_version: str,
|
|
2723
|
-
statistics: Optional["_models.RequestStatistics"] = None,
|
|
2724
|
-
**kwargs
|
|
2725
|
-
):
|
|
2726
|
-
"""
|
|
2727
|
-
:keyword documents: Response by document. Required.
|
|
2728
|
-
:paramtype documents: list[~azure.ai.textanalytics.v3_1.models.PiiDocumentEntities]
|
|
2729
|
-
:keyword errors: Errors by document id. Required.
|
|
2730
|
-
:paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError]
|
|
2731
|
-
:keyword statistics: if showStats=true was specified in the request this field will contain
|
|
2732
|
-
information about the request payload.
|
|
2733
|
-
:paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics
|
|
2734
|
-
:keyword model_version: This field indicates which model is used for scoring. Required.
|
|
2735
|
-
:paramtype model_version: str
|
|
2736
|
-
"""
|
|
2737
|
-
super().__init__(**kwargs)
|
|
2738
|
-
self.documents = documents
|
|
2739
|
-
self.errors = errors
|
|
2740
|
-
self.statistics = statistics
|
|
2741
|
-
self.model_version = model_version
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
class PiiTask(_serialization.Model):
|
|
2745
|
-
"""PiiTask.
|
|
2746
|
-
|
|
2747
|
-
:ivar parameters:
|
|
2748
|
-
:vartype parameters: ~azure.ai.textanalytics.v3_1.models.PiiTaskParameters
|
|
2749
|
-
:ivar task_name:
|
|
2750
|
-
:vartype task_name: str
|
|
2751
|
-
"""
|
|
2752
|
-
|
|
2753
|
-
_attribute_map = {
|
|
2754
|
-
"parameters": {"key": "parameters", "type": "PiiTaskParameters"},
|
|
2755
|
-
"task_name": {"key": "taskName", "type": "str"},
|
|
2756
|
-
}
|
|
2757
|
-
|
|
2758
|
-
def __init__(
|
|
2759
|
-
self,
|
|
2760
|
-
*,
|
|
2761
|
-
parameters: Optional["_models.PiiTaskParameters"] = None,
|
|
2762
|
-
task_name: Optional[str] = None,
|
|
2763
|
-
**kwargs
|
|
2764
|
-
):
|
|
2765
|
-
"""
|
|
2766
|
-
:keyword parameters:
|
|
2767
|
-
:paramtype parameters: ~azure.ai.textanalytics.v3_1.models.PiiTaskParameters
|
|
2768
|
-
:keyword task_name:
|
|
2769
|
-
:paramtype task_name: str
|
|
2770
|
-
"""
|
|
2771
|
-
super().__init__(**kwargs)
|
|
2772
|
-
self.parameters = parameters
|
|
2773
|
-
self.task_name = task_name
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
class PiiTaskParameters(_serialization.Model):
|
|
2777
|
-
"""PiiTaskParameters.
|
|
2778
|
-
|
|
2779
|
-
:ivar domain: Known values are: "phi" and "none".
|
|
2780
|
-
:vartype domain: str or ~azure.ai.textanalytics.v3_1.models.PiiTaskParametersDomain
|
|
2781
|
-
:ivar model_version:
|
|
2782
|
-
:vartype model_version: str
|
|
2783
|
-
:ivar logging_opt_out:
|
|
2784
|
-
:vartype logging_opt_out: bool
|
|
2785
|
-
:ivar pii_categories: (Optional) describes the PII categories to return.
|
|
2786
|
-
:vartype pii_categories: list[str or ~azure.ai.textanalytics.v3_1.models.PiiCategory]
|
|
2787
|
-
:ivar string_index_type: Known values are: "TextElement_v8", "UnicodeCodePoint", and
|
|
2788
|
-
"Utf16CodeUnit".
|
|
2789
|
-
:vartype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType
|
|
2790
|
-
"""
|
|
2791
|
-
|
|
2792
|
-
_validation = {
|
|
2793
|
-
'pii_categories': {'unique': True},
|
|
2794
|
-
}
|
|
2795
|
-
|
|
2796
|
-
_attribute_map = {
|
|
2797
|
-
"domain": {"key": "domain", "type": "str"},
|
|
2798
|
-
"model_version": {"key": "model-version", "type": "str"},
|
|
2799
|
-
"logging_opt_out": {"key": "loggingOptOut", "type": "bool"},
|
|
2800
|
-
"pii_categories": {"key": "piiCategories", "type": "[str]"},
|
|
2801
|
-
"string_index_type": {"key": "stringIndexType", "type": "str"},
|
|
2802
|
-
}
|
|
2803
|
-
|
|
2804
|
-
def __init__(
|
|
2805
|
-
self,
|
|
2806
|
-
*,
|
|
2807
|
-
domain: Union[str, "_models.PiiTaskParametersDomain"] = "none",
|
|
2808
|
-
model_version: str = "latest",
|
|
2809
|
-
logging_opt_out: bool = True,
|
|
2810
|
-
pii_categories: Optional[List[Union[str, "_models.PiiCategory"]]] = None,
|
|
2811
|
-
string_index_type: Optional[Union[str, "_models.StringIndexType"]] = None,
|
|
2812
|
-
**kwargs
|
|
2813
|
-
):
|
|
2814
|
-
"""
|
|
2815
|
-
:keyword domain: Known values are: "phi" and "none".
|
|
2816
|
-
:paramtype domain: str or ~azure.ai.textanalytics.v3_1.models.PiiTaskParametersDomain
|
|
2817
|
-
:keyword model_version:
|
|
2818
|
-
:paramtype model_version: str
|
|
2819
|
-
:keyword logging_opt_out:
|
|
2820
|
-
:paramtype logging_opt_out: bool
|
|
2821
|
-
:keyword pii_categories: (Optional) describes the PII categories to return.
|
|
2822
|
-
:paramtype pii_categories: list[str or ~azure.ai.textanalytics.v3_1.models.PiiCategory]
|
|
2823
|
-
:keyword string_index_type: Known values are: "TextElement_v8", "UnicodeCodePoint", and
|
|
2824
|
-
"Utf16CodeUnit".
|
|
2825
|
-
:paramtype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType
|
|
2826
|
-
"""
|
|
2827
|
-
super().__init__(**kwargs)
|
|
2828
|
-
self.domain = domain
|
|
2829
|
-
self.model_version = model_version
|
|
2830
|
-
self.logging_opt_out = logging_opt_out
|
|
2831
|
-
self.pii_categories = pii_categories
|
|
2832
|
-
self.string_index_type = string_index_type
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
class PiiTaskResult(_serialization.Model):
|
|
2836
|
-
"""PiiTaskResult.
|
|
2837
|
-
|
|
2838
|
-
:ivar results:
|
|
2839
|
-
:vartype results: ~azure.ai.textanalytics.v3_1.models.PiiResult
|
|
2840
|
-
"""
|
|
2841
|
-
|
|
2842
|
-
_attribute_map = {
|
|
2843
|
-
"results": {"key": "results", "type": "PiiResult"},
|
|
2844
|
-
}
|
|
2845
|
-
|
|
2846
|
-
def __init__(
|
|
2847
|
-
self,
|
|
2848
|
-
*,
|
|
2849
|
-
results: Optional["_models.PiiResult"] = None,
|
|
2850
|
-
**kwargs
|
|
2851
|
-
):
|
|
2852
|
-
"""
|
|
2853
|
-
:keyword results:
|
|
2854
|
-
:paramtype results: ~azure.ai.textanalytics.v3_1.models.PiiResult
|
|
2855
|
-
"""
|
|
2856
|
-
super().__init__(**kwargs)
|
|
2857
|
-
self.results = results
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
class RequestStatistics(_serialization.Model):
|
|
2861
|
-
"""if showStats=true was specified in the request this field will contain information about the request payload.
|
|
2862
|
-
|
|
2863
|
-
All required parameters must be populated in order to send to Azure.
|
|
2864
|
-
|
|
2865
|
-
:ivar documents_count: Number of documents submitted in the request. Required.
|
|
2866
|
-
:vartype documents_count: int
|
|
2867
|
-
:ivar valid_documents_count: Number of valid documents. This excludes empty, over-size limit or
|
|
2868
|
-
non-supported languages documents. Required.
|
|
2869
|
-
:vartype valid_documents_count: int
|
|
2870
|
-
:ivar erroneous_documents_count: Number of invalid documents. This includes empty, over-size
|
|
2871
|
-
limit or non-supported languages documents. Required.
|
|
2872
|
-
:vartype erroneous_documents_count: int
|
|
2873
|
-
:ivar transactions_count: Number of transactions for the request. Required.
|
|
2874
|
-
:vartype transactions_count: int
|
|
2875
|
-
"""
|
|
2876
|
-
|
|
2877
|
-
_validation = {
|
|
2878
|
-
'documents_count': {'required': True},
|
|
2879
|
-
'valid_documents_count': {'required': True},
|
|
2880
|
-
'erroneous_documents_count': {'required': True},
|
|
2881
|
-
'transactions_count': {'required': True},
|
|
2882
|
-
}
|
|
2883
|
-
|
|
2884
|
-
_attribute_map = {
|
|
2885
|
-
"documents_count": {"key": "documentsCount", "type": "int"},
|
|
2886
|
-
"valid_documents_count": {"key": "validDocumentsCount", "type": "int"},
|
|
2887
|
-
"erroneous_documents_count": {"key": "erroneousDocumentsCount", "type": "int"},
|
|
2888
|
-
"transactions_count": {"key": "transactionsCount", "type": "int"},
|
|
2889
|
-
}
|
|
2890
|
-
|
|
2891
|
-
def __init__(
|
|
2892
|
-
self,
|
|
2893
|
-
*,
|
|
2894
|
-
documents_count: int,
|
|
2895
|
-
valid_documents_count: int,
|
|
2896
|
-
erroneous_documents_count: int,
|
|
2897
|
-
transactions_count: int,
|
|
2898
|
-
**kwargs
|
|
2899
|
-
):
|
|
2900
|
-
"""
|
|
2901
|
-
:keyword documents_count: Number of documents submitted in the request. Required.
|
|
2902
|
-
:paramtype documents_count: int
|
|
2903
|
-
:keyword valid_documents_count: Number of valid documents. This excludes empty, over-size limit
|
|
2904
|
-
or non-supported languages documents. Required.
|
|
2905
|
-
:paramtype valid_documents_count: int
|
|
2906
|
-
:keyword erroneous_documents_count: Number of invalid documents. This includes empty, over-size
|
|
2907
|
-
limit or non-supported languages documents. Required.
|
|
2908
|
-
:paramtype erroneous_documents_count: int
|
|
2909
|
-
:keyword transactions_count: Number of transactions for the request. Required.
|
|
2910
|
-
:paramtype transactions_count: int
|
|
2911
|
-
"""
|
|
2912
|
-
super().__init__(**kwargs)
|
|
2913
|
-
self.documents_count = documents_count
|
|
2914
|
-
self.valid_documents_count = valid_documents_count
|
|
2915
|
-
self.erroneous_documents_count = erroneous_documents_count
|
|
2916
|
-
self.transactions_count = transactions_count
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
class SentenceAssessment(_serialization.Model):
|
|
2920
|
-
"""SentenceAssessment.
|
|
2921
|
-
|
|
2922
|
-
All required parameters must be populated in order to send to Azure.
|
|
2923
|
-
|
|
2924
|
-
:ivar sentiment: Assessment sentiment in the sentence. Required. Known values are: "positive",
|
|
2925
|
-
"mixed", and "negative".
|
|
2926
|
-
:vartype sentiment: str or ~azure.ai.textanalytics.v3_1.models.TokenSentimentValue
|
|
2927
|
-
:ivar confidence_scores: Assessment sentiment confidence scores in the sentence. Required.
|
|
2928
|
-
:vartype confidence_scores: ~azure.ai.textanalytics.v3_1.models.TargetConfidenceScoreLabel
|
|
2929
|
-
:ivar offset: The assessment offset from the start of the sentence. Required.
|
|
2930
|
-
:vartype offset: int
|
|
2931
|
-
:ivar length: The length of the assessment. Required.
|
|
2932
|
-
:vartype length: int
|
|
2933
|
-
:ivar text: The assessment text detected. Required.
|
|
2934
|
-
:vartype text: str
|
|
2935
|
-
:ivar is_negated: The indicator representing if the assessment is negated. Required.
|
|
2936
|
-
:vartype is_negated: bool
|
|
2937
|
-
"""
|
|
2938
|
-
|
|
2939
|
-
_validation = {
|
|
2940
|
-
'sentiment': {'required': True},
|
|
2941
|
-
'confidence_scores': {'required': True},
|
|
2942
|
-
'offset': {'required': True},
|
|
2943
|
-
'length': {'required': True},
|
|
2944
|
-
'text': {'required': True},
|
|
2945
|
-
'is_negated': {'required': True},
|
|
2946
|
-
}
|
|
2947
|
-
|
|
2948
|
-
_attribute_map = {
|
|
2949
|
-
"sentiment": {"key": "sentiment", "type": "str"},
|
|
2950
|
-
"confidence_scores": {"key": "confidenceScores", "type": "TargetConfidenceScoreLabel"},
|
|
2951
|
-
"offset": {"key": "offset", "type": "int"},
|
|
2952
|
-
"length": {"key": "length", "type": "int"},
|
|
2953
|
-
"text": {"key": "text", "type": "str"},
|
|
2954
|
-
"is_negated": {"key": "isNegated", "type": "bool"},
|
|
2955
|
-
}
|
|
2956
|
-
|
|
2957
|
-
def __init__(
|
|
2958
|
-
self,
|
|
2959
|
-
*,
|
|
2960
|
-
sentiment: Union[str, "_models.TokenSentimentValue"],
|
|
2961
|
-
confidence_scores: "_models.TargetConfidenceScoreLabel",
|
|
2962
|
-
offset: int,
|
|
2963
|
-
length: int,
|
|
2964
|
-
text: str,
|
|
2965
|
-
is_negated: bool,
|
|
2966
|
-
**kwargs
|
|
2967
|
-
):
|
|
2968
|
-
"""
|
|
2969
|
-
:keyword sentiment: Assessment sentiment in the sentence. Required. Known values are:
|
|
2970
|
-
"positive", "mixed", and "negative".
|
|
2971
|
-
:paramtype sentiment: str or ~azure.ai.textanalytics.v3_1.models.TokenSentimentValue
|
|
2972
|
-
:keyword confidence_scores: Assessment sentiment confidence scores in the sentence. Required.
|
|
2973
|
-
:paramtype confidence_scores: ~azure.ai.textanalytics.v3_1.models.TargetConfidenceScoreLabel
|
|
2974
|
-
:keyword offset: The assessment offset from the start of the sentence. Required.
|
|
2975
|
-
:paramtype offset: int
|
|
2976
|
-
:keyword length: The length of the assessment. Required.
|
|
2977
|
-
:paramtype length: int
|
|
2978
|
-
:keyword text: The assessment text detected. Required.
|
|
2979
|
-
:paramtype text: str
|
|
2980
|
-
:keyword is_negated: The indicator representing if the assessment is negated. Required.
|
|
2981
|
-
:paramtype is_negated: bool
|
|
2982
|
-
"""
|
|
2983
|
-
super().__init__(**kwargs)
|
|
2984
|
-
self.sentiment = sentiment
|
|
2985
|
-
self.confidence_scores = confidence_scores
|
|
2986
|
-
self.offset = offset
|
|
2987
|
-
self.length = length
|
|
2988
|
-
self.text = text
|
|
2989
|
-
self.is_negated = is_negated
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
class SentenceSentiment(_serialization.Model):
|
|
2993
|
-
"""SentenceSentiment.
|
|
2994
|
-
|
|
2995
|
-
All required parameters must be populated in order to send to Azure.
|
|
2996
|
-
|
|
2997
|
-
:ivar text: The sentence text. Required.
|
|
2998
|
-
:vartype text: str
|
|
2999
|
-
:ivar sentiment: The predicted Sentiment for the sentence. Required. Known values are:
|
|
3000
|
-
"positive", "neutral", and "negative".
|
|
3001
|
-
:vartype sentiment: str or ~azure.ai.textanalytics.v3_1.models.SentenceSentimentValue
|
|
3002
|
-
:ivar confidence_scores: The sentiment confidence score between 0 and 1 for the sentence for
|
|
3003
|
-
all classes. Required.
|
|
3004
|
-
:vartype confidence_scores:
|
|
3005
|
-
~azure.ai.textanalytics.v3_1.models.SentimentConfidenceScorePerLabel
|
|
3006
|
-
:ivar offset: The sentence offset from the start of the document. Required.
|
|
3007
|
-
:vartype offset: int
|
|
3008
|
-
:ivar length: The length of the sentence. Required.
|
|
3009
|
-
:vartype length: int
|
|
3010
|
-
:ivar targets: The array of sentence targets for the sentence.
|
|
3011
|
-
:vartype targets: list[~azure.ai.textanalytics.v3_1.models.SentenceTarget]
|
|
3012
|
-
:ivar assessments: The array of assessments for the sentence.
|
|
3013
|
-
:vartype assessments: list[~azure.ai.textanalytics.v3_1.models.SentenceAssessment]
|
|
3014
|
-
"""
|
|
3015
|
-
|
|
3016
|
-
_validation = {
|
|
3017
|
-
'text': {'required': True},
|
|
3018
|
-
'sentiment': {'required': True},
|
|
3019
|
-
'confidence_scores': {'required': True},
|
|
3020
|
-
'offset': {'required': True},
|
|
3021
|
-
'length': {'required': True},
|
|
3022
|
-
}
|
|
3023
|
-
|
|
3024
|
-
_attribute_map = {
|
|
3025
|
-
"text": {"key": "text", "type": "str"},
|
|
3026
|
-
"sentiment": {"key": "sentiment", "type": "str"},
|
|
3027
|
-
"confidence_scores": {"key": "confidenceScores", "type": "SentimentConfidenceScorePerLabel"},
|
|
3028
|
-
"offset": {"key": "offset", "type": "int"},
|
|
3029
|
-
"length": {"key": "length", "type": "int"},
|
|
3030
|
-
"targets": {"key": "targets", "type": "[SentenceTarget]"},
|
|
3031
|
-
"assessments": {"key": "assessments", "type": "[SentenceAssessment]"},
|
|
3032
|
-
}
|
|
3033
|
-
|
|
3034
|
-
def __init__(
|
|
3035
|
-
self,
|
|
3036
|
-
*,
|
|
3037
|
-
text: str,
|
|
3038
|
-
sentiment: Union[str, "_models.SentenceSentimentValue"],
|
|
3039
|
-
confidence_scores: "_models.SentimentConfidenceScorePerLabel",
|
|
3040
|
-
offset: int,
|
|
3041
|
-
length: int,
|
|
3042
|
-
targets: Optional[List["_models.SentenceTarget"]] = None,
|
|
3043
|
-
assessments: Optional[List["_models.SentenceAssessment"]] = None,
|
|
3044
|
-
**kwargs
|
|
3045
|
-
):
|
|
3046
|
-
"""
|
|
3047
|
-
:keyword text: The sentence text. Required.
|
|
3048
|
-
:paramtype text: str
|
|
3049
|
-
:keyword sentiment: The predicted Sentiment for the sentence. Required. Known values are:
|
|
3050
|
-
"positive", "neutral", and "negative".
|
|
3051
|
-
:paramtype sentiment: str or ~azure.ai.textanalytics.v3_1.models.SentenceSentimentValue
|
|
3052
|
-
:keyword confidence_scores: The sentiment confidence score between 0 and 1 for the sentence for
|
|
3053
|
-
all classes. Required.
|
|
3054
|
-
:paramtype confidence_scores:
|
|
3055
|
-
~azure.ai.textanalytics.v3_1.models.SentimentConfidenceScorePerLabel
|
|
3056
|
-
:keyword offset: The sentence offset from the start of the document. Required.
|
|
3057
|
-
:paramtype offset: int
|
|
3058
|
-
:keyword length: The length of the sentence. Required.
|
|
3059
|
-
:paramtype length: int
|
|
3060
|
-
:keyword targets: The array of sentence targets for the sentence.
|
|
3061
|
-
:paramtype targets: list[~azure.ai.textanalytics.v3_1.models.SentenceTarget]
|
|
3062
|
-
:keyword assessments: The array of assessments for the sentence.
|
|
3063
|
-
:paramtype assessments: list[~azure.ai.textanalytics.v3_1.models.SentenceAssessment]
|
|
3064
|
-
"""
|
|
3065
|
-
super().__init__(**kwargs)
|
|
3066
|
-
self.text = text
|
|
3067
|
-
self.sentiment = sentiment
|
|
3068
|
-
self.confidence_scores = confidence_scores
|
|
3069
|
-
self.offset = offset
|
|
3070
|
-
self.length = length
|
|
3071
|
-
self.targets = targets
|
|
3072
|
-
self.assessments = assessments
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
class SentenceTarget(_serialization.Model):
|
|
3076
|
-
"""SentenceTarget.
|
|
3077
|
-
|
|
3078
|
-
All required parameters must be populated in order to send to Azure.
|
|
3079
|
-
|
|
3080
|
-
:ivar sentiment: Targeted sentiment in the sentence. Required. Known values are: "positive",
|
|
3081
|
-
"mixed", and "negative".
|
|
3082
|
-
:vartype sentiment: str or ~azure.ai.textanalytics.v3_1.models.TokenSentimentValue
|
|
3083
|
-
:ivar confidence_scores: Target sentiment confidence scores for the target in the sentence.
|
|
3084
|
-
Required.
|
|
3085
|
-
:vartype confidence_scores: ~azure.ai.textanalytics.v3_1.models.TargetConfidenceScoreLabel
|
|
3086
|
-
:ivar offset: The target offset from the start of the sentence. Required.
|
|
3087
|
-
:vartype offset: int
|
|
3088
|
-
:ivar length: The length of the target. Required.
|
|
3089
|
-
:vartype length: int
|
|
3090
|
-
:ivar text: The target text detected. Required.
|
|
3091
|
-
:vartype text: str
|
|
3092
|
-
:ivar relations: The array of either assessment or target objects which is related to the
|
|
3093
|
-
target. Required.
|
|
3094
|
-
:vartype relations: list[~azure.ai.textanalytics.v3_1.models.TargetRelation]
|
|
3095
|
-
"""
|
|
3096
|
-
|
|
3097
|
-
_validation = {
|
|
3098
|
-
'sentiment': {'required': True},
|
|
3099
|
-
'confidence_scores': {'required': True},
|
|
3100
|
-
'offset': {'required': True},
|
|
3101
|
-
'length': {'required': True},
|
|
3102
|
-
'text': {'required': True},
|
|
3103
|
-
'relations': {'required': True},
|
|
3104
|
-
}
|
|
3105
|
-
|
|
3106
|
-
_attribute_map = {
|
|
3107
|
-
"sentiment": {"key": "sentiment", "type": "str"},
|
|
3108
|
-
"confidence_scores": {"key": "confidenceScores", "type": "TargetConfidenceScoreLabel"},
|
|
3109
|
-
"offset": {"key": "offset", "type": "int"},
|
|
3110
|
-
"length": {"key": "length", "type": "int"},
|
|
3111
|
-
"text": {"key": "text", "type": "str"},
|
|
3112
|
-
"relations": {"key": "relations", "type": "[TargetRelation]"},
|
|
3113
|
-
}
|
|
3114
|
-
|
|
3115
|
-
def __init__(
|
|
3116
|
-
self,
|
|
3117
|
-
*,
|
|
3118
|
-
sentiment: Union[str, "_models.TokenSentimentValue"],
|
|
3119
|
-
confidence_scores: "_models.TargetConfidenceScoreLabel",
|
|
3120
|
-
offset: int,
|
|
3121
|
-
length: int,
|
|
3122
|
-
text: str,
|
|
3123
|
-
relations: List["_models.TargetRelation"],
|
|
3124
|
-
**kwargs
|
|
3125
|
-
):
|
|
3126
|
-
"""
|
|
3127
|
-
:keyword sentiment: Targeted sentiment in the sentence. Required. Known values are: "positive",
|
|
3128
|
-
"mixed", and "negative".
|
|
3129
|
-
:paramtype sentiment: str or ~azure.ai.textanalytics.v3_1.models.TokenSentimentValue
|
|
3130
|
-
:keyword confidence_scores: Target sentiment confidence scores for the target in the sentence.
|
|
3131
|
-
Required.
|
|
3132
|
-
:paramtype confidence_scores: ~azure.ai.textanalytics.v3_1.models.TargetConfidenceScoreLabel
|
|
3133
|
-
:keyword offset: The target offset from the start of the sentence. Required.
|
|
3134
|
-
:paramtype offset: int
|
|
3135
|
-
:keyword length: The length of the target. Required.
|
|
3136
|
-
:paramtype length: int
|
|
3137
|
-
:keyword text: The target text detected. Required.
|
|
3138
|
-
:paramtype text: str
|
|
3139
|
-
:keyword relations: The array of either assessment or target objects which is related to the
|
|
3140
|
-
target. Required.
|
|
3141
|
-
:paramtype relations: list[~azure.ai.textanalytics.v3_1.models.TargetRelation]
|
|
3142
|
-
"""
|
|
3143
|
-
super().__init__(**kwargs)
|
|
3144
|
-
self.sentiment = sentiment
|
|
3145
|
-
self.confidence_scores = confidence_scores
|
|
3146
|
-
self.offset = offset
|
|
3147
|
-
self.length = length
|
|
3148
|
-
self.text = text
|
|
3149
|
-
self.relations = relations
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
class SentimentAnalysisTask(_serialization.Model):
|
|
3153
|
-
"""SentimentAnalysisTask.
|
|
3154
|
-
|
|
3155
|
-
:ivar parameters:
|
|
3156
|
-
:vartype parameters: ~azure.ai.textanalytics.v3_1.models.SentimentAnalysisTaskParameters
|
|
3157
|
-
:ivar task_name:
|
|
3158
|
-
:vartype task_name: str
|
|
3159
|
-
"""
|
|
3160
|
-
|
|
3161
|
-
_attribute_map = {
|
|
3162
|
-
"parameters": {"key": "parameters", "type": "SentimentAnalysisTaskParameters"},
|
|
3163
|
-
"task_name": {"key": "taskName", "type": "str"},
|
|
3164
|
-
}
|
|
3165
|
-
|
|
3166
|
-
def __init__(
|
|
3167
|
-
self,
|
|
3168
|
-
*,
|
|
3169
|
-
parameters: Optional["_models.SentimentAnalysisTaskParameters"] = None,
|
|
3170
|
-
task_name: Optional[str] = None,
|
|
3171
|
-
**kwargs
|
|
3172
|
-
):
|
|
3173
|
-
"""
|
|
3174
|
-
:keyword parameters:
|
|
3175
|
-
:paramtype parameters: ~azure.ai.textanalytics.v3_1.models.SentimentAnalysisTaskParameters
|
|
3176
|
-
:keyword task_name:
|
|
3177
|
-
:paramtype task_name: str
|
|
3178
|
-
"""
|
|
3179
|
-
super().__init__(**kwargs)
|
|
3180
|
-
self.parameters = parameters
|
|
3181
|
-
self.task_name = task_name
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
class SentimentAnalysisTaskParameters(_serialization.Model):
|
|
3185
|
-
"""SentimentAnalysisTaskParameters.
|
|
3186
|
-
|
|
3187
|
-
:ivar model_version:
|
|
3188
|
-
:vartype model_version: str
|
|
3189
|
-
:ivar logging_opt_out:
|
|
3190
|
-
:vartype logging_opt_out: bool
|
|
3191
|
-
:ivar opinion_mining:
|
|
3192
|
-
:vartype opinion_mining: bool
|
|
3193
|
-
:ivar string_index_type: Known values are: "TextElement_v8", "UnicodeCodePoint", and
|
|
3194
|
-
"Utf16CodeUnit".
|
|
3195
|
-
:vartype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType
|
|
3196
|
-
"""
|
|
3197
|
-
|
|
3198
|
-
_attribute_map = {
|
|
3199
|
-
"model_version": {"key": "model-version", "type": "str"},
|
|
3200
|
-
"logging_opt_out": {"key": "loggingOptOut", "type": "bool"},
|
|
3201
|
-
"opinion_mining": {"key": "opinionMining", "type": "bool"},
|
|
3202
|
-
"string_index_type": {"key": "stringIndexType", "type": "str"},
|
|
3203
|
-
}
|
|
3204
|
-
|
|
3205
|
-
def __init__(
|
|
3206
|
-
self,
|
|
3207
|
-
*,
|
|
3208
|
-
model_version: str = "latest",
|
|
3209
|
-
logging_opt_out: bool = False,
|
|
3210
|
-
opinion_mining: bool = False,
|
|
3211
|
-
string_index_type: Optional[Union[str, "_models.StringIndexType"]] = None,
|
|
3212
|
-
**kwargs
|
|
3213
|
-
):
|
|
3214
|
-
"""
|
|
3215
|
-
:keyword model_version:
|
|
3216
|
-
:paramtype model_version: str
|
|
3217
|
-
:keyword logging_opt_out:
|
|
3218
|
-
:paramtype logging_opt_out: bool
|
|
3219
|
-
:keyword opinion_mining:
|
|
3220
|
-
:paramtype opinion_mining: bool
|
|
3221
|
-
:keyword string_index_type: Known values are: "TextElement_v8", "UnicodeCodePoint", and
|
|
3222
|
-
"Utf16CodeUnit".
|
|
3223
|
-
:paramtype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType
|
|
3224
|
-
"""
|
|
3225
|
-
super().__init__(**kwargs)
|
|
3226
|
-
self.model_version = model_version
|
|
3227
|
-
self.logging_opt_out = logging_opt_out
|
|
3228
|
-
self.opinion_mining = opinion_mining
|
|
3229
|
-
self.string_index_type = string_index_type
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
class SentimentConfidenceScorePerLabel(_serialization.Model):
|
|
3233
|
-
"""Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative.
|
|
3234
|
-
|
|
3235
|
-
All required parameters must be populated in order to send to Azure.
|
|
3236
|
-
|
|
3237
|
-
:ivar positive: Required.
|
|
3238
|
-
:vartype positive: float
|
|
3239
|
-
:ivar neutral: Required.
|
|
3240
|
-
:vartype neutral: float
|
|
3241
|
-
:ivar negative: Required.
|
|
3242
|
-
:vartype negative: float
|
|
3243
|
-
"""
|
|
3244
|
-
|
|
3245
|
-
_validation = {
|
|
3246
|
-
'positive': {'required': True},
|
|
3247
|
-
'neutral': {'required': True},
|
|
3248
|
-
'negative': {'required': True},
|
|
3249
|
-
}
|
|
3250
|
-
|
|
3251
|
-
_attribute_map = {
|
|
3252
|
-
"positive": {"key": "positive", "type": "float"},
|
|
3253
|
-
"neutral": {"key": "neutral", "type": "float"},
|
|
3254
|
-
"negative": {"key": "negative", "type": "float"},
|
|
3255
|
-
}
|
|
3256
|
-
|
|
3257
|
-
def __init__(
|
|
3258
|
-
self,
|
|
3259
|
-
*,
|
|
3260
|
-
positive: float,
|
|
3261
|
-
neutral: float,
|
|
3262
|
-
negative: float,
|
|
3263
|
-
**kwargs
|
|
3264
|
-
):
|
|
3265
|
-
"""
|
|
3266
|
-
:keyword positive: Required.
|
|
3267
|
-
:paramtype positive: float
|
|
3268
|
-
:keyword neutral: Required.
|
|
3269
|
-
:paramtype neutral: float
|
|
3270
|
-
:keyword negative: Required.
|
|
3271
|
-
:paramtype negative: float
|
|
3272
|
-
"""
|
|
3273
|
-
super().__init__(**kwargs)
|
|
3274
|
-
self.positive = positive
|
|
3275
|
-
self.neutral = neutral
|
|
3276
|
-
self.negative = negative
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
class SentimentResponse(_serialization.Model):
|
|
3280
|
-
"""SentimentResponse.
|
|
3281
|
-
|
|
3282
|
-
All required parameters must be populated in order to send to Azure.
|
|
3283
|
-
|
|
3284
|
-
:ivar documents: Sentiment analysis per document. Required.
|
|
3285
|
-
:vartype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentSentiment]
|
|
3286
|
-
:ivar errors: Errors by document id. Required.
|
|
3287
|
-
:vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError]
|
|
3288
|
-
:ivar statistics: if showStats=true was specified in the request this field will contain
|
|
3289
|
-
information about the request payload.
|
|
3290
|
-
:vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics
|
|
3291
|
-
:ivar model_version: This field indicates which model is used for scoring. Required.
|
|
3292
|
-
:vartype model_version: str
|
|
3293
|
-
"""
|
|
3294
|
-
|
|
3295
|
-
_validation = {
|
|
3296
|
-
'documents': {'required': True},
|
|
3297
|
-
'errors': {'required': True},
|
|
3298
|
-
'model_version': {'required': True},
|
|
3299
|
-
}
|
|
3300
|
-
|
|
3301
|
-
_attribute_map = {
|
|
3302
|
-
"documents": {"key": "documents", "type": "[DocumentSentiment]"},
|
|
3303
|
-
"errors": {"key": "errors", "type": "[DocumentError]"},
|
|
3304
|
-
"statistics": {"key": "statistics", "type": "RequestStatistics"},
|
|
3305
|
-
"model_version": {"key": "modelVersion", "type": "str"},
|
|
3306
|
-
}
|
|
3307
|
-
|
|
3308
|
-
def __init__(
|
|
3309
|
-
self,
|
|
3310
|
-
*,
|
|
3311
|
-
documents: List["_models.DocumentSentiment"],
|
|
3312
|
-
errors: List["_models.DocumentError"],
|
|
3313
|
-
model_version: str,
|
|
3314
|
-
statistics: Optional["_models.RequestStatistics"] = None,
|
|
3315
|
-
**kwargs
|
|
3316
|
-
):
|
|
3317
|
-
"""
|
|
3318
|
-
:keyword documents: Sentiment analysis per document. Required.
|
|
3319
|
-
:paramtype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentSentiment]
|
|
3320
|
-
:keyword errors: Errors by document id. Required.
|
|
3321
|
-
:paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError]
|
|
3322
|
-
:keyword statistics: if showStats=true was specified in the request this field will contain
|
|
3323
|
-
information about the request payload.
|
|
3324
|
-
:paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics
|
|
3325
|
-
:keyword model_version: This field indicates which model is used for scoring. Required.
|
|
3326
|
-
:paramtype model_version: str
|
|
3327
|
-
"""
|
|
3328
|
-
super().__init__(**kwargs)
|
|
3329
|
-
self.documents = documents
|
|
3330
|
-
self.errors = errors
|
|
3331
|
-
self.statistics = statistics
|
|
3332
|
-
self.model_version = model_version
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
class SentimentTaskResult(_serialization.Model):
|
|
3336
|
-
"""SentimentTaskResult.
|
|
3337
|
-
|
|
3338
|
-
:ivar results:
|
|
3339
|
-
:vartype results: ~azure.ai.textanalytics.v3_1.models.SentimentResponse
|
|
3340
|
-
"""
|
|
3341
|
-
|
|
3342
|
-
_attribute_map = {
|
|
3343
|
-
"results": {"key": "results", "type": "SentimentResponse"},
|
|
3344
|
-
}
|
|
3345
|
-
|
|
3346
|
-
def __init__(
|
|
3347
|
-
self,
|
|
3348
|
-
*,
|
|
3349
|
-
results: Optional["_models.SentimentResponse"] = None,
|
|
3350
|
-
**kwargs
|
|
3351
|
-
):
|
|
3352
|
-
"""
|
|
3353
|
-
:keyword results:
|
|
3354
|
-
:paramtype results: ~azure.ai.textanalytics.v3_1.models.SentimentResponse
|
|
3355
|
-
"""
|
|
3356
|
-
super().__init__(**kwargs)
|
|
3357
|
-
self.results = results
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
class TargetConfidenceScoreLabel(_serialization.Model):
|
|
3361
|
-
"""Represents the confidence scores across all sentiment classes: positive, neutral, negative.
|
|
3362
|
-
|
|
3363
|
-
All required parameters must be populated in order to send to Azure.
|
|
3364
|
-
|
|
3365
|
-
:ivar positive: Required.
|
|
3366
|
-
:vartype positive: float
|
|
3367
|
-
:ivar negative: Required.
|
|
3368
|
-
:vartype negative: float
|
|
3369
|
-
"""
|
|
3370
|
-
|
|
3371
|
-
_validation = {
|
|
3372
|
-
'positive': {'required': True},
|
|
3373
|
-
'negative': {'required': True},
|
|
3374
|
-
}
|
|
3375
|
-
|
|
3376
|
-
_attribute_map = {
|
|
3377
|
-
"positive": {"key": "positive", "type": "float"},
|
|
3378
|
-
"negative": {"key": "negative", "type": "float"},
|
|
3379
|
-
}
|
|
3380
|
-
|
|
3381
|
-
def __init__(
|
|
3382
|
-
self,
|
|
3383
|
-
*,
|
|
3384
|
-
positive: float,
|
|
3385
|
-
negative: float,
|
|
3386
|
-
**kwargs
|
|
3387
|
-
):
|
|
3388
|
-
"""
|
|
3389
|
-
:keyword positive: Required.
|
|
3390
|
-
:paramtype positive: float
|
|
3391
|
-
:keyword negative: Required.
|
|
3392
|
-
:paramtype negative: float
|
|
3393
|
-
"""
|
|
3394
|
-
super().__init__(**kwargs)
|
|
3395
|
-
self.positive = positive
|
|
3396
|
-
self.negative = negative
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
class TargetRelation(_serialization.Model):
|
|
3400
|
-
"""TargetRelation.
|
|
3401
|
-
|
|
3402
|
-
All required parameters must be populated in order to send to Azure.
|
|
3403
|
-
|
|
3404
|
-
:ivar relation_type: The type related to the target. Required. Known values are: "assessment"
|
|
3405
|
-
and "target".
|
|
3406
|
-
:vartype relation_type: str or ~azure.ai.textanalytics.v3_1.models.TargetRelationType
|
|
3407
|
-
:ivar ref: The JSON pointer indicating the linked object. Required.
|
|
3408
|
-
:vartype ref: str
|
|
3409
|
-
"""
|
|
3410
|
-
|
|
3411
|
-
_validation = {
|
|
3412
|
-
'relation_type': {'required': True},
|
|
3413
|
-
'ref': {'required': True},
|
|
3414
|
-
}
|
|
3415
|
-
|
|
3416
|
-
_attribute_map = {
|
|
3417
|
-
"relation_type": {"key": "relationType", "type": "str"},
|
|
3418
|
-
"ref": {"key": "ref", "type": "str"},
|
|
3419
|
-
}
|
|
3420
|
-
|
|
3421
|
-
def __init__(
|
|
3422
|
-
self,
|
|
3423
|
-
*,
|
|
3424
|
-
relation_type: Union[str, "_models.TargetRelationType"],
|
|
3425
|
-
ref: str,
|
|
3426
|
-
**kwargs
|
|
3427
|
-
):
|
|
3428
|
-
"""
|
|
3429
|
-
:keyword relation_type: The type related to the target. Required. Known values are:
|
|
3430
|
-
"assessment" and "target".
|
|
3431
|
-
:paramtype relation_type: str or ~azure.ai.textanalytics.v3_1.models.TargetRelationType
|
|
3432
|
-
:keyword ref: The JSON pointer indicating the linked object. Required.
|
|
3433
|
-
:paramtype ref: str
|
|
3434
|
-
"""
|
|
3435
|
-
super().__init__(**kwargs)
|
|
3436
|
-
self.relation_type = relation_type
|
|
3437
|
-
self.ref = ref
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
class TasksStateTasks(_serialization.Model):
|
|
3441
|
-
"""TasksStateTasks.
|
|
3442
|
-
|
|
3443
|
-
All required parameters must be populated in order to send to Azure.
|
|
3444
|
-
|
|
3445
|
-
:ivar completed: Required.
|
|
3446
|
-
:vartype completed: int
|
|
3447
|
-
:ivar failed: Required.
|
|
3448
|
-
:vartype failed: int
|
|
3449
|
-
:ivar in_progress: Required.
|
|
3450
|
-
:vartype in_progress: int
|
|
3451
|
-
:ivar total: Required.
|
|
3452
|
-
:vartype total: int
|
|
3453
|
-
:ivar entity_recognition_tasks:
|
|
3454
|
-
:vartype entity_recognition_tasks:
|
|
3455
|
-
list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksEntityRecognitionTasksItem]
|
|
3456
|
-
:ivar entity_recognition_pii_tasks:
|
|
3457
|
-
:vartype entity_recognition_pii_tasks:
|
|
3458
|
-
list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksEntityRecognitionPiiTasksItem]
|
|
3459
|
-
:ivar key_phrase_extraction_tasks:
|
|
3460
|
-
:vartype key_phrase_extraction_tasks:
|
|
3461
|
-
list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksKeyPhraseExtractionTasksItem]
|
|
3462
|
-
:ivar entity_linking_tasks:
|
|
3463
|
-
:vartype entity_linking_tasks:
|
|
3464
|
-
list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksEntityLinkingTasksItem]
|
|
3465
|
-
:ivar sentiment_analysis_tasks:
|
|
3466
|
-
:vartype sentiment_analysis_tasks:
|
|
3467
|
-
list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksSentimentAnalysisTasksItem]
|
|
3468
|
-
"""
|
|
3469
|
-
|
|
3470
|
-
_validation = {
|
|
3471
|
-
'completed': {'required': True},
|
|
3472
|
-
'failed': {'required': True},
|
|
3473
|
-
'in_progress': {'required': True},
|
|
3474
|
-
'total': {'required': True},
|
|
3475
|
-
}
|
|
3476
|
-
|
|
3477
|
-
_attribute_map = {
|
|
3478
|
-
"completed": {"key": "completed", "type": "int"},
|
|
3479
|
-
"failed": {"key": "failed", "type": "int"},
|
|
3480
|
-
"in_progress": {"key": "inProgress", "type": "int"},
|
|
3481
|
-
"total": {"key": "total", "type": "int"},
|
|
3482
|
-
"entity_recognition_tasks": {"key": "entityRecognitionTasks", "type": "[TasksStateTasksEntityRecognitionTasksItem]"},
|
|
3483
|
-
"entity_recognition_pii_tasks": {"key": "entityRecognitionPiiTasks", "type": "[TasksStateTasksEntityRecognitionPiiTasksItem]"},
|
|
3484
|
-
"key_phrase_extraction_tasks": {"key": "keyPhraseExtractionTasks", "type": "[TasksStateTasksKeyPhraseExtractionTasksItem]"},
|
|
3485
|
-
"entity_linking_tasks": {"key": "entityLinkingTasks", "type": "[TasksStateTasksEntityLinkingTasksItem]"},
|
|
3486
|
-
"sentiment_analysis_tasks": {"key": "sentimentAnalysisTasks", "type": "[TasksStateTasksSentimentAnalysisTasksItem]"},
|
|
3487
|
-
}
|
|
3488
|
-
|
|
3489
|
-
def __init__(
|
|
3490
|
-
self,
|
|
3491
|
-
*,
|
|
3492
|
-
completed: int,
|
|
3493
|
-
failed: int,
|
|
3494
|
-
in_progress: int,
|
|
3495
|
-
total: int,
|
|
3496
|
-
entity_recognition_tasks: Optional[List["_models.TasksStateTasksEntityRecognitionTasksItem"]] = None,
|
|
3497
|
-
entity_recognition_pii_tasks: Optional[List["_models.TasksStateTasksEntityRecognitionPiiTasksItem"]] = None,
|
|
3498
|
-
key_phrase_extraction_tasks: Optional[List["_models.TasksStateTasksKeyPhraseExtractionTasksItem"]] = None,
|
|
3499
|
-
entity_linking_tasks: Optional[List["_models.TasksStateTasksEntityLinkingTasksItem"]] = None,
|
|
3500
|
-
sentiment_analysis_tasks: Optional[List["_models.TasksStateTasksSentimentAnalysisTasksItem"]] = None,
|
|
3501
|
-
**kwargs
|
|
3502
|
-
):
|
|
3503
|
-
"""
|
|
3504
|
-
:keyword completed: Required.
|
|
3505
|
-
:paramtype completed: int
|
|
3506
|
-
:keyword failed: Required.
|
|
3507
|
-
:paramtype failed: int
|
|
3508
|
-
:keyword in_progress: Required.
|
|
3509
|
-
:paramtype in_progress: int
|
|
3510
|
-
:keyword total: Required.
|
|
3511
|
-
:paramtype total: int
|
|
3512
|
-
:keyword entity_recognition_tasks:
|
|
3513
|
-
:paramtype entity_recognition_tasks:
|
|
3514
|
-
list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksEntityRecognitionTasksItem]
|
|
3515
|
-
:keyword entity_recognition_pii_tasks:
|
|
3516
|
-
:paramtype entity_recognition_pii_tasks:
|
|
3517
|
-
list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksEntityRecognitionPiiTasksItem]
|
|
3518
|
-
:keyword key_phrase_extraction_tasks:
|
|
3519
|
-
:paramtype key_phrase_extraction_tasks:
|
|
3520
|
-
list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksKeyPhraseExtractionTasksItem]
|
|
3521
|
-
:keyword entity_linking_tasks:
|
|
3522
|
-
:paramtype entity_linking_tasks:
|
|
3523
|
-
list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksEntityLinkingTasksItem]
|
|
3524
|
-
:keyword sentiment_analysis_tasks:
|
|
3525
|
-
:paramtype sentiment_analysis_tasks:
|
|
3526
|
-
list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksSentimentAnalysisTasksItem]
|
|
3527
|
-
"""
|
|
3528
|
-
super().__init__(**kwargs)
|
|
3529
|
-
self.completed = completed
|
|
3530
|
-
self.failed = failed
|
|
3531
|
-
self.in_progress = in_progress
|
|
3532
|
-
self.total = total
|
|
3533
|
-
self.entity_recognition_tasks = entity_recognition_tasks
|
|
3534
|
-
self.entity_recognition_pii_tasks = entity_recognition_pii_tasks
|
|
3535
|
-
self.key_phrase_extraction_tasks = key_phrase_extraction_tasks
|
|
3536
|
-
self.entity_linking_tasks = entity_linking_tasks
|
|
3537
|
-
self.sentiment_analysis_tasks = sentiment_analysis_tasks
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
class TaskState(_serialization.Model):
|
|
3541
|
-
"""TaskState.
|
|
3542
|
-
|
|
3543
|
-
All required parameters must be populated in order to send to Azure.
|
|
3544
|
-
|
|
3545
|
-
:ivar last_update_date_time: Required.
|
|
3546
|
-
:vartype last_update_date_time: ~datetime.datetime
|
|
3547
|
-
:ivar task_name: Required.
|
|
3548
|
-
:vartype task_name: str
|
|
3549
|
-
:ivar status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
3550
|
-
"rejected", "cancelled", and "cancelling".
|
|
3551
|
-
:vartype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
3552
|
-
"""
|
|
3553
|
-
|
|
3554
|
-
_validation = {
|
|
3555
|
-
'last_update_date_time': {'required': True},
|
|
3556
|
-
'task_name': {'required': True},
|
|
3557
|
-
'status': {'required': True},
|
|
3558
|
-
}
|
|
3559
|
-
|
|
3560
|
-
_attribute_map = {
|
|
3561
|
-
"last_update_date_time": {"key": "lastUpdateDateTime", "type": "iso-8601"},
|
|
3562
|
-
"task_name": {"key": "taskName", "type": "str"},
|
|
3563
|
-
"status": {"key": "status", "type": "str"},
|
|
3564
|
-
}
|
|
3565
|
-
|
|
3566
|
-
def __init__(
|
|
3567
|
-
self,
|
|
3568
|
-
*,
|
|
3569
|
-
last_update_date_time: datetime.datetime,
|
|
3570
|
-
task_name: str,
|
|
3571
|
-
status: Union[str, "_models.State"],
|
|
3572
|
-
**kwargs
|
|
3573
|
-
):
|
|
3574
|
-
"""
|
|
3575
|
-
:keyword last_update_date_time: Required.
|
|
3576
|
-
:paramtype last_update_date_time: ~datetime.datetime
|
|
3577
|
-
:keyword task_name: Required.
|
|
3578
|
-
:paramtype task_name: str
|
|
3579
|
-
:keyword status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
3580
|
-
"rejected", "cancelled", and "cancelling".
|
|
3581
|
-
:paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
3582
|
-
"""
|
|
3583
|
-
super().__init__(**kwargs)
|
|
3584
|
-
self.last_update_date_time = last_update_date_time
|
|
3585
|
-
self.task_name = task_name
|
|
3586
|
-
self.status = status
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
class TasksStateTasksEntityLinkingTasksItem(TaskState, EntityLinkingTaskResult):
|
|
3590
|
-
"""TasksStateTasksEntityLinkingTasksItem.
|
|
3591
|
-
|
|
3592
|
-
All required parameters must be populated in order to send to Azure.
|
|
3593
|
-
|
|
3594
|
-
:ivar results:
|
|
3595
|
-
:vartype results: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult
|
|
3596
|
-
:ivar last_update_date_time: Required.
|
|
3597
|
-
:vartype last_update_date_time: ~datetime.datetime
|
|
3598
|
-
:ivar task_name: Required.
|
|
3599
|
-
:vartype task_name: str
|
|
3600
|
-
:ivar status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
3601
|
-
"rejected", "cancelled", and "cancelling".
|
|
3602
|
-
:vartype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
3603
|
-
"""
|
|
3604
|
-
|
|
3605
|
-
_validation = {
|
|
3606
|
-
'last_update_date_time': {'required': True},
|
|
3607
|
-
'task_name': {'required': True},
|
|
3608
|
-
'status': {'required': True},
|
|
3609
|
-
}
|
|
3610
|
-
|
|
3611
|
-
_attribute_map = {
|
|
3612
|
-
"results": {"key": "results", "type": "EntityLinkingResult"},
|
|
3613
|
-
"last_update_date_time": {"key": "lastUpdateDateTime", "type": "iso-8601"},
|
|
3614
|
-
"task_name": {"key": "taskName", "type": "str"},
|
|
3615
|
-
"status": {"key": "status", "type": "str"},
|
|
3616
|
-
}
|
|
3617
|
-
|
|
3618
|
-
def __init__(
|
|
3619
|
-
self,
|
|
3620
|
-
*,
|
|
3621
|
-
last_update_date_time: datetime.datetime,
|
|
3622
|
-
task_name: str,
|
|
3623
|
-
status: Union[str, "_models.State"],
|
|
3624
|
-
results: Optional["_models.EntityLinkingResult"] = None,
|
|
3625
|
-
**kwargs
|
|
3626
|
-
):
|
|
3627
|
-
"""
|
|
3628
|
-
:keyword results:
|
|
3629
|
-
:paramtype results: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult
|
|
3630
|
-
:keyword last_update_date_time: Required.
|
|
3631
|
-
:paramtype last_update_date_time: ~datetime.datetime
|
|
3632
|
-
:keyword task_name: Required.
|
|
3633
|
-
:paramtype task_name: str
|
|
3634
|
-
:keyword status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
3635
|
-
"rejected", "cancelled", and "cancelling".
|
|
3636
|
-
:paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
3637
|
-
"""
|
|
3638
|
-
super().__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs)
|
|
3639
|
-
self.results = results
|
|
3640
|
-
self.last_update_date_time = last_update_date_time
|
|
3641
|
-
self.task_name = task_name
|
|
3642
|
-
self.status = status
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
class TasksStateTasksEntityRecognitionPiiTasksItem(TaskState, PiiTaskResult):
|
|
3646
|
-
"""TasksStateTasksEntityRecognitionPiiTasksItem.
|
|
3647
|
-
|
|
3648
|
-
All required parameters must be populated in order to send to Azure.
|
|
3649
|
-
|
|
3650
|
-
:ivar results:
|
|
3651
|
-
:vartype results: ~azure.ai.textanalytics.v3_1.models.PiiResult
|
|
3652
|
-
:ivar last_update_date_time: Required.
|
|
3653
|
-
:vartype last_update_date_time: ~datetime.datetime
|
|
3654
|
-
:ivar task_name: Required.
|
|
3655
|
-
:vartype task_name: str
|
|
3656
|
-
:ivar status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
3657
|
-
"rejected", "cancelled", and "cancelling".
|
|
3658
|
-
:vartype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
3659
|
-
"""
|
|
3660
|
-
|
|
3661
|
-
_validation = {
|
|
3662
|
-
'last_update_date_time': {'required': True},
|
|
3663
|
-
'task_name': {'required': True},
|
|
3664
|
-
'status': {'required': True},
|
|
3665
|
-
}
|
|
3666
|
-
|
|
3667
|
-
_attribute_map = {
|
|
3668
|
-
"results": {"key": "results", "type": "PiiResult"},
|
|
3669
|
-
"last_update_date_time": {"key": "lastUpdateDateTime", "type": "iso-8601"},
|
|
3670
|
-
"task_name": {"key": "taskName", "type": "str"},
|
|
3671
|
-
"status": {"key": "status", "type": "str"},
|
|
3672
|
-
}
|
|
3673
|
-
|
|
3674
|
-
def __init__(
|
|
3675
|
-
self,
|
|
3676
|
-
*,
|
|
3677
|
-
last_update_date_time: datetime.datetime,
|
|
3678
|
-
task_name: str,
|
|
3679
|
-
status: Union[str, "_models.State"],
|
|
3680
|
-
results: Optional["_models.PiiResult"] = None,
|
|
3681
|
-
**kwargs
|
|
3682
|
-
):
|
|
3683
|
-
"""
|
|
3684
|
-
:keyword results:
|
|
3685
|
-
:paramtype results: ~azure.ai.textanalytics.v3_1.models.PiiResult
|
|
3686
|
-
:keyword last_update_date_time: Required.
|
|
3687
|
-
:paramtype last_update_date_time: ~datetime.datetime
|
|
3688
|
-
:keyword task_name: Required.
|
|
3689
|
-
:paramtype task_name: str
|
|
3690
|
-
:keyword status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
3691
|
-
"rejected", "cancelled", and "cancelling".
|
|
3692
|
-
:paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
3693
|
-
"""
|
|
3694
|
-
super().__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs)
|
|
3695
|
-
self.results = results
|
|
3696
|
-
self.last_update_date_time = last_update_date_time
|
|
3697
|
-
self.task_name = task_name
|
|
3698
|
-
self.status = status
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
class TasksStateTasksEntityRecognitionTasksItem(TaskState, EntitiesTaskResult):
|
|
3702
|
-
"""TasksStateTasksEntityRecognitionTasksItem.
|
|
3703
|
-
|
|
3704
|
-
All required parameters must be populated in order to send to Azure.
|
|
3705
|
-
|
|
3706
|
-
:ivar results:
|
|
3707
|
-
:vartype results: ~azure.ai.textanalytics.v3_1.models.EntitiesResult
|
|
3708
|
-
:ivar last_update_date_time: Required.
|
|
3709
|
-
:vartype last_update_date_time: ~datetime.datetime
|
|
3710
|
-
:ivar task_name: Required.
|
|
3711
|
-
:vartype task_name: str
|
|
3712
|
-
:ivar status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
3713
|
-
"rejected", "cancelled", and "cancelling".
|
|
3714
|
-
:vartype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
3715
|
-
"""
|
|
3716
|
-
|
|
3717
|
-
_validation = {
|
|
3718
|
-
'last_update_date_time': {'required': True},
|
|
3719
|
-
'task_name': {'required': True},
|
|
3720
|
-
'status': {'required': True},
|
|
3721
|
-
}
|
|
3722
|
-
|
|
3723
|
-
_attribute_map = {
|
|
3724
|
-
"results": {"key": "results", "type": "EntitiesResult"},
|
|
3725
|
-
"last_update_date_time": {"key": "lastUpdateDateTime", "type": "iso-8601"},
|
|
3726
|
-
"task_name": {"key": "taskName", "type": "str"},
|
|
3727
|
-
"status": {"key": "status", "type": "str"},
|
|
3728
|
-
}
|
|
3729
|
-
|
|
3730
|
-
def __init__(
|
|
3731
|
-
self,
|
|
3732
|
-
*,
|
|
3733
|
-
last_update_date_time: datetime.datetime,
|
|
3734
|
-
task_name: str,
|
|
3735
|
-
status: Union[str, "_models.State"],
|
|
3736
|
-
results: Optional["_models.EntitiesResult"] = None,
|
|
3737
|
-
**kwargs
|
|
3738
|
-
):
|
|
3739
|
-
"""
|
|
3740
|
-
:keyword results:
|
|
3741
|
-
:paramtype results: ~azure.ai.textanalytics.v3_1.models.EntitiesResult
|
|
3742
|
-
:keyword last_update_date_time: Required.
|
|
3743
|
-
:paramtype last_update_date_time: ~datetime.datetime
|
|
3744
|
-
:keyword task_name: Required.
|
|
3745
|
-
:paramtype task_name: str
|
|
3746
|
-
:keyword status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
3747
|
-
"rejected", "cancelled", and "cancelling".
|
|
3748
|
-
:paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
3749
|
-
"""
|
|
3750
|
-
super().__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs)
|
|
3751
|
-
self.results = results
|
|
3752
|
-
self.last_update_date_time = last_update_date_time
|
|
3753
|
-
self.task_name = task_name
|
|
3754
|
-
self.status = status
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
class TasksStateTasksKeyPhraseExtractionTasksItem(TaskState, KeyPhraseTaskResult):
|
|
3758
|
-
"""TasksStateTasksKeyPhraseExtractionTasksItem.
|
|
3759
|
-
|
|
3760
|
-
All required parameters must be populated in order to send to Azure.
|
|
3761
|
-
|
|
3762
|
-
:ivar results:
|
|
3763
|
-
:vartype results: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult
|
|
3764
|
-
:ivar last_update_date_time: Required.
|
|
3765
|
-
:vartype last_update_date_time: ~datetime.datetime
|
|
3766
|
-
:ivar task_name: Required.
|
|
3767
|
-
:vartype task_name: str
|
|
3768
|
-
:ivar status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
3769
|
-
"rejected", "cancelled", and "cancelling".
|
|
3770
|
-
:vartype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
3771
|
-
"""
|
|
3772
|
-
|
|
3773
|
-
_validation = {
|
|
3774
|
-
'last_update_date_time': {'required': True},
|
|
3775
|
-
'task_name': {'required': True},
|
|
3776
|
-
'status': {'required': True},
|
|
3777
|
-
}
|
|
3778
|
-
|
|
3779
|
-
_attribute_map = {
|
|
3780
|
-
"results": {"key": "results", "type": "KeyPhraseResult"},
|
|
3781
|
-
"last_update_date_time": {"key": "lastUpdateDateTime", "type": "iso-8601"},
|
|
3782
|
-
"task_name": {"key": "taskName", "type": "str"},
|
|
3783
|
-
"status": {"key": "status", "type": "str"},
|
|
3784
|
-
}
|
|
3785
|
-
|
|
3786
|
-
def __init__(
|
|
3787
|
-
self,
|
|
3788
|
-
*,
|
|
3789
|
-
last_update_date_time: datetime.datetime,
|
|
3790
|
-
task_name: str,
|
|
3791
|
-
status: Union[str, "_models.State"],
|
|
3792
|
-
results: Optional["_models.KeyPhraseResult"] = None,
|
|
3793
|
-
**kwargs
|
|
3794
|
-
):
|
|
3795
|
-
"""
|
|
3796
|
-
:keyword results:
|
|
3797
|
-
:paramtype results: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult
|
|
3798
|
-
:keyword last_update_date_time: Required.
|
|
3799
|
-
:paramtype last_update_date_time: ~datetime.datetime
|
|
3800
|
-
:keyword task_name: Required.
|
|
3801
|
-
:paramtype task_name: str
|
|
3802
|
-
:keyword status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
3803
|
-
"rejected", "cancelled", and "cancelling".
|
|
3804
|
-
:paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
3805
|
-
"""
|
|
3806
|
-
super().__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs)
|
|
3807
|
-
self.results = results
|
|
3808
|
-
self.last_update_date_time = last_update_date_time
|
|
3809
|
-
self.task_name = task_name
|
|
3810
|
-
self.status = status
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
class TasksStateTasksSentimentAnalysisTasksItem(TaskState, SentimentTaskResult):
|
|
3814
|
-
"""TasksStateTasksSentimentAnalysisTasksItem.
|
|
3815
|
-
|
|
3816
|
-
All required parameters must be populated in order to send to Azure.
|
|
3817
|
-
|
|
3818
|
-
:ivar results:
|
|
3819
|
-
:vartype results: ~azure.ai.textanalytics.v3_1.models.SentimentResponse
|
|
3820
|
-
:ivar last_update_date_time: Required.
|
|
3821
|
-
:vartype last_update_date_time: ~datetime.datetime
|
|
3822
|
-
:ivar task_name: Required.
|
|
3823
|
-
:vartype task_name: str
|
|
3824
|
-
:ivar status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
3825
|
-
"rejected", "cancelled", and "cancelling".
|
|
3826
|
-
:vartype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
3827
|
-
"""
|
|
3828
|
-
|
|
3829
|
-
_validation = {
|
|
3830
|
-
'last_update_date_time': {'required': True},
|
|
3831
|
-
'task_name': {'required': True},
|
|
3832
|
-
'status': {'required': True},
|
|
3833
|
-
}
|
|
3834
|
-
|
|
3835
|
-
_attribute_map = {
|
|
3836
|
-
"results": {"key": "results", "type": "SentimentResponse"},
|
|
3837
|
-
"last_update_date_time": {"key": "lastUpdateDateTime", "type": "iso-8601"},
|
|
3838
|
-
"task_name": {"key": "taskName", "type": "str"},
|
|
3839
|
-
"status": {"key": "status", "type": "str"},
|
|
3840
|
-
}
|
|
3841
|
-
|
|
3842
|
-
def __init__(
|
|
3843
|
-
self,
|
|
3844
|
-
*,
|
|
3845
|
-
last_update_date_time: datetime.datetime,
|
|
3846
|
-
task_name: str,
|
|
3847
|
-
status: Union[str, "_models.State"],
|
|
3848
|
-
results: Optional["_models.SentimentResponse"] = None,
|
|
3849
|
-
**kwargs
|
|
3850
|
-
):
|
|
3851
|
-
"""
|
|
3852
|
-
:keyword results:
|
|
3853
|
-
:paramtype results: ~azure.ai.textanalytics.v3_1.models.SentimentResponse
|
|
3854
|
-
:keyword last_update_date_time: Required.
|
|
3855
|
-
:paramtype last_update_date_time: ~datetime.datetime
|
|
3856
|
-
:keyword task_name: Required.
|
|
3857
|
-
:paramtype task_name: str
|
|
3858
|
-
:keyword status: Required. Known values are: "notStarted", "running", "succeeded", "failed",
|
|
3859
|
-
"rejected", "cancelled", and "cancelling".
|
|
3860
|
-
:paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State
|
|
3861
|
-
"""
|
|
3862
|
-
super().__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs)
|
|
3863
|
-
self.results = results
|
|
3864
|
-
self.last_update_date_time = last_update_date_time
|
|
3865
|
-
self.task_name = task_name
|
|
3866
|
-
self.status = status
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
class TextAnalyticsError(_serialization.Model):
|
|
3870
|
-
"""TextAnalyticsError.
|
|
3871
|
-
|
|
3872
|
-
All required parameters must be populated in order to send to Azure.
|
|
3873
|
-
|
|
3874
|
-
:ivar code: Error code. Required. Known values are: "InvalidRequest", "InvalidArgument",
|
|
3875
|
-
"InternalServerError", "ServiceUnavailable", and "NotFound".
|
|
3876
|
-
:vartype code: str or ~azure.ai.textanalytics.v3_1.models.ErrorCodeValue
|
|
3877
|
-
:ivar message: Error message. Required.
|
|
3878
|
-
:vartype message: str
|
|
3879
|
-
:ivar target: Error target.
|
|
3880
|
-
:vartype target: str
|
|
3881
|
-
:ivar innererror: Inner error contains more specific information.
|
|
3882
|
-
:vartype innererror: ~azure.ai.textanalytics.v3_1.models.InnerError
|
|
3883
|
-
:ivar details: Details about specific errors that led to this reported error.
|
|
3884
|
-
:vartype details: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError]
|
|
3885
|
-
"""
|
|
3886
|
-
|
|
3887
|
-
_validation = {
|
|
3888
|
-
'code': {'required': True},
|
|
3889
|
-
'message': {'required': True},
|
|
3890
|
-
}
|
|
3891
|
-
|
|
3892
|
-
_attribute_map = {
|
|
3893
|
-
"code": {"key": "code", "type": "str"},
|
|
3894
|
-
"message": {"key": "message", "type": "str"},
|
|
3895
|
-
"target": {"key": "target", "type": "str"},
|
|
3896
|
-
"innererror": {"key": "innererror", "type": "InnerError"},
|
|
3897
|
-
"details": {"key": "details", "type": "[TextAnalyticsError]"},
|
|
3898
|
-
}
|
|
3899
|
-
|
|
3900
|
-
def __init__(
|
|
3901
|
-
self,
|
|
3902
|
-
*,
|
|
3903
|
-
code: Union[str, "_models.ErrorCodeValue"],
|
|
3904
|
-
message: str,
|
|
3905
|
-
target: Optional[str] = None,
|
|
3906
|
-
innererror: Optional["_models.InnerError"] = None,
|
|
3907
|
-
details: Optional[List["_models.TextAnalyticsError"]] = None,
|
|
3908
|
-
**kwargs
|
|
3909
|
-
):
|
|
3910
|
-
"""
|
|
3911
|
-
:keyword code: Error code. Required. Known values are: "InvalidRequest", "InvalidArgument",
|
|
3912
|
-
"InternalServerError", "ServiceUnavailable", and "NotFound".
|
|
3913
|
-
:paramtype code: str or ~azure.ai.textanalytics.v3_1.models.ErrorCodeValue
|
|
3914
|
-
:keyword message: Error message. Required.
|
|
3915
|
-
:paramtype message: str
|
|
3916
|
-
:keyword target: Error target.
|
|
3917
|
-
:paramtype target: str
|
|
3918
|
-
:keyword innererror: Inner error contains more specific information.
|
|
3919
|
-
:paramtype innererror: ~azure.ai.textanalytics.v3_1.models.InnerError
|
|
3920
|
-
:keyword details: Details about specific errors that led to this reported error.
|
|
3921
|
-
:paramtype details: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError]
|
|
3922
|
-
"""
|
|
3923
|
-
super().__init__(**kwargs)
|
|
3924
|
-
self.code = code
|
|
3925
|
-
self.message = message
|
|
3926
|
-
self.target = target
|
|
3927
|
-
self.innererror = innererror
|
|
3928
|
-
self.details = details
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
class TextAnalyticsWarning(_serialization.Model):
|
|
3932
|
-
"""TextAnalyticsWarning.
|
|
3933
|
-
|
|
3934
|
-
All required parameters must be populated in order to send to Azure.
|
|
3935
|
-
|
|
3936
|
-
:ivar code: Error code. Required. Known values are: "LongWordsInDocument" and
|
|
3937
|
-
"DocumentTruncated".
|
|
3938
|
-
:vartype code: str or ~azure.ai.textanalytics.v3_1.models.WarningCodeValue
|
|
3939
|
-
:ivar message: Warning message. Required.
|
|
3940
|
-
:vartype message: str
|
|
3941
|
-
:ivar target_ref: A JSON pointer reference indicating the target object.
|
|
3942
|
-
:vartype target_ref: str
|
|
3943
|
-
"""
|
|
3944
|
-
|
|
3945
|
-
_validation = {
|
|
3946
|
-
'code': {'required': True},
|
|
3947
|
-
'message': {'required': True},
|
|
3948
|
-
}
|
|
3949
|
-
|
|
3950
|
-
_attribute_map = {
|
|
3951
|
-
"code": {"key": "code", "type": "str"},
|
|
3952
|
-
"message": {"key": "message", "type": "str"},
|
|
3953
|
-
"target_ref": {"key": "targetRef", "type": "str"},
|
|
3954
|
-
}
|
|
3955
|
-
|
|
3956
|
-
def __init__(
|
|
3957
|
-
self,
|
|
3958
|
-
*,
|
|
3959
|
-
code: Union[str, "_models.WarningCodeValue"],
|
|
3960
|
-
message: str,
|
|
3961
|
-
target_ref: Optional[str] = None,
|
|
3962
|
-
**kwargs
|
|
3963
|
-
):
|
|
3964
|
-
"""
|
|
3965
|
-
:keyword code: Error code. Required. Known values are: "LongWordsInDocument" and
|
|
3966
|
-
"DocumentTruncated".
|
|
3967
|
-
:paramtype code: str or ~azure.ai.textanalytics.v3_1.models.WarningCodeValue
|
|
3968
|
-
:keyword message: Warning message. Required.
|
|
3969
|
-
:paramtype message: str
|
|
3970
|
-
:keyword target_ref: A JSON pointer reference indicating the target object.
|
|
3971
|
-
:paramtype target_ref: str
|
|
3972
|
-
"""
|
|
3973
|
-
super().__init__(**kwargs)
|
|
3974
|
-
self.code = code
|
|
3975
|
-
self.message = message
|
|
3976
|
-
self.target_ref = target_ref
|