azure-ai-textanalytics 5.3.0b1__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.

Files changed (128) hide show
  1. azure/ai/textanalytics/__init__.py +26 -197
  2. azure/ai/textanalytics/_client.py +111 -0
  3. azure/ai/textanalytics/_configuration.py +73 -0
  4. azure/ai/textanalytics/{_generated/v2022_05_01/operations → _operations}/__init__.py +13 -8
  5. azure/ai/textanalytics/_operations/_operations.py +716 -0
  6. azure/ai/textanalytics/{_generated/v2022_05_01/models → _operations}/_patch.py +8 -6
  7. azure/ai/textanalytics/_patch.py +350 -0
  8. azure/ai/textanalytics/{_generated/aio → _utils}/__init__.py +1 -5
  9. azure/ai/textanalytics/_utils/model_base.py +1237 -0
  10. azure/ai/textanalytics/{_generated/_serialization.py → _utils/serialization.py} +640 -616
  11. azure/ai/textanalytics/{_generated/v2022_05_01/aio/_vendor.py → _utils/utils.py} +10 -12
  12. azure/ai/textanalytics/_version.py +8 -7
  13. azure/ai/textanalytics/aio/__init__.py +25 -14
  14. azure/ai/textanalytics/aio/_client.py +115 -0
  15. azure/ai/textanalytics/aio/_configuration.py +75 -0
  16. azure/ai/textanalytics/{_generated/v2022_10_01_preview/aio/operations → aio/_operations}/__init__.py +13 -8
  17. azure/ai/textanalytics/aio/_operations/_operations.py +623 -0
  18. azure/ai/textanalytics/{_generated/v2022_05_01 → aio/_operations}/_patch.py +8 -6
  19. azure/ai/textanalytics/aio/_patch.py +344 -0
  20. azure/ai/textanalytics/models/__init__.py +402 -0
  21. azure/ai/textanalytics/models/_enums.py +1979 -0
  22. azure/ai/textanalytics/models/_models.py +6641 -0
  23. azure/ai/textanalytics/{_generated/v2022_05_01/aio → models}/_patch.py +8 -6
  24. azure/ai/textanalytics/py.typed +1 -0
  25. {azure_ai_textanalytics-5.3.0b1.dist-info → azure_ai_textanalytics-6.0.0b1.dist-info}/METADATA +755 -319
  26. azure_ai_textanalytics-6.0.0b1.dist-info/RECORD +29 -0
  27. {azure_ai_textanalytics-5.3.0b1.dist-info → azure_ai_textanalytics-6.0.0b1.dist-info}/WHEEL +1 -1
  28. azure/ai/textanalytics/_base_client.py +0 -111
  29. azure/ai/textanalytics/_check.py +0 -22
  30. azure/ai/textanalytics/_dict_mixin.py +0 -54
  31. azure/ai/textanalytics/_generated/__init__.py +0 -16
  32. azure/ai/textanalytics/_generated/_configuration.py +0 -70
  33. azure/ai/textanalytics/_generated/_operations_mixin.py +0 -795
  34. azure/ai/textanalytics/_generated/_text_analytics_client.py +0 -126
  35. azure/ai/textanalytics/_generated/_version.py +0 -8
  36. azure/ai/textanalytics/_generated/aio/_configuration.py +0 -66
  37. azure/ai/textanalytics/_generated/aio/_operations_mixin.py +0 -776
  38. azure/ai/textanalytics/_generated/aio/_text_analytics_client.py +0 -124
  39. azure/ai/textanalytics/_generated/models.py +0 -8
  40. azure/ai/textanalytics/_generated/v2022_05_01/__init__.py +0 -20
  41. azure/ai/textanalytics/_generated/v2022_05_01/_configuration.py +0 -72
  42. azure/ai/textanalytics/_generated/v2022_05_01/_text_analytics_client.py +0 -100
  43. azure/ai/textanalytics/_generated/v2022_05_01/_vendor.py +0 -45
  44. azure/ai/textanalytics/_generated/v2022_05_01/aio/__init__.py +0 -20
  45. azure/ai/textanalytics/_generated/v2022_05_01/aio/_configuration.py +0 -71
  46. azure/ai/textanalytics/_generated/v2022_05_01/aio/_text_analytics_client.py +0 -97
  47. azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/__init__.py +0 -18
  48. azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/_patch.py +0 -121
  49. azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/_text_analytics_client_operations.py +0 -603
  50. azure/ai/textanalytics/_generated/v2022_05_01/models/__init__.py +0 -281
  51. azure/ai/textanalytics/_generated/v2022_05_01/models/_models_py3.py +0 -5722
  52. azure/ai/textanalytics/_generated/v2022_05_01/models/_text_analytics_client_enums.py +0 -439
  53. azure/ai/textanalytics/_generated/v2022_05_01/operations/_patch.py +0 -120
  54. azure/ai/textanalytics/_generated/v2022_05_01/operations/_text_analytics_client_operations.py +0 -744
  55. azure/ai/textanalytics/_generated/v2022_10_01_preview/__init__.py +0 -20
  56. azure/ai/textanalytics/_generated/v2022_10_01_preview/_configuration.py +0 -72
  57. azure/ai/textanalytics/_generated/v2022_10_01_preview/_patch.py +0 -19
  58. azure/ai/textanalytics/_generated/v2022_10_01_preview/_text_analytics_client.py +0 -100
  59. azure/ai/textanalytics/_generated/v2022_10_01_preview/_vendor.py +0 -45
  60. azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/__init__.py +0 -20
  61. azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/_configuration.py +0 -71
  62. azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/_patch.py +0 -19
  63. azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/_text_analytics_client.py +0 -97
  64. azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/_vendor.py +0 -27
  65. azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/operations/_patch.py +0 -121
  66. azure/ai/textanalytics/_generated/v2022_10_01_preview/aio/operations/_text_analytics_client_operations.py +0 -603
  67. azure/ai/textanalytics/_generated/v2022_10_01_preview/models/__init__.py +0 -407
  68. azure/ai/textanalytics/_generated/v2022_10_01_preview/models/_models_py3.py +0 -8462
  69. azure/ai/textanalytics/_generated/v2022_10_01_preview/models/_patch.py +0 -72
  70. azure/ai/textanalytics/_generated/v2022_10_01_preview/models/_text_analytics_client_enums.py +0 -730
  71. azure/ai/textanalytics/_generated/v2022_10_01_preview/operations/__init__.py +0 -18
  72. azure/ai/textanalytics/_generated/v2022_10_01_preview/operations/_patch.py +0 -120
  73. azure/ai/textanalytics/_generated/v2022_10_01_preview/operations/_text_analytics_client_operations.py +0 -744
  74. azure/ai/textanalytics/_generated/v3_0/__init__.py +0 -20
  75. azure/ai/textanalytics/_generated/v3_0/_configuration.py +0 -66
  76. azure/ai/textanalytics/_generated/v3_0/_patch.py +0 -31
  77. azure/ai/textanalytics/_generated/v3_0/_text_analytics_client.py +0 -96
  78. azure/ai/textanalytics/_generated/v3_0/_vendor.py +0 -33
  79. azure/ai/textanalytics/_generated/v3_0/aio/__init__.py +0 -20
  80. azure/ai/textanalytics/_generated/v3_0/aio/_configuration.py +0 -65
  81. azure/ai/textanalytics/_generated/v3_0/aio/_patch.py +0 -31
  82. azure/ai/textanalytics/_generated/v3_0/aio/_text_analytics_client.py +0 -93
  83. azure/ai/textanalytics/_generated/v3_0/aio/_vendor.py +0 -27
  84. azure/ai/textanalytics/_generated/v3_0/aio/operations/__init__.py +0 -18
  85. azure/ai/textanalytics/_generated/v3_0/aio/operations/_patch.py +0 -19
  86. azure/ai/textanalytics/_generated/v3_0/aio/operations/_text_analytics_client_operations.py +0 -428
  87. azure/ai/textanalytics/_generated/v3_0/models/__init__.py +0 -81
  88. azure/ai/textanalytics/_generated/v3_0/models/_models_py3.py +0 -1467
  89. azure/ai/textanalytics/_generated/v3_0/models/_patch.py +0 -19
  90. azure/ai/textanalytics/_generated/v3_0/models/_text_analytics_client_enums.py +0 -58
  91. azure/ai/textanalytics/_generated/v3_0/operations/__init__.py +0 -18
  92. azure/ai/textanalytics/_generated/v3_0/operations/_patch.py +0 -19
  93. azure/ai/textanalytics/_generated/v3_0/operations/_text_analytics_client_operations.py +0 -604
  94. azure/ai/textanalytics/_generated/v3_1/__init__.py +0 -20
  95. azure/ai/textanalytics/_generated/v3_1/_configuration.py +0 -66
  96. azure/ai/textanalytics/_generated/v3_1/_patch.py +0 -31
  97. azure/ai/textanalytics/_generated/v3_1/_text_analytics_client.py +0 -98
  98. azure/ai/textanalytics/_generated/v3_1/_vendor.py +0 -45
  99. azure/ai/textanalytics/_generated/v3_1/aio/__init__.py +0 -20
  100. azure/ai/textanalytics/_generated/v3_1/aio/_configuration.py +0 -65
  101. azure/ai/textanalytics/_generated/v3_1/aio/_patch.py +0 -31
  102. azure/ai/textanalytics/_generated/v3_1/aio/_text_analytics_client.py +0 -95
  103. azure/ai/textanalytics/_generated/v3_1/aio/_vendor.py +0 -27
  104. azure/ai/textanalytics/_generated/v3_1/aio/operations/__init__.py +0 -18
  105. azure/ai/textanalytics/_generated/v3_1/aio/operations/_patch.py +0 -19
  106. azure/ai/textanalytics/_generated/v3_1/aio/operations/_text_analytics_client_operations.py +0 -1291
  107. azure/ai/textanalytics/_generated/v3_1/models/__init__.py +0 -205
  108. azure/ai/textanalytics/_generated/v3_1/models/_models_py3.py +0 -3976
  109. azure/ai/textanalytics/_generated/v3_1/models/_patch.py +0 -19
  110. azure/ai/textanalytics/_generated/v3_1/models/_text_analytics_client_enums.py +0 -367
  111. azure/ai/textanalytics/_generated/v3_1/operations/__init__.py +0 -18
  112. azure/ai/textanalytics/_generated/v3_1/operations/_patch.py +0 -19
  113. azure/ai/textanalytics/_generated/v3_1/operations/_text_analytics_client_operations.py +0 -1709
  114. azure/ai/textanalytics/_lro.py +0 -552
  115. azure/ai/textanalytics/_models.py +0 -3142
  116. azure/ai/textanalytics/_policies.py +0 -66
  117. azure/ai/textanalytics/_request_handlers.py +0 -104
  118. azure/ai/textanalytics/_response_handlers.py +0 -580
  119. azure/ai/textanalytics/_text_analytics_client.py +0 -1802
  120. azure/ai/textanalytics/_user_agent.py +0 -8
  121. azure/ai/textanalytics/_validate.py +0 -113
  122. azure/ai/textanalytics/aio/_base_client_async.py +0 -95
  123. azure/ai/textanalytics/aio/_lro_async.py +0 -501
  124. azure/ai/textanalytics/aio/_response_handlers_async.py +0 -94
  125. azure/ai/textanalytics/aio/_text_analytics_client_async.py +0 -1800
  126. azure_ai_textanalytics-5.3.0b1.dist-info/RECORD +0 -115
  127. {azure_ai_textanalytics-5.3.0b1.dist-info → azure_ai_textanalytics-6.0.0b1.dist-info/licenses}/LICENSE +0 -0
  128. {azure_ai_textanalytics-5.3.0b1.dist-info → azure_ai_textanalytics-6.0.0b1.dist-info}/top_level.txt +0 -0
