diff --git a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md index 63ca574523d8..1a2eb61fb0f5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md +++ b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md @@ -13,6 +13,7 @@ This version of the SDK defaults to the latest supported API version, which curr ### Breaking Changes ### Bugs Fixed +- Restarting a long-running operation from a saved state is now supported for the `begin_analyze_actions` and `begin_recognize_healthcare_entities` methods. ### Other Changes - Package requires [azure-core](https://pypi.org/project/azure-core/) version 1.16.0 or greater diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_lro.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_lro.py index de42817c54d1..025bdeb1c0bb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_lro.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_lro.py @@ -3,6 +3,9 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + +import base64 +import functools from typing import TYPE_CHECKING, Generic from six.moves.urllib.parse import urlencode from azure.core.polling._poller import PollingReturnType @@ -110,6 +113,8 @@ def _poll(self): class AnalyzeHealthcareEntitiesLROPollingMethod(TextAnalyticsLROPollingMethod): def __init__(self, *args, **kwargs): + self._doc_id_order = kwargs.pop("doc_id_order", None) + self._show_stats = kwargs.pop("show_stats", None) self._text_analytics_client = kwargs.pop("text_analytics_client") super(AnalyzeHealthcareEntitiesLROPollingMethod, self).__init__(*args, **kwargs) @@ -143,6 +148,13 @@ def id(self): return None return self._current_body.job_id + def get_continuation_token(self): + # type: () -> str + import pickle + self._initial_response.context.options["doc_id_order"] = self._doc_id_order + self._initial_response.context.options["show_stats"] = self._show_stats + return base64.b64encode(pickle.dumps(self._initial_response)).decode('ascii') + class AnalyzeHealthcareEntitiesLROPoller(LROPoller, Generic[PollingReturnType]): def polling_method(self): @@ -190,6 +202,24 @@ def id(self): """ return self.polling_method().id + @classmethod + def from_continuation_token(cls, polling_method, continuation_token, **kwargs): # type: ignore + # type: (AnalyzeHealthcareEntitiesLROPollingMethod, str, Any) -> AnalyzeHealthcareEntitiesLROPoller + client, initial_response, deserialization_callback = polling_method.from_continuation_token( + continuation_token, **kwargs + ) + polling_method._lro_algorithms = [ # pylint: disable=protected-access + TextAnalyticsOperationResourcePolling( + show_stats=initial_response.context.options["show_stats"] + ) + ] + return cls( + client, + initial_response, + functools.partial(deserialization_callback, initial_response), + polling_method + ) + def cancel(self, **kwargs): # type: ignore # type: (Any) -> LROPoller[None] """Cancel the operation currently being polled. @@ -231,6 +261,12 @@ def cancel(self, **kwargs): # type: ignore class AnalyzeActionsLROPollingMethod(TextAnalyticsLROPollingMethod): + def __init__(self, *args, **kwargs): + self._doc_id_order = kwargs.pop("doc_id_order", None) + self._task_id_order = kwargs.pop("task_id_order", None) + self._show_stats = kwargs.pop("show_stats", None) + super(AnalyzeActionsLROPollingMethod, self).__init__(*args, **kwargs) + @property def _current_body(self): from ._generated.models import AnalyzeJobMetadata @@ -291,6 +327,14 @@ def id(self): return None return self._current_body.job_id + def get_continuation_token(self): + # type: () -> str + import pickle + self._initial_response.context.options["doc_id_order"] = self._doc_id_order + self._initial_response.context.options["task_id_order"] = self._task_id_order + self._initial_response.context.options["show_stats"] = self._show_stats + return base64.b64encode(pickle.dumps(self._initial_response)).decode('ascii') + class AnalyzeActionsLROPoller(LROPoller, Generic[PollingReturnType]): def polling_method(self): @@ -390,3 +434,21 @@ def id(self): :rtype: str """ return self.polling_method().id + + @classmethod + def from_continuation_token(cls, polling_method, continuation_token, **kwargs): # type: ignore + # type: (AnalyzeActionsLROPollingMethod, str, Any) -> AnalyzeActionsLROPoller + client, initial_response, deserialization_callback = polling_method.from_continuation_token( + continuation_token, **kwargs + ) + polling_method._lro_algorithms = [ # pylint: disable=protected-access + TextAnalyticsOperationResourcePolling( + show_stats=initial_response.context.options["show_stats"] + ) + ] + return cls( + client, + initial_response, + functools.partial(deserialization_callback, initial_response), + polling_method + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py index f78106fe6f47..4e13bf9c9805 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py @@ -5,7 +5,6 @@ # ------------------------------------ # pylint: disable=too-many-lines -import copy from typing import ( Union, Any, @@ -18,6 +17,7 @@ from azure.core.tracing.decorator import distributed_trace from azure.core.exceptions import HttpResponseError from ._base_client import TextAnalyticsClientBase, TextAnalyticsApiVersion +from ._lro import AnalyzeActionsLROPoller, AnalyzeHealthcareEntitiesLROPoller from ._request_handlers import ( _validate_input, _determine_action_type, @@ -71,7 +71,6 @@ MultiCategoryClassifyAction, MultiCategoryClassifyResult, ) - from ._lro import AnalyzeHealthcareEntitiesLROPoller, AnalyzeActionsLROPoller class TextAnalyticsClient(TextAnalyticsClientBase): @@ -564,7 +563,10 @@ def begin_analyze_healthcare_entities( # type: ignore see https://aka.ms/text-analytics-offsets :keyword int polling_interval: Waiting time between two polls for LRO operations if no Retry-After header is present. Defaults to 5 seconds. - :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword str continuation_token: + Call `continuation_token()` on the poller object to save the long-running operation (LRO) + state into an opaque token. Pass the value as the `continuation_token` keyword argument + to restart the LRO from a saved state. :keyword bool disable_service_logs: Defaults to true, meaning that Text Analytics will not log your input text on the service side for troubleshooting. If set to False, Text Analytics logs your input text for 48 hours, solely to allow for troubleshooting issues in providing you with @@ -595,7 +597,6 @@ def begin_analyze_healthcare_entities( # type: ignore """ language_arg = kwargs.pop("language", None) language = language_arg if language_arg is not None else self._default_language - docs = _validate_input(documents, "language", language) model_version = kwargs.pop("model_version", None) show_stats = kwargs.pop("show_stats", False) polling_interval = kwargs.pop("polling_interval", 5) @@ -603,7 +604,28 @@ def begin_analyze_healthcare_entities( # type: ignore string_index_type = kwargs.pop( "string_index_type", self._string_index_type_default ) + disable_service_logs = kwargs.pop("disable_service_logs", None) + + if continuation_token: + def get_result_from_cont_token(initial_response, pipeline_response): + doc_id_order = initial_response.context.options["doc_id_order"] + show_stats = initial_response.context.options["show_stats"] + return self._healthcare_result_callback( + doc_id_order, pipeline_response, None, {}, show_stats=show_stats + ) + return AnalyzeHealthcareEntitiesLROPoller.from_continuation_token( + polling_method=AnalyzeHealthcareEntitiesLROPollingMethod( + text_analytics_client=self._client, + timeout=polling_interval, + **kwargs + ), + client=self._client._client, # pylint: disable=protected-access + deserialization_callback=get_result_from_cont_token, + continuation_token=continuation_token + ) + + docs = _validate_input(documents, "language", language) doc_id_order = [doc.get("id") for doc in docs] my_cls = kwargs.pop( "cls", @@ -611,28 +633,28 @@ def begin_analyze_healthcare_entities( # type: ignore self._healthcare_result_callback, doc_id_order, show_stats=show_stats ), ) - disable_service_logs = kwargs.pop("disable_service_logs", None) - polling_kwargs = kwargs - operation_kwargs = copy.copy(kwargs) - if disable_service_logs is not None: - operation_kwargs["logging_opt_out"] = disable_service_logs try: return self._client.begin_health( docs, model_version=model_version, string_index_type=string_index_type, + logging_opt_out=disable_service_logs, cls=my_cls, polling=AnalyzeHealthcareEntitiesLROPollingMethod( text_analytics_client=self._client, timeout=polling_interval, + doc_id_order=doc_id_order, + show_stats=show_stats, lro_algorithms=[ - TextAnalyticsOperationResourcePolling(show_stats=show_stats) + TextAnalyticsOperationResourcePolling( + show_stats=show_stats, + ) ], - **polling_kwargs + **kwargs ), continuation_token=continuation_token, - **operation_kwargs + **kwargs ) except ValueError as error: @@ -894,6 +916,10 @@ def begin_analyze_actions( # type: ignore :keyword bool show_stats: If set to true, response will contain document level statistics. :keyword int polling_interval: Waiting time between two polls for LRO operations if no Retry-After header is present. Defaults to 5 seconds. + :keyword str continuation_token: + Call `continuation_token()` on the poller object to save the long-running operation (LRO) + state into an opaque token. Pass the value as the `continuation_token` keyword argument + to restart the LRO from a saved state. :return: An instance of an AnalyzeActionsLROPoller. Call `result()` on the poller object to return a pageable heterogeneous list of lists. This list of lists is first ordered by the documents you input, then ordered by the actions you input. For example, @@ -931,18 +957,37 @@ def begin_analyze_actions( # type: ignore actions over a batch of documents. """ + continuation_token = kwargs.pop("continuation_token", None) display_name = kwargs.pop("display_name", None) language_arg = kwargs.pop("language", None) + show_stats = kwargs.pop("show_stats", False) + polling_interval = kwargs.pop("polling_interval", 5) language = language_arg if language_arg is not None else self._default_language + + if continuation_token: + def get_result_from_cont_token(initial_response, pipeline_response): + doc_id_order = initial_response.context.options["doc_id_order"] + task_id_order = initial_response.context.options["task_id_order"] + show_stats = initial_response.context.options["show_stats"] + return self._analyze_result_callback( + doc_id_order, task_id_order, pipeline_response, None, {}, show_stats=show_stats + ) + + return AnalyzeActionsLROPoller.from_continuation_token( + polling_method=AnalyzeActionsLROPollingMethod( + timeout=polling_interval, + **kwargs + ), + client=self._client._client, # pylint: disable=protected-access + deserialization_callback=get_result_from_cont_token, + continuation_token=continuation_token + ) + docs = self._client.models( api_version=self._api_version ).MultiLanguageBatchInput( documents=_validate_input(documents, "language", language) ) - show_stats = kwargs.pop("show_stats", False) - polling_interval = kwargs.pop("polling_interval", 5) - continuation_token = kwargs.pop("continuation_token", None) - doc_id_order = [doc.get("id") for doc in docs.documents] try: generated_tasks = [ @@ -1012,8 +1057,13 @@ def begin_analyze_actions( # type: ignore ), polling=AnalyzeActionsLROPollingMethod( timeout=polling_interval, + show_stats=show_stats, + doc_id_order=doc_id_order, + task_id_order=task_order, lro_algorithms=[ - TextAnalyticsOperationResourcePolling(show_stats=show_stats) + TextAnalyticsOperationResourcePolling( + show_stats=show_stats, + ) ], **kwargs ), diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_lro_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_lro_async.py index de578bb7e70b..b3087790afb0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_lro_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_lro_async.py @@ -4,12 +4,15 @@ # Licensed under the MIT License. # ------------------------------------ import datetime -from typing import Optional +import base64 +import functools +from typing import Optional, Any from azure.core.exceptions import HttpResponseError from azure.core.polling import AsyncLROPoller from azure.core.polling.base_polling import OperationFailed, BadStatus from azure.core.polling.async_base_polling import AsyncLROBasePolling from azure.core.polling._async_poller import PollingReturnType +from .._lro import TextAnalyticsOperationResourcePolling _FINISHED = frozenset(["succeeded", "cancelled", "failed", "partiallycompleted"]) @@ -83,6 +86,8 @@ class AsyncAnalyzeHealthcareEntitiesLROPollingMethod( ): def __init__(self, *args, **kwargs): self._text_analytics_client = kwargs.pop("text_analytics_client") + self._doc_id_order = kwargs.pop("doc_id_order", None) + self._show_stats = kwargs.pop("show_stats", None) super(AsyncAnalyzeHealthcareEntitiesLROPollingMethod, self).__init__( *args, **kwargs ) @@ -117,6 +122,13 @@ def id(self): return None return self._current_body.job_id + def get_continuation_token(self): + # type() -> str + import pickle + self._initial_response.context.options["doc_id_order"] = self._doc_id_order + self._initial_response.context.options["show_stats"] = self._show_stats + return base64.b64encode(pickle.dumps(self._initial_response)).decode('ascii') + class AsyncAnalyzeHealthcareEntitiesLROPoller(AsyncLROPoller[PollingReturnType]): def polling_method(self) -> AsyncAnalyzeHealthcareEntitiesLROPollingMethod: # type: ignore @@ -159,6 +171,29 @@ def id(self) -> str: """ return self.polling_method().id + @classmethod + def from_continuation_token( # type: ignore + cls, + polling_method, # type: AsyncAnalyzeHealthcareEntitiesLROPollingMethod + continuation_token, # type: str + **kwargs # type: Any + ): + # type: (...) -> AsyncAnalyzeHealthcareEntitiesLROPoller + client, initial_response, deserialization_callback = polling_method.from_continuation_token( + continuation_token, **kwargs + ) + polling_method._lro_algorithms = [ # pylint: disable=protected-access + TextAnalyticsOperationResourcePolling( + show_stats=initial_response.context.options["show_stats"] + ) + ] + return cls( + client, + initial_response, + functools.partial(deserialization_callback, initial_response), + polling_method # type: ignore + ) + async def cancel(self, **kwargs) -> "AsyncLROPoller[None]": # type: ignore """Cancel the operation currently being polled. @@ -195,6 +230,12 @@ async def cancel(self, **kwargs) -> "AsyncLROPoller[None]": # type: ignore class AsyncAnalyzeActionsLROPollingMethod(TextAnalyticsAsyncLROPollingMethod): + def __init__(self, *args, **kwargs): + self._doc_id_order = kwargs.pop("doc_id_order", None) + self._task_id_order = kwargs.pop("task_id_order", None) + self._show_stats = kwargs.pop("show_stats", None) + super(AsyncAnalyzeActionsLROPollingMethod, self).__init__(*args, **kwargs) + @property def _current_body(self): from .._generated.models import AnalyzeJobMetadata @@ -255,6 +296,14 @@ def id(self): return None return self._current_body.job_id + def get_continuation_token(self): + # type: () -> str + import pickle + self._initial_response.context.options["doc_id_order"] = self._doc_id_order + self._initial_response.context.options["task_id_order"] = self._task_id_order + self._initial_response.context.options["show_stats"] = self._show_stats + return base64.b64encode(pickle.dumps(self._initial_response)).decode('ascii') + class AsyncAnalyzeActionsLROPoller(AsyncLROPoller[PollingReturnType]): def polling_method(self) -> AsyncAnalyzeActionsLROPollingMethod: # type: ignore @@ -344,3 +393,21 @@ def id(self) -> str: :rtype: str """ return self.polling_method().id + + @classmethod + def from_continuation_token(cls, polling_method, continuation_token, **kwargs): # type: ignore + # type: (AsyncAnalyzeActionsLROPollingMethod, str, Any) -> AsyncAnalyzeActionsLROPoller + client, initial_response, deserialization_callback = polling_method.from_continuation_token( + continuation_token, **kwargs + ) + polling_method._lro_algorithms = [ # pylint: disable=protected-access + TextAnalyticsOperationResourcePolling( + show_stats=initial_response.context.options["show_stats"] + ) + ] + return cls( + client, + initial_response, + functools.partial(deserialization_callback, initial_response), + polling_method # type: ignore + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py index cc251cb8781f..be827c3f3a3a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py @@ -5,7 +5,6 @@ # ------------------------------------ # pylint: disable=too-many-lines -import copy from typing import Union, Any, List, Dict, TYPE_CHECKING from functools import partial from azure.core.async_paging import AsyncItemPaged @@ -751,7 +750,10 @@ async def begin_analyze_healthcare_entities( # type: ignore For additional information see https://aka.ms/text-analytics-offsets :keyword int polling_interval: Waiting time between two polls for LRO operations if no Retry-After header is present. Defaults to 5 seconds. - :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword str continuation_token: + Call `continuation_token()` on the poller object to save the long-running operation (LRO) + state into an opaque token. Pass the value as the `continuation_token` keyword argument + to restart the LRO from a saved state. :keyword bool disable_service_logs: Defaults to true, meaning that Text Analytics will not log your input text on the service side for troubleshooting. If set to False, Text Analytics logs your input text for 48 hours, solely to allow for troubleshooting issues in providing you with @@ -782,13 +784,33 @@ async def begin_analyze_healthcare_entities( # type: ignore """ language_arg = kwargs.pop("language", None) language = language_arg if language_arg is not None else self._default_language - docs = _validate_input(documents, "language", language) model_version = kwargs.pop("model_version", None) show_stats = kwargs.pop("show_stats", False) polling_interval = kwargs.pop("polling_interval", 5) continuation_token = kwargs.pop("continuation_token", None) string_index_type = kwargs.pop("string_index_type", self._string_code_unit) disable_service_logs = kwargs.pop("disable_service_logs", None) + + if continuation_token: + def get_result_from_cont_token(initial_response, pipeline_response): + doc_id_order = initial_response.context.options["doc_id_order"] + show_stats = initial_response.context.options["show_stats"] + return self._healthcare_result_callback( + doc_id_order, pipeline_response, None, {}, show_stats=show_stats + ) + + return AsyncAnalyzeHealthcareEntitiesLROPoller.from_continuation_token( + polling_method=AsyncAnalyzeHealthcareEntitiesLROPollingMethod( + text_analytics_client=self._client, + timeout=polling_interval, + **kwargs + ), + client=self._client._client, # pylint: disable=protected-access + deserialization_callback=get_result_from_cont_token, + continuation_token=continuation_token + ) + + docs = _validate_input(documents, "language", language) doc_id_order = [doc.get("id") for doc in docs] my_cls = kwargs.pop( "cls", @@ -796,27 +818,28 @@ async def begin_analyze_healthcare_entities( # type: ignore self._healthcare_result_callback, doc_id_order, show_stats=show_stats ), ) - polling_kwargs = kwargs - operation_kwargs = copy.copy(kwargs) - if disable_service_logs is not None: - operation_kwargs["logging_opt_out"] = disable_service_logs try: return await self._client.begin_health( docs, model_version=model_version, string_index_type=string_index_type, + logging_opt_out=disable_service_logs, cls=my_cls, polling=AsyncAnalyzeHealthcareEntitiesLROPollingMethod( text_analytics_client=self._client, + doc_id_order=doc_id_order, + show_stats=show_stats, timeout=polling_interval, lro_algorithms=[ - TextAnalyticsOperationResourcePolling(show_stats=show_stats) + TextAnalyticsOperationResourcePolling( + show_stats=show_stats, + ) ], - **polling_kwargs, + **kwargs, ), continuation_token=continuation_token, - **operation_kwargs, + **kwargs, ) except ValueError as error: @@ -913,6 +936,10 @@ async def begin_analyze_actions( # type: ignore :keyword bool show_stats: If set to true, response will contain document level statistics. :keyword int polling_interval: Waiting time between two polls for LRO operations if no Retry-After header is present. Defaults to 5 seconds. + :keyword str continuation_token: + Call `continuation_token()` on the poller object to save the long-running operation (LRO) + state into an opaque token. Pass the value as the `continuation_token` keyword argument + to restart the LRO from a saved state. :return: An instance of an AsyncAnalyzeActionsLROPoller. Call `result()` on the poller object to return a pageable heterogeneous list of lists. This list of lists is first ordered by the documents you input, then ordered by the actions you input. For example, @@ -953,15 +980,35 @@ async def begin_analyze_actions( # type: ignore display_name = kwargs.pop("display_name", None) language_arg = kwargs.pop("language", None) language = language_arg if language_arg is not None else self._default_language + + show_stats = kwargs.pop("show_stats", False) + polling_interval = kwargs.pop("polling_interval", 5) + continuation_token = kwargs.pop("continuation_token", None) + + if continuation_token: + def get_result_from_cont_token(initial_response, pipeline_response): + doc_id_order = initial_response.context.options["doc_id_order"] + task_id_order = initial_response.context.options["task_id_order"] + show_stats = initial_response.context.options["show_stats"] + return self._analyze_result_callback( + doc_id_order, task_id_order, pipeline_response, None, {}, show_stats=show_stats + ) + + return AsyncAnalyzeActionsLROPoller.from_continuation_token( + polling_method=AsyncAnalyzeActionsLROPollingMethod( + timeout=polling_interval, + **kwargs + ), + client=self._client._client, # pylint: disable=protected-access + deserialization_callback=get_result_from_cont_token, + continuation_token=continuation_token + ) + docs = self._client.models( api_version=self._api_version ).MultiLanguageBatchInput( documents=_validate_input(documents, "language", language) ) - show_stats = kwargs.pop("show_stats", False) - polling_interval = kwargs.pop("polling_interval", 5) - continuation_token = kwargs.pop("continuation_token", None) - doc_id_order = [doc.get("id") for doc in docs.documents] try: generated_tasks = [ @@ -1031,8 +1078,13 @@ async def begin_analyze_actions( # type: ignore ), polling=AsyncAnalyzeActionsLROPollingMethod( timeout=polling_interval, + show_stats=show_stats, + doc_id_order=doc_id_order, + task_id_order=task_order, lro_algorithms=[ - TextAnalyticsOperationResourcePolling(show_stats=show_stats) + TextAnalyticsOperationResourcePolling( + show_stats=show_stats, + ) ], **kwargs, ), diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_analyze_continuation_token.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_analyze_continuation_token.yaml new file mode 100644 index 000000000000..5d27da4cf7f8 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_analyze_continuation_token.yaml @@ -0,0 +1,691 @@ +interactions: +- request: + body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "1"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false}, "taskName": "3"}], "entityLinkingTasks": [], "sentimentAnalysisTasks": + [{"parameters": {"model-version": "latest", "loggingOptOut": false, "opinionMining": + false}, "taskName": "2"}], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": + [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "1", "text": "A recent report by + the Government Accountability Office (GAO) found that the dramatic increase + in oil and natural gas development on federal lands over the past six years + has stretched the staff of the BLM to a point that it has been unable to meet + its environmental protection responsibilities.", "language": "en"}, {"id": "2", + "text": "David Schmidt, senior vice president--Food Safety, International Food + Information Council (IFIC), Washington, D.C., discussed the physical activity + component.", "language": "en"}, {"id": "3", "text": "", "language": "en"}, {"id": + "4", "text": "I need a reservation for an indoor restaurant in China. Please + don''t stop the music. Play music and add it to my playlist", "language": "en"}]}}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1528' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze + response: + body: + string: '' + headers: + apim-request-id: + - ab0cb781-fe7f-4aeb-9902-d21d2354a35e + date: + - Mon, 25 Oct 2021 19:24:11 GMT + operation-location: + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '393' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:14Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"running","errors":[],"tasks":{"completed":1,"failed":0,"inProgress":3,"total":4,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}]}}' + headers: + apim-request-id: + - fca0b61a-41bf-44dc-9e29-dd6288ffebec + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:18 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '1912' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:19Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"running","errors":[],"tasks":{"completed":2,"failed":0,"inProgress":2,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:19.310668Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}]}}' + headers: + apim-request-id: + - e91c6d04-d36a-41ee-b3d8-3388b9f61211 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:22 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '143' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:19Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"running","errors":[],"tasks":{"completed":2,"failed":0,"inProgress":2,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:19.310668Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}]}}' + headers: + apim-request-id: + - c26a1d46-ea72-4ce9-9bc9-143e71c15330 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:26 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '3702' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:19Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"running","errors":[],"tasks":{"completed":2,"failed":0,"inProgress":2,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:19.310668Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}]}}' + headers: + apim-request-id: + - d208e6a1-041f-442d-8b6d-fd660ef99a8d + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:27 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '167' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:19Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"running","errors":[],"tasks":{"completed":2,"failed":0,"inProgress":2,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:19.310668Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}]}}' + headers: + apim-request-id: + - c16672fa-e0c2-4788-9fa7-e629b23ae41f + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:31 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '173' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:32Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"running","errors":[],"tasks":{"completed":3,"failed":0,"inProgress":1,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:19.310668Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:32.7619484Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","keyPhrases":["Government + Accountability Office","natural gas development","past six years","environmental + protection responsibilities","recent report","dramatic increase","federal + lands","GAO","oil","staff","BLM","point"],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["International + Food Information Council","senior vice president","physical activity component","Food + Safety","David Schmidt","D.C.","IFIC","Washington"],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["indoor + restaurant","reservation","China","music","playlist"],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}]}}' + headers: + apim-request-id: + - e0e5788c-e8bd-4d10-a078-51e123bc7c55 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:32 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '227' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:32Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"running","errors":[],"tasks":{"completed":3,"failed":0,"inProgress":1,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:19.310668Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:32.7619484Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","keyPhrases":["Government + Accountability Office","natural gas development","past six years","environmental + protection responsibilities","recent report","dramatic increase","federal + lands","GAO","oil","staff","BLM","point"],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["International + Food Information Council","senior vice president","physical activity component","Food + Safety","David Schmidt","D.C.","IFIC","Washington"],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["indoor + restaurant","reservation","China","music","playlist"],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}]}}' + headers: + apim-request-id: + - 9b52a9dd-f698-4e42-8866-563c312ce4be + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:37 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '241' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:32Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"running","errors":[],"tasks":{"completed":3,"failed":0,"inProgress":1,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:19.310668Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:32.7619484Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","keyPhrases":["Government + Accountability Office","natural gas development","past six years","environmental + protection responsibilities","recent report","dramatic increase","federal + lands","GAO","oil","staff","BLM","point"],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["International + Food Information Council","senior vice president","physical activity component","Food + Safety","David Schmidt","D.C.","IFIC","Washington"],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["indoor + restaurant","reservation","China","music","playlist"],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}]}}' + headers: + apim-request-id: + - 3e951462-3a10-4788-ab89-2619f997e54f + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:38 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '372' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:41Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"succeeded","errors":[],"tasks":{"completed":4,"failed":0,"inProgress":0,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:19.310668Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:32.7619484Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","keyPhrases":["Government + Accountability Office","natural gas development","past six years","environmental + protection responsibilities","recent report","dramatic increase","federal + lands","GAO","oil","staff","BLM","point"],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["International + Food Information Council","senior vice president","physical activity component","Food + Safety","David Schmidt","D.C.","IFIC","Washington"],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["indoor + restaurant","reservation","China","music","playlist"],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:41.0065874Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","sentiment":"neutral","statistics":{"charactersCount":295,"transactionsCount":1},"confidenceScores":{"positive":0.23,"neutral":0.61,"negative":0.16},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.23,"neutral":0.61,"negative":0.16},"offset":0,"length":295,"text":"A + recent report by the Government Accountability Office (GAO) found that the + dramatic increase in oil and natural gas development on federal lands over + the past six years has stretched the staff of the BLM to a point that it has + been unable to meet its environmental protection responsibilities."}],"warnings":[]},{"id":"2","sentiment":"neutral","statistics":{"charactersCount":158,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":1.0,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.0,"neutral":1.0,"negative":0.0},"offset":0,"length":158,"text":"David + Schmidt, senior vice president--Food Safety, International Food Information + Council (IFIC), Washington, D.C., discussed the physical activity component."}],"warnings":[]},{"id":"4","sentiment":"positive","statistics":{"charactersCount":121,"transactionsCount":1},"confidenceScores":{"positive":0.57,"neutral":0.41,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.03,"neutral":0.96,"negative":0.01},"offset":0,"length":55,"text":"I + need a reservation for an indoor restaurant in China."},{"sentiment":"neutral","confidenceScores":{"positive":0.12,"neutral":0.78,"negative":0.1},"offset":56,"length":28,"text":"Please + don''t stop the music."},{"sentiment":"positive","confidenceScores":{"positive":0.57,"neutral":0.41,"negative":0.02},"offset":85,"length":36,"text":"Play + music and add it to my playlist"}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2020-04-01"}}]}}' + headers: + apim-request-id: + - 7d7905a7-275c-4857-b2d0-fbf55fb79cfa + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:43 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '306' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:41Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"succeeded","errors":[],"tasks":{"completed":4,"failed":0,"inProgress":0,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:19.310668Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:32.7619484Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","keyPhrases":["Government + Accountability Office","natural gas development","past six years","environmental + protection responsibilities","recent report","dramatic increase","federal + lands","GAO","oil","staff","BLM","point"],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["International + Food Information Council","senior vice president","physical activity component","Food + Safety","David Schmidt","D.C.","IFIC","Washington"],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["indoor + restaurant","reservation","China","music","playlist"],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:41.0065874Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","sentiment":"neutral","statistics":{"charactersCount":295,"transactionsCount":1},"confidenceScores":{"positive":0.23,"neutral":0.61,"negative":0.16},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.23,"neutral":0.61,"negative":0.16},"offset":0,"length":295,"text":"A + recent report by the Government Accountability Office (GAO) found that the + dramatic increase in oil and natural gas development on federal lands over + the past six years has stretched the staff of the BLM to a point that it has + been unable to meet its environmental protection responsibilities."}],"warnings":[]},{"id":"2","sentiment":"neutral","statistics":{"charactersCount":158,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":1.0,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.0,"neutral":1.0,"negative":0.0},"offset":0,"length":158,"text":"David + Schmidt, senior vice president--Food Safety, International Food Information + Council (IFIC), Washington, D.C., discussed the physical activity component."}],"warnings":[]},{"id":"4","sentiment":"positive","statistics":{"charactersCount":121,"transactionsCount":1},"confidenceScores":{"positive":0.57,"neutral":0.41,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.03,"neutral":0.96,"negative":0.01},"offset":0,"length":55,"text":"I + need a reservation for an indoor restaurant in China."},{"sentiment":"neutral","confidenceScores":{"positive":0.12,"neutral":0.78,"negative":0.1},"offset":56,"length":28,"text":"Please + don''t stop the music."},{"sentiment":"positive","confidenceScores":{"positive":0.57,"neutral":0.41,"negative":0.02},"offset":85,"length":36,"text":"Play + music and add it to my playlist"}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2020-04-01"}}]}}' + headers: + apim-request-id: + - 05b53899-25ee-44bc-bc86-538fbb3d530b + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:44 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '311' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_analyze_continuation_token.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_analyze_continuation_token.yaml new file mode 100644 index 000000000000..7eb39c3cf973 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_analyze_continuation_token.yaml @@ -0,0 +1,293 @@ +interactions: +- request: + body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "1"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false}, "taskName": "3"}], "entityLinkingTasks": [], "sentimentAnalysisTasks": + [{"parameters": {"model-version": "latest", "loggingOptOut": false, "opinionMining": + false}, "taskName": "2"}], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": + [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "1", "text": "A recent report by + the Government Accountability Office (GAO) found that the dramatic increase + in oil and natural gas development on federal lands over the past six years + has stretched the staff of the BLM to a point that it has been unable to meet + its environmental protection responsibilities.", "language": "en"}, {"id": "2", + "text": "David Schmidt, senior vice president--Food Safety, International Food + Information Council (IFIC), Washington, D.C., discussed the physical activity + component.", "language": "en"}, {"id": "3", "text": "", "language": "en"}, {"id": + "4", "text": "I need a reservation for an indoor restaurant in China. Please + don''t stop the music. Play music and add it to my playlist", "language": "en"}]}}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '1528' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze + response: + body: + string: '' + headers: + apim-request-id: 6ec8348e-ca21-4d16-b84a-b1f9ec14830e + date: Mon, 25 Oct 2021 19:25:17 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833 + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '517' + status: + code: 202 + message: Accepted + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True + response: + body: + string: '{"jobId":"006e06bb-8866-4b6f-852d-ed9d75f13833","lastUpdateDateTime":"2021-10-25T19:25:18Z","createdDateTime":"2021-10-25T19:25:18Z","expirationDateTime":"2021-10-26T19:25:18Z","status":"running","errors":[],"tasks":{"completed":0,"failed":0,"inProgress":4,"total":4}}' + headers: + apim-request-id: cd51fb39-8760-4d84-84f9-73923fcc6a9d + content-type: application/json; charset=utf-8 + date: Mon, 25 Oct 2021 19:25:23 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '7' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True + response: + body: + string: '{"jobId":"006e06bb-8866-4b6f-852d-ed9d75f13833","lastUpdateDateTime":"2021-10-25T19:25:28Z","createdDateTime":"2021-10-25T19:25:18Z","expirationDateTime":"2021-10-26T19:25:18Z","status":"running","errors":[],"tasks":{"completed":2,"failed":0,"inProgress":2,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:28.1220369Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:26.6161059Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","keyPhrases":["Government + Accountability Office","natural gas development","past six years","environmental + protection responsibilities","recent report","dramatic increase","federal + lands","GAO","oil","staff","BLM","point"],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["International + Food Information Council","senior vice president","physical activity component","Food + Safety","David Schmidt","D.C.","IFIC","Washington"],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["indoor + restaurant","reservation","China","music","playlist"],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}]}}' + headers: + apim-request-id: e5209e22-5751-456f-84a4-9cd1ccb69958 + content-type: application/json; charset=utf-8 + date: Mon, 25 Oct 2021 19:25:28 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '188' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True + response: + body: + string: '{"jobId":"006e06bb-8866-4b6f-852d-ed9d75f13833","lastUpdateDateTime":"2021-10-25T19:25:31Z","createdDateTime":"2021-10-25T19:25:18Z","expirationDateTime":"2021-10-26T19:25:18Z","status":"running","errors":[],"tasks":{"completed":3,"failed":0,"inProgress":1,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:28.1220369Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:31.9322667Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:26.6161059Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","keyPhrases":["Government + Accountability Office","natural gas development","past six years","environmental + protection responsibilities","recent report","dramatic increase","federal + lands","GAO","oil","staff","BLM","point"],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["International + Food Information Council","senior vice president","physical activity component","Food + Safety","David Schmidt","D.C.","IFIC","Washington"],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["indoor + restaurant","reservation","China","music","playlist"],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}]}}' + headers: + apim-request-id: 3cc4a635-3ddc-46ad-b129-3ff64c65a1d9 + content-type: application/json; charset=utf-8 + date: Mon, 25 Oct 2021 19:25:34 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '713' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True + response: + body: + string: '{"jobId":"006e06bb-8866-4b6f-852d-ed9d75f13833","lastUpdateDateTime":"2021-10-25T19:25:36Z","createdDateTime":"2021-10-25T19:25:18Z","expirationDateTime":"2021-10-26T19:25:18Z","status":"succeeded","errors":[],"tasks":{"completed":4,"failed":0,"inProgress":0,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:28.1220369Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:31.9322667Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:26.6161059Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","keyPhrases":["Government + Accountability Office","natural gas development","past six years","environmental + protection responsibilities","recent report","dramatic increase","federal + lands","GAO","oil","staff","BLM","point"],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["International + Food Information Council","senior vice president","physical activity component","Food + Safety","David Schmidt","D.C.","IFIC","Washington"],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["indoor + restaurant","reservation","China","music","playlist"],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:36.1869152Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","sentiment":"neutral","statistics":{"charactersCount":295,"transactionsCount":1},"confidenceScores":{"positive":0.23,"neutral":0.61,"negative":0.16},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.23,"neutral":0.61,"negative":0.16},"offset":0,"length":295,"text":"A + recent report by the Government Accountability Office (GAO) found that the + dramatic increase in oil and natural gas development on federal lands over + the past six years has stretched the staff of the BLM to a point that it has + been unable to meet its environmental protection responsibilities."}],"warnings":[]},{"id":"2","sentiment":"neutral","statistics":{"charactersCount":158,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":1.0,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.0,"neutral":1.0,"negative":0.0},"offset":0,"length":158,"text":"David + Schmidt, senior vice president--Food Safety, International Food Information + Council (IFIC), Washington, D.C., discussed the physical activity component."}],"warnings":[]},{"id":"4","sentiment":"positive","statistics":{"charactersCount":121,"transactionsCount":1},"confidenceScores":{"positive":0.57,"neutral":0.41,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.03,"neutral":0.96,"negative":0.01},"offset":0,"length":55,"text":"I + need a reservation for an indoor restaurant in China."},{"sentiment":"neutral","confidenceScores":{"positive":0.12,"neutral":0.78,"negative":0.1},"offset":56,"length":28,"text":"Please + don''t stop the music."},{"sentiment":"positive","confidenceScores":{"positive":0.57,"neutral":0.41,"negative":0.02},"offset":85,"length":36,"text":"Play + music and add it to my playlist"}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2020-04-01"}}]}}' + headers: + apim-request-id: de026245-1397-48a1-83ab-5eed81a5f74f + content-type: application/json; charset=utf-8 + date: Mon, 25 Oct 2021 19:25:42 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '2893' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True + response: + body: + string: '{"jobId":"006e06bb-8866-4b6f-852d-ed9d75f13833","lastUpdateDateTime":"2021-10-25T19:25:36Z","createdDateTime":"2021-10-25T19:25:18Z","expirationDateTime":"2021-10-26T19:25:18Z","status":"succeeded","errors":[],"tasks":{"completed":4,"failed":0,"inProgress":0,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:28.1220369Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:31.9322667Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:26.6161059Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","keyPhrases":["Government + Accountability Office","natural gas development","past six years","environmental + protection responsibilities","recent report","dramatic increase","federal + lands","GAO","oil","staff","BLM","point"],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["International + Food Information Council","senior vice president","physical activity component","Food + Safety","David Schmidt","D.C.","IFIC","Washington"],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["indoor + restaurant","reservation","China","music","playlist"],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:36.1869152Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","sentiment":"neutral","statistics":{"charactersCount":295,"transactionsCount":1},"confidenceScores":{"positive":0.23,"neutral":0.61,"negative":0.16},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.23,"neutral":0.61,"negative":0.16},"offset":0,"length":295,"text":"A + recent report by the Government Accountability Office (GAO) found that the + dramatic increase in oil and natural gas development on federal lands over + the past six years has stretched the staff of the BLM to a point that it has + been unable to meet its environmental protection responsibilities."}],"warnings":[]},{"id":"2","sentiment":"neutral","statistics":{"charactersCount":158,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":1.0,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.0,"neutral":1.0,"negative":0.0},"offset":0,"length":158,"text":"David + Schmidt, senior vice president--Food Safety, International Food Information + Council (IFIC), Washington, D.C., discussed the physical activity component."}],"warnings":[]},{"id":"4","sentiment":"positive","statistics":{"charactersCount":121,"transactionsCount":1},"confidenceScores":{"positive":0.57,"neutral":0.41,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.03,"neutral":0.96,"negative":0.01},"offset":0,"length":55,"text":"I + need a reservation for an indoor restaurant in China."},{"sentiment":"neutral","confidenceScores":{"positive":0.12,"neutral":0.78,"negative":0.1},"offset":56,"length":28,"text":"Please + don''t stop the music."},{"sentiment":"positive","confidenceScores":{"positive":0.57,"neutral":0.41,"negative":0.02},"offset":85,"length":36,"text":"Play + music and add it to my playlist"}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2020-04-01"}}]}}' + headers: + apim-request-id: 98e476b5-9bdc-491a-b4d5-7f5e3ff5bdc9 + content-type: application/json; charset=utf-8 + date: Mon, 25 Oct 2021 19:25:47 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '445' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_healthcare_continuation_token.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_healthcare_continuation_token.yaml new file mode 100644 index 000000000000..2c1b7de32458 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_healthcare_continuation_token.yaml @@ -0,0 +1,300 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "Baby not likely to have Meningitis. + In case of fever in the mother, consider Penicillin for the baby too.", "language": + "en"}, {"id": "2", "text": "patients must have histologically confirmed NHL", + "language": "en"}, {"id": "3", "text": "", "language": "en"}, {"id": "4", "text": + "The patient was diagnosed with Parkinsons Disease (PD)", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '393' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint + response: + body: + string: '' + headers: + apim-request-id: + - ea1692fd-0f77-42e4-8dc1-fb82e253ae6d + date: + - Mon, 25 Oct 2021 18:35:46 GMT + operation-location: + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8dee58e0-04ae-4494-8eda-b5e2a432a200 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '1566' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8dee58e0-04ae-4494-8eda-b5e2a432a200?showStats=True + response: + body: + string: '{"jobId":"8dee58e0-04ae-4494-8eda-b5e2a432a200","lastUpdateDateTime":"2021-10-25T18:35:46Z","createdDateTime":"2021-10-25T18:35:45Z","expirationDateTime":"2021-10-26T18:35:45Z","status":"notStarted","errors":[]}' + headers: + apim-request-id: + - 71ac1ee4-f149-42ac-a84e-af081a0de2bc + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 18:35:51 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '8' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8dee58e0-04ae-4494-8eda-b5e2a432a200?showStats=True + response: + body: + string: '{"jobId":"8dee58e0-04ae-4494-8eda-b5e2a432a200","lastUpdateDateTime":"2021-10-25T18:35:52Z","createdDateTime":"2021-10-25T18:35:45Z","expirationDateTime":"2021-10-26T18:35:45Z","status":"running","errors":[]}' + headers: + apim-request-id: + - e7d78131-1d19-4f9d-a4f7-a891b33e74a4 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 18:35:56 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '130' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8dee58e0-04ae-4494-8eda-b5e2a432a200?showStats=True + response: + body: + string: '{"jobId":"8dee58e0-04ae-4494-8eda-b5e2a432a200","lastUpdateDateTime":"2021-10-25T18:35:52Z","createdDateTime":"2021-10-25T18:35:45Z","expirationDateTime":"2021-10-26T18:35:45Z","status":"running","errors":[]}' + headers: + apim-request-id: + - 98a7200c-99e8-4bf2-bfe6-95d67a9680c4 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 18:35:57 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '126' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8dee58e0-04ae-4494-8eda-b5e2a432a200?showStats=True + response: + body: + string: '{"jobId":"8dee58e0-04ae-4494-8eda-b5e2a432a200","lastUpdateDateTime":"2021-10-25T18:35:52Z","createdDateTime":"2021-10-25T18:35:45Z","expirationDateTime":"2021-10-26T18:35:45Z","status":"running","errors":[]}' + headers: + apim-request-id: + - f71cfcfb-f4d2-4d30-a159-ae07401851b7 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 18:36:01 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '55' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8dee58e0-04ae-4494-8eda-b5e2a432a200?showStats=True + response: + body: + string: '{"jobId":"8dee58e0-04ae-4494-8eda-b5e2a432a200","lastUpdateDateTime":"2021-10-25T18:36:02Z","createdDateTime":"2021-10-25T18:35:45Z","expirationDateTime":"2021-10-26T18:35:45Z","status":"running","errors":[]}' + headers: + apim-request-id: + - dd2fe871-7503-4e52-b438-d1c529938382 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 18:36:02 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '8' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8dee58e0-04ae-4494-8eda-b5e2a432a200?showStats=True + response: + body: + string: '{"jobId":"8dee58e0-04ae-4494-8eda-b5e2a432a200","lastUpdateDateTime":"2021-10-25T18:36:02Z","createdDateTime":"2021-10-25T18:35:45Z","expirationDateTime":"2021-10-26T18:35:45Z","status":"succeeded","errors":[],"results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"offset":0,"length":4,"text":"Baby","category":"Age","confidenceScore":0.94,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]},{"offset":24,"length":10,"text":"Meningitis","category":"Diagnosis","confidenceScore":1.0,"assertion":{"certainty":"negativePossible"},"name":"Meningitis","links":[{"dataSource":"UMLS","id":"C0025289"},{"dataSource":"AOD","id":"0000006185"},{"dataSource":"BI","id":"BI00546"},{"dataSource":"CCPSS","id":"1018016"},{"dataSource":"CCSR_10","id":"NVS001"},{"dataSource":"CHV","id":"0000007932"},{"dataSource":"COSTAR","id":"478"},{"dataSource":"CSP","id":"2042-5301"},{"dataSource":"CST","id":"MENINGITIS"},{"dataSource":"DXP","id":"U002543"},{"dataSource":"HPO","id":"HP:0001287"},{"dataSource":"ICD10","id":"G03.9"},{"dataSource":"ICD10AM","id":"G03.9"},{"dataSource":"ICD10CM","id":"G03.9"},{"dataSource":"ICD9CM","id":"322.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU048434"},{"dataSource":"ICPC2P","id":"N71002"},{"dataSource":"LCH","id":"U002901"},{"dataSource":"LCH_NW","id":"sh85083562"},{"dataSource":"LNC","id":"LP20756-0"},{"dataSource":"MDR","id":"10027199"},{"dataSource":"MEDCIN","id":"31192"},{"dataSource":"MEDLINEPLUS","id":"324"},{"dataSource":"MSH","id":"D008581"},{"dataSource":"NANDA-I","id":"02899"},{"dataSource":"NCI","id":"C26828"},{"dataSource":"NCI_CPTAC","id":"C26828"},{"dataSource":"NCI_CTCAE","id":"E11458"},{"dataSource":"NCI_FDA","id":"2389"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000471780"},{"dataSource":"NCI_NICHD","id":"C26828"},{"dataSource":"OMIM","id":"MTHU005994"},{"dataSource":"PSY","id":"30660"},{"dataSource":"RCD","id":"X000H"},{"dataSource":"SNM","id":"M-40000"},{"dataSource":"SNMI","id":"DA-10010"},{"dataSource":"SNOMEDCT_US","id":"7180009"},{"dataSource":"WHO","id":"0955"}]},{"offset":47,"length":5,"text":"fever","category":"SymptomOrSign","confidenceScore":1.0,"name":"Fever","links":[{"dataSource":"UMLS","id":"C0015967"},{"dataSource":"AIR","id":"FEVER"},{"dataSource":"AOD","id":"0000004396"},{"dataSource":"BI","id":"BI00751"},{"dataSource":"CCC","id":"K25.2"},{"dataSource":"CCPSS","id":"1017166"},{"dataSource":"CCSR_10","id":"SYM002"},{"dataSource":"CHV","id":"0000005010"},{"dataSource":"COSTAR","id":"300"},{"dataSource":"CPM","id":"65287"},{"dataSource":"CSP","id":"2871-4310"},{"dataSource":"CST","id":"FEVER"},{"dataSource":"DXP","id":"U001483"},{"dataSource":"GO","id":"GO:0001660"},{"dataSource":"HPO","id":"HP:0001945"},{"dataSource":"ICD10","id":"R50.9"},{"dataSource":"ICD10AM","id":"R50.9"},{"dataSource":"ICD10CM","id":"R50.9"},{"dataSource":"ICD9CM","id":"780.60"},{"dataSource":"ICNP","id":"10041539"},{"dataSource":"ICPC","id":"A03"},{"dataSource":"ICPC2EENG","id":"A03"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU041751"},{"dataSource":"ICPC2P","id":"A03002"},{"dataSource":"LCH","id":"U001776"},{"dataSource":"LCH_NW","id":"sh85047994"},{"dataSource":"LNC","id":"MTHU013518"},{"dataSource":"MDR","id":"10005911"},{"dataSource":"MEDCIN","id":"6005"},{"dataSource":"MEDLINEPLUS","id":"511"},{"dataSource":"MSH","id":"D005334"},{"dataSource":"MTHICD9","id":"780.60"},{"dataSource":"NANDA-I","id":"01128"},{"dataSource":"NCI","id":"C3038"},{"dataSource":"NCI_CTCAE","id":"E11102"},{"dataSource":"NCI_FDA","id":"1858"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000450108"},{"dataSource":"NCI_NICHD","id":"C3038"},{"dataSource":"NOC","id":"070307"},{"dataSource":"OMIM","id":"MTHU005439"},{"dataSource":"OMS","id":"50.03"},{"dataSource":"PCDS","id":"PRB_11020.02"},{"dataSource":"PDQ","id":"CDR0000775882"},{"dataSource":"PSY","id":"23840"},{"dataSource":"QMR","id":"Q0200115"},{"dataSource":"RCD","id":"X76EI"},{"dataSource":"SNM","id":"F-03003"},{"dataSource":"SNMI","id":"F-03003"},{"dataSource":"SNOMEDCT_US","id":"386661006"},{"dataSource":"WHO","id":"0725"}]},{"offset":60,"length":6,"text":"mother","category":"FamilyRelation","confidenceScore":0.99,"name":"Mother + (person)","links":[{"dataSource":"UMLS","id":"C0026591"},{"dataSource":"AOD","id":"0000027173"},{"dataSource":"CCPSS","id":"U000286"},{"dataSource":"CHV","id":"0000008266"},{"dataSource":"CSP","id":"1124-5492"},{"dataSource":"HL7V3.0","id":"MTH"},{"dataSource":"LCH","id":"U003028"},{"dataSource":"LCH_NW","id":"sh85087526"},{"dataSource":"LNC","id":"LA10417-6"},{"dataSource":"MSH","id":"D009035"},{"dataSource":"NCI","id":"C25189"},{"dataSource":"NCI_CDISC","id":"C25189"},{"dataSource":"NCI_GDC","id":"C25189"},{"dataSource":"PSY","id":"32140"},{"dataSource":"RCD","id":"X78ym"},{"dataSource":"SNMI","id":"S-10120"},{"dataSource":"SNOMEDCT_US","id":"72705000"}]},{"offset":77,"length":10,"text":"Penicillin","category":"MedicationName","confidenceScore":0.9,"assertion":{"certainty":"neutralPossible"},"name":"penicillins","links":[{"dataSource":"UMLS","id":"C0030842"},{"dataSource":"AOD","id":"0000019206"},{"dataSource":"ATC","id":"J01C"},{"dataSource":"CCPSS","id":"0014106"},{"dataSource":"CHV","id":"0000009423"},{"dataSource":"CSP","id":"0199-8025"},{"dataSource":"GS","id":"4011"},{"dataSource":"LCH","id":"U003521"},{"dataSource":"LCH_NW","id":"sh85099402"},{"dataSource":"LNC","id":"LP14319-5"},{"dataSource":"MEDCIN","id":"40319"},{"dataSource":"MMSL","id":"d00116"},{"dataSource":"MSH","id":"D010406"},{"dataSource":"NCI","id":"C1500"},{"dataSource":"NCI_DTP","id":"NSC0402815"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045296"},{"dataSource":"NDDF","id":"016121"},{"dataSource":"PSY","id":"37190"},{"dataSource":"RCD","id":"x009C"},{"dataSource":"SNM","id":"E-7260"},{"dataSource":"SNMI","id":"C-54000"},{"dataSource":"SNOMEDCT_US","id":"764146007"},{"dataSource":"VANDF","id":"4019880"}]},{"offset":96,"length":4,"text":"baby","category":"FamilyRelation","confidenceScore":1.0,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]}],"relations":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":47,"transactionsCount":1},"entities":[{"offset":19,"length":14,"text":"histologically","category":"ExaminationName","confidenceScore":1.0,"name":"Histology + Procedure","links":[{"dataSource":"UMLS","id":"C0344441"},{"dataSource":"CHV","id":"0000030964"},{"dataSource":"LNC","id":"MTHU010496"},{"dataSource":"MDR","id":"10062005"},{"dataSource":"MTH","id":"U002823"},{"dataSource":"MTHMST","id":"MT140012"},{"dataSource":"NCI","id":"C49131"},{"dataSource":"SNOMEDCT_US","id":"714797009"}]},{"offset":44,"length":3,"text":"NHL","category":"Diagnosis","confidenceScore":1.0,"name":"Lymphoma, + Non-Hodgkin","links":[{"dataSource":"UMLS","id":"C0024305"},{"dataSource":"BI","id":"BI00323"},{"dataSource":"CCPSS","id":"0001640"},{"dataSource":"CCS","id":"2.10.2"},{"dataSource":"CCSR_10","id":"NEO058"},{"dataSource":"CHV","id":"0000007621"},{"dataSource":"COSTAR","id":"U000045"},{"dataSource":"CSP","id":"4001-0094"},{"dataSource":"DXP","id":"U002830"},{"dataSource":"HPO","id":"HP:0012539"},{"dataSource":"ICD10","id":"C85.9"},{"dataSource":"ICD10AM","id":"M9672/3"},{"dataSource":"ICD10CM","id":"C85.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU053464"},{"dataSource":"ICPC2P","id":"B74002"},{"dataSource":"MDR","id":"10029547"},{"dataSource":"MEDCIN","id":"35839"},{"dataSource":"MEDLINEPLUS","id":"117"},{"dataSource":"MSH","id":"D008228"},{"dataSource":"NCI","id":"C3211"},{"dataSource":"NCI_CELLOSAURUS","id":"C3211"},{"dataSource":"NCI_CPTAC","id":"C3211"},{"dataSource":"NCI_CTEP-SDC","id":"10029593"},{"dataSource":"NCI_CTRP","id":"C3211"},{"dataSource":"NCI_GDC","id":"C3211"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045148"},{"dataSource":"NCI_NICHD","id":"C3211"},{"dataSource":"OMIM","id":"MTHU014311"},{"dataSource":"PDQ","id":"CDR0000038957"},{"dataSource":"QMR","id":"R0121804"},{"dataSource":"RCD","id":"B627."},{"dataSource":"SNM","id":"M-YYX54"},{"dataSource":"SNMI","id":"M-96723"},{"dataSource":"SNOMEDCT_US","id":"1929004"},{"dataSource":"WHO","id":"1544"}]}],"relations":[{"relationType":"ExaminationFindsCondition","entities":[{"ref":"#/results/documents/1/entities/0","role":"Examination"},{"ref":"#/results/documents/1/entities/1","role":"Condition"}]}],"warnings":[]},{"id":"4","statistics":{"charactersCount":54,"transactionsCount":1},"entities":[{"offset":31,"length":18,"text":"Parkinsons + Disease","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR + SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]},{"offset":51,"length":2,"text":"PD","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson + Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR + SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]}],"relations":[{"relationType":"Abbreviation","entities":[{"ref":"#/results/documents/2/entities/0","role":"FullTerm"},{"ref":"#/results/documents/2/entities/1","role":"AbbreviatedTerm"}]}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-05-15"}}' + headers: + apim-request-id: + - 5b99bd19-d94d-4361-b049-8a09287e188e + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 18:36:06 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '324' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8dee58e0-04ae-4494-8eda-b5e2a432a200?showStats=True + response: + body: + string: '{"jobId":"8dee58e0-04ae-4494-8eda-b5e2a432a200","lastUpdateDateTime":"2021-10-25T18:36:02Z","createdDateTime":"2021-10-25T18:35:45Z","expirationDateTime":"2021-10-26T18:35:45Z","status":"succeeded","errors":[],"results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"offset":0,"length":4,"text":"Baby","category":"Age","confidenceScore":0.94,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]},{"offset":24,"length":10,"text":"Meningitis","category":"Diagnosis","confidenceScore":1.0,"assertion":{"certainty":"negativePossible"},"name":"Meningitis","links":[{"dataSource":"UMLS","id":"C0025289"},{"dataSource":"AOD","id":"0000006185"},{"dataSource":"BI","id":"BI00546"},{"dataSource":"CCPSS","id":"1018016"},{"dataSource":"CCSR_10","id":"NVS001"},{"dataSource":"CHV","id":"0000007932"},{"dataSource":"COSTAR","id":"478"},{"dataSource":"CSP","id":"2042-5301"},{"dataSource":"CST","id":"MENINGITIS"},{"dataSource":"DXP","id":"U002543"},{"dataSource":"HPO","id":"HP:0001287"},{"dataSource":"ICD10","id":"G03.9"},{"dataSource":"ICD10AM","id":"G03.9"},{"dataSource":"ICD10CM","id":"G03.9"},{"dataSource":"ICD9CM","id":"322.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU048434"},{"dataSource":"ICPC2P","id":"N71002"},{"dataSource":"LCH","id":"U002901"},{"dataSource":"LCH_NW","id":"sh85083562"},{"dataSource":"LNC","id":"LP20756-0"},{"dataSource":"MDR","id":"10027199"},{"dataSource":"MEDCIN","id":"31192"},{"dataSource":"MEDLINEPLUS","id":"324"},{"dataSource":"MSH","id":"D008581"},{"dataSource":"NANDA-I","id":"02899"},{"dataSource":"NCI","id":"C26828"},{"dataSource":"NCI_CPTAC","id":"C26828"},{"dataSource":"NCI_CTCAE","id":"E11458"},{"dataSource":"NCI_FDA","id":"2389"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000471780"},{"dataSource":"NCI_NICHD","id":"C26828"},{"dataSource":"OMIM","id":"MTHU005994"},{"dataSource":"PSY","id":"30660"},{"dataSource":"RCD","id":"X000H"},{"dataSource":"SNM","id":"M-40000"},{"dataSource":"SNMI","id":"DA-10010"},{"dataSource":"SNOMEDCT_US","id":"7180009"},{"dataSource":"WHO","id":"0955"}]},{"offset":47,"length":5,"text":"fever","category":"SymptomOrSign","confidenceScore":1.0,"name":"Fever","links":[{"dataSource":"UMLS","id":"C0015967"},{"dataSource":"AIR","id":"FEVER"},{"dataSource":"AOD","id":"0000004396"},{"dataSource":"BI","id":"BI00751"},{"dataSource":"CCC","id":"K25.2"},{"dataSource":"CCPSS","id":"1017166"},{"dataSource":"CCSR_10","id":"SYM002"},{"dataSource":"CHV","id":"0000005010"},{"dataSource":"COSTAR","id":"300"},{"dataSource":"CPM","id":"65287"},{"dataSource":"CSP","id":"2871-4310"},{"dataSource":"CST","id":"FEVER"},{"dataSource":"DXP","id":"U001483"},{"dataSource":"GO","id":"GO:0001660"},{"dataSource":"HPO","id":"HP:0001945"},{"dataSource":"ICD10","id":"R50.9"},{"dataSource":"ICD10AM","id":"R50.9"},{"dataSource":"ICD10CM","id":"R50.9"},{"dataSource":"ICD9CM","id":"780.60"},{"dataSource":"ICNP","id":"10041539"},{"dataSource":"ICPC","id":"A03"},{"dataSource":"ICPC2EENG","id":"A03"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU041751"},{"dataSource":"ICPC2P","id":"A03002"},{"dataSource":"LCH","id":"U001776"},{"dataSource":"LCH_NW","id":"sh85047994"},{"dataSource":"LNC","id":"MTHU013518"},{"dataSource":"MDR","id":"10005911"},{"dataSource":"MEDCIN","id":"6005"},{"dataSource":"MEDLINEPLUS","id":"511"},{"dataSource":"MSH","id":"D005334"},{"dataSource":"MTHICD9","id":"780.60"},{"dataSource":"NANDA-I","id":"01128"},{"dataSource":"NCI","id":"C3038"},{"dataSource":"NCI_CTCAE","id":"E11102"},{"dataSource":"NCI_FDA","id":"1858"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000450108"},{"dataSource":"NCI_NICHD","id":"C3038"},{"dataSource":"NOC","id":"070307"},{"dataSource":"OMIM","id":"MTHU005439"},{"dataSource":"OMS","id":"50.03"},{"dataSource":"PCDS","id":"PRB_11020.02"},{"dataSource":"PDQ","id":"CDR0000775882"},{"dataSource":"PSY","id":"23840"},{"dataSource":"QMR","id":"Q0200115"},{"dataSource":"RCD","id":"X76EI"},{"dataSource":"SNM","id":"F-03003"},{"dataSource":"SNMI","id":"F-03003"},{"dataSource":"SNOMEDCT_US","id":"386661006"},{"dataSource":"WHO","id":"0725"}]},{"offset":60,"length":6,"text":"mother","category":"FamilyRelation","confidenceScore":0.99,"name":"Mother + (person)","links":[{"dataSource":"UMLS","id":"C0026591"},{"dataSource":"AOD","id":"0000027173"},{"dataSource":"CCPSS","id":"U000286"},{"dataSource":"CHV","id":"0000008266"},{"dataSource":"CSP","id":"1124-5492"},{"dataSource":"HL7V3.0","id":"MTH"},{"dataSource":"LCH","id":"U003028"},{"dataSource":"LCH_NW","id":"sh85087526"},{"dataSource":"LNC","id":"LA10417-6"},{"dataSource":"MSH","id":"D009035"},{"dataSource":"NCI","id":"C25189"},{"dataSource":"NCI_CDISC","id":"C25189"},{"dataSource":"NCI_GDC","id":"C25189"},{"dataSource":"PSY","id":"32140"},{"dataSource":"RCD","id":"X78ym"},{"dataSource":"SNMI","id":"S-10120"},{"dataSource":"SNOMEDCT_US","id":"72705000"}]},{"offset":77,"length":10,"text":"Penicillin","category":"MedicationName","confidenceScore":0.9,"assertion":{"certainty":"neutralPossible"},"name":"penicillins","links":[{"dataSource":"UMLS","id":"C0030842"},{"dataSource":"AOD","id":"0000019206"},{"dataSource":"ATC","id":"J01C"},{"dataSource":"CCPSS","id":"0014106"},{"dataSource":"CHV","id":"0000009423"},{"dataSource":"CSP","id":"0199-8025"},{"dataSource":"GS","id":"4011"},{"dataSource":"LCH","id":"U003521"},{"dataSource":"LCH_NW","id":"sh85099402"},{"dataSource":"LNC","id":"LP14319-5"},{"dataSource":"MEDCIN","id":"40319"},{"dataSource":"MMSL","id":"d00116"},{"dataSource":"MSH","id":"D010406"},{"dataSource":"NCI","id":"C1500"},{"dataSource":"NCI_DTP","id":"NSC0402815"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045296"},{"dataSource":"NDDF","id":"016121"},{"dataSource":"PSY","id":"37190"},{"dataSource":"RCD","id":"x009C"},{"dataSource":"SNM","id":"E-7260"},{"dataSource":"SNMI","id":"C-54000"},{"dataSource":"SNOMEDCT_US","id":"764146007"},{"dataSource":"VANDF","id":"4019880"}]},{"offset":96,"length":4,"text":"baby","category":"FamilyRelation","confidenceScore":1.0,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]}],"relations":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":47,"transactionsCount":1},"entities":[{"offset":19,"length":14,"text":"histologically","category":"ExaminationName","confidenceScore":1.0,"name":"Histology + Procedure","links":[{"dataSource":"UMLS","id":"C0344441"},{"dataSource":"CHV","id":"0000030964"},{"dataSource":"LNC","id":"MTHU010496"},{"dataSource":"MDR","id":"10062005"},{"dataSource":"MTH","id":"U002823"},{"dataSource":"MTHMST","id":"MT140012"},{"dataSource":"NCI","id":"C49131"},{"dataSource":"SNOMEDCT_US","id":"714797009"}]},{"offset":44,"length":3,"text":"NHL","category":"Diagnosis","confidenceScore":1.0,"name":"Lymphoma, + Non-Hodgkin","links":[{"dataSource":"UMLS","id":"C0024305"},{"dataSource":"BI","id":"BI00323"},{"dataSource":"CCPSS","id":"0001640"},{"dataSource":"CCS","id":"2.10.2"},{"dataSource":"CCSR_10","id":"NEO058"},{"dataSource":"CHV","id":"0000007621"},{"dataSource":"COSTAR","id":"U000045"},{"dataSource":"CSP","id":"4001-0094"},{"dataSource":"DXP","id":"U002830"},{"dataSource":"HPO","id":"HP:0012539"},{"dataSource":"ICD10","id":"C85.9"},{"dataSource":"ICD10AM","id":"M9672/3"},{"dataSource":"ICD10CM","id":"C85.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU053464"},{"dataSource":"ICPC2P","id":"B74002"},{"dataSource":"MDR","id":"10029547"},{"dataSource":"MEDCIN","id":"35839"},{"dataSource":"MEDLINEPLUS","id":"117"},{"dataSource":"MSH","id":"D008228"},{"dataSource":"NCI","id":"C3211"},{"dataSource":"NCI_CELLOSAURUS","id":"C3211"},{"dataSource":"NCI_CPTAC","id":"C3211"},{"dataSource":"NCI_CTEP-SDC","id":"10029593"},{"dataSource":"NCI_CTRP","id":"C3211"},{"dataSource":"NCI_GDC","id":"C3211"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045148"},{"dataSource":"NCI_NICHD","id":"C3211"},{"dataSource":"OMIM","id":"MTHU014311"},{"dataSource":"PDQ","id":"CDR0000038957"},{"dataSource":"QMR","id":"R0121804"},{"dataSource":"RCD","id":"B627."},{"dataSource":"SNM","id":"M-YYX54"},{"dataSource":"SNMI","id":"M-96723"},{"dataSource":"SNOMEDCT_US","id":"1929004"},{"dataSource":"WHO","id":"1544"}]}],"relations":[{"relationType":"ExaminationFindsCondition","entities":[{"ref":"#/results/documents/1/entities/0","role":"Examination"},{"ref":"#/results/documents/1/entities/1","role":"Condition"}]}],"warnings":[]},{"id":"4","statistics":{"charactersCount":54,"transactionsCount":1},"entities":[{"offset":31,"length":18,"text":"Parkinsons + Disease","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR + SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]},{"offset":51,"length":2,"text":"PD","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson + Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR + SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]}],"relations":[{"relationType":"Abbreviation","entities":[{"ref":"#/results/documents/2/entities/0","role":"FullTerm"},{"ref":"#/results/documents/2/entities/1","role":"AbbreviatedTerm"}]}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-05-15"}}' + headers: + apim-request-id: + - 3e39f1f1-1a86-4fde-a222-503bc8ecdc6a + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 18:36:08 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '1789' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_healthcare_continuation_token.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_healthcare_continuation_token.yaml new file mode 100644 index 000000000000..869ffc97d56f --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_healthcare_continuation_token.yaml @@ -0,0 +1,96 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "Baby not likely to have Meningitis. + In case of fever in the mother, consider Penicillin for the baby too.", "language": + "en"}, {"id": "2", "text": "patients must have histologically confirmed NHL", + "language": "en"}, {"id": "3", "text": "", "language": "en"}, {"id": "4", "text": + "The patient was diagnosed with Parkinsons Disease (PD)", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '393' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint + response: + body: + string: '' + headers: + apim-request-id: e4937493-c255-4e5e-8ee4-2d6e63777d9f + date: Mon, 25 Oct 2021 19:22:45 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/53509204-49cd-4066-8864-6469dd11c982 + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '235' + status: + code: 202 + message: Accepted + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/53509204-49cd-4066-8864-6469dd11c982?showStats=True + response: + body: + string: '{"jobId":"53509204-49cd-4066-8864-6469dd11c982","lastUpdateDateTime":"2021-10-25T19:22:47Z","createdDateTime":"2021-10-25T19:22:45Z","expirationDateTime":"2021-10-26T19:22:45Z","status":"succeeded","errors":[],"results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"offset":0,"length":4,"text":"Baby","category":"Age","confidenceScore":0.94,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]},{"offset":24,"length":10,"text":"Meningitis","category":"Diagnosis","confidenceScore":1.0,"assertion":{"certainty":"negativePossible"},"name":"Meningitis","links":[{"dataSource":"UMLS","id":"C0025289"},{"dataSource":"AOD","id":"0000006185"},{"dataSource":"BI","id":"BI00546"},{"dataSource":"CCPSS","id":"1018016"},{"dataSource":"CCSR_10","id":"NVS001"},{"dataSource":"CHV","id":"0000007932"},{"dataSource":"COSTAR","id":"478"},{"dataSource":"CSP","id":"2042-5301"},{"dataSource":"CST","id":"MENINGITIS"},{"dataSource":"DXP","id":"U002543"},{"dataSource":"HPO","id":"HP:0001287"},{"dataSource":"ICD10","id":"G03.9"},{"dataSource":"ICD10AM","id":"G03.9"},{"dataSource":"ICD10CM","id":"G03.9"},{"dataSource":"ICD9CM","id":"322.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU048434"},{"dataSource":"ICPC2P","id":"N71002"},{"dataSource":"LCH","id":"U002901"},{"dataSource":"LCH_NW","id":"sh85083562"},{"dataSource":"LNC","id":"LP20756-0"},{"dataSource":"MDR","id":"10027199"},{"dataSource":"MEDCIN","id":"31192"},{"dataSource":"MEDLINEPLUS","id":"324"},{"dataSource":"MSH","id":"D008581"},{"dataSource":"NANDA-I","id":"02899"},{"dataSource":"NCI","id":"C26828"},{"dataSource":"NCI_CPTAC","id":"C26828"},{"dataSource":"NCI_CTCAE","id":"E11458"},{"dataSource":"NCI_FDA","id":"2389"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000471780"},{"dataSource":"NCI_NICHD","id":"C26828"},{"dataSource":"OMIM","id":"MTHU005994"},{"dataSource":"PSY","id":"30660"},{"dataSource":"RCD","id":"X000H"},{"dataSource":"SNM","id":"M-40000"},{"dataSource":"SNMI","id":"DA-10010"},{"dataSource":"SNOMEDCT_US","id":"7180009"},{"dataSource":"WHO","id":"0955"}]},{"offset":47,"length":5,"text":"fever","category":"SymptomOrSign","confidenceScore":1.0,"name":"Fever","links":[{"dataSource":"UMLS","id":"C0015967"},{"dataSource":"AIR","id":"FEVER"},{"dataSource":"AOD","id":"0000004396"},{"dataSource":"BI","id":"BI00751"},{"dataSource":"CCC","id":"K25.2"},{"dataSource":"CCPSS","id":"1017166"},{"dataSource":"CCSR_10","id":"SYM002"},{"dataSource":"CHV","id":"0000005010"},{"dataSource":"COSTAR","id":"300"},{"dataSource":"CPM","id":"65287"},{"dataSource":"CSP","id":"2871-4310"},{"dataSource":"CST","id":"FEVER"},{"dataSource":"DXP","id":"U001483"},{"dataSource":"GO","id":"GO:0001660"},{"dataSource":"HPO","id":"HP:0001945"},{"dataSource":"ICD10","id":"R50.9"},{"dataSource":"ICD10AM","id":"R50.9"},{"dataSource":"ICD10CM","id":"R50.9"},{"dataSource":"ICD9CM","id":"780.60"},{"dataSource":"ICNP","id":"10041539"},{"dataSource":"ICPC","id":"A03"},{"dataSource":"ICPC2EENG","id":"A03"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU041751"},{"dataSource":"ICPC2P","id":"A03002"},{"dataSource":"LCH","id":"U001776"},{"dataSource":"LCH_NW","id":"sh85047994"},{"dataSource":"LNC","id":"MTHU013518"},{"dataSource":"MDR","id":"10005911"},{"dataSource":"MEDCIN","id":"6005"},{"dataSource":"MEDLINEPLUS","id":"511"},{"dataSource":"MSH","id":"D005334"},{"dataSource":"MTHICD9","id":"780.60"},{"dataSource":"NANDA-I","id":"01128"},{"dataSource":"NCI","id":"C3038"},{"dataSource":"NCI_CTCAE","id":"E11102"},{"dataSource":"NCI_FDA","id":"1858"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000450108"},{"dataSource":"NCI_NICHD","id":"C3038"},{"dataSource":"NOC","id":"070307"},{"dataSource":"OMIM","id":"MTHU005439"},{"dataSource":"OMS","id":"50.03"},{"dataSource":"PCDS","id":"PRB_11020.02"},{"dataSource":"PDQ","id":"CDR0000775882"},{"dataSource":"PSY","id":"23840"},{"dataSource":"QMR","id":"Q0200115"},{"dataSource":"RCD","id":"X76EI"},{"dataSource":"SNM","id":"F-03003"},{"dataSource":"SNMI","id":"F-03003"},{"dataSource":"SNOMEDCT_US","id":"386661006"},{"dataSource":"WHO","id":"0725"}]},{"offset":60,"length":6,"text":"mother","category":"FamilyRelation","confidenceScore":0.99,"name":"Mother + (person)","links":[{"dataSource":"UMLS","id":"C0026591"},{"dataSource":"AOD","id":"0000027173"},{"dataSource":"CCPSS","id":"U000286"},{"dataSource":"CHV","id":"0000008266"},{"dataSource":"CSP","id":"1124-5492"},{"dataSource":"HL7V3.0","id":"MTH"},{"dataSource":"LCH","id":"U003028"},{"dataSource":"LCH_NW","id":"sh85087526"},{"dataSource":"LNC","id":"LA10417-6"},{"dataSource":"MSH","id":"D009035"},{"dataSource":"NCI","id":"C25189"},{"dataSource":"NCI_CDISC","id":"C25189"},{"dataSource":"NCI_GDC","id":"C25189"},{"dataSource":"PSY","id":"32140"},{"dataSource":"RCD","id":"X78ym"},{"dataSource":"SNMI","id":"S-10120"},{"dataSource":"SNOMEDCT_US","id":"72705000"}]},{"offset":77,"length":10,"text":"Penicillin","category":"MedicationName","confidenceScore":0.9,"assertion":{"certainty":"neutralPossible"},"name":"penicillins","links":[{"dataSource":"UMLS","id":"C0030842"},{"dataSource":"AOD","id":"0000019206"},{"dataSource":"ATC","id":"J01C"},{"dataSource":"CCPSS","id":"0014106"},{"dataSource":"CHV","id":"0000009423"},{"dataSource":"CSP","id":"0199-8025"},{"dataSource":"GS","id":"4011"},{"dataSource":"LCH","id":"U003521"},{"dataSource":"LCH_NW","id":"sh85099402"},{"dataSource":"LNC","id":"LP14319-5"},{"dataSource":"MEDCIN","id":"40319"},{"dataSource":"MMSL","id":"d00116"},{"dataSource":"MSH","id":"D010406"},{"dataSource":"NCI","id":"C1500"},{"dataSource":"NCI_DTP","id":"NSC0402815"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045296"},{"dataSource":"NDDF","id":"016121"},{"dataSource":"PSY","id":"37190"},{"dataSource":"RCD","id":"x009C"},{"dataSource":"SNM","id":"E-7260"},{"dataSource":"SNMI","id":"C-54000"},{"dataSource":"SNOMEDCT_US","id":"764146007"},{"dataSource":"VANDF","id":"4019880"}]},{"offset":96,"length":4,"text":"baby","category":"FamilyRelation","confidenceScore":1.0,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]}],"relations":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":47,"transactionsCount":1},"entities":[{"offset":19,"length":14,"text":"histologically","category":"ExaminationName","confidenceScore":1.0,"name":"Histology + Procedure","links":[{"dataSource":"UMLS","id":"C0344441"},{"dataSource":"CHV","id":"0000030964"},{"dataSource":"LNC","id":"MTHU010496"},{"dataSource":"MDR","id":"10062005"},{"dataSource":"MTH","id":"U002823"},{"dataSource":"MTHMST","id":"MT140012"},{"dataSource":"NCI","id":"C49131"},{"dataSource":"SNOMEDCT_US","id":"714797009"}]},{"offset":44,"length":3,"text":"NHL","category":"Diagnosis","confidenceScore":1.0,"name":"Lymphoma, + Non-Hodgkin","links":[{"dataSource":"UMLS","id":"C0024305"},{"dataSource":"BI","id":"BI00323"},{"dataSource":"CCPSS","id":"0001640"},{"dataSource":"CCS","id":"2.10.2"},{"dataSource":"CCSR_10","id":"NEO058"},{"dataSource":"CHV","id":"0000007621"},{"dataSource":"COSTAR","id":"U000045"},{"dataSource":"CSP","id":"4001-0094"},{"dataSource":"DXP","id":"U002830"},{"dataSource":"HPO","id":"HP:0012539"},{"dataSource":"ICD10","id":"C85.9"},{"dataSource":"ICD10AM","id":"M9672/3"},{"dataSource":"ICD10CM","id":"C85.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU053464"},{"dataSource":"ICPC2P","id":"B74002"},{"dataSource":"MDR","id":"10029547"},{"dataSource":"MEDCIN","id":"35839"},{"dataSource":"MEDLINEPLUS","id":"117"},{"dataSource":"MSH","id":"D008228"},{"dataSource":"NCI","id":"C3211"},{"dataSource":"NCI_CELLOSAURUS","id":"C3211"},{"dataSource":"NCI_CPTAC","id":"C3211"},{"dataSource":"NCI_CTEP-SDC","id":"10029593"},{"dataSource":"NCI_CTRP","id":"C3211"},{"dataSource":"NCI_GDC","id":"C3211"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045148"},{"dataSource":"NCI_NICHD","id":"C3211"},{"dataSource":"OMIM","id":"MTHU014311"},{"dataSource":"PDQ","id":"CDR0000038957"},{"dataSource":"QMR","id":"R0121804"},{"dataSource":"RCD","id":"B627."},{"dataSource":"SNM","id":"M-YYX54"},{"dataSource":"SNMI","id":"M-96723"},{"dataSource":"SNOMEDCT_US","id":"1929004"},{"dataSource":"WHO","id":"1544"}]}],"relations":[{"relationType":"ExaminationFindsCondition","entities":[{"ref":"#/results/documents/1/entities/0","role":"Examination"},{"ref":"#/results/documents/1/entities/1","role":"Condition"}]}],"warnings":[]},{"id":"4","statistics":{"charactersCount":54,"transactionsCount":1},"entities":[{"offset":31,"length":18,"text":"Parkinsons + Disease","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR + SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]},{"offset":51,"length":2,"text":"PD","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson + Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR + SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]}],"relations":[{"relationType":"Abbreviation","entities":[{"ref":"#/results/documents/2/entities/0","role":"FullTerm"},{"ref":"#/results/documents/2/entities/1","role":"AbbreviatedTerm"}]}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-05-15"}}' + headers: + apim-request-id: 2d69e095-4583-4bf7-aa9f-9281ae0bdb0e + content-type: application/json; charset=utf-8 + date: Mon, 25 Oct 2021 19:22:50 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '129' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/53509204-49cd-4066-8864-6469dd11c982?showStats=True +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/53509204-49cd-4066-8864-6469dd11c982?showStats=True + response: + body: + string: '{"jobId":"53509204-49cd-4066-8864-6469dd11c982","lastUpdateDateTime":"2021-10-25T19:22:47Z","createdDateTime":"2021-10-25T19:22:45Z","expirationDateTime":"2021-10-26T19:22:45Z","status":"succeeded","errors":[],"results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"offset":0,"length":4,"text":"Baby","category":"Age","confidenceScore":0.94,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]},{"offset":24,"length":10,"text":"Meningitis","category":"Diagnosis","confidenceScore":1.0,"assertion":{"certainty":"negativePossible"},"name":"Meningitis","links":[{"dataSource":"UMLS","id":"C0025289"},{"dataSource":"AOD","id":"0000006185"},{"dataSource":"BI","id":"BI00546"},{"dataSource":"CCPSS","id":"1018016"},{"dataSource":"CCSR_10","id":"NVS001"},{"dataSource":"CHV","id":"0000007932"},{"dataSource":"COSTAR","id":"478"},{"dataSource":"CSP","id":"2042-5301"},{"dataSource":"CST","id":"MENINGITIS"},{"dataSource":"DXP","id":"U002543"},{"dataSource":"HPO","id":"HP:0001287"},{"dataSource":"ICD10","id":"G03.9"},{"dataSource":"ICD10AM","id":"G03.9"},{"dataSource":"ICD10CM","id":"G03.9"},{"dataSource":"ICD9CM","id":"322.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU048434"},{"dataSource":"ICPC2P","id":"N71002"},{"dataSource":"LCH","id":"U002901"},{"dataSource":"LCH_NW","id":"sh85083562"},{"dataSource":"LNC","id":"LP20756-0"},{"dataSource":"MDR","id":"10027199"},{"dataSource":"MEDCIN","id":"31192"},{"dataSource":"MEDLINEPLUS","id":"324"},{"dataSource":"MSH","id":"D008581"},{"dataSource":"NANDA-I","id":"02899"},{"dataSource":"NCI","id":"C26828"},{"dataSource":"NCI_CPTAC","id":"C26828"},{"dataSource":"NCI_CTCAE","id":"E11458"},{"dataSource":"NCI_FDA","id":"2389"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000471780"},{"dataSource":"NCI_NICHD","id":"C26828"},{"dataSource":"OMIM","id":"MTHU005994"},{"dataSource":"PSY","id":"30660"},{"dataSource":"RCD","id":"X000H"},{"dataSource":"SNM","id":"M-40000"},{"dataSource":"SNMI","id":"DA-10010"},{"dataSource":"SNOMEDCT_US","id":"7180009"},{"dataSource":"WHO","id":"0955"}]},{"offset":47,"length":5,"text":"fever","category":"SymptomOrSign","confidenceScore":1.0,"name":"Fever","links":[{"dataSource":"UMLS","id":"C0015967"},{"dataSource":"AIR","id":"FEVER"},{"dataSource":"AOD","id":"0000004396"},{"dataSource":"BI","id":"BI00751"},{"dataSource":"CCC","id":"K25.2"},{"dataSource":"CCPSS","id":"1017166"},{"dataSource":"CCSR_10","id":"SYM002"},{"dataSource":"CHV","id":"0000005010"},{"dataSource":"COSTAR","id":"300"},{"dataSource":"CPM","id":"65287"},{"dataSource":"CSP","id":"2871-4310"},{"dataSource":"CST","id":"FEVER"},{"dataSource":"DXP","id":"U001483"},{"dataSource":"GO","id":"GO:0001660"},{"dataSource":"HPO","id":"HP:0001945"},{"dataSource":"ICD10","id":"R50.9"},{"dataSource":"ICD10AM","id":"R50.9"},{"dataSource":"ICD10CM","id":"R50.9"},{"dataSource":"ICD9CM","id":"780.60"},{"dataSource":"ICNP","id":"10041539"},{"dataSource":"ICPC","id":"A03"},{"dataSource":"ICPC2EENG","id":"A03"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU041751"},{"dataSource":"ICPC2P","id":"A03002"},{"dataSource":"LCH","id":"U001776"},{"dataSource":"LCH_NW","id":"sh85047994"},{"dataSource":"LNC","id":"MTHU013518"},{"dataSource":"MDR","id":"10005911"},{"dataSource":"MEDCIN","id":"6005"},{"dataSource":"MEDLINEPLUS","id":"511"},{"dataSource":"MSH","id":"D005334"},{"dataSource":"MTHICD9","id":"780.60"},{"dataSource":"NANDA-I","id":"01128"},{"dataSource":"NCI","id":"C3038"},{"dataSource":"NCI_CTCAE","id":"E11102"},{"dataSource":"NCI_FDA","id":"1858"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000450108"},{"dataSource":"NCI_NICHD","id":"C3038"},{"dataSource":"NOC","id":"070307"},{"dataSource":"OMIM","id":"MTHU005439"},{"dataSource":"OMS","id":"50.03"},{"dataSource":"PCDS","id":"PRB_11020.02"},{"dataSource":"PDQ","id":"CDR0000775882"},{"dataSource":"PSY","id":"23840"},{"dataSource":"QMR","id":"Q0200115"},{"dataSource":"RCD","id":"X76EI"},{"dataSource":"SNM","id":"F-03003"},{"dataSource":"SNMI","id":"F-03003"},{"dataSource":"SNOMEDCT_US","id":"386661006"},{"dataSource":"WHO","id":"0725"}]},{"offset":60,"length":6,"text":"mother","category":"FamilyRelation","confidenceScore":0.99,"name":"Mother + (person)","links":[{"dataSource":"UMLS","id":"C0026591"},{"dataSource":"AOD","id":"0000027173"},{"dataSource":"CCPSS","id":"U000286"},{"dataSource":"CHV","id":"0000008266"},{"dataSource":"CSP","id":"1124-5492"},{"dataSource":"HL7V3.0","id":"MTH"},{"dataSource":"LCH","id":"U003028"},{"dataSource":"LCH_NW","id":"sh85087526"},{"dataSource":"LNC","id":"LA10417-6"},{"dataSource":"MSH","id":"D009035"},{"dataSource":"NCI","id":"C25189"},{"dataSource":"NCI_CDISC","id":"C25189"},{"dataSource":"NCI_GDC","id":"C25189"},{"dataSource":"PSY","id":"32140"},{"dataSource":"RCD","id":"X78ym"},{"dataSource":"SNMI","id":"S-10120"},{"dataSource":"SNOMEDCT_US","id":"72705000"}]},{"offset":77,"length":10,"text":"Penicillin","category":"MedicationName","confidenceScore":0.9,"assertion":{"certainty":"neutralPossible"},"name":"penicillins","links":[{"dataSource":"UMLS","id":"C0030842"},{"dataSource":"AOD","id":"0000019206"},{"dataSource":"ATC","id":"J01C"},{"dataSource":"CCPSS","id":"0014106"},{"dataSource":"CHV","id":"0000009423"},{"dataSource":"CSP","id":"0199-8025"},{"dataSource":"GS","id":"4011"},{"dataSource":"LCH","id":"U003521"},{"dataSource":"LCH_NW","id":"sh85099402"},{"dataSource":"LNC","id":"LP14319-5"},{"dataSource":"MEDCIN","id":"40319"},{"dataSource":"MMSL","id":"d00116"},{"dataSource":"MSH","id":"D010406"},{"dataSource":"NCI","id":"C1500"},{"dataSource":"NCI_DTP","id":"NSC0402815"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045296"},{"dataSource":"NDDF","id":"016121"},{"dataSource":"PSY","id":"37190"},{"dataSource":"RCD","id":"x009C"},{"dataSource":"SNM","id":"E-7260"},{"dataSource":"SNMI","id":"C-54000"},{"dataSource":"SNOMEDCT_US","id":"764146007"},{"dataSource":"VANDF","id":"4019880"}]},{"offset":96,"length":4,"text":"baby","category":"FamilyRelation","confidenceScore":1.0,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]}],"relations":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":47,"transactionsCount":1},"entities":[{"offset":19,"length":14,"text":"histologically","category":"ExaminationName","confidenceScore":1.0,"name":"Histology + Procedure","links":[{"dataSource":"UMLS","id":"C0344441"},{"dataSource":"CHV","id":"0000030964"},{"dataSource":"LNC","id":"MTHU010496"},{"dataSource":"MDR","id":"10062005"},{"dataSource":"MTH","id":"U002823"},{"dataSource":"MTHMST","id":"MT140012"},{"dataSource":"NCI","id":"C49131"},{"dataSource":"SNOMEDCT_US","id":"714797009"}]},{"offset":44,"length":3,"text":"NHL","category":"Diagnosis","confidenceScore":1.0,"name":"Lymphoma, + Non-Hodgkin","links":[{"dataSource":"UMLS","id":"C0024305"},{"dataSource":"BI","id":"BI00323"},{"dataSource":"CCPSS","id":"0001640"},{"dataSource":"CCS","id":"2.10.2"},{"dataSource":"CCSR_10","id":"NEO058"},{"dataSource":"CHV","id":"0000007621"},{"dataSource":"COSTAR","id":"U000045"},{"dataSource":"CSP","id":"4001-0094"},{"dataSource":"DXP","id":"U002830"},{"dataSource":"HPO","id":"HP:0012539"},{"dataSource":"ICD10","id":"C85.9"},{"dataSource":"ICD10AM","id":"M9672/3"},{"dataSource":"ICD10CM","id":"C85.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU053464"},{"dataSource":"ICPC2P","id":"B74002"},{"dataSource":"MDR","id":"10029547"},{"dataSource":"MEDCIN","id":"35839"},{"dataSource":"MEDLINEPLUS","id":"117"},{"dataSource":"MSH","id":"D008228"},{"dataSource":"NCI","id":"C3211"},{"dataSource":"NCI_CELLOSAURUS","id":"C3211"},{"dataSource":"NCI_CPTAC","id":"C3211"},{"dataSource":"NCI_CTEP-SDC","id":"10029593"},{"dataSource":"NCI_CTRP","id":"C3211"},{"dataSource":"NCI_GDC","id":"C3211"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045148"},{"dataSource":"NCI_NICHD","id":"C3211"},{"dataSource":"OMIM","id":"MTHU014311"},{"dataSource":"PDQ","id":"CDR0000038957"},{"dataSource":"QMR","id":"R0121804"},{"dataSource":"RCD","id":"B627."},{"dataSource":"SNM","id":"M-YYX54"},{"dataSource":"SNMI","id":"M-96723"},{"dataSource":"SNOMEDCT_US","id":"1929004"},{"dataSource":"WHO","id":"1544"}]}],"relations":[{"relationType":"ExaminationFindsCondition","entities":[{"ref":"#/results/documents/1/entities/0","role":"Examination"},{"ref":"#/results/documents/1/entities/1","role":"Condition"}]}],"warnings":[]},{"id":"4","statistics":{"charactersCount":54,"transactionsCount":1},"entities":[{"offset":31,"length":18,"text":"Parkinsons + Disease","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR + SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]},{"offset":51,"length":2,"text":"PD","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson + Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR + SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]}],"relations":[{"relationType":"Abbreviation","entities":[{"ref":"#/results/documents/2/entities/0","role":"FullTerm"},{"ref":"#/results/documents/2/entities/1","role":"AbbreviatedTerm"}]}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-05-15"}}' + headers: + apim-request-id: d68dfa45-1581-4f85-b80c-551681ff1646 + content-type: application/json; charset=utf-8 + date: Mon, 25 Oct 2021 19:22:55 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '115' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/53509204-49cd-4066-8864-6469dd11c982?showStats=True +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py index 174d5e1274ca..9ffb3d49c328 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py @@ -1145,6 +1145,7 @@ def test_recognize_custom_entities( assert entity.length is not None assert entity.confidence_score is not None + @pytest.mark.skip("https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/12409536 and https://github.com/Azure/azure-sdk-for-python/issues/21369") @TextAnalyticsPreparer() def test_custom_partial_error( self, @@ -1191,3 +1192,59 @@ def test_custom_partial_error( assert document_results[1][0].is_error assert document_results[1][1].is_error assert document_results[1][2].is_error + + @TextAnalyticsPreparer() + @TextAnalyticsClientPreparer() + def test_analyze_continuation_token(self, client): + docs = [ + {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, + {"id": "3", "text": ""}, + {"id": "4", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + ] + + actions = [ + RecognizeEntitiesAction(), + RecognizePiiEntitiesAction(), + AnalyzeSentimentAction(), + ExtractKeyPhrasesAction(), + ] + + initial_poller = client.begin_analyze_actions( + docs, + actions=actions, + show_stats=True, + polling_interval=self._interval(), + ) + + cont_token = initial_poller.continuation_token() + + poller = client.begin_analyze_actions( + None, + None, + continuation_token=cont_token, + polling_interval=self._interval(), + ) + response = poller.result() + + action_results = list(response) + assert len(action_results) == len(docs) + action_order = [ + _AnalyzeActionsType.RECOGNIZE_ENTITIES, + _AnalyzeActionsType.RECOGNIZE_PII_ENTITIES, + _AnalyzeActionsType.ANALYZE_SENTIMENT, + _AnalyzeActionsType.EXTRACT_KEY_PHRASES, + ] + document_order = ["1", "2", "3", "4"] + for doc_idx, document_results in enumerate(action_results): + assert len(document_results) == 4 + for action_idx, document_result in enumerate(document_results): + if doc_idx == 2: + assert document_result.id == document_order[doc_idx] + assert document_result.is_error + else: + assert document_result.id == document_order[doc_idx] + assert document_result.statistics + assert self.document_result_to_action_type(document_result) == action_order[action_idx] + + initial_poller.wait() # necessary so azure-devtools doesn't throw assertion error diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_async.py index 1b6d3fc83a1a..95699088d814 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_async.py @@ -1209,6 +1209,7 @@ async def test_recognize_custom_entities( assert entity.length is not None assert entity.confidence_score is not None + @pytest.mark.skip("https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/12409536 and https://github.com/Azure/azure-sdk-for-python/issues/21369") @TextAnalyticsPreparer() async def test_custom_partial_error( self, @@ -1258,3 +1259,62 @@ async def test_custom_partial_error( assert document_results[1][0].is_error assert document_results[1][1].is_error assert document_results[1][2].is_error + + @TextAnalyticsPreparer() + @TextAnalyticsClientPreparer() + async def test_analyze_continuation_token(self, client): + docs = [ + {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, + {"id": "3", "text": ""}, + {"id": "4", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + ] + + actions = [ + RecognizeEntitiesAction(), + RecognizePiiEntitiesAction(), + AnalyzeSentimentAction(), + ExtractKeyPhrasesAction(), + ] + async with client: + initial_poller = await client.begin_analyze_actions( + docs, + actions=actions, + show_stats=True, + polling_interval=self._interval(), + ) + + cont_token = initial_poller.continuation_token() + + poller = await client.begin_analyze_actions( + None, + None, + continuation_token=cont_token, + polling_interval=self._interval(), + ) + response = await poller.result() + + action_results = [] + async for action_result in response: + action_results.append(action_result) + + assert len(action_results) == len(docs) + action_order = [ + _AnalyzeActionsType.RECOGNIZE_ENTITIES, + _AnalyzeActionsType.RECOGNIZE_PII_ENTITIES, + _AnalyzeActionsType.ANALYZE_SENTIMENT, + _AnalyzeActionsType.EXTRACT_KEY_PHRASES, + ] + document_order = ["1", "2", "3", "4"] + for doc_idx, document_results in enumerate(action_results): + assert len(document_results) == 4 + for action_idx, document_result in enumerate(document_results): + if doc_idx == 2: + assert document_result.id == document_order[doc_idx] + assert document_result.is_error + else: + assert document_result.id == document_order[doc_idx] + assert document_result.statistics + assert self.document_result_to_action_type(document_result) == action_order[action_idx] + + await initial_poller.wait() # necessary so azure-devtools doesn't throw assertion error diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare.py index b4ccdfba9769..074da697f306 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare.py @@ -430,3 +430,38 @@ def callback(resp): disable_service_logs=True, raw_response_hook=callback, ).result() + + @TextAnalyticsPreparer() + @TextAnalyticsClientPreparer() + def test_healthcare_continuation_token(self, client): + initial_poller = client.begin_analyze_healthcare_entities( + documents=[ + {"id": "1", "text": "Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too."}, + {"id": "2", "text": "patients must have histologically confirmed NHL"}, + {"id": "3", "text": ""}, + {"id": "4", "text": "The patient was diagnosed with Parkinsons Disease (PD)"} + ], + show_stats=True, + polling_interval=self._interval(), + ) + + cont_token = initial_poller.continuation_token() + poller = client.begin_analyze_healthcare_entities( + None, + continuation_token=cont_token, + polling_interval=self._interval(), + ) + response = poller.result() + + results = list(response) + document_order = ["1", "2", "3", "4"] + for doc_idx, result in enumerate(results): + if doc_idx == 2: + assert result.id == document_order[doc_idx] + assert result.is_error + else: + assert result.id == document_order[doc_idx] + assert result.statistics + assert result.entities + + initial_poller.wait() # necessary so azure-devtools doesn't throw assertion error \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py index e22c034c133a..d8a1624a8057 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py @@ -475,3 +475,42 @@ def callback(resp): disable_service_logs=True, raw_response_hook=callback, )).result() + + @TextAnalyticsPreparer() + @TextAnalyticsClientPreparer() + async def test_healthcare_continuation_token(self, client): + async with client: + initial_poller = await client.begin_analyze_healthcare_entities( + documents=[ + {"id": "1", "text": "Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too."}, + {"id": "2", "text": "patients must have histologically confirmed NHL"}, + {"id": "3", "text": ""}, + {"id": "4", "text": "The patient was diagnosed with Parkinsons Disease (PD)"} + ], + show_stats=True, + polling_interval=self._interval(), + ) + + cont_token = initial_poller.continuation_token() + poller = await client.begin_analyze_healthcare_entities( + None, + continuation_token=cont_token, + polling_interval=self._interval(), + ) + response = await poller.result() + + results = [] + async for result in response: + results.append(result) + + document_order = ["1", "2", "3", "4"] + for doc_idx, result in enumerate(results): + if doc_idx == 2: + assert result.id == document_order[doc_idx] + assert result.is_error + else: + assert result.id == document_order[doc_idx] + assert result.statistics + assert result.entities + + await initial_poller.wait() # necessary so azure-devtools doesn't throw assertion error