@@ -1,1467 +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
- from typing import Dict, List, Optional, TYPE_CHECKING, Union
11
-
12
- from ... import _serialization
13
-
14
- if TYPE_CHECKING:
15
- # pylint: disable=unused-import,ungrouped-imports
16
- from .. import models as _models
17
-
18
-
19
- class DetectedLanguage(_serialization.Model):
20
- """DetectedLanguage.
21
-
22
- All required parameters must be populated in order to send to Azure.
23
-
24
- :ivar name: Long name of a detected language (e.g. English, French). Required.
25
- :vartype name: str
26
- :ivar iso6391_name: A two letter representation of the detected language according to the ISO
27
- 639-1 standard (e.g. en, fr). Required.
28
- :vartype iso6391_name: str
29
- :ivar confidence_score: A confidence score between 0 and 1. Scores close to 1 indicate 100%
30
- certainty that the identified language is true. Required.
31
- :vartype confidence_score: float
32
- """
33
-
34
- _validation = {
35
- 'name': {'required': True},
36
- 'iso6391_name': {'required': True},
37
- 'confidence_score': {'required': True},
38
- }
39
-
40
- _attribute_map = {
41
- "name": {"key": "name", "type": "str"},
42
- "iso6391_name": {"key": "iso6391Name", "type": "str"},
43
- "confidence_score": {"key": "confidenceScore", "type": "float"},
44
- }
45
-
46
- def __init__(
47
- self,
48
- *,
49
- name: str,
50
- iso6391_name: str,
51
- confidence_score: float,
52
- **kwargs
53
- ):
54
- """
55
- :keyword name: Long name of a detected language (e.g. English, French). Required.
56
- :paramtype name: str
57
- :keyword iso6391_name: A two letter representation of the detected language according to the
58
- ISO 639-1 standard (e.g. en, fr). Required.
59
- :paramtype iso6391_name: str
60
- :keyword confidence_score: A confidence score between 0 and 1. Scores close to 1 indicate 100%
61
- certainty that the identified language is true. Required.
62
- :paramtype confidence_score: float
63
- """
64
- super().__init__(**kwargs)
65
- self.name = name
66
- self.iso6391_name = iso6391_name
67
- self.confidence_score = confidence_score
68
-
69
-
70
- class DocumentEntities(_serialization.Model):
71
- """DocumentEntities.
72
-
73
- All required parameters must be populated in order to send to Azure.
74
-
75
- :ivar id: Unique, non-empty document identifier. Required.
76
- :vartype id: str
77
- :ivar entities: Recognized entities in the document. Required.
78
- :vartype entities: list[~azure.ai.textanalytics.v3_0.models.Entity]
79
- :ivar warnings: Warnings encountered while processing document. Required.
80
- :vartype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning]
81
- :ivar statistics: if showStats=true was specified in the request this field will contain
82
- information about the document payload.
83
- :vartype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics
84
- """
85
-
86
- _validation = {
87
- 'id': {'required': True},
88
- 'entities': {'required': True},
89
- 'warnings': {'required': True},
90
- }
91
-
92
- _attribute_map = {
93
- "id": {"key": "id", "type": "str"},
94
- "entities": {"key": "entities", "type": "[Entity]"},
95
- "warnings": {"key": "warnings", "type": "[TextAnalyticsWarning]"},
96
- "statistics": {"key": "statistics", "type": "DocumentStatistics"},
97
- }
98
-
99
- def __init__(
100
- self,
101
- *,
102
- id: str, # pylint: disable=redefined-builtin
103
- entities: List["_models.Entity"],
104
- warnings: List["_models.TextAnalyticsWarning"],
105
- statistics: Optional["_models.DocumentStatistics"] = None,
106
- **kwargs
107
- ):
108
- """
109
- :keyword id: Unique, non-empty document identifier. Required.
110
- :paramtype id: str
111
- :keyword entities: Recognized entities in the document. Required.
112
- :paramtype entities: list[~azure.ai.textanalytics.v3_0.models.Entity]
113
- :keyword warnings: Warnings encountered while processing document. Required.
114
- :paramtype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning]
115
- :keyword statistics: if showStats=true was specified in the request this field will contain
116
- information about the document payload.
117
- :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics
118
- """
119
- super().__init__(**kwargs)
120
- self.id = id
121
- self.entities = entities
122
- self.warnings = warnings
123
- self.statistics = statistics
124
-
125
-
126
- class DocumentError(_serialization.Model):
127
- """DocumentError.
128
-
129
- All required parameters must be populated in order to send to Azure.
130
-
131
- :ivar id: Document Id. Required.
132
- :vartype id: str
133
- :ivar error: Document Error. Required.
134
- :vartype error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError
135
- """
136
-
137
- _validation = {
138
- 'id': {'required': True},
139
- 'error': {'required': True},
140
- }
141
-
142
- _attribute_map = {
143
- "id": {"key": "id", "type": "str"},
144
- "error": {"key": "error", "type": "TextAnalyticsError"},
145
- }
146
-
147
- def __init__(
148
- self,
149
- *,
150
- id: str, # pylint: disable=redefined-builtin
151
- error: "_models.TextAnalyticsError",
152
- **kwargs
153
- ):
154
- """
155
- :keyword id: Document Id. Required.
156
- :paramtype id: str
157
- :keyword error: Document Error. Required.
158
- :paramtype error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError
159
- """
160
- super().__init__(**kwargs)
161
- self.id = id
162
- self.error = error
163
-
164
-
165
- class DocumentKeyPhrases(_serialization.Model):
166
- """DocumentKeyPhrases.
167
-
168
- All required parameters must be populated in order to send to Azure.
169
-
170
- :ivar id: Unique, non-empty document identifier. Required.
171
- :vartype id: str
172
- :ivar key_phrases: A list of representative words or phrases. The number of key phrases
173
- returned is proportional to the number of words in the input document. Required.
174
- :vartype key_phrases: list[str]
175
- :ivar warnings: Warnings encountered while processing document. Required.
176
- :vartype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning]
177
- :ivar statistics: if showStats=true was specified in the request this field will contain
178
- information about the document payload.
179
- :vartype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics
180
- """
181
-
182
- _validation = {
183
- 'id': {'required': True},
184
- 'key_phrases': {'required': True},
185
- 'warnings': {'required': True},
186
- }
187
-
188
- _attribute_map = {
189
- "id": {"key": "id", "type": "str"},
190
- "key_phrases": {"key": "keyPhrases", "type": "[str]"},
191
- "warnings": {"key": "warnings", "type": "[TextAnalyticsWarning]"},
192
- "statistics": {"key": "statistics", "type": "DocumentStatistics"},
193
- }
194
-
195
- def __init__(
196
- self,
197
- *,
198
- id: str, # pylint: disable=redefined-builtin
199
- key_phrases: List[str],
200
- warnings: List["_models.TextAnalyticsWarning"],
201
- statistics: Optional["_models.DocumentStatistics"] = None,
202
- **kwargs
203
- ):
204
- """
205
- :keyword id: Unique, non-empty document identifier. Required.
206
- :paramtype id: str
207
- :keyword key_phrases: A list of representative words or phrases. The number of key phrases
208
- returned is proportional to the number of words in the input document. Required.
209
- :paramtype key_phrases: list[str]
210
- :keyword warnings: Warnings encountered while processing document. Required.
211
- :paramtype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning]
212
- :keyword statistics: if showStats=true was specified in the request this field will contain
213
- information about the document payload.
214
- :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics
215
- """
216
- super().__init__(**kwargs)
217
- self.id = id
218
- self.key_phrases = key_phrases
219
- self.warnings = warnings
220
- self.statistics = statistics
221
-
222
-
223
- class DocumentLanguage(_serialization.Model):
224
- """DocumentLanguage.
225
-
226
- All required parameters must be populated in order to send to Azure.
227
-
228
- :ivar id: Unique, non-empty document identifier. Required.
229
- :vartype id: str
230
- :ivar detected_language: Detected Language. Required.
231
- :vartype detected_language: ~azure.ai.textanalytics.v3_0.models.DetectedLanguage
232
- :ivar warnings: Warnings encountered while processing document. Required.
233
- :vartype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning]
234
- :ivar statistics: if showStats=true was specified in the request this field will contain
235
- information about the document payload.
236
- :vartype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics
237
- """
238
-
239
- _validation = {
240
- 'id': {'required': True},
241
- 'detected_language': {'required': True},
242
- 'warnings': {'required': True},
243
- }
244
-
245
- _attribute_map = {
246
- "id": {"key": "id", "type": "str"},
247
- "detected_language": {"key": "detectedLanguage", "type": "DetectedLanguage"},
248
- "warnings": {"key": "warnings", "type": "[TextAnalyticsWarning]"},
249
- "statistics": {"key": "statistics", "type": "DocumentStatistics"},
250
- }
251
-
252
- def __init__(
253
- self,
254
- *,
255
- id: str, # pylint: disable=redefined-builtin
256
- detected_language: "_models.DetectedLanguage",
257
- warnings: List["_models.TextAnalyticsWarning"],
258
- statistics: Optional["_models.DocumentStatistics"] = None,
259
- **kwargs
260
- ):
261
- """
262
- :keyword id: Unique, non-empty document identifier. Required.
263
- :paramtype id: str
264
- :keyword detected_language: Detected Language. Required.
265
- :paramtype detected_language: ~azure.ai.textanalytics.v3_0.models.DetectedLanguage
266
- :keyword warnings: Warnings encountered while processing document. Required.
267
- :paramtype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning]
268
- :keyword statistics: if showStats=true was specified in the request this field will contain
269
- information about the document payload.
270
- :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics
271
- """
272
- super().__init__(**kwargs)
273
- self.id = id
274
- self.detected_language = detected_language
275
- self.warnings = warnings
276
- self.statistics = statistics
277
-
278
-
279
- class DocumentLinkedEntities(_serialization.Model):
280
- """DocumentLinkedEntities.
281
-
282
- All required parameters must be populated in order to send to Azure.
283
-
284
- :ivar id: Unique, non-empty document identifier. Required.
285
- :vartype id: str
286
- :ivar entities: Recognized well-known entities in the document. Required.
287
- :vartype entities: list[~azure.ai.textanalytics.v3_0.models.LinkedEntity]
288
- :ivar warnings: Warnings encountered while processing document. Required.
289
- :vartype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning]
290
- :ivar statistics: if showStats=true was specified in the request this field will contain
291
- information about the document payload.
292
- :vartype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics
293
- """
294
-
295
- _validation = {
296
- 'id': {'required': True},
297
- 'entities': {'required': True},
298
- 'warnings': {'required': True},
299
- }
300
-
301
- _attribute_map = {
302
- "id": {"key": "id", "type": "str"},
303
- "entities": {"key": "entities", "type": "[LinkedEntity]"},
304
- "warnings": {"key": "warnings", "type": "[TextAnalyticsWarning]"},
305
- "statistics": {"key": "statistics", "type": "DocumentStatistics"},
306
- }
307
-
308
- def __init__(
309
- self,
310
- *,
311
- id: str, # pylint: disable=redefined-builtin
312
- entities: List["_models.LinkedEntity"],
313
- warnings: List["_models.TextAnalyticsWarning"],
314
- statistics: Optional["_models.DocumentStatistics"] = None,
315
- **kwargs
316
- ):
317
- """
318
- :keyword id: Unique, non-empty document identifier. Required.
319
- :paramtype id: str
320
- :keyword entities: Recognized well-known entities in the document. Required.
321
- :paramtype entities: list[~azure.ai.textanalytics.v3_0.models.LinkedEntity]
322
- :keyword warnings: Warnings encountered while processing document. Required.
323
- :paramtype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning]
324
- :keyword statistics: if showStats=true was specified in the request this field will contain
325
- information about the document payload.
326
- :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics
327
- """
328
- super().__init__(**kwargs)
329
- self.id = id
330
- self.entities = entities
331
- self.warnings = warnings
332
- self.statistics = statistics
333
-
334
-
335
- class DocumentSentiment(_serialization.Model):
336
- """DocumentSentiment.
337
-
338
- All required parameters must be populated in order to send to Azure.
339
-
340
- :ivar id: Unique, non-empty document identifier. Required.
341
- :vartype id: str
342
- :ivar sentiment: Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).
343
- Required. Known values are: "positive", "neutral", "negative", and "mixed".
344
- :vartype sentiment: str or ~azure.ai.textanalytics.v3_0.models.DocumentSentimentValue
345
- :ivar statistics: if showStats=true was specified in the request this field will contain
346
- information about the document payload.
347
- :vartype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics
348
- :ivar confidence_scores: Document level sentiment confidence scores between 0 and 1 for each
349
- sentiment class. Required.
350
- :vartype confidence_scores:
351
- ~azure.ai.textanalytics.v3_0.models.SentimentConfidenceScorePerLabel
352
- :ivar sentences: Sentence level sentiment analysis. Required.
353
- :vartype sentences: list[~azure.ai.textanalytics.v3_0.models.SentenceSentiment]
354
- :ivar warnings: Warnings encountered while processing document. Required.
355
- :vartype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning]
356
- """
357
-
358
- _validation = {
359
- 'id': {'required': True},
360
- 'sentiment': {'required': True},
361
- 'confidence_scores': {'required': True},
362
- 'sentences': {'required': True},
363
- 'warnings': {'required': True},
364
- }
365
-
366
- _attribute_map = {
367
- "id": {"key": "id", "type": "str"},
368
- "sentiment": {"key": "sentiment", "type": "str"},
369
- "statistics": {"key": "statistics", "type": "DocumentStatistics"},
370
- "confidence_scores": {"key": "confidenceScores", "type": "SentimentConfidenceScorePerLabel"},
371
- "sentences": {"key": "sentences", "type": "[SentenceSentiment]"},
372
- "warnings": {"key": "warnings", "type": "[TextAnalyticsWarning]"},
373
- }
374
-
375
- def __init__(
376
- self,
377
- *,
378
- id: str, # pylint: disable=redefined-builtin
379
- sentiment: Union[str, "_models.DocumentSentimentValue"],
380
- confidence_scores: "_models.SentimentConfidenceScorePerLabel",
381
- sentences: List["_models.SentenceSentiment"],
382
- warnings: List["_models.TextAnalyticsWarning"],
383
- statistics: Optional["_models.DocumentStatistics"] = None,
384
- **kwargs
385
- ):
386
- """
387
- :keyword id: Unique, non-empty document identifier. Required.
388
- :paramtype id: str
389
- :keyword sentiment: Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).
390
- Required. Known values are: "positive", "neutral", "negative", and "mixed".
391
- :paramtype sentiment: str or ~azure.ai.textanalytics.v3_0.models.DocumentSentimentValue
392
- :keyword statistics: if showStats=true was specified in the request this field will contain
393
- information about the document payload.
394
- :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics
395
- :keyword confidence_scores: Document level sentiment confidence scores between 0 and 1 for each
396
- sentiment class. Required.
397
- :paramtype confidence_scores:
398
- ~azure.ai.textanalytics.v3_0.models.SentimentConfidenceScorePerLabel
399
- :keyword sentences: Sentence level sentiment analysis. Required.
400
- :paramtype sentences: list[~azure.ai.textanalytics.v3_0.models.SentenceSentiment]
401
- :keyword warnings: Warnings encountered while processing document. Required.
402
- :paramtype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning]
403
- """
404
- super().__init__(**kwargs)
405
- self.id = id
406
- self.sentiment = sentiment
407
- self.statistics = statistics
408
- self.confidence_scores = confidence_scores
409
- self.sentences = sentences
410
- self.warnings = warnings
411
-
412
-
413
- class DocumentStatistics(_serialization.Model):
414
- """if showStats=true was specified in the request this field will contain information about the document payload.
415
-
416
- All required parameters must be populated in order to send to Azure.
417
-
418
- :ivar characters_count: Number of text elements recognized in the document. Required.
419
- :vartype characters_count: int
420
- :ivar transactions_count: Number of transactions for the document. Required.
421
- :vartype transactions_count: int
422
- """
423
-
424
- _validation = {
425
- 'characters_count': {'required': True},
426
- 'transactions_count': {'required': True},
427
- }
428
-
429
- _attribute_map = {
430
- "characters_count": {"key": "charactersCount", "type": "int"},
431
- "transactions_count": {"key": "transactionsCount", "type": "int"},
432
- }
433
-
434
- def __init__(
435
- self,
436
- *,
437
- characters_count: int,
438
- transactions_count: int,
439
- **kwargs
440
- ):
441
- """
442
- :keyword characters_count: Number of text elements recognized in the document. Required.
443
- :paramtype characters_count: int
444
- :keyword transactions_count: Number of transactions for the document. Required.
445
- :paramtype transactions_count: int
446
- """
447
- super().__init__(**kwargs)
448
- self.characters_count = characters_count
449
- self.transactions_count = transactions_count
450
-
451
-
452
- class EntitiesResult(_serialization.Model):
453
- """EntitiesResult.
454
-
455
- All required parameters must be populated in order to send to Azure.
456
-
457
- :ivar documents: Response by document. Required.
458
- :vartype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentEntities]
459
- :ivar errors: Errors by document id. Required.
460
- :vartype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError]
461
- :ivar statistics: if showStats=true was specified in the request this field will contain
462
- information about the request payload.
463
- :vartype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics
464
- :ivar model_version: This field indicates which model is used for scoring. Required.
465
- :vartype model_version: str
466
- """
467
-
468
- _validation = {
469
- 'documents': {'required': True},
470
- 'errors': {'required': True},
471
- 'model_version': {'required': True},
472
- }
473
-
474
- _attribute_map = {
475
- "documents": {"key": "documents", "type": "[DocumentEntities]"},
476
- "errors": {"key": "errors", "type": "[DocumentError]"},
477
- "statistics": {"key": "statistics", "type": "RequestStatistics"},
478
- "model_version": {"key": "modelVersion", "type": "str"},
479
- }
480
-
481
- def __init__(
482
- self,
483
- *,
484
- documents: List["_models.DocumentEntities"],
485
- errors: List["_models.DocumentError"],
486
- model_version: str,
487
- statistics: Optional["_models.RequestStatistics"] = None,
488
- **kwargs
489
- ):
490
- """
491
- :keyword documents: Response by document. Required.
492
- :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentEntities]
493
- :keyword errors: Errors by document id. Required.
494
- :paramtype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError]
495
- :keyword statistics: if showStats=true was specified in the request this field will contain
496
- information about the request payload.
497
- :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics
498
- :keyword model_version: This field indicates which model is used for scoring. Required.
499
- :paramtype model_version: str
500
- """
501
- super().__init__(**kwargs)
502
- self.documents = documents
503
- self.errors = errors
504
- self.statistics = statistics
505
- self.model_version = model_version
506
-
507
-
508
- class Entity(_serialization.Model):
509
- """Entity.
510
-
511
- All required parameters must be populated in order to send to Azure.
512
-
513
- :ivar text: Entity text as appears in the request. Required.
514
- :vartype text: str
515
- :ivar category: Entity type, such as Person/Location/Org/SSN etc. Required.
516
- :vartype category: str
517
- :ivar subcategory: Entity sub type, such as Age/Year/TimeRange etc.
518
- :vartype subcategory: str
519
- :ivar offset: Start position (in Unicode characters) for the entity text. Required.
520
- :vartype offset: int
521
- :ivar length: Length (in Unicode characters) for the entity text. Required.
522
- :vartype length: int
523
- :ivar confidence_score: Confidence score between 0 and 1 of the extracted entity. Required.
524
- :vartype confidence_score: float
525
- """
526
-
527
- _validation = {
528
- 'text': {'required': True},
529
- 'category': {'required': True},
530
- 'offset': {'required': True},
531
- 'length': {'required': True},
532
- 'confidence_score': {'required': True},
533
- }
534
-
535
- _attribute_map = {
536
- "text": {"key": "text", "type": "str"},
537
- "category": {"key": "category", "type": "str"},
538
- "subcategory": {"key": "subcategory", "type": "str"},
539
- "offset": {"key": "offset", "type": "int"},
540
- "length": {"key": "length", "type": "int"},
541
- "confidence_score": {"key": "confidenceScore", "type": "float"},
542
- }
543
-
544
- def __init__(
545
- self,
546
- *,
547
- text: str,
548
- category: str,
549
- offset: int,
550
- length: int,
551
- confidence_score: float,
552
- subcategory: Optional[str] = None,
553
- **kwargs
554
- ):
555
- """
556
- :keyword text: Entity text as appears in the request. Required.
557
- :paramtype text: str
558
- :keyword category: Entity type, such as Person/Location/Org/SSN etc. Required.
559
- :paramtype category: str
560
- :keyword subcategory: Entity sub type, such as Age/Year/TimeRange etc.
561
- :paramtype subcategory: str
562
- :keyword offset: Start position (in Unicode characters) for the entity text. Required.
563
- :paramtype offset: int
564
- :keyword length: Length (in Unicode characters) for the entity text. Required.
565
- :paramtype length: int
566
- :keyword confidence_score: Confidence score between 0 and 1 of the extracted entity. Required.
567
- :paramtype confidence_score: float
568
- """
569
- super().__init__(**kwargs)
570
- self.text = text
571
- self.category = category
572
- self.subcategory = subcategory
573
- self.offset = offset
574
- self.length = length
575
- self.confidence_score = confidence_score
576
-
577
-
578
- class EntityLinkingResult(_serialization.Model):
579
- """EntityLinkingResult.
580
-
581
- All required parameters must be populated in order to send to Azure.
582
-
583
- :ivar documents: Response by document. Required.
584
- :vartype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentLinkedEntities]
585
- :ivar errors: Errors by document id. Required.
586
- :vartype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError]
587
- :ivar statistics: if showStats=true was specified in the request this field will contain
588
- information about the request payload.
589
- :vartype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics
590
- :ivar model_version: This field indicates which model is used for scoring. Required.
591
- :vartype model_version: str
592
- """
593
-
594
- _validation = {
595
- 'documents': {'required': True},
596
- 'errors': {'required': True},
597
- 'model_version': {'required': True},
598
- }
599
-
600
- _attribute_map = {
601
- "documents": {"key": "documents", "type": "[DocumentLinkedEntities]"},
602
- "errors": {"key": "errors", "type": "[DocumentError]"},
603
- "statistics": {"key": "statistics", "type": "RequestStatistics"},
604
- "model_version": {"key": "modelVersion", "type": "str"},
605
- }
606
-
607
- def __init__(
608
- self,
609
- *,
610
- documents: List["_models.DocumentLinkedEntities"],
611
- errors: List["_models.DocumentError"],
612
- model_version: str,
613
- statistics: Optional["_models.RequestStatistics"] = None,
614
- **kwargs
615
- ):
616
- """
617
- :keyword documents: Response by document. Required.
618
- :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentLinkedEntities]
619
- :keyword errors: Errors by document id. Required.
620
- :paramtype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError]
621
- :keyword statistics: if showStats=true was specified in the request this field will contain
622
- information about the request payload.
623
- :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics
624
- :keyword model_version: This field indicates which model is used for scoring. Required.
625
- :paramtype model_version: str
626
- """
627
- super().__init__(**kwargs)
628
- self.documents = documents
629
- self.errors = errors
630
- self.statistics = statistics
631
- self.model_version = model_version
632
-
633
-
634
- class ErrorResponse(_serialization.Model):
635
- """ErrorResponse.
636
-
637
- All required parameters must be populated in order to send to Azure.
638
-
639
- :ivar error: Document Error. Required.
640
- :vartype error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError
641
- """
642
-
643
- _validation = {
644
- 'error': {'required': True},
645
- }
646
-
647
- _attribute_map = {
648
- "error": {"key": "error", "type": "TextAnalyticsError"},
649
- }
650
-
651
- def __init__(
652
- self,
653
- *,
654
- error: "_models.TextAnalyticsError",
655
- **kwargs
656
- ):
657
- """
658
- :keyword error: Document Error. Required.
659
- :paramtype error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError
660
- """
661
- super().__init__(**kwargs)
662
- self.error = error
663
-
664
-
665
- class InnerError(_serialization.Model):
666
- """InnerError.
667
-
668
- All required parameters must be populated in order to send to Azure.
669
-
670
- :ivar code: Error code. Required. Known values are: "invalidParameterValue",
671
- "invalidRequestBodyFormat", "emptyRequest", "missingInputRecords", "invalidDocument",
672
- "modelVersionIncorrect", "invalidDocumentBatch", "unsupportedLanguageCode", and
673
- "invalidCountryHint".
674
- :vartype code: str or ~azure.ai.textanalytics.v3_0.models.InnerErrorCodeValue
675
- :ivar message: Error message. Required.
676
- :vartype message: str
677
- :ivar details: Error details.
678
- :vartype details: dict[str, str]
679
- :ivar target: Error target.
680
- :vartype target: str
681
- :ivar innererror: Inner error contains more specific information.
682
- :vartype innererror: ~azure.ai.textanalytics.v3_0.models.InnerError
683
- """
684
-
685
- _validation = {
686
- 'code': {'required': True},
687
- 'message': {'required': True},
688
- }
689
-
690
- _attribute_map = {
691
- "code": {"key": "code", "type": "str"},
692
- "message": {"key": "message", "type": "str"},
693
- "details": {"key": "details", "type": "{str}"},
694
- "target": {"key": "target", "type": "str"},
695
- "innererror": {"key": "innererror", "type": "InnerError"},
696
- }
697
-
698
- def __init__(
699
- self,
700
- *,
701
- code: Union[str, "_models.InnerErrorCodeValue"],
702
- message: str,
703
- details: Optional[Dict[str, str]] = None,
704
- target: Optional[str] = None,
705
- innererror: Optional["_models.InnerError"] = None,
706
- **kwargs
707
- ):
708
- """
709
- :keyword code: Error code. Required. Known values are: "invalidParameterValue",
710
- "invalidRequestBodyFormat", "emptyRequest", "missingInputRecords", "invalidDocument",
711
- "modelVersionIncorrect", "invalidDocumentBatch", "unsupportedLanguageCode", and
712
- "invalidCountryHint".
713
- :paramtype code: str or ~azure.ai.textanalytics.v3_0.models.InnerErrorCodeValue
714
- :keyword message: Error message. Required.
715
- :paramtype message: str
716
- :keyword details: Error details.
717
- :paramtype details: dict[str, str]
718
- :keyword target: Error target.
719
- :paramtype target: str
720
- :keyword innererror: Inner error contains more specific information.
721
- :paramtype innererror: ~azure.ai.textanalytics.v3_0.models.InnerError
722
- """
723
- super().__init__(**kwargs)
724
- self.code = code
725
- self.message = message
726
- self.details = details
727
- self.target = target
728
- self.innererror = innererror
729
-
730
-
731
- class KeyPhraseResult(_serialization.Model):
732
- """KeyPhraseResult.
733
-
734
- All required parameters must be populated in order to send to Azure.
735
-
736
- :ivar documents: Response by document. Required.
737
- :vartype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentKeyPhrases]
738
- :ivar errors: Errors by document id. Required.
739
- :vartype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError]
740
- :ivar statistics: if showStats=true was specified in the request this field will contain
741
- information about the request payload.
742
- :vartype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics
743
- :ivar model_version: This field indicates which model is used for scoring. Required.
744
- :vartype model_version: str
745
- """
746
-
747
- _validation = {
748
- 'documents': {'required': True},
749
- 'errors': {'required': True},
750
- 'model_version': {'required': True},
751
- }
752
-
753
- _attribute_map = {
754
- "documents": {"key": "documents", "type": "[DocumentKeyPhrases]"},
755
- "errors": {"key": "errors", "type": "[DocumentError]"},
756
- "statistics": {"key": "statistics", "type": "RequestStatistics"},
757
- "model_version": {"key": "modelVersion", "type": "str"},
758
- }
759
-
760
- def __init__(
761
- self,
762
- *,
763
- documents: List["_models.DocumentKeyPhrases"],
764
- errors: List["_models.DocumentError"],
765
- model_version: str,
766
- statistics: Optional["_models.RequestStatistics"] = None,
767
- **kwargs
768
- ):
769
- """
770
- :keyword documents: Response by document. Required.
771
- :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentKeyPhrases]
772
- :keyword errors: Errors by document id. Required.
773
- :paramtype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError]
774
- :keyword statistics: if showStats=true was specified in the request this field will contain
775
- information about the request payload.
776
- :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics
777
- :keyword model_version: This field indicates which model is used for scoring. Required.
778
- :paramtype model_version: str
779
- """
780
- super().__init__(**kwargs)
781
- self.documents = documents
782
- self.errors = errors
783
- self.statistics = statistics
784
- self.model_version = model_version
785
-
786
-
787
- class LanguageBatchInput(_serialization.Model):
788
- """LanguageBatchInput.
789
-
790
- All required parameters must be populated in order to send to Azure.
791
-
792
- :ivar documents: Required.
793
- :vartype documents: list[~azure.ai.textanalytics.v3_0.models.LanguageInput]
794
- """
795
-
796
- _validation = {
797
- 'documents': {'required': True},
798
- }
799
-
800
- _attribute_map = {
801
- "documents": {"key": "documents", "type": "[LanguageInput]"},
802
- }
803
-
804
- def __init__(
805
- self,
806
- *,
807
- documents: List["_models.LanguageInput"],
808
- **kwargs
809
- ):
810
- """
811
- :keyword documents: Required.
812
- :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.LanguageInput]
813
- """
814
- super().__init__(**kwargs)
815
- self.documents = documents
816
-
817
-
818
- class LanguageInput(_serialization.Model):
819
- """LanguageInput.
820
-
821
- All required parameters must be populated in order to send to Azure.
822
-
823
- :ivar id: Unique, non-empty document identifier. Required.
824
- :vartype id: str
825
- :ivar text: Required.
826
- :vartype text: str
827
- :ivar country_hint:
828
- :vartype country_hint: str
829
- """
830
-
831
- _validation = {
832
- 'id': {'required': True},
833
- 'text': {'required': True},
834
- }
835
-
836
- _attribute_map = {
837
- "id": {"key": "id", "type": "str"},
838
- "text": {"key": "text", "type": "str"},
839
- "country_hint": {"key": "countryHint", "type": "str"},
840
- }
841
-
842
- def __init__(
843
- self,
844
- *,
845
- id: str, # pylint: disable=redefined-builtin
846
- text: str,
847
- country_hint: Optional[str] = None,
848
- **kwargs
849
- ):
850
- """
851
- :keyword id: Unique, non-empty document identifier. Required.
852
- :paramtype id: str
853
- :keyword text: Required.
854
- :paramtype text: str
855
- :keyword country_hint:
856
- :paramtype country_hint: str
857
- """
858
- super().__init__(**kwargs)
859
- self.id = id
860
- self.text = text
861
- self.country_hint = country_hint
862
-
863
-
864
- class LanguageResult(_serialization.Model):
865
- """LanguageResult.
866
-
867
- All required parameters must be populated in order to send to Azure.
868
-
869
- :ivar documents: Response by document. Required.
870
- :vartype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentLanguage]
871
- :ivar errors: Errors by document id. Required.
872
- :vartype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError]
873
- :ivar statistics: if showStats=true was specified in the request this field will contain
874
- information about the request payload.
875
- :vartype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics
876
- :ivar model_version: This field indicates which model is used for scoring. Required.
877
- :vartype model_version: str
878
- """
879
-
880
- _validation = {
881
- 'documents': {'required': True},
882
- 'errors': {'required': True},
883
- 'model_version': {'required': True},
884
- }
885
-
886
- _attribute_map = {
887
- "documents": {"key": "documents", "type": "[DocumentLanguage]"},
888
- "errors": {"key": "errors", "type": "[DocumentError]"},
889
- "statistics": {"key": "statistics", "type": "RequestStatistics"},
890
- "model_version": {"key": "modelVersion", "type": "str"},
891
- }
892
-
893
- def __init__(
894
- self,
895
- *,
896
- documents: List["_models.DocumentLanguage"],
897
- errors: List["_models.DocumentError"],
898
- model_version: str,
899
- statistics: Optional["_models.RequestStatistics"] = None,
900
- **kwargs
901
- ):
902
- """
903
- :keyword documents: Response by document. Required.
904
- :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentLanguage]
905
- :keyword errors: Errors by document id. Required.
906
- :paramtype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError]
907
- :keyword statistics: if showStats=true was specified in the request this field will contain
908
- information about the request payload.
909
- :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics
910
- :keyword model_version: This field indicates which model is used for scoring. Required.
911
- :paramtype model_version: str
912
- """
913
- super().__init__(**kwargs)
914
- self.documents = documents
915
- self.errors = errors
916
- self.statistics = statistics
917
- self.model_version = model_version
918
-
919
-
920
- class LinkedEntity(_serialization.Model):
921
- """LinkedEntity.
922
-
923
- All required parameters must be populated in order to send to Azure.
924
-
925
- :ivar name: Entity Linking formal name. Required.
926
- :vartype name: str
927
- :ivar matches: List of instances this entity appears in the text. Required.
928
- :vartype matches: list[~azure.ai.textanalytics.v3_0.models.Match]
929
- :ivar language: Language used in the data source. Required.
930
- :vartype language: str
931
- :ivar id: Unique identifier of the recognized entity from the data source.
932
- :vartype id: str
933
- :ivar url: URL for the entity's page from the data source. Required.
934
- :vartype url: str
935
- :ivar data_source: Data source used to extract entity linking, such as Wiki/Bing etc. Required.
936
- :vartype data_source: str
937
- """
938
-
939
- _validation = {
940
- 'name': {'required': True},
941
- 'matches': {'required': True},
942
- 'language': {'required': True},
943
- 'url': {'required': True},
944
- 'data_source': {'required': True},
945
- }
946
-
947
- _attribute_map = {
948
- "name": {"key": "name", "type": "str"},
949
- "matches": {"key": "matches", "type": "[Match]"},
950
- "language": {"key": "language", "type": "str"},
951
- "id": {"key": "id", "type": "str"},
952
- "url": {"key": "url", "type": "str"},
953
- "data_source": {"key": "dataSource", "type": "str"},
954
- }
955
-
956
- def __init__(
957
- self,
958
- *,
959
- name: str,
960
- matches: List["_models.Match"],
961
- language: str,
962
- url: str,
963
- data_source: str,
964
- id: Optional[str] = None, # pylint: disable=redefined-builtin
965
- **kwargs
966
- ):
967
- """
968
- :keyword name: Entity Linking formal name. Required.
969
- :paramtype name: str
970
- :keyword matches: List of instances this entity appears in the text. Required.
971
- :paramtype matches: list[~azure.ai.textanalytics.v3_0.models.Match]
972
- :keyword language: Language used in the data source. Required.
973
- :paramtype language: str
974
- :keyword id: Unique identifier of the recognized entity from the data source.
975
- :paramtype id: str
976
- :keyword url: URL for the entity's page from the data source. Required.
977
- :paramtype url: str
978
- :keyword data_source: Data source used to extract entity linking, such as Wiki/Bing etc.
979
- Required.
980
- :paramtype data_source: str
981
- """
982
- super().__init__(**kwargs)
983
- self.name = name
984
- self.matches = matches
985
- self.language = language
986
- self.id = id
987
- self.url = url
988
- self.data_source = data_source
989
-
990
-
991
- class Match(_serialization.Model):
992
- """Match.
993
-
994
- All required parameters must be populated in order to send to Azure.
995
-
996
- :ivar confidence_score: If a well-known item is recognized, a decimal number denoting the
997
- confidence level between 0 and 1 will be returned. Required.
998
- :vartype confidence_score: float
999
- :ivar text: Entity text as appears in the request. Required.
1000
- :vartype text: str
1001
- :ivar offset: Start position (in Unicode characters) for the entity match text. Required.
1002
- :vartype offset: int
1003
- :ivar length: Length (in Unicode characters) for the entity match text. Required.
1004
- :vartype length: int
1005
- """
1006
-
1007
- _validation = {
1008
- 'confidence_score': {'required': True},
1009
- 'text': {'required': True},
1010
- 'offset': {'required': True},
1011
- 'length': {'required': True},
1012
- }
1013
-
1014
- _attribute_map = {
1015
- "confidence_score": {"key": "confidenceScore", "type": "float"},
1016
- "text": {"key": "text", "type": "str"},
1017
- "offset": {"key": "offset", "type": "int"},
1018
- "length": {"key": "length", "type": "int"},
1019
- }
1020
-
1021
- def __init__(
1022
- self,
1023
- *,
1024
- confidence_score: float,
1025
- text: str,
1026
- offset: int,
1027
- length: int,
1028
- **kwargs
1029
- ):
1030
- """
1031
- :keyword confidence_score: If a well-known item is recognized, a decimal number denoting the
1032
- confidence level between 0 and 1 will be returned. Required.
1033
- :paramtype confidence_score: float
1034
- :keyword text: Entity text as appears in the request. Required.
1035
- :paramtype text: str
1036
- :keyword offset: Start position (in Unicode characters) for the entity match text. Required.
1037
- :paramtype offset: int
1038
- :keyword length: Length (in Unicode characters) for the entity match text. Required.
1039
- :paramtype length: int
1040
- """
1041
- super().__init__(**kwargs)
1042
- self.confidence_score = confidence_score
1043
- self.text = text
1044
- self.offset = offset
1045
- self.length = length
1046
-
1047
-
1048
- class MultiLanguageBatchInput(_serialization.Model):
1049
- """Contains a set of input documents to be analyzed by the service.
1050
-
1051
- All required parameters must be populated in order to send to Azure.
1052
-
1053
- :ivar documents: The set of documents to process as part of this batch. Required.
1054
- :vartype documents: list[~azure.ai.textanalytics.v3_0.models.MultiLanguageInput]
1055
- """
1056
-
1057
- _validation = {
1058
- 'documents': {'required': True},
1059
- }
1060
-
1061
- _attribute_map = {
1062
- "documents": {"key": "documents", "type": "[MultiLanguageInput]"},
1063
- }
1064
-
1065
- def __init__(
1066
- self,
1067
- *,
1068
- documents: List["_models.MultiLanguageInput"],
1069
- **kwargs
1070
- ):
1071
- """
1072
- :keyword documents: The set of documents to process as part of this batch. Required.
1073
- :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.MultiLanguageInput]
1074
- """
1075
- super().__init__(**kwargs)
1076
- self.documents = documents
1077
-
1078
-
1079
- class MultiLanguageInput(_serialization.Model):
1080
- """Contains an input document to be analyzed by the service.
1081
-
1082
- All required parameters must be populated in order to send to Azure.
1083
-
1084
- :ivar id: A unique, non-empty document identifier. Required.
1085
- :vartype id: str
1086
- :ivar text: The input text to process. Required.
1087
- :vartype text: str
1088
- :ivar language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For
1089
- example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as
1090
- default.
1091
- :vartype language: str
1092
- """
1093
-
1094
- _validation = {
1095
- 'id': {'required': True},
1096
- 'text': {'required': True},
1097
- }
1098
-
1099
- _attribute_map = {
1100
- "id": {"key": "id", "type": "str"},
1101
- "text": {"key": "text", "type": "str"},
1102
- "language": {"key": "language", "type": "str"},
1103
- }
1104
-
1105
- def __init__(
1106
- self,
1107
- *,
1108
- id: str, # pylint: disable=redefined-builtin
1109
- text: str,
1110
- language: Optional[str] = None,
1111
- **kwargs
1112
- ):
1113
- """
1114
- :keyword id: A unique, non-empty document identifier. Required.
1115
- :paramtype id: str
1116
- :keyword text: The input text to process. Required.
1117
- :paramtype text: str
1118
- :keyword language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For
1119
- example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as
1120
- default.
1121
- :paramtype language: str
1122
- """
1123
- super().__init__(**kwargs)
1124
- self.id = id
1125
- self.text = text
1126
- self.language = language
1127
-
1128
-
1129
- class RequestStatistics(_serialization.Model):
1130
- """if showStats=true was specified in the request this field will contain information about the request payload.
1131
-
1132
- All required parameters must be populated in order to send to Azure.
1133
-
1134
- :ivar documents_count: Number of documents submitted in the request. Required.
1135
- :vartype documents_count: int
1136
- :ivar valid_documents_count: Number of valid documents. This excludes empty, over-size limit or
1137
- non-supported languages documents. Required.
1138
- :vartype valid_documents_count: int
1139
- :ivar erroneous_documents_count: Number of invalid documents. This includes empty, over-size
1140
- limit or non-supported languages documents. Required.
1141
- :vartype erroneous_documents_count: int
1142
- :ivar transactions_count: Number of transactions for the request. Required.
1143
- :vartype transactions_count: int
1144
- """
1145
-
1146
- _validation = {
1147
- 'documents_count': {'required': True},
1148
- 'valid_documents_count': {'required': True},
1149
- 'erroneous_documents_count': {'required': True},
1150
- 'transactions_count': {'required': True},
1151
- }
1152
-
1153
- _attribute_map = {
1154
- "documents_count": {"key": "documentsCount", "type": "int"},
1155
- "valid_documents_count": {"key": "validDocumentsCount", "type": "int"},
1156
- "erroneous_documents_count": {"key": "erroneousDocumentsCount", "type": "int"},
1157
- "transactions_count": {"key": "transactionsCount", "type": "int"},
1158
- }
1159
-
1160
- def __init__(
1161
- self,
1162
- *,
1163
- documents_count: int,
1164
- valid_documents_count: int,
1165
- erroneous_documents_count: int,
1166
- transactions_count: int,
1167
- **kwargs
1168
- ):
1169
- """
1170
- :keyword documents_count: Number of documents submitted in the request. Required.
1171
- :paramtype documents_count: int
1172
- :keyword valid_documents_count: Number of valid documents. This excludes empty, over-size limit
1173
- or non-supported languages documents. Required.
1174
- :paramtype valid_documents_count: int
1175
- :keyword erroneous_documents_count: Number of invalid documents. This includes empty, over-size
1176
- limit or non-supported languages documents. Required.
1177
- :paramtype erroneous_documents_count: int
1178
- :keyword transactions_count: Number of transactions for the request. Required.
1179
- :paramtype transactions_count: int
1180
- """
1181
- super().__init__(**kwargs)
1182
- self.documents_count = documents_count
1183
- self.valid_documents_count = valid_documents_count
1184
- self.erroneous_documents_count = erroneous_documents_count
1185
- self.transactions_count = transactions_count
1186
-
1187
-
1188
- class SentenceSentiment(_serialization.Model):
1189
- """SentenceSentiment.
1190
-
1191
- All required parameters must be populated in order to send to Azure.
1192
-
1193
- :ivar text: The sentence text. Required.
1194
- :vartype text: str
1195
- :ivar sentiment: The predicted Sentiment for the sentence. Required. Known values are:
1196
- "positive", "neutral", and "negative".
1197
- :vartype sentiment: str or ~azure.ai.textanalytics.v3_0.models.SentenceSentimentValue
1198
- :ivar confidence_scores: The sentiment confidence score between 0 and 1 for the sentence for
1199
- all classes. Required.
1200
- :vartype confidence_scores:
1201
- ~azure.ai.textanalytics.v3_0.models.SentimentConfidenceScorePerLabel
1202
- :ivar offset: The sentence offset from the start of the document. Required.
1203
- :vartype offset: int
1204
- :ivar length: The length of the sentence by Unicode standard. Required.
1205
- :vartype length: int
1206
- """
1207
-
1208
- _validation = {
1209
- 'text': {'required': True},
1210
- 'sentiment': {'required': True},
1211
- 'confidence_scores': {'required': True},
1212
- 'offset': {'required': True},
1213
- 'length': {'required': True},
1214
- }
1215
-
1216
- _attribute_map = {
1217
- "text": {"key": "text", "type": "str"},
1218
- "sentiment": {"key": "sentiment", "type": "str"},
1219
- "confidence_scores": {"key": "confidenceScores", "type": "SentimentConfidenceScorePerLabel"},
1220
- "offset": {"key": "offset", "type": "int"},
1221
- "length": {"key": "length", "type": "int"},
1222
- }
1223
-
1224
- def __init__(
1225
- self,
1226
- *,
1227
- text: str,
1228
- sentiment: Union[str, "_models.SentenceSentimentValue"],
1229
- confidence_scores: "_models.SentimentConfidenceScorePerLabel",
1230
- offset: int,
1231
- length: int,
1232
- **kwargs
1233
- ):
1234
- """
1235
- :keyword text: The sentence text. Required.
1236
- :paramtype text: str
1237
- :keyword sentiment: The predicted Sentiment for the sentence. Required. Known values are:
1238
- "positive", "neutral", and "negative".
1239
- :paramtype sentiment: str or ~azure.ai.textanalytics.v3_0.models.SentenceSentimentValue
1240
- :keyword confidence_scores: The sentiment confidence score between 0 and 1 for the sentence for
1241
- all classes. Required.
1242
- :paramtype confidence_scores:
1243
- ~azure.ai.textanalytics.v3_0.models.SentimentConfidenceScorePerLabel
1244
- :keyword offset: The sentence offset from the start of the document. Required.
1245
- :paramtype offset: int
1246
- :keyword length: The length of the sentence by Unicode standard. Required.
1247
- :paramtype length: int
1248
- """
1249
- super().__init__(**kwargs)
1250
- self.text = text
1251
- self.sentiment = sentiment
1252
- self.confidence_scores = confidence_scores
1253
- self.offset = offset
1254
- self.length = length
1255
-
1256
-
1257
- class SentimentConfidenceScorePerLabel(_serialization.Model):
1258
- """Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative.
1259
-
1260
- All required parameters must be populated in order to send to Azure.
1261
-
1262
- :ivar positive: Required.
1263
- :vartype positive: float
1264
- :ivar neutral: Required.
1265
- :vartype neutral: float
1266
- :ivar negative: Required.
1267
- :vartype negative: float
1268
- """
1269
-
1270
- _validation = {
1271
- 'positive': {'required': True},
1272
- 'neutral': {'required': True},
1273
- 'negative': {'required': True},
1274
- }
1275
-
1276
- _attribute_map = {
1277
- "positive": {"key": "positive", "type": "float"},
1278
- "neutral": {"key": "neutral", "type": "float"},
1279
- "negative": {"key": "negative", "type": "float"},
1280
- }
1281
-
1282
- def __init__(
1283
- self,
1284
- *,
1285
- positive: float,
1286
- neutral: float,
1287
- negative: float,
1288
- **kwargs
1289
- ):
1290
- """
1291
- :keyword positive: Required.
1292
- :paramtype positive: float
1293
- :keyword neutral: Required.
1294
- :paramtype neutral: float
1295
- :keyword negative: Required.
1296
- :paramtype negative: float
1297
- """
1298
- super().__init__(**kwargs)
1299
- self.positive = positive
1300
- self.neutral = neutral
1301
- self.negative = negative
1302
-
1303
-
1304
- class SentimentResponse(_serialization.Model):
1305
- """SentimentResponse.
1306
-
1307
- All required parameters must be populated in order to send to Azure.
1308
-
1309
- :ivar documents: Sentiment analysis per document. Required.
1310
- :vartype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentSentiment]
1311
- :ivar errors: Errors by document id. Required.
1312
- :vartype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError]
1313
- :ivar statistics: if showStats=true was specified in the request this field will contain
1314
- information about the request payload.
1315
- :vartype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics
1316
- :ivar model_version: This field indicates which model is used for scoring. Required.
1317
- :vartype model_version: str
1318
- """
1319
-
1320
- _validation = {
1321
- 'documents': {'required': True},
1322
- 'errors': {'required': True},
1323
- 'model_version': {'required': True},
1324
- }
1325
-
1326
- _attribute_map = {
1327
- "documents": {"key": "documents", "type": "[DocumentSentiment]"},
1328
- "errors": {"key": "errors", "type": "[DocumentError]"},
1329
- "statistics": {"key": "statistics", "type": "RequestStatistics"},
1330
- "model_version": {"key": "modelVersion", "type": "str"},
1331
- }
1332
-
1333
- def __init__(
1334
- self,
1335
- *,
1336
- documents: List["_models.DocumentSentiment"],
1337
- errors: List["_models.DocumentError"],
1338
- model_version: str,
1339
- statistics: Optional["_models.RequestStatistics"] = None,
1340
- **kwargs
1341
- ):
1342
- """
1343
- :keyword documents: Sentiment analysis per document. Required.
1344
- :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentSentiment]
1345
- :keyword errors: Errors by document id. Required.
1346
- :paramtype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError]
1347
- :keyword statistics: if showStats=true was specified in the request this field will contain
1348
- information about the request payload.
1349
- :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics
1350
- :keyword model_version: This field indicates which model is used for scoring. Required.
1351
- :paramtype model_version: str
1352
- """
1353
- super().__init__(**kwargs)
1354
- self.documents = documents
1355
- self.errors = errors
1356
- self.statistics = statistics
1357
- self.model_version = model_version
1358
-
1359
-
1360
- class TextAnalyticsError(_serialization.Model):
1361
- """TextAnalyticsError.
1362
-
1363
- All required parameters must be populated in order to send to Azure.
1364
-
1365
- :ivar code: Error code. Required. Known values are: "invalidRequest", "invalidArgument",
1366
- "internalServerError", and "serviceUnavailable".
1367
- :vartype code: str or ~azure.ai.textanalytics.v3_0.models.ErrorCodeValue
1368
- :ivar message: Error message. Required.
1369
- :vartype message: str
1370
- :ivar target: Error target.
1371
- :vartype target: str
1372
- :ivar innererror: Inner error contains more specific information.
1373
- :vartype innererror: ~azure.ai.textanalytics.v3_0.models.InnerError
1374
- :ivar details: Details about specific errors that led to this reported error.
1375
- :vartype details: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsError]
1376
- """
1377
-
1378
- _validation = {
1379
- 'code': {'required': True},
1380
- 'message': {'required': True},
1381
- }
1382
-
1383
- _attribute_map = {
1384
- "code": {"key": "code", "type": "str"},
1385
- "message": {"key": "message", "type": "str"},
1386
- "target": {"key": "target", "type": "str"},
1387
- "innererror": {"key": "innererror", "type": "InnerError"},
1388
- "details": {"key": "details", "type": "[TextAnalyticsError]"},
1389
- }
1390
-
1391
- def __init__(
1392
- self,
1393
- *,
1394
- code: Union[str, "_models.ErrorCodeValue"],
1395
- message: str,
1396
- target: Optional[str] = None,
1397
- innererror: Optional["_models.InnerError"] = None,
1398
- details: Optional[List["_models.TextAnalyticsError"]] = None,
1399
- **kwargs
1400
- ):
1401
- """
1402
- :keyword code: Error code. Required. Known values are: "invalidRequest", "invalidArgument",
1403
- "internalServerError", and "serviceUnavailable".
1404
- :paramtype code: str or ~azure.ai.textanalytics.v3_0.models.ErrorCodeValue
1405
- :keyword message: Error message. Required.
1406
- :paramtype message: str
1407
- :keyword target: Error target.
1408
- :paramtype target: str
1409
- :keyword innererror: Inner error contains more specific information.
1410
- :paramtype innererror: ~azure.ai.textanalytics.v3_0.models.InnerError
1411
- :keyword details: Details about specific errors that led to this reported error.
1412
- :paramtype details: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsError]
1413
- """
1414
- super().__init__(**kwargs)
1415
- self.code = code
1416
- self.message = message
1417
- self.target = target
1418
- self.innererror = innererror
1419
- self.details = details
1420
-
1421
-
1422
- class TextAnalyticsWarning(_serialization.Model):
1423
- """TextAnalyticsWarning.
1424
-
1425
- All required parameters must be populated in order to send to Azure.
1426
-
1427
- :ivar code: Error code. Required. Known values are: "LongWordsInDocument" and
1428
- "DocumentTruncated".
1429
- :vartype code: str or ~azure.ai.textanalytics.v3_0.models.WarningCodeValue
1430
- :ivar message: Warning message. Required.
1431
- :vartype message: str
1432
- :ivar target_ref: A JSON pointer reference indicating the target object.
1433
- :vartype target_ref: str
1434
- """
1435
-
1436
- _validation = {
1437
- 'code': {'required': True},
1438
- 'message': {'required': True},
1439
- }
1440
-
1441
- _attribute_map = {
1442
- "code": {"key": "code", "type": "str"},
1443
- "message": {"key": "message", "type": "str"},
1444
- "target_ref": {"key": "targetRef", "type": "str"},
1445
- }
1446
-
1447
- def __init__(
1448
- self,
1449
- *,
1450
- code: Union[str, "_models.WarningCodeValue"],
1451
- message: str,
1452
- target_ref: Optional[str] = None,
1453
- **kwargs
1454
- ):
1455
- """
1456
- :keyword code: Error code. Required. Known values are: "LongWordsInDocument" and
1457
- "DocumentTruncated".
1458
- :paramtype code: str or ~azure.ai.textanalytics.v3_0.models.WarningCodeValue
1459
- :keyword message: Warning message. Required.
1460
- :paramtype message: str
1461
- :keyword target_ref: A JSON pointer reference indicating the target object.
1462
- :paramtype target_ref: str
1463
- """
1464
- super().__init__(**kwargs)
1465
- self.code = code
1466
- self.message = message
1467
- self.target_ref = target_ref