From 105b071f6ae959013a78c7cde9a955ab5e08326d Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Tue, 21 Jul 2020 17:27:53 -0400 Subject: [PATCH 01/13] add back PII models --- .../azure/ai/textanalytics/__init__.py | 8 ++- .../azure/ai/textanalytics/_models.py | 72 ++++++++++++++++++- 2 files changed, 77 insertions(+), 3 deletions(-) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/__init__.py index 24df553f396d..adcf6c634354 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/__init__.py @@ -25,7 +25,9 @@ LinkedEntityMatch, TextDocumentBatchStatistics, SentenceSentiment, - SentimentConfidenceScores + SentimentConfidenceScores, + RecognizePiiEntitiesResult, + PiiEntity ) __all__ = [ @@ -48,7 +50,9 @@ 'LinkedEntityMatch', 'TextDocumentBatchStatistics', 'SentenceSentiment', - 'SentimentConfidenceScores' + 'SentimentConfidenceScores', + 'RecognizePiiEntitiesResult', + 'PiiEntity', ] __version__ = VERSION diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py index a6bdf3e80a14..9b2120070880 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py @@ -124,6 +124,35 @@ def __repr__(self): .format(self.id, repr(self.entities), repr(self.warnings), repr(self.statistics), self.is_error)[:1024] +class RecognizePiiEntitiesResult(DictMixin): + """RecognizePiiEntitiesResult is a result object which contains + the recognized Personally Identifiable Information (PII) entities + from a particular document. + :ivar str id: Unique, non-empty document identifier that matches the + document id that was passed in with the request. If not specified + in the request, an id is assigned for the document. + :ivar entities: Recognized PII entities in the document. + :vartype entities: + list[~azure.ai.textanalytics.PiiEntity] + :ivar statistics: If show_stats=true was specified in the request this + field will contain information about the document payload. + :vartype statistics: + ~azure.ai.textanalytics.TextDocumentStatistics + :ivar bool is_error: Boolean check for error item when iterating over list of + results. Always False for an instance of a RecognizePiiEntitiesResult. + """ + + def __init__(self, **kwargs): + self.id = kwargs.get("id", None) + self.entities = kwargs.get("entities", None) + self.statistics = kwargs.get("statistics", None) + self.is_error = False + + def __repr__(self): + return "RecognizePiiEntitiesResult(id={}, entities={}, statistics={}, is_error={})" \ + .format(self.id, repr(self.entities), repr(self.statistics), self.is_error)[:1024] + + class DetectLanguageResult(DictMixin): """DetectLanguageResult is a result object which contains the detected language of a particular document. @@ -193,6 +222,46 @@ def __repr__(self): self.text, self.category, self.subcategory, self.confidence_score )[:1024] +class PiiEntity(DictMixin): + """PiiEntity contains information about a Personally Identifiable + Information (PII) entity found in text. + :ivar str text: Entity text as appears in the request. + :ivar str category: Entity category, such as Financial Account + Identification/Social Security Number/Phone Number, etc. + :ivar str subcategory: Entity subcategory, such as Credit Card/EU + Phone number/ABA Routing Numbers, etc. + :ivar int offset: Start position (in Unicode characters) for the + entity text. + :ivar int length: Length (in Unicode characters) for the entity + text. + :ivar float confidence_score: Confidence score between 0 and 1 of the extracted + entity. + """ + + def __init__(self, **kwargs): + self.text = kwargs.get('text', None) + self.category = kwargs.get('category', None) + self.subcategory = kwargs.get('subcategory', None) + self.offset = kwargs.get('offset', None) + self.length = kwargs.get('length', None) + self.confidence_score = kwargs.get('confidence_score', None) + + @classmethod + def _from_generated(cls, entity): + return cls( + text=entity.text, + category=entity.type, + subcategory=entity.subtype, + offset=entity.offset, + length=entity.length, + confidence_score=entity.score, + ) + + def __repr__(self): + return "PiiEntity(text={}, category={}, subcategory={}, offset={}, length={}, " \ + "confidence_score={})".format(self.text, self.category, self.subcategory, self.offset, + self.length, self.confidence_score)[:1024] + class TextAnalyticsError(DictMixin): """TextAnalyticsError contains the error code, message, and @@ -429,10 +498,11 @@ def __init__(self, **kwargs): def __getattr__(self, attr): result_set = set() result_set.update( - RecognizeEntitiesResult().keys() + RecognizeEntitiesResult().keys() + RecognizePiiEntitiesResult().keys() + DetectLanguageResult().keys() + RecognizeLinkedEntitiesResult().keys() + AnalyzeSentimentResult().keys() + ExtractKeyPhrasesResult().keys() ) + result_set.update() result_attrs = result_set.difference(DocumentError().keys()) if attr in result_attrs: raise AttributeError( From 725a5eb9fa3636dacc7baff43a6aaf3548d91c7a Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Wed, 22 Jul 2020 17:56:58 -0400 Subject: [PATCH 02/13] add pii endpoint --- .../azure-ai-textanalytics/CHANGELOG.md | 4 + .../azure/ai/textanalytics/_models.py | 30 ++++---- .../ai/textanalytics/_response_handlers.py | 13 +++- .../textanalytics/_text_analytics_client.py | 76 ++++++++++++++++++- .../aio/_text_analytics_client_async.py | 75 +++++++++++++++++- 5 files changed, 179 insertions(+), 19 deletions(-) diff --git a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md index f08fefb11aa5..7a4f4861272a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md +++ b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md @@ -2,6 +2,10 @@ ## 1.0.1 (Unreleased) +**New featurest** + +- We have added an endpoint `recognize_pii_entities` which returns entities containing personal information for a batch of documents. Only available for version v3.1-preview.1 and up. + ## 1.0.0 (2020-06-09) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py index 9b2120070880..a33ddcf6d2af 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py @@ -128,12 +128,16 @@ class RecognizePiiEntitiesResult(DictMixin): """RecognizePiiEntitiesResult is a result object which contains the recognized Personally Identifiable Information (PII) entities from a particular document. + :ivar str id: Unique, non-empty document identifier that matches the document id that was passed in with the request. If not specified in the request, an id is assigned for the document. :ivar entities: Recognized PII entities in the document. :vartype entities: list[~azure.ai.textanalytics.PiiEntity] + :ivar warnings: Warnings encountered while processing document. Results will still be returned + if there are warnings, but they may not be fully accurate. + :vartype warnings: list[~azure.ai.textanalytics.TextAnalyticsWarning] :ivar statistics: If show_stats=true was specified in the request this field will contain information about the document payload. :vartype statistics: @@ -145,12 +149,13 @@ class RecognizePiiEntitiesResult(DictMixin): def __init__(self, **kwargs): self.id = kwargs.get("id", None) self.entities = kwargs.get("entities", None) + self.warnings = kwargs.get("warnings", []) self.statistics = kwargs.get("statistics", None) self.is_error = False def __repr__(self): - return "RecognizePiiEntitiesResult(id={}, entities={}, statistics={}, is_error={})" \ - .format(self.id, repr(self.entities), repr(self.statistics), self.is_error)[:1024] + return "RecognizePiiEntitiesResult(id={}, entities={}, warnings={}, statistics={}, is_error={})" \ + .format(self.id, repr(self.entities), repr(self.warnings), repr(self.statistics), self.is_error)[:1024] class DetectLanguageResult(DictMixin): @@ -225,15 +230,12 @@ def __repr__(self): class PiiEntity(DictMixin): """PiiEntity contains information about a Personally Identifiable Information (PII) entity found in text. + :ivar str text: Entity text as appears in the request. :ivar str category: Entity category, such as Financial Account Identification/Social Security Number/Phone Number, etc. :ivar str subcategory: Entity subcategory, such as Credit Card/EU Phone number/ABA Routing Numbers, etc. - :ivar int offset: Start position (in Unicode characters) for the - entity text. - :ivar int length: Length (in Unicode characters) for the entity - text. :ivar float confidence_score: Confidence score between 0 and 1 of the extracted entity. """ @@ -242,25 +244,21 @@ def __init__(self, **kwargs): self.text = kwargs.get('text', None) self.category = kwargs.get('category', None) self.subcategory = kwargs.get('subcategory', None) - self.offset = kwargs.get('offset', None) - self.length = kwargs.get('length', None) self.confidence_score = kwargs.get('confidence_score', None) @classmethod def _from_generated(cls, entity): return cls( text=entity.text, - category=entity.type, - subcategory=entity.subtype, - offset=entity.offset, - length=entity.length, - confidence_score=entity.score, + category=entity.category, + subcategory=entity.subcategory, + confidence_score=entity.confidence_score, ) def __repr__(self): - return "PiiEntity(text={}, category={}, subcategory={}, offset={}, length={}, " \ - "confidence_score={})".format(self.text, self.category, self.subcategory, self.offset, - self.length, self.confidence_score)[:1024] + return "PiiEntity(text={}, category={}, subcategory={}, confidence_score={})".format( + self.text, self.category, self.subcategory, self.confidence_score + )[:1024] class TextAnalyticsError(DictMixin): diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_response_handlers.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_response_handlers.py index 0bef54fa0c1c..03bf101131fa 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_response_handlers.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_response_handlers.py @@ -24,7 +24,9 @@ DocumentError, SentimentConfidenceScores, TextAnalyticsError, - TextAnalyticsWarning + TextAnalyticsWarning, + RecognizePiiEntitiesResult, + PiiEntity, ) def _get_too_many_documents_error(obj): @@ -162,3 +164,12 @@ def sentiment_result(sentiment): confidence_scores=SentimentConfidenceScores._from_generated(sentiment.confidence_scores), # pylint: disable=protected-access sentences=[SentenceSentiment._from_generated(s) for s in sentiment.sentences], # pylint: disable=protected-access ) + +@prepare_result +def pii_entities_result(entity): + return RecognizePiiEntitiesResult( + id=entity.id, + entities=[PiiEntity._from_generated(e) for e in entity.entities], # pylint: disable=protected-access + warnings=[TextAnalyticsWarning._from_generated(w) for w in entity.warnings], # pylint: disable=protected-access + statistics=TextDocumentStatistics._from_generated(entity.statistics), # pylint: disable=protected-access + ) 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 15cc197d740c..9d236eed3ddf 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 @@ -22,7 +22,8 @@ linked_entities_result, key_phrases_result, sentiment_result, - language_result + language_result, + pii_entities_result ) if TYPE_CHECKING: @@ -36,6 +37,7 @@ ExtractKeyPhrasesResult, AnalyzeSentimentResult, DocumentError, + RecognizePiiEntitiesResult, ) @@ -222,6 +224,78 @@ def recognize_entities( # type: ignore except HttpResponseError as error: process_batch_error(error) + @distributed_trace + def recognize_pii_entities( # type: ignore + self, + documents, # type: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]] + **kwargs # type: Any + ): + # type: (...) -> List[Union[RecognizePiiEntitiesResult, DocumentError]] + """Recognize entities containing personal information for a batch of documents. + + Returns a list of personal information entities ("SSN", + "Bank Account", etc) in the document. For the list of supported entity types, + check https://aka.ms/tanerpii + for document length limits, maximum batch size, and supported text encoding. + + See https://docs.microsoft.com/azure/cognitive-services/text-analytics/overview#data-limits + for document length limits, maximum batch size, and supported text encoding. + + :param documents: The set of documents to process as part of this batch. + If you wish to specify the ID and language on a per-item basis you must + use as input a list[:class:`~azure.ai.textanalytics.TextDocumentInput`] or a list of + dict representations of :class:`~azure.ai.textanalytics.TextDocumentInput`, like + `{"id": "1", "language": "en", "text": "hello world"}`. + :type documents: + list[str] or list[~azure.ai.textanalytics.TextDocumentInput] or + list[dict[str, str]] + :keyword str language: The 2 letter ISO 639-1 representation of language for the + entire batch. For example, use "en" for English; "es" for Spanish etc. + If not set, uses "en" for English as default. Per-document language will + take precedence over whole batch language. See https://aka.ms/talangs for + supported languages in Text Analytics API. + :keyword str model_version: This value indicates which model will + be used for scoring, e.g. "latest", "2019-10-01". If a model-version + is not specified, the API will default to the latest, non-preview version. + :keyword bool show_stats: If set to true, response will contain document level statistics. + :return: The combined list of :class:`~azure.ai.textanalytics.RecognizePiiEntitiesResult` + and :class:`~azure.ai.textanalytics.DocumentError` in the order the original documents + were passed in. + :rtype: list[~azure.ai.textanalytics.RecognizePiiEntitiesResult, + ~azure.ai.textanalytics.DocumentError] + :raises ~azure.core.exceptions.HttpResponseError or TypeError or ValueError or NotImplementedError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_recognize_pii_entities.py + :start-after: [START batch_recognize_pii_entities] + :end-before: [END batch_recognize_pii_entities] + :language: python + :dedent: 8 + :caption: Recognize personally identifiable information entities in a batch of documents. + """ + language_arg = kwargs.pop("language", None) + language = language_arg if language_arg is not None else self._default_language + docs = _validate_batch_input(documents, "language", language) + model_version = kwargs.pop("model_version", None) + show_stats = kwargs.pop("show_stats", False) + try: + return self._client.entities_recognition_pii( + documents=docs, + model_version=model_version, + show_stats=show_stats, + cls=kwargs.pop("cls", pii_entities_result), + **kwargs + ) + except AttributeError as error: + if "'TextAnalyticsClient' object has no attribute 'entities_recognition_pii'" in str(error): + raise NotImplementedError( + "'recognize_pii_entities' endpoint is only available for API version v3.1-preview.1" + ) + raise error + except HttpResponseError as error: + process_batch_error(error) + @distributed_trace def recognize_linked_entities( # type: ignore self, 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 90f12fb9837d..db2b5777c025 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 @@ -22,7 +22,8 @@ linked_entities_result, key_phrases_result, sentiment_result, - language_result + language_result, + pii_entities_result, ) from .._models import ( DetectLanguageInput, @@ -33,6 +34,7 @@ ExtractKeyPhrasesResult, AnalyzeSentimentResult, DocumentError, + RecognizePiiEntitiesResult, ) if TYPE_CHECKING: @@ -225,6 +227,77 @@ async def recognize_entities( # type: ignore except HttpResponseError as error: process_batch_error(error) + @distributed_trace_async + async def recognize_pii_entities( # type: ignore + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + **kwargs: Any + ) -> List[Union[RecognizePiiEntitiesResult, DocumentError]]: + """Recognize entities containing personal information for a batch of documents. + + Returns a list of personal information entities ("SSN", + "Bank Account", etc) in the document. For the list of supported entity types, + check https://aka.ms/tanerpii + for document length limits, maximum batch size, and supported text encoding. + + See https://docs.microsoft.com/azure/cognitive-services/text-analytics/overview#data-limits + for document length limits, maximum batch size, and supported text encoding. + + :param documents: The set of documents to process as part of this batch. + If you wish to specify the ID and language on a per-item basis you must + use as input a list[:class:`~azure.ai.textanalytics.TextDocumentInput`] or a list of + dict representations of :class:`~azure.ai.textanalytics.TextDocumentInput`, like + `{"id": "1", "language": "en", "text": "hello world"}`. + :type documents: + list[str] or list[~azure.ai.textanalytics.TextDocumentInput] or + list[dict[str, str]] + :keyword str language: The 2 letter ISO 639-1 representation of language for the + entire batch. For example, use "en" for English; "es" for Spanish etc. + If not set, uses "en" for English as default. Per-document language will + take precedence over whole batch language. See https://aka.ms/talangs for + supported languages in Text Analytics API. + :keyword str model_version: This value indicates which model will + be used for scoring, e.g. "latest", "2019-10-01". If a model-version + is not specified, the API will default to the latest, non-preview version. + :keyword bool show_stats: If set to true, response will contain document level statistics. + :return: The combined list of :class:`~azure.ai.textanalytics.RecognizePiiEntitiesResult` + and :class:`~azure.ai.textanalytics.DocumentError` in the order the original documents + were passed in. + :rtype: list[~azure.ai.textanalytics.RecognizePiiEntitiesResult, + ~azure.ai.textanalytics.DocumentError] + :raises ~azure.core.exceptions.HttpResponseError or TypeError or ValueError or NotImplementedError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_recognize_pii_entities.py + :start-after: [START batch_recognize_pii_entities] + :end-before: [END batch_recognize_pii_entities] + :language: python + :dedent: 8 + :caption: Recognize personally identifiable information entities in a batch of documents. + """ + language_arg = kwargs.pop("language", None) + language = language_arg if language_arg is not None else self._default_language + docs = _validate_batch_input(documents, "language", language) + model_version = kwargs.pop("model_version", None) + show_stats = kwargs.pop("show_stats", False) + try: + return await self._client.entities_recognition_pii( + documents=docs, + model_version=model_version, + show_stats=show_stats, + cls=kwargs.pop("cls", pii_entities_result), + **kwargs + ) + except AttributeError as error: + if "'TextAnalyticsClient' object has no attribute 'entities_recognition_pii'" in str(error): + raise NotImplementedError( + "'recognize_pii_entities' endpoint is only available for API version v3.1-preview.1" + ) + raise error + except HttpResponseError as error: + process_batch_error(error) + @distributed_trace_async async def recognize_linked_entities( # type: ignore self, From c7a66d4de294f5a82d281f0e7953f16733cbeea2 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Wed, 22 Jul 2020 17:57:20 -0400 Subject: [PATCH 03/13] add tests --- ...ties.test_all_successful_passing_dict.yaml | 49 ++ ...uccessful_passing_text_document_input.yaml | 49 ++ ...ize_pii_entities.test_bad_credentials.yaml | 33 + ...entities.test_bad_model_version_error.yaml | 42 + ...i_entities.test_batch_size_over_limit.yaml | 786 ++++++++++++++++++ ...ties.test_batch_size_over_limit_error.yaml | 751 +++++++++++++++++ ...t_client_passed_default_language_hint.yaml | 139 ++++ ...t_attribute_error_no_result_attribute.yaml | 42 + ...attribute_error_nonexistent_attribute.yaml | 42 + ...ize_pii_entities.test_document_errors.yaml | 51 ++ ...e_pii_entities.test_document_warnings.yaml | 43 + ...pii_entities.test_duplicate_ids_error.yaml | 42 + ..._entities.test_empty_credential_class.yaml | 33 + ...i_entities.test_input_with_all_errors.yaml | 47 ++ ..._entities.test_input_with_some_errors.yaml | 49 ++ ...ities.test_invalid_language_hint_docs.yaml | 43 + ...ies.test_invalid_language_hint_method.yaml | 43 + ..._entities.test_language_kwarg_english.yaml | 44 + ..._entities.test_language_kwarg_spanish.yaml | 43 + ...e_pii_entities.test_length_with_emoji.yaml | 44 + ...ze_pii_entities.test_out_of_order_ids.yaml | 47 ++ ...ities.test_output_same_order_as_input.yaml | 45 + ..._recognize_pii_entities.test_pass_cls.yaml | 43 + ...pii_entities.test_passing_only_string.yaml | 52 ++ ....test_per_item_dont_use_language_hint.yaml | 45 + ...entities.test_rotate_subscription_key.yaml | 121 +++ ...ies.test_show_stats_and_model_version.yaml | 47 ++ ..._pii_entities.test_too_many_documents.yaml | 48 ++ ...ecognize_pii_entities.test_user_agent.yaml | 45 + ...st_whole_batch_dont_use_language_hint.yaml | 45 + ...tities.test_whole_batch_language_hint.yaml | 49 ++ ...language_hint_and_dict_per_item_hints.yaml | 49 ++ ...ole_batch_language_hint_and_obj_input.yaml | 49 ++ ..._language_hint_and_obj_per_item_hints.yaml | 49 ++ ...sync.test_all_successful_passing_dict.yaml | 38 + ...uccessful_passing_text_document_input.yaml | 38 + ...i_entities_async.test_bad_credentials.yaml | 28 + ...es_async.test_bad_model_version_error.yaml | 32 + ...ties_async.test_batch_size_over_limit.yaml | 776 +++++++++++++++++ ...sync.test_batch_size_over_limit_error.yaml | 741 +++++++++++++++++ ...t_client_passed_default_language_hint.yaml | 108 +++ ...t_attribute_error_no_result_attribute.yaml | 32 + ...attribute_error_nonexistent_attribute.yaml | 32 + ...i_entities_async.test_document_errors.yaml | 41 + ...entities_async.test_document_warnings.yaml | 32 + ...tities_async.test_duplicate_ids_error.yaml | 32 + ...ies_async.test_empty_credential_class.yaml | 28 + ...ties_async.test_input_with_all_errors.yaml | 37 + ...ies_async.test_input_with_some_errors.yaml | 38 + ...async.test_invalid_language_hint_docs.yaml | 33 + ...ync.test_invalid_language_hint_method.yaml | 33 + ...ies_async.test_language_kwarg_english.yaml | 33 + ...entities_async.test_length_with_emoji.yaml | 33 + ..._entities_async.test_out_of_order_ids.yaml | 36 + ...async.test_output_same_order_as_input.yaml | 34 + ...nize_pii_entities_async.test_pass_cls.yaml | 32 + ...tities_async.test_passing_only_string.yaml | 41 + ....test_per_item_dont_use_language_hint.yaml | 34 + ...es_async.test_rotate_subscription_key.yaml | 94 +++ ...ync.test_show_stats_and_model_version.yaml | 36 + ...ntities_async.test_too_many_documents.yaml | 37 + ...ze_pii_entities_async.test_user_agent.yaml | 34 + ...st_whole_batch_dont_use_language_hint.yaml | 34 + ..._async.test_whole_batch_language_hint.yaml | 39 + ...language_hint_and_dict_per_item_hints.yaml | 38 + ...ole_batch_language_hint_and_obj_input.yaml | 39 + ..._language_hint_and_obj_per_item_hints.yaml | 38 + ...t_text_analytics.test_detect_language.yaml | 4 +- .../tests/test_recognize_pii_entities.py | 567 +++++++++++++ .../test_recognize_pii_entities_async.py | 567 +++++++++++++ .../tests/test_text_analytics.py | 17 + .../azure-ai-textanalytics/tests/testcase.py | 4 +- 72 files changed, 7036 insertions(+), 3 deletions(-) create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_dict.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_text_document_input.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_credentials.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_model_version_error.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit_error.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_client_passed_default_language_hint.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_no_result_attribute.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_nonexistent_attribute.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_errors.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_warnings.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_duplicate_ids_error.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_empty_credential_class.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_all_errors.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_some_errors.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_docs.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_method.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_english.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_spanish.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_length_with_emoji.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_out_of_order_ids.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_output_same_order_as_input.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_pass_cls.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_passing_only_string.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_per_item_dont_use_language_hint.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_rotate_subscription_key.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_show_stats_and_model_version.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_too_many_documents.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_user_agent.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_dont_use_language_hint.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_input.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_dict.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_text_document_input.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_credentials.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_model_version_error.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit_error.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_client_passed_default_language_hint.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_no_result_attribute.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_nonexistent_attribute.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_errors.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_warnings.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_duplicate_ids_error.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_empty_credential_class.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_all_errors.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_some_errors.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_docs.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_method.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_language_kwarg_english.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_length_with_emoji.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_out_of_order_ids.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_output_same_order_as_input.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_pass_cls.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_passing_only_string.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_per_item_dont_use_language_hint.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_rotate_subscription_key.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_show_stats_and_model_version.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_too_many_documents.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_user_agent.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_dont_use_language_hint.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_input.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_dict.yaml new file mode 100644 index 000000000000..7f68100d5652 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_dict.yaml @@ -0,0 +1,49 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "My SSN is 555-55-5555.", "language": + "en"}, {"id": "2", "text": "Your ABA number - 111000025 - is the first 9 digits + in the lower left hand corner of your personal check.", "language": "en"}, {"id": + "3", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '315' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true + response: + body: + string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"555-55-5555","category":"U.S. + Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.85}],"warnings":[]},{"id":"2","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone + Number","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABA + Routing Number","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil + CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 2ba78094-50da-41e5-a1eb-6cf31353c399 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=3 + date: + - Wed, 22 Jul 2020 15:42:16 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '798' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_text_document_input.yaml new file mode 100644 index 000000000000..16823339d529 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_text_document_input.yaml @@ -0,0 +1,49 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "My SSN is 555-55-5555.", "language": + "en"}, {"id": "2", "text": "Your ABA number - 111000025 - is the first 9 digits + in the lower left hand corner of your personal check.", "language": "en"}, {"id": + "3", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '315' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true + response: + body: + string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"555-55-5555","category":"U.S. + Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.85}],"warnings":[]},{"id":"2","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone + Number","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABA + Routing Number","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil + CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - fe4b4b94-91ad-411d-9000-66c71e569f0d + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=3 + date: + - Wed, 22 Jul 2020 15:42:16 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '111' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_credentials.yaml new file mode 100644 index 000000000000..55f370b006c0 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_credentials.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "This is written in English.", "language": + "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '85' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"error":{"code":"401","message":"Access denied due to invalid subscription + key or wrong API endpoint. Make sure to provide a valid key for an active + subscription and use a correct regional API endpoint for your resource."}}' + headers: + content-length: + - '224' + date: + - Wed, 22 Jul 2020 15:42:17 GMT + status: + code: 401 + message: PermissionDenied +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_model_version_error.yaml new file mode 100644 index 000000000000..623e9fcbcba7 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_model_version_error.yaml @@ -0,0 +1,42 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "I did not like the hotel we stayed + at.", "language": "english"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '101' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=bad&showStats=false + response: + body: + string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid + model version. Possible values are: latest,2020-04-01,2019-10-01,2020-02-01"}}}' + headers: + apim-request-id: + - 706ab128-3c70-4fa5-9e2e-d1127db48393 + content-type: + - application/json; charset=utf-8 + date: + - Wed, 22 Jul 2020 15:42:17 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '5' + status: + code: 400 + message: Bad Request +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit.yaml new file mode 100644 index 000000000000..b2511e69dab8 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit.yaml @@ -0,0 +1,786 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "hello world", "language": "en"}, {"id": + "1", "text": "hello world", "language": "en"}, {"id": "2", "text": "hello world", + "language": "en"}, {"id": "3", "text": "hello world", "language": "en"}, {"id": + "4", "text": "hello world", "language": "en"}, {"id": "5", "text": "hello world", + "language": "en"}, {"id": "6", "text": "hello world", "language": "en"}, {"id": + "7", "text": "hello world", "language": "en"}, {"id": "8", "text": "hello world", + "language": "en"}, {"id": "9", "text": "hello world", "language": "en"}, {"id": + "10", "text": "hello world", "language": "en"}, {"id": "11", "text": "hello + world", "language": "en"}, {"id": "12", "text": "hello world", "language": "en"}, + {"id": "13", "text": "hello world", "language": "en"}, {"id": "14", "text": + "hello world", "language": "en"}, {"id": "15", "text": "hello world", "language": + "en"}, {"id": "16", "text": "hello world", "language": "en"}, {"id": "17", "text": + "hello world", "language": "en"}, {"id": "18", "text": "hello world", "language": + "en"}, {"id": "19", "text": "hello world", "language": "en"}, {"id": "20", "text": + "hello world", "language": "en"}, {"id": "21", "text": "hello world", "language": + "en"}, {"id": "22", "text": "hello world", "language": "en"}, {"id": "23", "text": + "hello world", "language": "en"}, {"id": "24", "text": "hello world", "language": + "en"}, {"id": "25", "text": "hello world", "language": "en"}, {"id": "26", "text": + "hello world", "language": "en"}, {"id": "27", "text": "hello world", "language": + "en"}, {"id": "28", "text": "hello world", "language": "en"}, {"id": "29", "text": + "hello world", "language": "en"}, {"id": "30", "text": "hello world", "language": + "en"}, {"id": "31", "text": "hello world", "language": "en"}, {"id": "32", "text": + "hello world", "language": "en"}, {"id": "33", "text": "hello world", "language": + "en"}, {"id": "34", "text": "hello world", "language": "en"}, {"id": "35", "text": + "hello world", "language": "en"}, {"id": "36", "text": "hello world", "language": + "en"}, {"id": "37", "text": "hello world", "language": "en"}, {"id": "38", "text": + "hello world", "language": "en"}, {"id": "39", "text": "hello world", "language": + "en"}, {"id": "40", "text": "hello world", "language": "en"}, {"id": "41", "text": + "hello world", "language": "en"}, {"id": "42", "text": "hello world", "language": + "en"}, {"id": "43", "text": "hello world", "language": "en"}, {"id": "44", "text": + "hello world", "language": "en"}, {"id": "45", "text": "hello world", "language": + "en"}, {"id": "46", "text": "hello world", "language": "en"}, {"id": "47", "text": + "hello world", "language": "en"}, {"id": "48", "text": "hello world", "language": + "en"}, {"id": "49", "text": "hello world", "language": "en"}, {"id": "50", "text": + "hello world", "language": "en"}, {"id": "51", "text": "hello world", "language": + "en"}, {"id": "52", "text": "hello world", "language": "en"}, {"id": "53", "text": + "hello world", "language": "en"}, {"id": "54", "text": "hello world", "language": + "en"}, {"id": "55", "text": "hello world", "language": "en"}, {"id": "56", "text": + "hello world", "language": "en"}, {"id": "57", "text": "hello world", "language": + "en"}, {"id": "58", "text": "hello world", "language": "en"}, {"id": "59", "text": + "hello world", "language": "en"}, {"id": "60", "text": "hello world", "language": + "en"}, {"id": "61", "text": "hello world", "language": "en"}, {"id": "62", "text": + "hello world", "language": "en"}, {"id": "63", "text": "hello world", "language": + "en"}, {"id": "64", "text": "hello world", "language": "en"}, {"id": "65", "text": + "hello world", "language": "en"}, {"id": "66", "text": "hello world", "language": + "en"}, {"id": "67", "text": "hello world", "language": "en"}, {"id": "68", "text": + "hello world", "language": "en"}, {"id": "69", "text": "hello world", "language": + "en"}, {"id": "70", "text": "hello world", "language": "en"}, {"id": "71", "text": + "hello world", "language": "en"}, {"id": "72", "text": "hello world", "language": + "en"}, {"id": "73", "text": "hello world", "language": "en"}, {"id": "74", "text": + "hello world", "language": "en"}, {"id": "75", "text": "hello world", "language": + "en"}, {"id": "76", "text": "hello world", "language": "en"}, {"id": "77", "text": + "hello world", "language": "en"}, {"id": "78", "text": "hello world", "language": + "en"}, {"id": "79", "text": "hello world", "language": "en"}, {"id": "80", "text": + "hello world", "language": "en"}, {"id": "81", "text": "hello world", "language": + "en"}, {"id": "82", "text": "hello world", "language": "en"}, {"id": "83", "text": + "hello world", "language": "en"}, {"id": "84", "text": "hello world", "language": + "en"}, {"id": "85", "text": "hello world", "language": "en"}, {"id": "86", "text": + "hello world", "language": "en"}, {"id": "87", "text": "hello world", "language": + "en"}, {"id": "88", "text": "hello world", "language": "en"}, {"id": "89", "text": + "hello world", "language": "en"}, {"id": "90", "text": "hello world", "language": + "en"}, {"id": "91", "text": "hello world", "language": "en"}, {"id": "92", "text": + "hello world", "language": "en"}, {"id": "93", "text": "hello world", "language": + "en"}, {"id": "94", "text": "hello world", "language": "en"}, {"id": "95", "text": + "hello world", "language": "en"}, {"id": "96", "text": "hello world", "language": + "en"}, {"id": "97", "text": "hello world", "language": "en"}, {"id": "98", "text": + "hello world", "language": "en"}, {"id": "99", "text": "hello world", "language": + "en"}, {"id": "100", "text": "hello world", "language": "en"}, {"id": "101", + "text": "hello world", "language": "en"}, {"id": "102", "text": "hello world", + "language": "en"}, {"id": "103", "text": "hello world", "language": "en"}, {"id": + "104", "text": "hello world", "language": "en"}, {"id": "105", "text": "hello + world", "language": "en"}, {"id": "106", "text": "hello world", "language": + "en"}, {"id": "107", "text": "hello world", "language": "en"}, {"id": "108", + "text": "hello world", "language": "en"}, {"id": "109", "text": "hello world", + "language": "en"}, {"id": "110", "text": "hello world", "language": "en"}, {"id": + "111", "text": "hello world", "language": "en"}, {"id": "112", "text": "hello + world", "language": "en"}, {"id": "113", "text": "hello world", "language": + "en"}, {"id": "114", "text": "hello world", "language": "en"}, {"id": "115", + "text": "hello world", "language": "en"}, {"id": "116", "text": "hello world", + "language": "en"}, {"id": "117", "text": "hello world", "language": "en"}, {"id": + "118", "text": "hello world", "language": "en"}, {"id": "119", "text": "hello + world", "language": "en"}, {"id": "120", "text": "hello world", "language": + "en"}, {"id": "121", "text": "hello world", "language": "en"}, {"id": "122", + "text": "hello world", "language": "en"}, {"id": "123", "text": "hello world", + "language": "en"}, {"id": "124", "text": "hello world", "language": "en"}, {"id": + "125", "text": "hello world", "language": "en"}, {"id": "126", "text": "hello + world", "language": "en"}, {"id": "127", "text": "hello world", "language": + "en"}, {"id": "128", "text": "hello world", "language": "en"}, {"id": "129", + "text": "hello world", "language": "en"}, {"id": "130", "text": "hello world", + "language": "en"}, {"id": "131", "text": "hello world", "language": "en"}, {"id": + "132", "text": "hello world", "language": "en"}, {"id": "133", "text": "hello + world", "language": "en"}, {"id": "134", "text": "hello world", "language": + "en"}, {"id": "135", "text": "hello world", "language": "en"}, {"id": "136", + "text": "hello world", "language": "en"}, {"id": "137", "text": "hello world", + "language": "en"}, {"id": "138", "text": "hello world", "language": "en"}, {"id": + "139", "text": "hello world", "language": "en"}, {"id": "140", "text": "hello + world", "language": "en"}, {"id": "141", "text": "hello world", "language": + "en"}, {"id": "142", "text": "hello world", "language": "en"}, {"id": "143", + "text": "hello world", "language": "en"}, {"id": "144", "text": "hello world", + "language": "en"}, {"id": "145", "text": "hello world", "language": "en"}, {"id": + "146", "text": "hello world", "language": "en"}, {"id": "147", "text": "hello + world", "language": "en"}, {"id": "148", "text": "hello world", "language": + "en"}, {"id": "149", "text": "hello world", "language": "en"}, {"id": "150", + "text": "hello world", "language": "en"}, {"id": "151", "text": "hello world", + "language": "en"}, {"id": "152", "text": "hello world", "language": "en"}, {"id": + "153", "text": "hello world", "language": "en"}, {"id": "154", "text": "hello + world", "language": "en"}, {"id": "155", "text": "hello world", "language": + "en"}, {"id": "156", "text": "hello world", "language": "en"}, {"id": "157", + "text": "hello world", "language": "en"}, {"id": "158", "text": "hello world", + "language": "en"}, {"id": "159", "text": "hello world", "language": "en"}, {"id": + "160", "text": "hello world", "language": "en"}, {"id": "161", "text": "hello + world", "language": "en"}, {"id": "162", "text": "hello world", "language": + "en"}, {"id": "163", "text": "hello world", "language": "en"}, {"id": "164", + "text": "hello world", "language": "en"}, {"id": "165", "text": "hello world", + "language": "en"}, {"id": "166", "text": "hello world", "language": "en"}, {"id": + "167", "text": "hello world", "language": "en"}, {"id": "168", "text": "hello + world", "language": "en"}, {"id": "169", "text": "hello world", "language": + "en"}, {"id": "170", "text": "hello world", "language": "en"}, {"id": "171", + "text": "hello world", "language": "en"}, {"id": "172", "text": "hello world", + "language": "en"}, {"id": "173", "text": "hello world", "language": "en"}, {"id": + "174", "text": "hello world", "language": "en"}, {"id": "175", "text": "hello + world", "language": "en"}, {"id": "176", "text": "hello world", "language": + "en"}, {"id": "177", "text": "hello world", "language": "en"}, {"id": "178", + "text": "hello world", "language": "en"}, {"id": "179", "text": "hello world", + "language": "en"}, {"id": "180", "text": "hello world", "language": "en"}, {"id": + "181", "text": "hello world", "language": "en"}, {"id": "182", "text": "hello + world", "language": "en"}, {"id": "183", "text": "hello world", "language": + "en"}, {"id": "184", "text": "hello world", "language": "en"}, {"id": "185", + "text": "hello world", "language": "en"}, {"id": "186", "text": "hello world", + "language": "en"}, {"id": "187", "text": "hello world", "language": "en"}, {"id": + "188", "text": "hello world", "language": "en"}, {"id": "189", "text": "hello + world", "language": "en"}, {"id": "190", "text": "hello world", "language": + "en"}, {"id": "191", "text": "hello world", "language": "en"}, {"id": "192", + "text": "hello world", "language": "en"}, {"id": "193", "text": "hello world", + "language": "en"}, {"id": "194", "text": "hello world", "language": "en"}, {"id": + "195", "text": "hello world", "language": "en"}, {"id": "196", "text": "hello + world", "language": "en"}, {"id": "197", "text": "hello world", "language": + "en"}, {"id": "198", "text": "hello world", "language": "en"}, {"id": "199", + "text": "hello world", "language": "en"}, {"id": "200", "text": "hello world", + "language": "en"}, {"id": "201", "text": "hello world", "language": "en"}, {"id": + "202", "text": "hello world", "language": "en"}, {"id": "203", "text": "hello + world", "language": "en"}, {"id": "204", "text": "hello world", "language": + "en"}, {"id": "205", "text": "hello world", "language": "en"}, {"id": "206", + "text": "hello world", "language": "en"}, {"id": "207", "text": "hello world", + "language": "en"}, {"id": "208", "text": "hello world", "language": "en"}, {"id": + "209", "text": "hello world", "language": "en"}, {"id": "210", "text": "hello + world", "language": "en"}, {"id": "211", "text": "hello world", "language": + "en"}, {"id": "212", "text": "hello world", "language": "en"}, {"id": "213", + "text": "hello world", "language": "en"}, {"id": "214", "text": "hello world", + "language": "en"}, {"id": "215", "text": "hello world", "language": "en"}, {"id": + "216", "text": "hello world", "language": "en"}, {"id": "217", "text": "hello + world", "language": "en"}, {"id": "218", "text": "hello world", "language": + "en"}, {"id": "219", "text": "hello world", "language": "en"}, {"id": "220", + "text": "hello world", "language": "en"}, {"id": "221", "text": "hello world", + "language": "en"}, {"id": "222", "text": "hello world", "language": "en"}, {"id": + "223", "text": "hello world", "language": "en"}, {"id": "224", "text": "hello + world", "language": "en"}, {"id": "225", "text": "hello world", "language": + "en"}, {"id": "226", "text": "hello world", "language": "en"}, {"id": "227", + "text": "hello world", "language": "en"}, {"id": "228", "text": "hello world", + "language": "en"}, {"id": "229", "text": "hello world", "language": "en"}, {"id": + "230", "text": "hello world", "language": "en"}, {"id": "231", "text": "hello + world", "language": "en"}, {"id": "232", "text": "hello world", "language": + "en"}, {"id": "233", "text": "hello world", "language": "en"}, {"id": "234", + "text": "hello world", "language": "en"}, {"id": "235", "text": "hello world", + "language": "en"}, {"id": "236", "text": "hello world", "language": "en"}, {"id": + "237", "text": "hello world", "language": "en"}, {"id": "238", "text": "hello + world", "language": "en"}, {"id": "239", "text": "hello world", "language": + "en"}, {"id": "240", "text": "hello world", "language": "en"}, {"id": "241", + "text": "hello world", "language": "en"}, {"id": "242", "text": "hello world", + "language": "en"}, {"id": "243", "text": "hello world", "language": "en"}, {"id": + "244", "text": "hello world", "language": "en"}, {"id": "245", "text": "hello + world", "language": "en"}, {"id": "246", "text": "hello world", "language": + "en"}, {"id": "247", "text": "hello world", "language": "en"}, {"id": "248", + "text": "hello world", "language": "en"}, {"id": "249", "text": "hello world", + "language": "en"}, {"id": "250", "text": "hello world", "language": "en"}, {"id": + "251", "text": "hello world", "language": "en"}, {"id": "252", "text": "hello + world", "language": "en"}, {"id": "253", "text": "hello world", "language": + "en"}, {"id": "254", "text": "hello world", "language": "en"}, {"id": "255", + "text": "hello world", "language": "en"}, {"id": "256", "text": "hello world", + "language": "en"}, {"id": "257", "text": "hello world", "language": "en"}, {"id": + "258", "text": "hello world", "language": "en"}, {"id": "259", "text": "hello + world", "language": "en"}, {"id": "260", "text": "hello world", "language": + "en"}, {"id": "261", "text": "hello world", "language": "en"}, {"id": "262", + "text": "hello world", "language": "en"}, {"id": "263", "text": "hello world", + "language": "en"}, {"id": "264", "text": "hello world", "language": "en"}, {"id": + "265", "text": "hello world", "language": "en"}, {"id": "266", "text": "hello + world", "language": "en"}, {"id": "267", "text": "hello world", "language": + "en"}, {"id": "268", "text": "hello world", "language": "en"}, {"id": "269", + "text": "hello world", "language": "en"}, {"id": "270", "text": "hello world", + "language": "en"}, {"id": "271", "text": "hello world", "language": "en"}, {"id": + "272", "text": "hello world", "language": "en"}, {"id": "273", "text": "hello + world", "language": "en"}, {"id": "274", "text": "hello world", "language": + "en"}, {"id": "275", "text": "hello world", "language": "en"}, {"id": "276", + "text": "hello world", "language": "en"}, {"id": "277", "text": "hello world", + "language": "en"}, {"id": "278", "text": "hello world", "language": "en"}, {"id": + "279", "text": "hello world", "language": "en"}, {"id": "280", "text": "hello + world", "language": "en"}, {"id": "281", "text": "hello world", "language": + "en"}, {"id": "282", "text": "hello world", "language": "en"}, {"id": "283", + "text": "hello world", "language": "en"}, {"id": "284", "text": "hello world", + "language": "en"}, {"id": "285", "text": "hello world", "language": "en"}, {"id": + "286", "text": "hello world", "language": "en"}, {"id": "287", "text": "hello + world", "language": "en"}, {"id": "288", "text": "hello world", "language": + "en"}, {"id": "289", "text": "hello world", "language": "en"}, {"id": "290", + "text": "hello world", "language": "en"}, {"id": "291", "text": "hello world", + "language": "en"}, {"id": "292", "text": "hello world", "language": "en"}, {"id": + "293", "text": "hello world", "language": "en"}, {"id": "294", "text": "hello + world", "language": "en"}, {"id": "295", "text": "hello world", "language": + "en"}, {"id": "296", "text": "hello world", "language": "en"}, {"id": "297", + "text": "hello world", "language": "en"}, {"id": "298", "text": "hello world", + "language": "en"}, {"id": "299", "text": "hello world", "language": "en"}, {"id": + "300", "text": "hello world", "language": "en"}, {"id": "301", "text": "hello + world", "language": "en"}, {"id": "302", "text": "hello world", "language": + "en"}, {"id": "303", "text": "hello world", "language": "en"}, {"id": "304", + "text": "hello world", "language": "en"}, {"id": "305", "text": "hello world", + "language": "en"}, {"id": "306", "text": "hello world", "language": "en"}, {"id": + "307", "text": "hello world", "language": "en"}, {"id": "308", "text": "hello + world", "language": "en"}, {"id": "309", "text": "hello world", "language": + "en"}, {"id": "310", "text": "hello world", "language": "en"}, {"id": "311", + "text": "hello world", "language": "en"}, {"id": "312", "text": "hello world", + "language": "en"}, {"id": "313", "text": "hello world", "language": "en"}, {"id": + "314", "text": "hello world", "language": "en"}, {"id": "315", "text": "hello + world", "language": "en"}, {"id": "316", "text": "hello world", "language": + "en"}, {"id": "317", "text": "hello world", "language": "en"}, {"id": "318", + "text": "hello world", "language": "en"}, {"id": "319", "text": "hello world", + "language": "en"}, {"id": "320", "text": "hello world", "language": "en"}, {"id": + "321", "text": "hello world", "language": "en"}, {"id": "322", "text": "hello + world", "language": "en"}, {"id": "323", "text": "hello world", "language": + "en"}, {"id": "324", "text": "hello world", "language": "en"}, {"id": "325", + "text": "hello world", "language": "en"}, {"id": "326", "text": "hello world", + "language": "en"}, {"id": "327", "text": "hello world", "language": "en"}, {"id": + "328", "text": "hello world", "language": "en"}, {"id": "329", "text": "hello + world", "language": "en"}, {"id": "330", "text": "hello world", "language": + "en"}, {"id": "331", "text": "hello world", "language": "en"}, {"id": "332", + "text": "hello world", "language": "en"}, {"id": "333", "text": "hello world", + "language": "en"}, {"id": "334", "text": "hello world", "language": "en"}, {"id": + "335", "text": "hello world", "language": "en"}, {"id": "336", "text": "hello + world", "language": "en"}, {"id": "337", "text": "hello world", "language": + "en"}, {"id": "338", "text": "hello world", "language": "en"}, {"id": "339", + "text": "hello world", "language": "en"}, {"id": "340", "text": "hello world", + "language": "en"}, {"id": "341", "text": "hello world", "language": "en"}, {"id": + "342", "text": "hello world", "language": "en"}, {"id": "343", "text": "hello + world", "language": "en"}, {"id": "344", "text": "hello world", "language": + "en"}, {"id": "345", "text": "hello world", "language": "en"}, {"id": "346", + "text": "hello world", "language": "en"}, {"id": "347", "text": "hello world", + "language": "en"}, {"id": "348", "text": "hello world", "language": "en"}, {"id": + "349", "text": "hello world", "language": "en"}, {"id": "350", "text": "hello + world", "language": "en"}, {"id": "351", "text": "hello world", "language": + "en"}, {"id": "352", "text": "hello world", "language": "en"}, {"id": "353", + "text": "hello world", "language": "en"}, {"id": "354", "text": "hello world", + "language": "en"}, {"id": "355", "text": "hello world", "language": "en"}, {"id": + "356", "text": "hello world", "language": "en"}, {"id": "357", "text": "hello + world", "language": "en"}, {"id": "358", "text": "hello world", "language": + "en"}, {"id": "359", "text": "hello world", "language": "en"}, {"id": "360", + "text": "hello world", "language": "en"}, {"id": "361", "text": "hello world", + "language": "en"}, {"id": "362", "text": "hello world", "language": "en"}, {"id": + "363", "text": "hello world", "language": "en"}, {"id": "364", "text": "hello + world", "language": "en"}, {"id": "365", "text": "hello world", "language": + "en"}, {"id": "366", "text": "hello world", "language": "en"}, {"id": "367", + "text": "hello world", "language": "en"}, {"id": "368", "text": "hello world", + "language": "en"}, {"id": "369", "text": "hello world", "language": "en"}, {"id": + "370", "text": "hello world", "language": "en"}, {"id": "371", "text": "hello + world", "language": "en"}, {"id": "372", "text": "hello world", "language": + "en"}, {"id": "373", "text": "hello world", "language": "en"}, {"id": "374", + "text": "hello world", "language": "en"}, {"id": "375", "text": "hello world", + "language": "en"}, {"id": "376", "text": "hello world", "language": "en"}, {"id": + "377", "text": "hello world", "language": "en"}, {"id": "378", "text": "hello + world", "language": "en"}, {"id": "379", "text": "hello world", "language": + "en"}, {"id": "380", "text": "hello world", "language": "en"}, {"id": "381", + "text": "hello world", "language": "en"}, {"id": "382", "text": "hello world", + "language": "en"}, {"id": "383", "text": "hello world", "language": "en"}, {"id": + "384", "text": "hello world", "language": "en"}, {"id": "385", "text": "hello + world", "language": "en"}, {"id": "386", "text": "hello world", "language": + "en"}, {"id": "387", "text": "hello world", "language": "en"}, {"id": "388", + "text": "hello world", "language": "en"}, {"id": "389", "text": "hello world", + "language": "en"}, {"id": "390", "text": "hello world", "language": "en"}, {"id": + "391", "text": "hello world", "language": "en"}, {"id": "392", "text": "hello + world", "language": "en"}, {"id": "393", "text": "hello world", "language": + "en"}, {"id": "394", "text": "hello world", "language": "en"}, {"id": "395", + "text": "hello world", "language": "en"}, {"id": "396", "text": "hello world", + "language": "en"}, {"id": "397", "text": "hello world", "language": "en"}, {"id": + "398", "text": "hello world", "language": "en"}, {"id": "399", "text": "hello + world", "language": "en"}, {"id": "400", "text": "hello world", "language": + "en"}, {"id": "401", "text": "hello world", "language": "en"}, {"id": "402", + "text": "hello world", "language": "en"}, {"id": "403", "text": "hello world", + "language": "en"}, {"id": "404", "text": "hello world", "language": "en"}, {"id": + "405", "text": "hello world", "language": "en"}, {"id": "406", "text": "hello + world", "language": "en"}, {"id": "407", "text": "hello world", "language": + "en"}, {"id": "408", "text": "hello world", "language": "en"}, {"id": "409", + "text": "hello world", "language": "en"}, {"id": "410", "text": "hello world", + "language": "en"}, {"id": "411", "text": "hello world", "language": "en"}, {"id": + "412", "text": "hello world", "language": "en"}, {"id": "413", "text": "hello + world", "language": "en"}, {"id": "414", "text": "hello world", "language": + "en"}, {"id": "415", "text": "hello world", "language": "en"}, {"id": "416", + "text": "hello world", "language": "en"}, {"id": "417", "text": "hello world", + "language": "en"}, {"id": "418", "text": "hello world", "language": "en"}, {"id": + "419", "text": "hello world", "language": "en"}, {"id": "420", "text": "hello + world", "language": "en"}, {"id": "421", "text": "hello world", "language": + "en"}, {"id": "422", "text": "hello world", "language": "en"}, {"id": "423", + "text": "hello world", "language": "en"}, {"id": "424", "text": "hello world", + "language": "en"}, {"id": "425", "text": "hello world", "language": "en"}, {"id": + "426", "text": "hello world", "language": "en"}, {"id": "427", "text": "hello + world", "language": "en"}, {"id": "428", "text": "hello world", "language": + "en"}, {"id": "429", "text": "hello world", "language": "en"}, {"id": "430", + "text": "hello world", "language": "en"}, {"id": "431", "text": "hello world", + "language": "en"}, {"id": "432", "text": "hello world", "language": "en"}, {"id": + "433", "text": "hello world", "language": "en"}, {"id": "434", "text": "hello + world", "language": "en"}, {"id": "435", "text": "hello world", "language": + "en"}, {"id": "436", "text": "hello world", "language": "en"}, {"id": "437", + "text": "hello world", "language": "en"}, {"id": "438", "text": "hello world", + "language": "en"}, {"id": "439", "text": "hello world", "language": "en"}, {"id": + "440", "text": "hello world", "language": "en"}, {"id": "441", "text": "hello + world", "language": "en"}, {"id": "442", "text": "hello world", "language": + "en"}, {"id": "443", "text": "hello world", "language": "en"}, {"id": "444", + "text": "hello world", "language": "en"}, {"id": "445", "text": "hello world", + "language": "en"}, {"id": "446", "text": "hello world", "language": "en"}, {"id": + "447", "text": "hello world", "language": "en"}, {"id": "448", "text": "hello + world", "language": "en"}, {"id": "449", "text": "hello world", "language": + "en"}, {"id": "450", "text": "hello world", "language": "en"}, {"id": "451", + "text": "hello world", "language": "en"}, {"id": "452", "text": "hello world", + "language": "en"}, {"id": "453", "text": "hello world", "language": "en"}, {"id": + "454", "text": "hello world", "language": "en"}, {"id": "455", "text": "hello + world", "language": "en"}, {"id": "456", "text": "hello world", "language": + "en"}, {"id": "457", "text": "hello world", "language": "en"}, {"id": "458", + "text": "hello world", "language": "en"}, {"id": "459", "text": "hello world", + "language": "en"}, {"id": "460", "text": "hello world", "language": "en"}, {"id": + "461", "text": "hello world", "language": "en"}, {"id": "462", "text": "hello + world", "language": "en"}, {"id": "463", "text": "hello world", "language": + "en"}, {"id": "464", "text": "hello world", "language": "en"}, {"id": "465", + "text": "hello world", "language": "en"}, {"id": "466", "text": "hello world", + "language": "en"}, {"id": "467", "text": "hello world", "language": "en"}, {"id": + "468", "text": "hello world", "language": "en"}, {"id": "469", "text": "hello + world", "language": "en"}, {"id": "470", "text": "hello world", "language": + "en"}, {"id": "471", "text": "hello world", "language": "en"}, {"id": "472", + "text": "hello world", "language": "en"}, {"id": "473", "text": "hello world", + "language": "en"}, {"id": "474", "text": "hello world", "language": "en"}, {"id": + "475", "text": "hello world", "language": "en"}, {"id": "476", "text": "hello + world", "language": "en"}, {"id": "477", "text": "hello world", "language": + "en"}, {"id": "478", "text": "hello world", "language": "en"}, {"id": "479", + "text": "hello world", "language": "en"}, {"id": "480", "text": "hello world", + "language": "en"}, {"id": "481", "text": "hello world", "language": "en"}, {"id": + "482", "text": "hello world", "language": "en"}, {"id": "483", "text": "hello + world", "language": "en"}, {"id": "484", "text": "hello world", "language": + "en"}, {"id": "485", "text": "hello world", "language": "en"}, {"id": "486", + "text": "hello world", "language": "en"}, {"id": "487", "text": "hello world", + "language": "en"}, {"id": "488", "text": "hello world", "language": "en"}, {"id": + "489", "text": "hello world", "language": "en"}, {"id": "490", "text": "hello + world", "language": "en"}, {"id": "491", "text": "hello world", "language": + "en"}, {"id": "492", "text": "hello world", "language": "en"}, {"id": "493", + "text": "hello world", "language": "en"}, {"id": "494", "text": "hello world", + "language": "en"}, {"id": "495", "text": "hello world", "language": "en"}, {"id": + "496", "text": "hello world", "language": "en"}, {"id": "497", "text": "hello + world", "language": "en"}, {"id": "498", "text": "hello world", "language": + "en"}, {"id": "499", "text": "hello world", "language": "en"}, {"id": "500", + "text": "hello world", "language": "en"}, {"id": "501", "text": "hello world", + "language": "en"}, {"id": "502", "text": "hello world", "language": "en"}, {"id": + "503", "text": "hello world", "language": "en"}, {"id": "504", "text": "hello + world", "language": "en"}, {"id": "505", "text": "hello world", "language": + "en"}, {"id": "506", "text": "hello world", "language": "en"}, {"id": "507", + "text": "hello world", "language": "en"}, {"id": "508", "text": "hello world", + "language": "en"}, {"id": "509", "text": "hello world", "language": "en"}, {"id": + "510", "text": "hello world", "language": "en"}, {"id": "511", "text": "hello + world", "language": "en"}, {"id": "512", "text": "hello world", "language": + "en"}, {"id": "513", "text": "hello world", "language": "en"}, {"id": "514", + "text": "hello world", "language": "en"}, {"id": "515", "text": "hello world", + "language": "en"}, {"id": "516", "text": "hello world", "language": "en"}, {"id": + "517", "text": "hello world", "language": "en"}, {"id": "518", "text": "hello + world", "language": "en"}, {"id": "519", "text": "hello world", "language": + "en"}, {"id": "520", "text": "hello world", "language": "en"}, {"id": "521", + "text": "hello world", "language": "en"}, {"id": "522", "text": "hello world", + "language": "en"}, {"id": "523", "text": "hello world", "language": "en"}, {"id": + "524", "text": "hello world", "language": "en"}, {"id": "525", "text": "hello + world", "language": "en"}, {"id": "526", "text": "hello world", "language": + "en"}, {"id": "527", "text": "hello world", "language": "en"}, {"id": "528", + "text": "hello world", "language": "en"}, {"id": "529", "text": "hello world", + "language": "en"}, {"id": "530", "text": "hello world", "language": "en"}, {"id": + "531", "text": "hello world", "language": "en"}, {"id": "532", "text": "hello + world", "language": "en"}, {"id": "533", "text": "hello world", "language": + "en"}, {"id": "534", "text": "hello world", "language": "en"}, {"id": "535", + "text": "hello world", "language": "en"}, {"id": "536", "text": "hello world", + "language": "en"}, {"id": "537", "text": "hello world", "language": "en"}, {"id": + "538", "text": "hello world", "language": "en"}, {"id": "539", "text": "hello + world", "language": "en"}, {"id": "540", "text": "hello world", "language": + "en"}, {"id": "541", "text": "hello world", "language": "en"}, {"id": "542", + "text": "hello world", "language": "en"}, {"id": "543", "text": "hello world", + "language": "en"}, {"id": "544", "text": "hello world", "language": "en"}, {"id": + "545", "text": "hello world", "language": "en"}, {"id": "546", "text": "hello + world", "language": "en"}, {"id": "547", "text": "hello world", "language": + "en"}, {"id": "548", "text": "hello world", "language": "en"}, {"id": "549", + "text": "hello world", "language": "en"}, {"id": "550", "text": "hello world", + "language": "en"}, {"id": "551", "text": "hello world", "language": "en"}, {"id": + "552", "text": "hello world", "language": "en"}, {"id": "553", "text": "hello + world", "language": "en"}, {"id": "554", "text": "hello world", "language": + "en"}, {"id": "555", "text": "hello world", "language": "en"}, {"id": "556", + "text": "hello world", "language": "en"}, {"id": "557", "text": "hello world", + "language": "en"}, {"id": "558", "text": "hello world", "language": "en"}, {"id": + "559", "text": "hello world", "language": "en"}, {"id": "560", "text": "hello + world", "language": "en"}, {"id": "561", "text": "hello world", "language": + "en"}, {"id": "562", "text": "hello world", "language": "en"}, {"id": "563", + "text": "hello world", "language": "en"}, {"id": "564", "text": "hello world", + "language": "en"}, {"id": "565", "text": "hello world", "language": "en"}, {"id": + "566", "text": "hello world", "language": "en"}, {"id": "567", "text": "hello + world", "language": "en"}, {"id": "568", "text": "hello world", "language": + "en"}, {"id": "569", "text": "hello world", "language": "en"}, {"id": "570", + "text": "hello world", "language": "en"}, {"id": "571", "text": "hello world", + "language": "en"}, {"id": "572", "text": "hello world", "language": "en"}, {"id": + "573", "text": "hello world", "language": "en"}, {"id": "574", "text": "hello + world", "language": "en"}, {"id": "575", "text": "hello world", "language": + "en"}, {"id": "576", "text": "hello world", "language": "en"}, {"id": "577", + "text": "hello world", "language": "en"}, {"id": "578", "text": "hello world", + "language": "en"}, {"id": "579", "text": "hello world", "language": "en"}, {"id": + "580", "text": "hello world", "language": "en"}, {"id": "581", "text": "hello + world", "language": "en"}, {"id": "582", "text": "hello world", "language": + "en"}, {"id": "583", "text": "hello world", "language": "en"}, {"id": "584", + "text": "hello world", "language": "en"}, {"id": "585", "text": "hello world", + "language": "en"}, {"id": "586", "text": "hello world", "language": "en"}, {"id": + "587", "text": "hello world", "language": "en"}, {"id": "588", "text": "hello + world", "language": "en"}, {"id": "589", "text": "hello world", "language": + "en"}, {"id": "590", "text": "hello world", "language": "en"}, {"id": "591", + "text": "hello world", "language": "en"}, {"id": "592", "text": "hello world", + "language": "en"}, {"id": "593", "text": "hello world", "language": "en"}, {"id": + "594", "text": "hello world", "language": "en"}, {"id": "595", "text": "hello + world", "language": "en"}, {"id": "596", "text": "hello world", "language": + "en"}, {"id": "597", "text": "hello world", "language": "en"}, {"id": "598", + "text": "hello world", "language": "en"}, {"id": "599", "text": "hello world", + "language": "en"}, {"id": "600", "text": "hello world", "language": "en"}, {"id": + "601", "text": "hello world", "language": "en"}, {"id": "602", "text": "hello + world", "language": "en"}, {"id": "603", "text": "hello world", "language": + "en"}, {"id": "604", "text": "hello world", "language": "en"}, {"id": "605", + "text": "hello world", "language": "en"}, {"id": "606", "text": "hello world", + "language": "en"}, {"id": "607", "text": "hello world", "language": "en"}, {"id": + "608", "text": "hello world", "language": "en"}, {"id": "609", "text": "hello + world", "language": "en"}, {"id": "610", "text": "hello world", "language": + "en"}, {"id": "611", "text": "hello world", "language": "en"}, {"id": "612", + "text": "hello world", "language": "en"}, {"id": "613", "text": "hello world", + "language": "en"}, {"id": "614", "text": "hello world", "language": "en"}, {"id": + "615", "text": "hello world", "language": "en"}, {"id": "616", "text": "hello + world", "language": "en"}, {"id": "617", "text": "hello world", "language": + "en"}, {"id": "618", "text": "hello world", "language": "en"}, {"id": "619", + "text": "hello world", "language": "en"}, {"id": "620", "text": "hello world", + "language": "en"}, {"id": "621", "text": "hello world", "language": "en"}, {"id": + "622", "text": "hello world", "language": "en"}, {"id": "623", "text": "hello + world", "language": "en"}, {"id": "624", "text": "hello world", "language": + "en"}, {"id": "625", "text": "hello world", "language": "en"}, {"id": "626", + "text": "hello world", "language": "en"}, {"id": "627", "text": "hello world", + "language": "en"}, {"id": "628", "text": "hello world", "language": "en"}, {"id": + "629", "text": "hello world", "language": "en"}, {"id": "630", "text": "hello + world", "language": "en"}, {"id": "631", "text": "hello world", "language": + "en"}, {"id": "632", "text": "hello world", "language": "en"}, {"id": "633", + "text": "hello world", "language": "en"}, {"id": "634", "text": "hello world", + "language": "en"}, {"id": "635", "text": "hello world", "language": "en"}, {"id": + "636", "text": "hello world", "language": "en"}, {"id": "637", "text": "hello + world", "language": "en"}, {"id": "638", "text": "hello world", "language": + "en"}, {"id": "639", "text": "hello world", "language": "en"}, {"id": "640", + "text": "hello world", "language": "en"}, {"id": "641", "text": "hello world", + "language": "en"}, {"id": "642", "text": "hello world", "language": "en"}, {"id": + "643", "text": "hello world", "language": "en"}, {"id": "644", "text": "hello + world", "language": "en"}, {"id": "645", "text": "hello world", "language": + "en"}, {"id": "646", "text": "hello world", "language": "en"}, {"id": "647", + "text": "hello world", "language": "en"}, {"id": "648", "text": "hello world", + "language": "en"}, {"id": "649", "text": "hello world", "language": "en"}, {"id": + "650", "text": "hello world", "language": "en"}, {"id": "651", "text": "hello + world", "language": "en"}, {"id": "652", "text": "hello world", "language": + "en"}, {"id": "653", "text": "hello world", "language": "en"}, {"id": "654", + "text": "hello world", "language": "en"}, {"id": "655", "text": "hello world", + "language": "en"}, {"id": "656", "text": "hello world", "language": "en"}, {"id": + "657", "text": "hello world", "language": "en"}, {"id": "658", "text": "hello + world", "language": "en"}, {"id": "659", "text": "hello world", "language": + "en"}, {"id": "660", "text": "hello world", "language": "en"}, {"id": "661", + "text": "hello world", "language": "en"}, {"id": "662", "text": "hello world", + "language": "en"}, {"id": "663", "text": "hello world", "language": "en"}, {"id": + "664", "text": "hello world", "language": "en"}, {"id": "665", "text": "hello + world", "language": "en"}, {"id": "666", "text": "hello world", "language": + "en"}, {"id": "667", "text": "hello world", "language": "en"}, {"id": "668", + "text": "hello world", "language": "en"}, {"id": "669", "text": "hello world", + "language": "en"}, {"id": "670", "text": "hello world", "language": "en"}, {"id": + "671", "text": "hello world", "language": "en"}, {"id": "672", "text": "hello + world", "language": "en"}, {"id": "673", "text": "hello world", "language": + "en"}, {"id": "674", "text": "hello world", "language": "en"}, {"id": "675", + "text": "hello world", "language": "en"}, {"id": "676", "text": "hello world", + "language": "en"}, {"id": "677", "text": "hello world", "language": "en"}, {"id": + "678", "text": "hello world", "language": "en"}, {"id": "679", "text": "hello + world", "language": "en"}, {"id": "680", "text": "hello world", "language": + "en"}, {"id": "681", "text": "hello world", "language": "en"}, {"id": "682", + "text": "hello world", "language": "en"}, {"id": "683", "text": "hello world", + "language": "en"}, {"id": "684", "text": "hello world", "language": "en"}, {"id": + "685", "text": "hello world", "language": "en"}, {"id": "686", "text": "hello + world", "language": "en"}, {"id": "687", "text": "hello world", "language": + "en"}, {"id": "688", "text": "hello world", "language": "en"}, {"id": "689", + "text": "hello world", "language": "en"}, {"id": "690", "text": "hello world", + "language": "en"}, {"id": "691", "text": "hello world", "language": "en"}, {"id": + "692", "text": "hello world", "language": "en"}, {"id": "693", "text": "hello + world", "language": "en"}, {"id": "694", "text": "hello world", "language": + "en"}, {"id": "695", "text": "hello world", "language": "en"}, {"id": "696", + "text": "hello world", "language": "en"}, {"id": "697", "text": "hello world", + "language": "en"}, {"id": "698", "text": "hello world", "language": "en"}, {"id": + "699", "text": "hello world", "language": "en"}, {"id": "700", "text": "hello + world", "language": "en"}, {"id": "701", "text": "hello world", "language": + "en"}, {"id": "702", "text": "hello world", "language": "en"}, {"id": "703", + "text": "hello world", "language": "en"}, {"id": "704", "text": "hello world", + "language": "en"}, {"id": "705", "text": "hello world", "language": "en"}, {"id": + "706", "text": "hello world", "language": "en"}, {"id": "707", "text": "hello + world", "language": "en"}, {"id": "708", "text": "hello world", "language": + "en"}, {"id": "709", "text": "hello world", "language": "en"}, {"id": "710", + "text": "hello world", "language": "en"}, {"id": "711", "text": "hello world", + "language": "en"}, {"id": "712", "text": "hello world", "language": "en"}, {"id": + "713", "text": "hello world", "language": "en"}, {"id": "714", "text": "hello + world", "language": "en"}, {"id": "715", "text": "hello world", "language": + "en"}, {"id": "716", "text": "hello world", "language": "en"}, {"id": "717", + "text": "hello world", "language": "en"}, {"id": "718", "text": "hello world", + "language": "en"}, {"id": "719", "text": "hello world", "language": "en"}, {"id": + "720", "text": "hello world", "language": "en"}, {"id": "721", "text": "hello + world", "language": "en"}, {"id": "722", "text": "hello world", "language": + "en"}, {"id": "723", "text": "hello world", "language": "en"}, {"id": "724", + "text": "hello world", "language": "en"}, {"id": "725", "text": "hello world", + "language": "en"}, {"id": "726", "text": "hello world", "language": "en"}, {"id": + "727", "text": "hello world", "language": "en"}, {"id": "728", "text": "hello + world", "language": "en"}, {"id": "729", "text": "hello world", "language": + "en"}, {"id": "730", "text": "hello world", "language": "en"}, {"id": "731", + "text": "hello world", "language": "en"}, {"id": "732", "text": "hello world", + "language": "en"}, {"id": "733", "text": "hello world", "language": "en"}, {"id": + "734", "text": "hello world", "language": "en"}, {"id": "735", "text": "hello + world", "language": "en"}, {"id": "736", "text": "hello world", "language": + "en"}, {"id": "737", "text": "hello world", "language": "en"}, {"id": "738", + "text": "hello world", "language": "en"}, {"id": "739", "text": "hello world", + "language": "en"}, {"id": "740", "text": "hello world", "language": "en"}, {"id": + "741", "text": "hello world", "language": "en"}, {"id": "742", "text": "hello + world", "language": "en"}, {"id": "743", "text": "hello world", "language": + "en"}, {"id": "744", "text": "hello world", "language": "en"}, {"id": "745", + "text": "hello world", "language": "en"}, {"id": "746", "text": "hello world", + "language": "en"}, {"id": "747", "text": "hello world", "language": "en"}, {"id": + "748", "text": "hello world", "language": "en"}, {"id": "749", "text": "hello + world", "language": "en"}, {"id": "750", "text": "hello world", "language": + "en"}, {"id": "751", "text": "hello world", "language": "en"}, {"id": "752", + "text": "hello world", "language": "en"}, {"id": "753", "text": "hello world", + "language": "en"}, {"id": "754", "text": "hello world", "language": "en"}, {"id": + "755", "text": "hello world", "language": "en"}, {"id": "756", "text": "hello + world", "language": "en"}, {"id": "757", "text": "hello world", "language": + "en"}, {"id": "758", "text": "hello world", "language": "en"}, {"id": "759", + "text": "hello world", "language": "en"}, {"id": "760", "text": "hello world", + "language": "en"}, {"id": "761", "text": "hello world", "language": "en"}, {"id": + "762", "text": "hello world", "language": "en"}, {"id": "763", "text": "hello + world", "language": "en"}, {"id": "764", "text": "hello world", "language": + "en"}, {"id": "765", "text": "hello world", "language": "en"}, {"id": "766", + "text": "hello world", "language": "en"}, {"id": "767", "text": "hello world", + "language": "en"}, {"id": "768", "text": "hello world", "language": "en"}, {"id": + "769", "text": "hello world", "language": "en"}, {"id": "770", "text": "hello + world", "language": "en"}, {"id": "771", "text": "hello world", "language": + "en"}, {"id": "772", "text": "hello world", "language": "en"}, {"id": "773", + "text": "hello world", "language": "en"}, {"id": "774", "text": "hello world", + "language": "en"}, {"id": "775", "text": "hello world", "language": "en"}, {"id": + "776", "text": "hello world", "language": "en"}, {"id": "777", "text": "hello + world", "language": "en"}, {"id": "778", "text": "hello world", "language": + "en"}, {"id": "779", "text": "hello world", "language": "en"}, {"id": "780", + "text": "hello world", "language": "en"}, {"id": "781", "text": "hello world", + "language": "en"}, {"id": "782", "text": "hello world", "language": "en"}, {"id": + "783", "text": "hello world", "language": "en"}, {"id": "784", "text": "hello + world", "language": "en"}, {"id": "785", "text": "hello world", "language": + "en"}, {"id": "786", "text": "hello world", "language": "en"}, {"id": "787", + "text": "hello world", "language": "en"}, {"id": "788", "text": "hello world", + "language": "en"}, {"id": "789", "text": "hello world", "language": "en"}, {"id": + "790", "text": "hello world", "language": "en"}, {"id": "791", "text": "hello + world", "language": "en"}, {"id": "792", "text": "hello world", "language": + "en"}, {"id": "793", "text": "hello world", "language": "en"}, {"id": "794", + "text": "hello world", "language": "en"}, {"id": "795", "text": "hello world", + "language": "en"}, {"id": "796", "text": "hello world", "language": "en"}, {"id": + "797", "text": "hello world", "language": "en"}, {"id": "798", "text": "hello + world", "language": "en"}, {"id": "799", "text": "hello world", "language": + "en"}, {"id": "800", "text": "hello world", "language": "en"}, {"id": "801", + "text": "hello world", "language": "en"}, {"id": "802", "text": "hello world", + "language": "en"}, {"id": "803", "text": "hello world", "language": "en"}, {"id": + "804", "text": "hello world", "language": "en"}, {"id": "805", "text": "hello + world", "language": "en"}, {"id": "806", "text": "hello world", "language": + "en"}, {"id": "807", "text": "hello world", "language": "en"}, {"id": "808", + "text": "hello world", "language": "en"}, {"id": "809", "text": "hello world", + "language": "en"}, {"id": "810", "text": "hello world", "language": "en"}, {"id": + "811", "text": "hello world", "language": "en"}, {"id": "812", "text": "hello + world", "language": "en"}, {"id": "813", "text": "hello world", "language": + "en"}, {"id": "814", "text": "hello world", "language": "en"}, {"id": "815", + "text": "hello world", "language": "en"}, {"id": "816", "text": "hello world", + "language": "en"}, {"id": "817", "text": "hello world", "language": "en"}, {"id": + "818", "text": "hello world", "language": "en"}, {"id": "819", "text": "hello + world", "language": "en"}, {"id": "820", "text": "hello world", "language": + "en"}, {"id": "821", "text": "hello world", "language": "en"}, {"id": "822", + "text": "hello world", "language": "en"}, {"id": "823", "text": "hello world", + "language": "en"}, {"id": "824", "text": "hello world", "language": "en"}, {"id": + "825", "text": "hello world", "language": "en"}, {"id": "826", "text": "hello + world", "language": "en"}, {"id": "827", "text": "hello world", "language": + "en"}, {"id": "828", "text": "hello world", "language": "en"}, {"id": "829", + "text": "hello world", "language": "en"}, {"id": "830", "text": "hello world", + "language": "en"}, {"id": "831", "text": "hello world", "language": "en"}, {"id": + "832", "text": "hello world", "language": "en"}, {"id": "833", "text": "hello + world", "language": "en"}, {"id": "834", "text": "hello world", "language": + "en"}, {"id": "835", "text": "hello world", "language": "en"}, {"id": "836", + "text": "hello world", "language": "en"}, {"id": "837", "text": "hello world", + "language": "en"}, {"id": "838", "text": "hello world", "language": "en"}, {"id": + "839", "text": "hello world", "language": "en"}, {"id": "840", "text": "hello + world", "language": "en"}, {"id": "841", "text": "hello world", "language": + "en"}, {"id": "842", "text": "hello world", "language": "en"}, {"id": "843", + "text": "hello world", "language": "en"}, {"id": "844", "text": "hello world", + "language": "en"}, {"id": "845", "text": "hello world", "language": "en"}, {"id": + "846", "text": "hello world", "language": "en"}, {"id": "847", "text": "hello + world", "language": "en"}, {"id": "848", "text": "hello world", "language": + "en"}, {"id": "849", "text": "hello world", "language": "en"}, {"id": "850", + "text": "hello world", "language": "en"}, {"id": "851", "text": "hello world", + "language": "en"}, {"id": "852", "text": "hello world", "language": "en"}, {"id": + "853", "text": "hello world", "language": "en"}, {"id": "854", "text": "hello + world", "language": "en"}, {"id": "855", "text": "hello world", "language": + "en"}, {"id": "856", "text": "hello world", "language": "en"}, {"id": "857", + "text": "hello world", "language": "en"}, {"id": "858", "text": "hello world", + "language": "en"}, {"id": "859", "text": "hello world", "language": "en"}, {"id": + "860", "text": "hello world", "language": "en"}, {"id": "861", "text": "hello + world", "language": "en"}, {"id": "862", "text": "hello world", "language": + "en"}, {"id": "863", "text": "hello world", "language": "en"}, {"id": "864", + "text": "hello world", "language": "en"}, {"id": "865", "text": "hello world", + "language": "en"}, {"id": "866", "text": "hello world", "language": "en"}, {"id": + "867", "text": "hello world", "language": "en"}, {"id": "868", "text": "hello + world", "language": "en"}, {"id": "869", "text": "hello world", "language": + "en"}, {"id": "870", "text": "hello world", "language": "en"}, {"id": "871", + "text": "hello world", "language": "en"}, {"id": "872", "text": "hello world", + "language": "en"}, {"id": "873", "text": "hello world", "language": "en"}, {"id": + "874", "text": "hello world", "language": "en"}, {"id": "875", "text": "hello + world", "language": "en"}, {"id": "876", "text": "hello world", "language": + "en"}, {"id": "877", "text": "hello world", "language": "en"}, {"id": "878", + "text": "hello world", "language": "en"}, {"id": "879", "text": "hello world", + "language": "en"}, {"id": "880", "text": "hello world", "language": "en"}, {"id": + "881", "text": "hello world", "language": "en"}, {"id": "882", "text": "hello + world", "language": "en"}, {"id": "883", "text": "hello world", "language": + "en"}, {"id": "884", "text": "hello world", "language": "en"}, {"id": "885", + "text": "hello world", "language": "en"}, {"id": "886", "text": "hello world", + "language": "en"}, {"id": "887", "text": "hello world", "language": "en"}, {"id": + "888", "text": "hello world", "language": "en"}, {"id": "889", "text": "hello + world", "language": "en"}, {"id": "890", "text": "hello world", "language": + "en"}, {"id": "891", "text": "hello world", "language": "en"}, {"id": "892", + "text": "hello world", "language": "en"}, {"id": "893", "text": "hello world", + "language": "en"}, {"id": "894", "text": "hello world", "language": "en"}, {"id": + "895", "text": "hello world", "language": "en"}, {"id": "896", "text": "hello + world", "language": "en"}, {"id": "897", "text": "hello world", "language": + "en"}, {"id": "898", "text": "hello world", "language": "en"}, {"id": "899", + "text": "hello world", "language": "en"}, {"id": "900", "text": "hello world", + "language": "en"}, {"id": "901", "text": "hello world", "language": "en"}, {"id": + "902", "text": "hello world", "language": "en"}, {"id": "903", "text": "hello + world", "language": "en"}, {"id": "904", "text": "hello world", "language": + "en"}, {"id": "905", "text": "hello world", "language": "en"}, {"id": "906", + "text": "hello world", "language": "en"}, {"id": "907", "text": "hello world", + "language": "en"}, {"id": "908", "text": "hello world", "language": "en"}, {"id": + "909", "text": "hello world", "language": "en"}, {"id": "910", "text": "hello + world", "language": "en"}, {"id": "911", "text": "hello world", "language": + "en"}, {"id": "912", "text": "hello world", "language": "en"}, {"id": "913", + "text": "hello world", "language": "en"}, {"id": "914", "text": "hello world", + "language": "en"}, {"id": "915", "text": "hello world", "language": "en"}, {"id": + "916", "text": "hello world", "language": "en"}, {"id": "917", "text": "hello + world", "language": "en"}, {"id": "918", "text": "hello world", "language": + "en"}, {"id": "919", "text": "hello world", "language": "en"}, {"id": "920", + "text": "hello world", "language": "en"}, {"id": "921", "text": "hello world", + "language": "en"}, {"id": "922", "text": "hello world", "language": "en"}, {"id": + "923", "text": "hello world", "language": "en"}, {"id": "924", "text": "hello + world", "language": "en"}, {"id": "925", "text": "hello world", "language": + "en"}, {"id": "926", "text": "hello world", "language": "en"}, {"id": "927", + "text": "hello world", "language": "en"}, {"id": "928", "text": "hello world", + "language": "en"}, {"id": "929", "text": "hello world", "language": "en"}, {"id": + "930", "text": "hello world", "language": "en"}, {"id": "931", "text": "hello + world", "language": "en"}, {"id": "932", "text": "hello world", "language": + "en"}, {"id": "933", "text": "hello world", "language": "en"}, {"id": "934", + "text": "hello world", "language": "en"}, {"id": "935", "text": "hello world", + "language": "en"}, {"id": "936", "text": "hello world", "language": "en"}, {"id": + "937", "text": "hello world", "language": "en"}, {"id": "938", "text": "hello + world", "language": "en"}, {"id": "939", "text": "hello world", "language": + "en"}, {"id": "940", "text": "hello world", "language": "en"}, {"id": "941", + "text": "hello world", "language": "en"}, {"id": "942", "text": "hello world", + "language": "en"}, {"id": "943", "text": "hello world", "language": "en"}, {"id": + "944", "text": "hello world", "language": "en"}, {"id": "945", "text": "hello + world", "language": "en"}, {"id": "946", "text": "hello world", "language": + "en"}, {"id": "947", "text": "hello world", "language": "en"}, {"id": "948", + "text": "hello world", "language": "en"}, {"id": "949", "text": "hello world", + "language": "en"}, {"id": "950", "text": "hello world", "language": "en"}, {"id": + "951", "text": "hello world", "language": "en"}, {"id": "952", "text": "hello + world", "language": "en"}, {"id": "953", "text": "hello world", "language": + "en"}, {"id": "954", "text": "hello world", "language": "en"}, {"id": "955", + "text": "hello world", "language": "en"}, {"id": "956", "text": "hello world", + "language": "en"}, {"id": "957", "text": "hello world", "language": "en"}, {"id": + "958", "text": "hello world", "language": "en"}, {"id": "959", "text": "hello + world", "language": "en"}, {"id": "960", "text": "hello world", "language": + "en"}, {"id": "961", "text": "hello world", "language": "en"}, {"id": "962", + "text": "hello world", "language": "en"}, {"id": "963", "text": "hello world", + "language": "en"}, {"id": "964", "text": "hello world", "language": "en"}, {"id": + "965", "text": "hello world", "language": "en"}, {"id": "966", "text": "hello + world", "language": "en"}, {"id": "967", "text": "hello world", "language": + "en"}, {"id": "968", "text": "hello world", "language": "en"}, {"id": "969", + "text": "hello world", "language": "en"}, {"id": "970", "text": "hello world", + "language": "en"}, {"id": "971", "text": "hello world", "language": "en"}, {"id": + "972", "text": "hello world", "language": "en"}, {"id": "973", "text": "hello + world", "language": "en"}, {"id": "974", "text": "hello world", "language": + "en"}, {"id": "975", "text": "hello world", "language": "en"}, {"id": "976", + "text": "hello world", "language": "en"}, {"id": "977", "text": "hello world", + "language": "en"}, {"id": "978", "text": "hello world", "language": "en"}, {"id": + "979", "text": "hello world", "language": "en"}, {"id": "980", "text": "hello + world", "language": "en"}, {"id": "981", "text": "hello world", "language": + "en"}, {"id": "982", "text": "hello world", "language": "en"}, {"id": "983", + "text": "hello world", "language": "en"}, {"id": "984", "text": "hello world", + "language": "en"}, {"id": "985", "text": "hello world", "language": "en"}, {"id": + "986", "text": "hello world", "language": "en"}, {"id": "987", "text": "hello + world", "language": "en"}, {"id": "988", "text": "hello world", "language": + "en"}, {"id": "989", "text": "hello world", "language": "en"}, {"id": "990", + "text": "hello world", "language": "en"}, {"id": "991", "text": "hello world", + "language": "en"}, {"id": "992", "text": "hello world", "language": "en"}, {"id": + "993", "text": "hello world", "language": "en"}, {"id": "994", "text": "hello + world", "language": "en"}, {"id": "995", "text": "hello world", "language": + "en"}, {"id": "996", "text": "hello world", "language": "en"}, {"id": "997", + "text": "hello world", "language": "en"}, {"id": "998", "text": "hello world", + "language": "en"}, {"id": "999", "text": "hello world", "language": "en"}, {"id": + "1000", "text": "hello world", "language": "en"}, {"id": "1001", "text": "hello + world", "language": "en"}, {"id": "1002", "text": "hello world", "language": + "en"}, {"id": "1003", "text": "hello world", "language": "en"}, {"id": "1004", + "text": "hello world", "language": "en"}, {"id": "1005", "text": "hello world", + "language": "en"}, {"id": "1006", "text": "hello world", "language": "en"}, + {"id": "1007", "text": "hello world", "language": "en"}, {"id": "1008", "text": + "hello world", "language": "en"}, {"id": "1009", "text": "hello world", "language": + "en"}, {"id": "1010", "text": "hello world", "language": "en"}, {"id": "1011", + "text": "hello world", "language": "en"}, {"id": "1012", "text": "hello world", + "language": "en"}, {"id": "1013", "text": "hello world", "language": "en"}, + {"id": "1014", "text": "hello world", "language": "en"}, {"id": "1015", "text": + "hello world", "language": "en"}, {"id": "1016", "text": "hello world", "language": + "en"}, {"id": "1017", "text": "hello world", "language": "en"}, {"id": "1018", + "text": "hello world", "language": "en"}, {"id": "1019", "text": "hello world", + "language": "en"}, {"id": "1020", "text": "hello world", "language": "en"}, + {"id": "1021", "text": "hello world", "language": "en"}, {"id": "1022", "text": + "hello world", "language": "en"}, {"id": "1023", "text": "hello world", "language": + "en"}, {"id": "1024", "text": "hello world", "language": "en"}, {"id": "1025", + "text": "hello world", "language": "en"}, {"id": "1026", "text": "hello world", + "language": "en"}, {"id": "1027", "text": "hello world", "language": "en"}, + {"id": "1028", "text": "hello world", "language": "en"}, {"id": "1029", "text": + "hello world", "language": "en"}, {"id": "1030", "text": "hello world", "language": + "en"}, {"id": "1031", "text": "hello world", "language": "en"}, {"id": "1032", + "text": "hello world", "language": "en"}, {"id": "1033", "text": "hello world", + "language": "en"}, {"id": "1034", "text": "hello world", "language": "en"}, + {"id": "1035", "text": "hello world", "language": "en"}, {"id": "1036", "text": + "hello world", "language": "en"}, {"id": "1037", "text": "hello world", "language": + "en"}, {"id": "1038", "text": "hello world", "language": "en"}, {"id": "1039", + "text": "hello world", "language": "en"}, {"id": "1040", "text": "hello world", + "language": "en"}, {"id": "1041", "text": "hello world", "language": "en"}, + {"id": "1042", "text": "hello world", "language": "en"}, {"id": "1043", "text": + "hello world", "language": "en"}, {"id": "1044", "text": "hello world", "language": + "en"}, {"id": "1045", "text": "hello world", "language": "en"}, {"id": "1046", + "text": "hello world", "language": "en"}, {"id": "1047", "text": "hello world", + "language": "en"}, {"id": "1048", "text": "hello world", "language": "en"}, + {"id": "1049", "text": "hello world", "language": "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '58755' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch + request contains too many records. Max 1000 records are permitted."}}}' + headers: + apim-request-id: + - ec0a5fa0-f002-48d4-8494-b5fc0a061aff + content-type: + - application/json; charset=utf-8 + date: + - Wed, 22 Jul 2020 15:42:18 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '184' + status: + code: 400 + message: Bad Request +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit_error.yaml new file mode 100644 index 000000000000..71deeb3ec706 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit_error.yaml @@ -0,0 +1,751 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "hello world", "language": "en"}, {"id": + "1", "text": "hello world", "language": "en"}, {"id": "2", "text": "hello world", + "language": "en"}, {"id": "3", "text": "hello world", "language": "en"}, {"id": + "4", "text": "hello world", "language": "en"}, {"id": "5", "text": "hello world", + "language": "en"}, {"id": "6", "text": "hello world", "language": "en"}, {"id": + "7", "text": "hello world", "language": "en"}, {"id": "8", "text": "hello world", + "language": "en"}, {"id": "9", "text": "hello world", "language": "en"}, {"id": + "10", "text": "hello world", "language": "en"}, {"id": "11", "text": "hello + world", "language": "en"}, {"id": "12", "text": "hello world", "language": "en"}, + {"id": "13", "text": "hello world", "language": "en"}, {"id": "14", "text": + "hello world", "language": "en"}, {"id": "15", "text": "hello world", "language": + "en"}, {"id": "16", "text": "hello world", "language": "en"}, {"id": "17", "text": + "hello world", "language": "en"}, {"id": "18", "text": "hello world", "language": + "en"}, {"id": "19", "text": "hello world", "language": "en"}, {"id": "20", "text": + "hello world", "language": "en"}, {"id": "21", "text": "hello world", "language": + "en"}, {"id": "22", "text": "hello world", "language": "en"}, {"id": "23", "text": + "hello world", "language": "en"}, {"id": "24", "text": "hello world", "language": + "en"}, {"id": "25", "text": "hello world", "language": "en"}, {"id": "26", "text": + "hello world", "language": "en"}, {"id": "27", "text": "hello world", "language": + "en"}, {"id": "28", "text": "hello world", "language": "en"}, {"id": "29", "text": + "hello world", "language": "en"}, {"id": "30", "text": "hello world", "language": + "en"}, {"id": "31", "text": "hello world", "language": "en"}, {"id": "32", "text": + "hello world", "language": "en"}, {"id": "33", "text": "hello world", "language": + "en"}, {"id": "34", "text": "hello world", "language": "en"}, {"id": "35", "text": + "hello world", "language": "en"}, {"id": "36", "text": "hello world", "language": + "en"}, {"id": "37", "text": "hello world", "language": "en"}, {"id": "38", "text": + "hello world", "language": "en"}, {"id": "39", "text": "hello world", "language": + "en"}, {"id": "40", "text": "hello world", "language": "en"}, {"id": "41", "text": + "hello world", "language": "en"}, {"id": "42", "text": "hello world", "language": + "en"}, {"id": "43", "text": "hello world", "language": "en"}, {"id": "44", "text": + "hello world", "language": "en"}, {"id": "45", "text": "hello world", "language": + "en"}, {"id": "46", "text": "hello world", "language": "en"}, {"id": "47", "text": + "hello world", "language": "en"}, {"id": "48", "text": "hello world", "language": + "en"}, {"id": "49", "text": "hello world", "language": "en"}, {"id": "50", "text": + "hello world", "language": "en"}, {"id": "51", "text": "hello world", "language": + "en"}, {"id": "52", "text": "hello world", "language": "en"}, {"id": "53", "text": + "hello world", "language": "en"}, {"id": "54", "text": "hello world", "language": + "en"}, {"id": "55", "text": "hello world", "language": "en"}, {"id": "56", "text": + "hello world", "language": "en"}, {"id": "57", "text": "hello world", "language": + "en"}, {"id": "58", "text": "hello world", "language": "en"}, {"id": "59", "text": + "hello world", "language": "en"}, {"id": "60", "text": "hello world", "language": + "en"}, {"id": "61", "text": "hello world", "language": "en"}, {"id": "62", "text": + "hello world", "language": "en"}, {"id": "63", "text": "hello world", "language": + "en"}, {"id": "64", "text": "hello world", "language": "en"}, {"id": "65", "text": + "hello world", "language": "en"}, {"id": "66", "text": "hello world", "language": + "en"}, {"id": "67", "text": "hello world", "language": "en"}, {"id": "68", "text": + "hello world", "language": "en"}, {"id": "69", "text": "hello world", "language": + "en"}, {"id": "70", "text": "hello world", "language": "en"}, {"id": "71", "text": + "hello world", "language": "en"}, {"id": "72", "text": "hello world", "language": + "en"}, {"id": "73", "text": "hello world", "language": "en"}, {"id": "74", "text": + "hello world", "language": "en"}, {"id": "75", "text": "hello world", "language": + "en"}, {"id": "76", "text": "hello world", "language": "en"}, {"id": "77", "text": + "hello world", "language": "en"}, {"id": "78", "text": "hello world", "language": + "en"}, {"id": "79", "text": "hello world", "language": "en"}, {"id": "80", "text": + "hello world", "language": "en"}, {"id": "81", "text": "hello world", "language": + "en"}, {"id": "82", "text": "hello world", "language": "en"}, {"id": "83", "text": + "hello world", "language": "en"}, {"id": "84", "text": "hello world", "language": + "en"}, {"id": "85", "text": "hello world", "language": "en"}, {"id": "86", "text": + "hello world", "language": "en"}, {"id": "87", "text": "hello world", "language": + "en"}, {"id": "88", "text": "hello world", "language": "en"}, {"id": "89", "text": + "hello world", "language": "en"}, {"id": "90", "text": "hello world", "language": + "en"}, {"id": "91", "text": "hello world", "language": "en"}, {"id": "92", "text": + "hello world", "language": "en"}, {"id": "93", "text": "hello world", "language": + "en"}, {"id": "94", "text": "hello world", "language": "en"}, {"id": "95", "text": + "hello world", "language": "en"}, {"id": "96", "text": "hello world", "language": + "en"}, {"id": "97", "text": "hello world", "language": "en"}, {"id": "98", "text": + "hello world", "language": "en"}, {"id": "99", "text": "hello world", "language": + "en"}, {"id": "100", "text": "hello world", "language": "en"}, {"id": "101", + "text": "hello world", "language": "en"}, {"id": "102", "text": "hello world", + "language": "en"}, {"id": "103", "text": "hello world", "language": "en"}, {"id": + "104", "text": "hello world", "language": "en"}, {"id": "105", "text": "hello + world", "language": "en"}, {"id": "106", "text": "hello world", "language": + "en"}, {"id": "107", "text": "hello world", "language": "en"}, {"id": "108", + "text": "hello world", "language": "en"}, {"id": "109", "text": "hello world", + "language": "en"}, {"id": "110", "text": "hello world", "language": "en"}, {"id": + "111", "text": "hello world", "language": "en"}, {"id": "112", "text": "hello + world", "language": "en"}, {"id": "113", "text": "hello world", "language": + "en"}, {"id": "114", "text": "hello world", "language": "en"}, {"id": "115", + "text": "hello world", "language": "en"}, {"id": "116", "text": "hello world", + "language": "en"}, {"id": "117", "text": "hello world", "language": "en"}, {"id": + "118", "text": "hello world", "language": "en"}, {"id": "119", "text": "hello + world", "language": "en"}, {"id": "120", "text": "hello world", "language": + "en"}, {"id": "121", "text": "hello world", "language": "en"}, {"id": "122", + "text": "hello world", "language": "en"}, {"id": "123", "text": "hello world", + "language": "en"}, {"id": "124", "text": "hello world", "language": "en"}, {"id": + "125", "text": "hello world", "language": "en"}, {"id": "126", "text": "hello + world", "language": "en"}, {"id": "127", "text": "hello world", "language": + "en"}, {"id": "128", "text": "hello world", "language": "en"}, {"id": "129", + "text": "hello world", "language": "en"}, {"id": "130", "text": "hello world", + "language": "en"}, {"id": "131", "text": "hello world", "language": "en"}, {"id": + "132", "text": "hello world", "language": "en"}, {"id": "133", "text": "hello + world", "language": "en"}, {"id": "134", "text": "hello world", "language": + "en"}, {"id": "135", "text": "hello world", "language": "en"}, {"id": "136", + "text": "hello world", "language": "en"}, {"id": "137", "text": "hello world", + "language": "en"}, {"id": "138", "text": "hello world", "language": "en"}, {"id": + "139", "text": "hello world", "language": "en"}, {"id": "140", "text": "hello + world", "language": "en"}, {"id": "141", "text": "hello world", "language": + "en"}, {"id": "142", "text": "hello world", "language": "en"}, {"id": "143", + "text": "hello world", "language": "en"}, {"id": "144", "text": "hello world", + "language": "en"}, {"id": "145", "text": "hello world", "language": "en"}, {"id": + "146", "text": "hello world", "language": "en"}, {"id": "147", "text": "hello + world", "language": "en"}, {"id": "148", "text": "hello world", "language": + "en"}, {"id": "149", "text": "hello world", "language": "en"}, {"id": "150", + "text": "hello world", "language": "en"}, {"id": "151", "text": "hello world", + "language": "en"}, {"id": "152", "text": "hello world", "language": "en"}, {"id": + "153", "text": "hello world", "language": "en"}, {"id": "154", "text": "hello + world", "language": "en"}, {"id": "155", "text": "hello world", "language": + "en"}, {"id": "156", "text": "hello world", "language": "en"}, {"id": "157", + "text": "hello world", "language": "en"}, {"id": "158", "text": "hello world", + "language": "en"}, {"id": "159", "text": "hello world", "language": "en"}, {"id": + "160", "text": "hello world", "language": "en"}, {"id": "161", "text": "hello + world", "language": "en"}, {"id": "162", "text": "hello world", "language": + "en"}, {"id": "163", "text": "hello world", "language": "en"}, {"id": "164", + "text": "hello world", "language": "en"}, {"id": "165", "text": "hello world", + "language": "en"}, {"id": "166", "text": "hello world", "language": "en"}, {"id": + "167", "text": "hello world", "language": "en"}, {"id": "168", "text": "hello + world", "language": "en"}, {"id": "169", "text": "hello world", "language": + "en"}, {"id": "170", "text": "hello world", "language": "en"}, {"id": "171", + "text": "hello world", "language": "en"}, {"id": "172", "text": "hello world", + "language": "en"}, {"id": "173", "text": "hello world", "language": "en"}, {"id": + "174", "text": "hello world", "language": "en"}, {"id": "175", "text": "hello + world", "language": "en"}, {"id": "176", "text": "hello world", "language": + "en"}, {"id": "177", "text": "hello world", "language": "en"}, {"id": "178", + "text": "hello world", "language": "en"}, {"id": "179", "text": "hello world", + "language": "en"}, {"id": "180", "text": "hello world", "language": "en"}, {"id": + "181", "text": "hello world", "language": "en"}, {"id": "182", "text": "hello + world", "language": "en"}, {"id": "183", "text": "hello world", "language": + "en"}, {"id": "184", "text": "hello world", "language": "en"}, {"id": "185", + "text": "hello world", "language": "en"}, {"id": "186", "text": "hello world", + "language": "en"}, {"id": "187", "text": "hello world", "language": "en"}, {"id": + "188", "text": "hello world", "language": "en"}, {"id": "189", "text": "hello + world", "language": "en"}, {"id": "190", "text": "hello world", "language": + "en"}, {"id": "191", "text": "hello world", "language": "en"}, {"id": "192", + "text": "hello world", "language": "en"}, {"id": "193", "text": "hello world", + "language": "en"}, {"id": "194", "text": "hello world", "language": "en"}, {"id": + "195", "text": "hello world", "language": "en"}, {"id": "196", "text": "hello + world", "language": "en"}, {"id": "197", "text": "hello world", "language": + "en"}, {"id": "198", "text": "hello world", "language": "en"}, {"id": "199", + "text": "hello world", "language": "en"}, {"id": "200", "text": "hello world", + "language": "en"}, {"id": "201", "text": "hello world", "language": "en"}, {"id": + "202", "text": "hello world", "language": "en"}, {"id": "203", "text": "hello + world", "language": "en"}, {"id": "204", "text": "hello world", "language": + "en"}, {"id": "205", "text": "hello world", "language": "en"}, {"id": "206", + "text": "hello world", "language": "en"}, {"id": "207", "text": "hello world", + "language": "en"}, {"id": "208", "text": "hello world", "language": "en"}, {"id": + "209", "text": "hello world", "language": "en"}, {"id": "210", "text": "hello + world", "language": "en"}, {"id": "211", "text": "hello world", "language": + "en"}, {"id": "212", "text": "hello world", "language": "en"}, {"id": "213", + "text": "hello world", "language": "en"}, {"id": "214", "text": "hello world", + "language": "en"}, {"id": "215", "text": "hello world", "language": "en"}, {"id": + "216", "text": "hello world", "language": "en"}, {"id": "217", "text": "hello + world", "language": "en"}, {"id": "218", "text": "hello world", "language": + "en"}, {"id": "219", "text": "hello world", "language": "en"}, {"id": "220", + "text": "hello world", "language": "en"}, {"id": "221", "text": "hello world", + "language": "en"}, {"id": "222", "text": "hello world", "language": "en"}, {"id": + "223", "text": "hello world", "language": "en"}, {"id": "224", "text": "hello + world", "language": "en"}, {"id": "225", "text": "hello world", "language": + "en"}, {"id": "226", "text": "hello world", "language": "en"}, {"id": "227", + "text": "hello world", "language": "en"}, {"id": "228", "text": "hello world", + "language": "en"}, {"id": "229", "text": "hello world", "language": "en"}, {"id": + "230", "text": "hello world", "language": "en"}, {"id": "231", "text": "hello + world", "language": "en"}, {"id": "232", "text": "hello world", "language": + "en"}, {"id": "233", "text": "hello world", "language": "en"}, {"id": "234", + "text": "hello world", "language": "en"}, {"id": "235", "text": "hello world", + "language": "en"}, {"id": "236", "text": "hello world", "language": "en"}, {"id": + "237", "text": "hello world", "language": "en"}, {"id": "238", "text": "hello + world", "language": "en"}, {"id": "239", "text": "hello world", "language": + "en"}, {"id": "240", "text": "hello world", "language": "en"}, {"id": "241", + "text": "hello world", "language": "en"}, {"id": "242", "text": "hello world", + "language": "en"}, {"id": "243", "text": "hello world", "language": "en"}, {"id": + "244", "text": "hello world", "language": "en"}, {"id": "245", "text": "hello + world", "language": "en"}, {"id": "246", "text": "hello world", "language": + "en"}, {"id": "247", "text": "hello world", "language": "en"}, {"id": "248", + "text": "hello world", "language": "en"}, {"id": "249", "text": "hello world", + "language": "en"}, {"id": "250", "text": "hello world", "language": "en"}, {"id": + "251", "text": "hello world", "language": "en"}, {"id": "252", "text": "hello + world", "language": "en"}, {"id": "253", "text": "hello world", "language": + "en"}, {"id": "254", "text": "hello world", "language": "en"}, {"id": "255", + "text": "hello world", "language": "en"}, {"id": "256", "text": "hello world", + "language": "en"}, {"id": "257", "text": "hello world", "language": "en"}, {"id": + "258", "text": "hello world", "language": "en"}, {"id": "259", "text": "hello + world", "language": "en"}, {"id": "260", "text": "hello world", "language": + "en"}, {"id": "261", "text": "hello world", "language": "en"}, {"id": "262", + "text": "hello world", "language": "en"}, {"id": "263", "text": "hello world", + "language": "en"}, {"id": "264", "text": "hello world", "language": "en"}, {"id": + "265", "text": "hello world", "language": "en"}, {"id": "266", "text": "hello + world", "language": "en"}, {"id": "267", "text": "hello world", "language": + "en"}, {"id": "268", "text": "hello world", "language": "en"}, {"id": "269", + "text": "hello world", "language": "en"}, {"id": "270", "text": "hello world", + "language": "en"}, {"id": "271", "text": "hello world", "language": "en"}, {"id": + "272", "text": "hello world", "language": "en"}, {"id": "273", "text": "hello + world", "language": "en"}, {"id": "274", "text": "hello world", "language": + "en"}, {"id": "275", "text": "hello world", "language": "en"}, {"id": "276", + "text": "hello world", "language": "en"}, {"id": "277", "text": "hello world", + "language": "en"}, {"id": "278", "text": "hello world", "language": "en"}, {"id": + "279", "text": "hello world", "language": "en"}, {"id": "280", "text": "hello + world", "language": "en"}, {"id": "281", "text": "hello world", "language": + "en"}, {"id": "282", "text": "hello world", "language": "en"}, {"id": "283", + "text": "hello world", "language": "en"}, {"id": "284", "text": "hello world", + "language": "en"}, {"id": "285", "text": "hello world", "language": "en"}, {"id": + "286", "text": "hello world", "language": "en"}, {"id": "287", "text": "hello + world", "language": "en"}, {"id": "288", "text": "hello world", "language": + "en"}, {"id": "289", "text": "hello world", "language": "en"}, {"id": "290", + "text": "hello world", "language": "en"}, {"id": "291", "text": "hello world", + "language": "en"}, {"id": "292", "text": "hello world", "language": "en"}, {"id": + "293", "text": "hello world", "language": "en"}, {"id": "294", "text": "hello + world", "language": "en"}, {"id": "295", "text": "hello world", "language": + "en"}, {"id": "296", "text": "hello world", "language": "en"}, {"id": "297", + "text": "hello world", "language": "en"}, {"id": "298", "text": "hello world", + "language": "en"}, {"id": "299", "text": "hello world", "language": "en"}, {"id": + "300", "text": "hello world", "language": "en"}, {"id": "301", "text": "hello + world", "language": "en"}, {"id": "302", "text": "hello world", "language": + "en"}, {"id": "303", "text": "hello world", "language": "en"}, {"id": "304", + "text": "hello world", "language": "en"}, {"id": "305", "text": "hello world", + "language": "en"}, {"id": "306", "text": "hello world", "language": "en"}, {"id": + "307", "text": "hello world", "language": "en"}, {"id": "308", "text": "hello + world", "language": "en"}, {"id": "309", "text": "hello world", "language": + "en"}, {"id": "310", "text": "hello world", "language": "en"}, {"id": "311", + "text": "hello world", "language": "en"}, {"id": "312", "text": "hello world", + "language": "en"}, {"id": "313", "text": "hello world", "language": "en"}, {"id": + "314", "text": "hello world", "language": "en"}, {"id": "315", "text": "hello + world", "language": "en"}, {"id": "316", "text": "hello world", "language": + "en"}, {"id": "317", "text": "hello world", "language": "en"}, {"id": "318", + "text": "hello world", "language": "en"}, {"id": "319", "text": "hello world", + "language": "en"}, {"id": "320", "text": "hello world", "language": "en"}, {"id": + "321", "text": "hello world", "language": "en"}, {"id": "322", "text": "hello + world", "language": "en"}, {"id": "323", "text": "hello world", "language": + "en"}, {"id": "324", "text": "hello world", "language": "en"}, {"id": "325", + "text": "hello world", "language": "en"}, {"id": "326", "text": "hello world", + "language": "en"}, {"id": "327", "text": "hello world", "language": "en"}, {"id": + "328", "text": "hello world", "language": "en"}, {"id": "329", "text": "hello + world", "language": "en"}, {"id": "330", "text": "hello world", "language": + "en"}, {"id": "331", "text": "hello world", "language": "en"}, {"id": "332", + "text": "hello world", "language": "en"}, {"id": "333", "text": "hello world", + "language": "en"}, {"id": "334", "text": "hello world", "language": "en"}, {"id": + "335", "text": "hello world", "language": "en"}, {"id": "336", "text": "hello + world", "language": "en"}, {"id": "337", "text": "hello world", "language": + "en"}, {"id": "338", "text": "hello world", "language": "en"}, {"id": "339", + "text": "hello world", "language": "en"}, {"id": "340", "text": "hello world", + "language": "en"}, {"id": "341", "text": "hello world", "language": "en"}, {"id": + "342", "text": "hello world", "language": "en"}, {"id": "343", "text": "hello + world", "language": "en"}, {"id": "344", "text": "hello world", "language": + "en"}, {"id": "345", "text": "hello world", "language": "en"}, {"id": "346", + "text": "hello world", "language": "en"}, {"id": "347", "text": "hello world", + "language": "en"}, {"id": "348", "text": "hello world", "language": "en"}, {"id": + "349", "text": "hello world", "language": "en"}, {"id": "350", "text": "hello + world", "language": "en"}, {"id": "351", "text": "hello world", "language": + "en"}, {"id": "352", "text": "hello world", "language": "en"}, {"id": "353", + "text": "hello world", "language": "en"}, {"id": "354", "text": "hello world", + "language": "en"}, {"id": "355", "text": "hello world", "language": "en"}, {"id": + "356", "text": "hello world", "language": "en"}, {"id": "357", "text": "hello + world", "language": "en"}, {"id": "358", "text": "hello world", "language": + "en"}, {"id": "359", "text": "hello world", "language": "en"}, {"id": "360", + "text": "hello world", "language": "en"}, {"id": "361", "text": "hello world", + "language": "en"}, {"id": "362", "text": "hello world", "language": "en"}, {"id": + "363", "text": "hello world", "language": "en"}, {"id": "364", "text": "hello + world", "language": "en"}, {"id": "365", "text": "hello world", "language": + "en"}, {"id": "366", "text": "hello world", "language": "en"}, {"id": "367", + "text": "hello world", "language": "en"}, {"id": "368", "text": "hello world", + "language": "en"}, {"id": "369", "text": "hello world", "language": "en"}, {"id": + "370", "text": "hello world", "language": "en"}, {"id": "371", "text": "hello + world", "language": "en"}, {"id": "372", "text": "hello world", "language": + "en"}, {"id": "373", "text": "hello world", "language": "en"}, {"id": "374", + "text": "hello world", "language": "en"}, {"id": "375", "text": "hello world", + "language": "en"}, {"id": "376", "text": "hello world", "language": "en"}, {"id": + "377", "text": "hello world", "language": "en"}, {"id": "378", "text": "hello + world", "language": "en"}, {"id": "379", "text": "hello world", "language": + "en"}, {"id": "380", "text": "hello world", "language": "en"}, {"id": "381", + "text": "hello world", "language": "en"}, {"id": "382", "text": "hello world", + "language": "en"}, {"id": "383", "text": "hello world", "language": "en"}, {"id": + "384", "text": "hello world", "language": "en"}, {"id": "385", "text": "hello + world", "language": "en"}, {"id": "386", "text": "hello world", "language": + "en"}, {"id": "387", "text": "hello world", "language": "en"}, {"id": "388", + "text": "hello world", "language": "en"}, {"id": "389", "text": "hello world", + "language": "en"}, {"id": "390", "text": "hello world", "language": "en"}, {"id": + "391", "text": "hello world", "language": "en"}, {"id": "392", "text": "hello + world", "language": "en"}, {"id": "393", "text": "hello world", "language": + "en"}, {"id": "394", "text": "hello world", "language": "en"}, {"id": "395", + "text": "hello world", "language": "en"}, {"id": "396", "text": "hello world", + "language": "en"}, {"id": "397", "text": "hello world", "language": "en"}, {"id": + "398", "text": "hello world", "language": "en"}, {"id": "399", "text": "hello + world", "language": "en"}, {"id": "400", "text": "hello world", "language": + "en"}, {"id": "401", "text": "hello world", "language": "en"}, {"id": "402", + "text": "hello world", "language": "en"}, {"id": "403", "text": "hello world", + "language": "en"}, {"id": "404", "text": "hello world", "language": "en"}, {"id": + "405", "text": "hello world", "language": "en"}, {"id": "406", "text": "hello + world", "language": "en"}, {"id": "407", "text": "hello world", "language": + "en"}, {"id": "408", "text": "hello world", "language": "en"}, {"id": "409", + "text": "hello world", "language": "en"}, {"id": "410", "text": "hello world", + "language": "en"}, {"id": "411", "text": "hello world", "language": "en"}, {"id": + "412", "text": "hello world", "language": "en"}, {"id": "413", "text": "hello + world", "language": "en"}, {"id": "414", "text": "hello world", "language": + "en"}, {"id": "415", "text": "hello world", "language": "en"}, {"id": "416", + "text": "hello world", "language": "en"}, {"id": "417", "text": "hello world", + "language": "en"}, {"id": "418", "text": "hello world", "language": "en"}, {"id": + "419", "text": "hello world", "language": "en"}, {"id": "420", "text": "hello + world", "language": "en"}, {"id": "421", "text": "hello world", "language": + "en"}, {"id": "422", "text": "hello world", "language": "en"}, {"id": "423", + "text": "hello world", "language": "en"}, {"id": "424", "text": "hello world", + "language": "en"}, {"id": "425", "text": "hello world", "language": "en"}, {"id": + "426", "text": "hello world", "language": "en"}, {"id": "427", "text": "hello + world", "language": "en"}, {"id": "428", "text": "hello world", "language": + "en"}, {"id": "429", "text": "hello world", "language": "en"}, {"id": "430", + "text": "hello world", "language": "en"}, {"id": "431", "text": "hello world", + "language": "en"}, {"id": "432", "text": "hello world", "language": "en"}, {"id": + "433", "text": "hello world", "language": "en"}, {"id": "434", "text": "hello + world", "language": "en"}, {"id": "435", "text": "hello world", "language": + "en"}, {"id": "436", "text": "hello world", "language": "en"}, {"id": "437", + "text": "hello world", "language": "en"}, {"id": "438", "text": "hello world", + "language": "en"}, {"id": "439", "text": "hello world", "language": "en"}, {"id": + "440", "text": "hello world", "language": "en"}, {"id": "441", "text": "hello + world", "language": "en"}, {"id": "442", "text": "hello world", "language": + "en"}, {"id": "443", "text": "hello world", "language": "en"}, {"id": "444", + "text": "hello world", "language": "en"}, {"id": "445", "text": "hello world", + "language": "en"}, {"id": "446", "text": "hello world", "language": "en"}, {"id": + "447", "text": "hello world", "language": "en"}, {"id": "448", "text": "hello + world", "language": "en"}, {"id": "449", "text": "hello world", "language": + "en"}, {"id": "450", "text": "hello world", "language": "en"}, {"id": "451", + "text": "hello world", "language": "en"}, {"id": "452", "text": "hello world", + "language": "en"}, {"id": "453", "text": "hello world", "language": "en"}, {"id": + "454", "text": "hello world", "language": "en"}, {"id": "455", "text": "hello + world", "language": "en"}, {"id": "456", "text": "hello world", "language": + "en"}, {"id": "457", "text": "hello world", "language": "en"}, {"id": "458", + "text": "hello world", "language": "en"}, {"id": "459", "text": "hello world", + "language": "en"}, {"id": "460", "text": "hello world", "language": "en"}, {"id": + "461", "text": "hello world", "language": "en"}, {"id": "462", "text": "hello + world", "language": "en"}, {"id": "463", "text": "hello world", "language": + "en"}, {"id": "464", "text": "hello world", "language": "en"}, {"id": "465", + "text": "hello world", "language": "en"}, {"id": "466", "text": "hello world", + "language": "en"}, {"id": "467", "text": "hello world", "language": "en"}, {"id": + "468", "text": "hello world", "language": "en"}, {"id": "469", "text": "hello + world", "language": "en"}, {"id": "470", "text": "hello world", "language": + "en"}, {"id": "471", "text": "hello world", "language": "en"}, {"id": "472", + "text": "hello world", "language": "en"}, {"id": "473", "text": "hello world", + "language": "en"}, {"id": "474", "text": "hello world", "language": "en"}, {"id": + "475", "text": "hello world", "language": "en"}, {"id": "476", "text": "hello + world", "language": "en"}, {"id": "477", "text": "hello world", "language": + "en"}, {"id": "478", "text": "hello world", "language": "en"}, {"id": "479", + "text": "hello world", "language": "en"}, {"id": "480", "text": "hello world", + "language": "en"}, {"id": "481", "text": "hello world", "language": "en"}, {"id": + "482", "text": "hello world", "language": "en"}, {"id": "483", "text": "hello + world", "language": "en"}, {"id": "484", "text": "hello world", "language": + "en"}, {"id": "485", "text": "hello world", "language": "en"}, {"id": "486", + "text": "hello world", "language": "en"}, {"id": "487", "text": "hello world", + "language": "en"}, {"id": "488", "text": "hello world", "language": "en"}, {"id": + "489", "text": "hello world", "language": "en"}, {"id": "490", "text": "hello + world", "language": "en"}, {"id": "491", "text": "hello world", "language": + "en"}, {"id": "492", "text": "hello world", "language": "en"}, {"id": "493", + "text": "hello world", "language": "en"}, {"id": "494", "text": "hello world", + "language": "en"}, {"id": "495", "text": "hello world", "language": "en"}, {"id": + "496", "text": "hello world", "language": "en"}, {"id": "497", "text": "hello + world", "language": "en"}, {"id": "498", "text": "hello world", "language": + "en"}, {"id": "499", "text": "hello world", "language": "en"}, {"id": "500", + "text": "hello world", "language": "en"}, {"id": "501", "text": "hello world", + "language": "en"}, {"id": "502", "text": "hello world", "language": "en"}, {"id": + "503", "text": "hello world", "language": "en"}, {"id": "504", "text": "hello + world", "language": "en"}, {"id": "505", "text": "hello world", "language": + "en"}, {"id": "506", "text": "hello world", "language": "en"}, {"id": "507", + "text": "hello world", "language": "en"}, {"id": "508", "text": "hello world", + "language": "en"}, {"id": "509", "text": "hello world", "language": "en"}, {"id": + "510", "text": "hello world", "language": "en"}, {"id": "511", "text": "hello + world", "language": "en"}, {"id": "512", "text": "hello world", "language": + "en"}, {"id": "513", "text": "hello world", "language": "en"}, {"id": "514", + "text": "hello world", "language": "en"}, {"id": "515", "text": "hello world", + "language": "en"}, {"id": "516", "text": "hello world", "language": "en"}, {"id": + "517", "text": "hello world", "language": "en"}, {"id": "518", "text": "hello + world", "language": "en"}, {"id": "519", "text": "hello world", "language": + "en"}, {"id": "520", "text": "hello world", "language": "en"}, {"id": "521", + "text": "hello world", "language": "en"}, {"id": "522", "text": "hello world", + "language": "en"}, {"id": "523", "text": "hello world", "language": "en"}, {"id": + "524", "text": "hello world", "language": "en"}, {"id": "525", "text": "hello + world", "language": "en"}, {"id": "526", "text": "hello world", "language": + "en"}, {"id": "527", "text": "hello world", "language": "en"}, {"id": "528", + "text": "hello world", "language": "en"}, {"id": "529", "text": "hello world", + "language": "en"}, {"id": "530", "text": "hello world", "language": "en"}, {"id": + "531", "text": "hello world", "language": "en"}, {"id": "532", "text": "hello + world", "language": "en"}, {"id": "533", "text": "hello world", "language": + "en"}, {"id": "534", "text": "hello world", "language": "en"}, {"id": "535", + "text": "hello world", "language": "en"}, {"id": "536", "text": "hello world", + "language": "en"}, {"id": "537", "text": "hello world", "language": "en"}, {"id": + "538", "text": "hello world", "language": "en"}, {"id": "539", "text": "hello + world", "language": "en"}, {"id": "540", "text": "hello world", "language": + "en"}, {"id": "541", "text": "hello world", "language": "en"}, {"id": "542", + "text": "hello world", "language": "en"}, {"id": "543", "text": "hello world", + "language": "en"}, {"id": "544", "text": "hello world", "language": "en"}, {"id": + "545", "text": "hello world", "language": "en"}, {"id": "546", "text": "hello + world", "language": "en"}, {"id": "547", "text": "hello world", "language": + "en"}, {"id": "548", "text": "hello world", "language": "en"}, {"id": "549", + "text": "hello world", "language": "en"}, {"id": "550", "text": "hello world", + "language": "en"}, {"id": "551", "text": "hello world", "language": "en"}, {"id": + "552", "text": "hello world", "language": "en"}, {"id": "553", "text": "hello + world", "language": "en"}, {"id": "554", "text": "hello world", "language": + "en"}, {"id": "555", "text": "hello world", "language": "en"}, {"id": "556", + "text": "hello world", "language": "en"}, {"id": "557", "text": "hello world", + "language": "en"}, {"id": "558", "text": "hello world", "language": "en"}, {"id": + "559", "text": "hello world", "language": "en"}, {"id": "560", "text": "hello + world", "language": "en"}, {"id": "561", "text": "hello world", "language": + "en"}, {"id": "562", "text": "hello world", "language": "en"}, {"id": "563", + "text": "hello world", "language": "en"}, {"id": "564", "text": "hello world", + "language": "en"}, {"id": "565", "text": "hello world", "language": "en"}, {"id": + "566", "text": "hello world", "language": "en"}, {"id": "567", "text": "hello + world", "language": "en"}, {"id": "568", "text": "hello world", "language": + "en"}, {"id": "569", "text": "hello world", "language": "en"}, {"id": "570", + "text": "hello world", "language": "en"}, {"id": "571", "text": "hello world", + "language": "en"}, {"id": "572", "text": "hello world", "language": "en"}, {"id": + "573", "text": "hello world", "language": "en"}, {"id": "574", "text": "hello + world", "language": "en"}, {"id": "575", "text": "hello world", "language": + "en"}, {"id": "576", "text": "hello world", "language": "en"}, {"id": "577", + "text": "hello world", "language": "en"}, {"id": "578", "text": "hello world", + "language": "en"}, {"id": "579", "text": "hello world", "language": "en"}, {"id": + "580", "text": "hello world", "language": "en"}, {"id": "581", "text": "hello + world", "language": "en"}, {"id": "582", "text": "hello world", "language": + "en"}, {"id": "583", "text": "hello world", "language": "en"}, {"id": "584", + "text": "hello world", "language": "en"}, {"id": "585", "text": "hello world", + "language": "en"}, {"id": "586", "text": "hello world", "language": "en"}, {"id": + "587", "text": "hello world", "language": "en"}, {"id": "588", "text": "hello + world", "language": "en"}, {"id": "589", "text": "hello world", "language": + "en"}, {"id": "590", "text": "hello world", "language": "en"}, {"id": "591", + "text": "hello world", "language": "en"}, {"id": "592", "text": "hello world", + "language": "en"}, {"id": "593", "text": "hello world", "language": "en"}, {"id": + "594", "text": "hello world", "language": "en"}, {"id": "595", "text": "hello + world", "language": "en"}, {"id": "596", "text": "hello world", "language": + "en"}, {"id": "597", "text": "hello world", "language": "en"}, {"id": "598", + "text": "hello world", "language": "en"}, {"id": "599", "text": "hello world", + "language": "en"}, {"id": "600", "text": "hello world", "language": "en"}, {"id": + "601", "text": "hello world", "language": "en"}, {"id": "602", "text": "hello + world", "language": "en"}, {"id": "603", "text": "hello world", "language": + "en"}, {"id": "604", "text": "hello world", "language": "en"}, {"id": "605", + "text": "hello world", "language": "en"}, {"id": "606", "text": "hello world", + "language": "en"}, {"id": "607", "text": "hello world", "language": "en"}, {"id": + "608", "text": "hello world", "language": "en"}, {"id": "609", "text": "hello + world", "language": "en"}, {"id": "610", "text": "hello world", "language": + "en"}, {"id": "611", "text": "hello world", "language": "en"}, {"id": "612", + "text": "hello world", "language": "en"}, {"id": "613", "text": "hello world", + "language": "en"}, {"id": "614", "text": "hello world", "language": "en"}, {"id": + "615", "text": "hello world", "language": "en"}, {"id": "616", "text": "hello + world", "language": "en"}, {"id": "617", "text": "hello world", "language": + "en"}, {"id": "618", "text": "hello world", "language": "en"}, {"id": "619", + "text": "hello world", "language": "en"}, {"id": "620", "text": "hello world", + "language": "en"}, {"id": "621", "text": "hello world", "language": "en"}, {"id": + "622", "text": "hello world", "language": "en"}, {"id": "623", "text": "hello + world", "language": "en"}, {"id": "624", "text": "hello world", "language": + "en"}, {"id": "625", "text": "hello world", "language": "en"}, {"id": "626", + "text": "hello world", "language": "en"}, {"id": "627", "text": "hello world", + "language": "en"}, {"id": "628", "text": "hello world", "language": "en"}, {"id": + "629", "text": "hello world", "language": "en"}, {"id": "630", "text": "hello + world", "language": "en"}, {"id": "631", "text": "hello world", "language": + "en"}, {"id": "632", "text": "hello world", "language": "en"}, {"id": "633", + "text": "hello world", "language": "en"}, {"id": "634", "text": "hello world", + "language": "en"}, {"id": "635", "text": "hello world", "language": "en"}, {"id": + "636", "text": "hello world", "language": "en"}, {"id": "637", "text": "hello + world", "language": "en"}, {"id": "638", "text": "hello world", "language": + "en"}, {"id": "639", "text": "hello world", "language": "en"}, {"id": "640", + "text": "hello world", "language": "en"}, {"id": "641", "text": "hello world", + "language": "en"}, {"id": "642", "text": "hello world", "language": "en"}, {"id": + "643", "text": "hello world", "language": "en"}, {"id": "644", "text": "hello + world", "language": "en"}, {"id": "645", "text": "hello world", "language": + "en"}, {"id": "646", "text": "hello world", "language": "en"}, {"id": "647", + "text": "hello world", "language": "en"}, {"id": "648", "text": "hello world", + "language": "en"}, {"id": "649", "text": "hello world", "language": "en"}, {"id": + "650", "text": "hello world", "language": "en"}, {"id": "651", "text": "hello + world", "language": "en"}, {"id": "652", "text": "hello world", "language": + "en"}, {"id": "653", "text": "hello world", "language": "en"}, {"id": "654", + "text": "hello world", "language": "en"}, {"id": "655", "text": "hello world", + "language": "en"}, {"id": "656", "text": "hello world", "language": "en"}, {"id": + "657", "text": "hello world", "language": "en"}, {"id": "658", "text": "hello + world", "language": "en"}, {"id": "659", "text": "hello world", "language": + "en"}, {"id": "660", "text": "hello world", "language": "en"}, {"id": "661", + "text": "hello world", "language": "en"}, {"id": "662", "text": "hello world", + "language": "en"}, {"id": "663", "text": "hello world", "language": "en"}, {"id": + "664", "text": "hello world", "language": "en"}, {"id": "665", "text": "hello + world", "language": "en"}, {"id": "666", "text": "hello world", "language": + "en"}, {"id": "667", "text": "hello world", "language": "en"}, {"id": "668", + "text": "hello world", "language": "en"}, {"id": "669", "text": "hello world", + "language": "en"}, {"id": "670", "text": "hello world", "language": "en"}, {"id": + "671", "text": "hello world", "language": "en"}, {"id": "672", "text": "hello + world", "language": "en"}, {"id": "673", "text": "hello world", "language": + "en"}, {"id": "674", "text": "hello world", "language": "en"}, {"id": "675", + "text": "hello world", "language": "en"}, {"id": "676", "text": "hello world", + "language": "en"}, {"id": "677", "text": "hello world", "language": "en"}, {"id": + "678", "text": "hello world", "language": "en"}, {"id": "679", "text": "hello + world", "language": "en"}, {"id": "680", "text": "hello world", "language": + "en"}, {"id": "681", "text": "hello world", "language": "en"}, {"id": "682", + "text": "hello world", "language": "en"}, {"id": "683", "text": "hello world", + "language": "en"}, {"id": "684", "text": "hello world", "language": "en"}, {"id": + "685", "text": "hello world", "language": "en"}, {"id": "686", "text": "hello + world", "language": "en"}, {"id": "687", "text": "hello world", "language": + "en"}, {"id": "688", "text": "hello world", "language": "en"}, {"id": "689", + "text": "hello world", "language": "en"}, {"id": "690", "text": "hello world", + "language": "en"}, {"id": "691", "text": "hello world", "language": "en"}, {"id": + "692", "text": "hello world", "language": "en"}, {"id": "693", "text": "hello + world", "language": "en"}, {"id": "694", "text": "hello world", "language": + "en"}, {"id": "695", "text": "hello world", "language": "en"}, {"id": "696", + "text": "hello world", "language": "en"}, {"id": "697", "text": "hello world", + "language": "en"}, {"id": "698", "text": "hello world", "language": "en"}, {"id": + "699", "text": "hello world", "language": "en"}, {"id": "700", "text": "hello + world", "language": "en"}, {"id": "701", "text": "hello world", "language": + "en"}, {"id": "702", "text": "hello world", "language": "en"}, {"id": "703", + "text": "hello world", "language": "en"}, {"id": "704", "text": "hello world", + "language": "en"}, {"id": "705", "text": "hello world", "language": "en"}, {"id": + "706", "text": "hello world", "language": "en"}, {"id": "707", "text": "hello + world", "language": "en"}, {"id": "708", "text": "hello world", "language": + "en"}, {"id": "709", "text": "hello world", "language": "en"}, {"id": "710", + "text": "hello world", "language": "en"}, {"id": "711", "text": "hello world", + "language": "en"}, {"id": "712", "text": "hello world", "language": "en"}, {"id": + "713", "text": "hello world", "language": "en"}, {"id": "714", "text": "hello + world", "language": "en"}, {"id": "715", "text": "hello world", "language": + "en"}, {"id": "716", "text": "hello world", "language": "en"}, {"id": "717", + "text": "hello world", "language": "en"}, {"id": "718", "text": "hello world", + "language": "en"}, {"id": "719", "text": "hello world", "language": "en"}, {"id": + "720", "text": "hello world", "language": "en"}, {"id": "721", "text": "hello + world", "language": "en"}, {"id": "722", "text": "hello world", "language": + "en"}, {"id": "723", "text": "hello world", "language": "en"}, {"id": "724", + "text": "hello world", "language": "en"}, {"id": "725", "text": "hello world", + "language": "en"}, {"id": "726", "text": "hello world", "language": "en"}, {"id": + "727", "text": "hello world", "language": "en"}, {"id": "728", "text": "hello + world", "language": "en"}, {"id": "729", "text": "hello world", "language": + "en"}, {"id": "730", "text": "hello world", "language": "en"}, {"id": "731", + "text": "hello world", "language": "en"}, {"id": "732", "text": "hello world", + "language": "en"}, {"id": "733", "text": "hello world", "language": "en"}, {"id": + "734", "text": "hello world", "language": "en"}, {"id": "735", "text": "hello + world", "language": "en"}, {"id": "736", "text": "hello world", "language": + "en"}, {"id": "737", "text": "hello world", "language": "en"}, {"id": "738", + "text": "hello world", "language": "en"}, {"id": "739", "text": "hello world", + "language": "en"}, {"id": "740", "text": "hello world", "language": "en"}, {"id": + "741", "text": "hello world", "language": "en"}, {"id": "742", "text": "hello + world", "language": "en"}, {"id": "743", "text": "hello world", "language": + "en"}, {"id": "744", "text": "hello world", "language": "en"}, {"id": "745", + "text": "hello world", "language": "en"}, {"id": "746", "text": "hello world", + "language": "en"}, {"id": "747", "text": "hello world", "language": "en"}, {"id": + "748", "text": "hello world", "language": "en"}, {"id": "749", "text": "hello + world", "language": "en"}, {"id": "750", "text": "hello world", "language": + "en"}, {"id": "751", "text": "hello world", "language": "en"}, {"id": "752", + "text": "hello world", "language": "en"}, {"id": "753", "text": "hello world", + "language": "en"}, {"id": "754", "text": "hello world", "language": "en"}, {"id": + "755", "text": "hello world", "language": "en"}, {"id": "756", "text": "hello + world", "language": "en"}, {"id": "757", "text": "hello world", "language": + "en"}, {"id": "758", "text": "hello world", "language": "en"}, {"id": "759", + "text": "hello world", "language": "en"}, {"id": "760", "text": "hello world", + "language": "en"}, {"id": "761", "text": "hello world", "language": "en"}, {"id": + "762", "text": "hello world", "language": "en"}, {"id": "763", "text": "hello + world", "language": "en"}, {"id": "764", "text": "hello world", "language": + "en"}, {"id": "765", "text": "hello world", "language": "en"}, {"id": "766", + "text": "hello world", "language": "en"}, {"id": "767", "text": "hello world", + "language": "en"}, {"id": "768", "text": "hello world", "language": "en"}, {"id": + "769", "text": "hello world", "language": "en"}, {"id": "770", "text": "hello + world", "language": "en"}, {"id": "771", "text": "hello world", "language": + "en"}, {"id": "772", "text": "hello world", "language": "en"}, {"id": "773", + "text": "hello world", "language": "en"}, {"id": "774", "text": "hello world", + "language": "en"}, {"id": "775", "text": "hello world", "language": "en"}, {"id": + "776", "text": "hello world", "language": "en"}, {"id": "777", "text": "hello + world", "language": "en"}, {"id": "778", "text": "hello world", "language": + "en"}, {"id": "779", "text": "hello world", "language": "en"}, {"id": "780", + "text": "hello world", "language": "en"}, {"id": "781", "text": "hello world", + "language": "en"}, {"id": "782", "text": "hello world", "language": "en"}, {"id": + "783", "text": "hello world", "language": "en"}, {"id": "784", "text": "hello + world", "language": "en"}, {"id": "785", "text": "hello world", "language": + "en"}, {"id": "786", "text": "hello world", "language": "en"}, {"id": "787", + "text": "hello world", "language": "en"}, {"id": "788", "text": "hello world", + "language": "en"}, {"id": "789", "text": "hello world", "language": "en"}, {"id": + "790", "text": "hello world", "language": "en"}, {"id": "791", "text": "hello + world", "language": "en"}, {"id": "792", "text": "hello world", "language": + "en"}, {"id": "793", "text": "hello world", "language": "en"}, {"id": "794", + "text": "hello world", "language": "en"}, {"id": "795", "text": "hello world", + "language": "en"}, {"id": "796", "text": "hello world", "language": "en"}, {"id": + "797", "text": "hello world", "language": "en"}, {"id": "798", "text": "hello + world", "language": "en"}, {"id": "799", "text": "hello world", "language": + "en"}, {"id": "800", "text": "hello world", "language": "en"}, {"id": "801", + "text": "hello world", "language": "en"}, {"id": "802", "text": "hello world", + "language": "en"}, {"id": "803", "text": "hello world", "language": "en"}, {"id": + "804", "text": "hello world", "language": "en"}, {"id": "805", "text": "hello + world", "language": "en"}, {"id": "806", "text": "hello world", "language": + "en"}, {"id": "807", "text": "hello world", "language": "en"}, {"id": "808", + "text": "hello world", "language": "en"}, {"id": "809", "text": "hello world", + "language": "en"}, {"id": "810", "text": "hello world", "language": "en"}, {"id": + "811", "text": "hello world", "language": "en"}, {"id": "812", "text": "hello + world", "language": "en"}, {"id": "813", "text": "hello world", "language": + "en"}, {"id": "814", "text": "hello world", "language": "en"}, {"id": "815", + "text": "hello world", "language": "en"}, {"id": "816", "text": "hello world", + "language": "en"}, {"id": "817", "text": "hello world", "language": "en"}, {"id": + "818", "text": "hello world", "language": "en"}, {"id": "819", "text": "hello + world", "language": "en"}, {"id": "820", "text": "hello world", "language": + "en"}, {"id": "821", "text": "hello world", "language": "en"}, {"id": "822", + "text": "hello world", "language": "en"}, {"id": "823", "text": "hello world", + "language": "en"}, {"id": "824", "text": "hello world", "language": "en"}, {"id": + "825", "text": "hello world", "language": "en"}, {"id": "826", "text": "hello + world", "language": "en"}, {"id": "827", "text": "hello world", "language": + "en"}, {"id": "828", "text": "hello world", "language": "en"}, {"id": "829", + "text": "hello world", "language": "en"}, {"id": "830", "text": "hello world", + "language": "en"}, {"id": "831", "text": "hello world", "language": "en"}, {"id": + "832", "text": "hello world", "language": "en"}, {"id": "833", "text": "hello + world", "language": "en"}, {"id": "834", "text": "hello world", "language": + "en"}, {"id": "835", "text": "hello world", "language": "en"}, {"id": "836", + "text": "hello world", "language": "en"}, {"id": "837", "text": "hello world", + "language": "en"}, {"id": "838", "text": "hello world", "language": "en"}, {"id": + "839", "text": "hello world", "language": "en"}, {"id": "840", "text": "hello + world", "language": "en"}, {"id": "841", "text": "hello world", "language": + "en"}, {"id": "842", "text": "hello world", "language": "en"}, {"id": "843", + "text": "hello world", "language": "en"}, {"id": "844", "text": "hello world", + "language": "en"}, {"id": "845", "text": "hello world", "language": "en"}, {"id": + "846", "text": "hello world", "language": "en"}, {"id": "847", "text": "hello + world", "language": "en"}, {"id": "848", "text": "hello world", "language": + "en"}, {"id": "849", "text": "hello world", "language": "en"}, {"id": "850", + "text": "hello world", "language": "en"}, {"id": "851", "text": "hello world", + "language": "en"}, {"id": "852", "text": "hello world", "language": "en"}, {"id": + "853", "text": "hello world", "language": "en"}, {"id": "854", "text": "hello + world", "language": "en"}, {"id": "855", "text": "hello world", "language": + "en"}, {"id": "856", "text": "hello world", "language": "en"}, {"id": "857", + "text": "hello world", "language": "en"}, {"id": "858", "text": "hello world", + "language": "en"}, {"id": "859", "text": "hello world", "language": "en"}, {"id": + "860", "text": "hello world", "language": "en"}, {"id": "861", "text": "hello + world", "language": "en"}, {"id": "862", "text": "hello world", "language": + "en"}, {"id": "863", "text": "hello world", "language": "en"}, {"id": "864", + "text": "hello world", "language": "en"}, {"id": "865", "text": "hello world", + "language": "en"}, {"id": "866", "text": "hello world", "language": "en"}, {"id": + "867", "text": "hello world", "language": "en"}, {"id": "868", "text": "hello + world", "language": "en"}, {"id": "869", "text": "hello world", "language": + "en"}, {"id": "870", "text": "hello world", "language": "en"}, {"id": "871", + "text": "hello world", "language": "en"}, {"id": "872", "text": "hello world", + "language": "en"}, {"id": "873", "text": "hello world", "language": "en"}, {"id": + "874", "text": "hello world", "language": "en"}, {"id": "875", "text": "hello + world", "language": "en"}, {"id": "876", "text": "hello world", "language": + "en"}, {"id": "877", "text": "hello world", "language": "en"}, {"id": "878", + "text": "hello world", "language": "en"}, {"id": "879", "text": "hello world", + "language": "en"}, {"id": "880", "text": "hello world", "language": "en"}, {"id": + "881", "text": "hello world", "language": "en"}, {"id": "882", "text": "hello + world", "language": "en"}, {"id": "883", "text": "hello world", "language": + "en"}, {"id": "884", "text": "hello world", "language": "en"}, {"id": "885", + "text": "hello world", "language": "en"}, {"id": "886", "text": "hello world", + "language": "en"}, {"id": "887", "text": "hello world", "language": "en"}, {"id": + "888", "text": "hello world", "language": "en"}, {"id": "889", "text": "hello + world", "language": "en"}, {"id": "890", "text": "hello world", "language": + "en"}, {"id": "891", "text": "hello world", "language": "en"}, {"id": "892", + "text": "hello world", "language": "en"}, {"id": "893", "text": "hello world", + "language": "en"}, {"id": "894", "text": "hello world", "language": "en"}, {"id": + "895", "text": "hello world", "language": "en"}, {"id": "896", "text": "hello + world", "language": "en"}, {"id": "897", "text": "hello world", "language": + "en"}, {"id": "898", "text": "hello world", "language": "en"}, {"id": "899", + "text": "hello world", "language": "en"}, {"id": "900", "text": "hello world", + "language": "en"}, {"id": "901", "text": "hello world", "language": "en"}, {"id": + "902", "text": "hello world", "language": "en"}, {"id": "903", "text": "hello + world", "language": "en"}, {"id": "904", "text": "hello world", "language": + "en"}, {"id": "905", "text": "hello world", "language": "en"}, {"id": "906", + "text": "hello world", "language": "en"}, {"id": "907", "text": "hello world", + "language": "en"}, {"id": "908", "text": "hello world", "language": "en"}, {"id": + "909", "text": "hello world", "language": "en"}, {"id": "910", "text": "hello + world", "language": "en"}, {"id": "911", "text": "hello world", "language": + "en"}, {"id": "912", "text": "hello world", "language": "en"}, {"id": "913", + "text": "hello world", "language": "en"}, {"id": "914", "text": "hello world", + "language": "en"}, {"id": "915", "text": "hello world", "language": "en"}, {"id": + "916", "text": "hello world", "language": "en"}, {"id": "917", "text": "hello + world", "language": "en"}, {"id": "918", "text": "hello world", "language": + "en"}, {"id": "919", "text": "hello world", "language": "en"}, {"id": "920", + "text": "hello world", "language": "en"}, {"id": "921", "text": "hello world", + "language": "en"}, {"id": "922", "text": "hello world", "language": "en"}, {"id": + "923", "text": "hello world", "language": "en"}, {"id": "924", "text": "hello + world", "language": "en"}, {"id": "925", "text": "hello world", "language": + "en"}, {"id": "926", "text": "hello world", "language": "en"}, {"id": "927", + "text": "hello world", "language": "en"}, {"id": "928", "text": "hello world", + "language": "en"}, {"id": "929", "text": "hello world", "language": "en"}, {"id": + "930", "text": "hello world", "language": "en"}, {"id": "931", "text": "hello + world", "language": "en"}, {"id": "932", "text": "hello world", "language": + "en"}, {"id": "933", "text": "hello world", "language": "en"}, {"id": "934", + "text": "hello world", "language": "en"}, {"id": "935", "text": "hello world", + "language": "en"}, {"id": "936", "text": "hello world", "language": "en"}, {"id": + "937", "text": "hello world", "language": "en"}, {"id": "938", "text": "hello + world", "language": "en"}, {"id": "939", "text": "hello world", "language": + "en"}, {"id": "940", "text": "hello world", "language": "en"}, {"id": "941", + "text": "hello world", "language": "en"}, {"id": "942", "text": "hello world", + "language": "en"}, {"id": "943", "text": "hello world", "language": "en"}, {"id": + "944", "text": "hello world", "language": "en"}, {"id": "945", "text": "hello + world", "language": "en"}, {"id": "946", "text": "hello world", "language": + "en"}, {"id": "947", "text": "hello world", "language": "en"}, {"id": "948", + "text": "hello world", "language": "en"}, {"id": "949", "text": "hello world", + "language": "en"}, {"id": "950", "text": "hello world", "language": "en"}, {"id": + "951", "text": "hello world", "language": "en"}, {"id": "952", "text": "hello + world", "language": "en"}, {"id": "953", "text": "hello world", "language": + "en"}, {"id": "954", "text": "hello world", "language": "en"}, {"id": "955", + "text": "hello world", "language": "en"}, {"id": "956", "text": "hello world", + "language": "en"}, {"id": "957", "text": "hello world", "language": "en"}, {"id": + "958", "text": "hello world", "language": "en"}, {"id": "959", "text": "hello + world", "language": "en"}, {"id": "960", "text": "hello world", "language": + "en"}, {"id": "961", "text": "hello world", "language": "en"}, {"id": "962", + "text": "hello world", "language": "en"}, {"id": "963", "text": "hello world", + "language": "en"}, {"id": "964", "text": "hello world", "language": "en"}, {"id": + "965", "text": "hello world", "language": "en"}, {"id": "966", "text": "hello + world", "language": "en"}, {"id": "967", "text": "hello world", "language": + "en"}, {"id": "968", "text": "hello world", "language": "en"}, {"id": "969", + "text": "hello world", "language": "en"}, {"id": "970", "text": "hello world", + "language": "en"}, {"id": "971", "text": "hello world", "language": "en"}, {"id": + "972", "text": "hello world", "language": "en"}, {"id": "973", "text": "hello + world", "language": "en"}, {"id": "974", "text": "hello world", "language": + "en"}, {"id": "975", "text": "hello world", "language": "en"}, {"id": "976", + "text": "hello world", "language": "en"}, {"id": "977", "text": "hello world", + "language": "en"}, {"id": "978", "text": "hello world", "language": "en"}, {"id": + "979", "text": "hello world", "language": "en"}, {"id": "980", "text": "hello + world", "language": "en"}, {"id": "981", "text": "hello world", "language": + "en"}, {"id": "982", "text": "hello world", "language": "en"}, {"id": "983", + "text": "hello world", "language": "en"}, {"id": "984", "text": "hello world", + "language": "en"}, {"id": "985", "text": "hello world", "language": "en"}, {"id": + "986", "text": "hello world", "language": "en"}, {"id": "987", "text": "hello + world", "language": "en"}, {"id": "988", "text": "hello world", "language": + "en"}, {"id": "989", "text": "hello world", "language": "en"}, {"id": "990", + "text": "hello world", "language": "en"}, {"id": "991", "text": "hello world", + "language": "en"}, {"id": "992", "text": "hello world", "language": "en"}, {"id": + "993", "text": "hello world", "language": "en"}, {"id": "994", "text": "hello + world", "language": "en"}, {"id": "995", "text": "hello world", "language": + "en"}, {"id": "996", "text": "hello world", "language": "en"}, {"id": "997", + "text": "hello world", "language": "en"}, {"id": "998", "text": "hello world", + "language": "en"}, {"id": "999", "text": "hello world", "language": "en"}, {"id": + "1000", "text": "hello world", "language": "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '55962' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch + request contains too many records. Max 1000 records are permitted."}}}' + headers: + apim-request-id: + - 4ddaa1e8-0682-4c46-b710-8367320ffe60 + content-type: + - application/json; charset=utf-8 + date: + - Wed, 22 Jul 2020 15:42:19 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '10' + status: + code: 400 + message: Bad Request +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_client_passed_default_language_hint.yaml new file mode 100644 index 000000000000..64776799457b --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_client_passed_default_language_hint.yaml @@ -0,0 +1,139 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": + "es"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": + "es"}, {"id": "3", "text": "The restaurant had really good food.", "language": + "es"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '240' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 27dd8397-2d02-47c7-94bd-89603065c425 + content-type: + - application/json; charset=utf-8 + date: + - Wed, 22 Jul 2020 15:42:19 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '1' + status: + code: 200 + message: OK +- request: + body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": + "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": + "en"}, {"id": "3", "text": "The restaurant had really good food.", "language": + "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '240' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - ca2e051f-01a2-4061-b6ef-39787b77acf0 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=3 + date: + - Wed, 22 Jul 2020 15:42:20 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '101' + status: + code: 200 + message: OK +- request: + body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": + "es"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": + "es"}, {"id": "3", "text": "The restaurant had really good food.", "language": + "es"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '240' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 745f298d-3c82-414c-912d-3c3c74849718 + content-type: + - application/json; charset=utf-8 + date: + - Wed, 22 Jul 2020 15:42:20 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '2' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_no_result_attribute.yaml new file mode 100644 index 000000000000..79e1d7ae4350 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_no_result_attribute.yaml @@ -0,0 +1,42 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '58' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 150adaf0-49bc-4795-a129-6d712619698f + content-type: + - application/json; charset=utf-8 + date: + - Wed, 22 Jul 2020 15:42:21 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '1' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_nonexistent_attribute.yaml new file mode 100644 index 000000000000..b1ac6ff5cade --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_nonexistent_attribute.yaml @@ -0,0 +1,42 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '58' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 4b943a67-30de-4bba-a0c9-e4d5a7c2a1d7 + content-type: + - application/json; charset=utf-8 + date: + - Wed, 22 Jul 2020 15:42:21 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '2' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_errors.yaml new file mode 100644 index 000000000000..9c84ab6b0021 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_errors.yaml @@ -0,0 +1,51 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "", "language": "en"}, {"id": "2", "text": + "I did not like the hotel we stayed at.", "language": "english"}, {"id": "3", + "text": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "language": "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '5308' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"A + document within the request was too large to be processed. Limit document + size to: 5120 text elements. For additional details on the data limitations + see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - fde2af85-e654-4e50-bcc8-8b0b7e6b4108 + content-type: + - application/json; charset=utf-8 + date: + - Wed, 22 Jul 2020 15:42:21 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '2' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_warnings.yaml new file mode 100644 index 000000000000..37d14dee96d9 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_warnings.yaml @@ -0,0 +1,43 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "This won''t actually create a warning + :''(", "language": "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '98' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 26cb730a-49d2-4991-8690-f64b4b76d0d8 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Wed, 22 Jul 2020 15:42:22 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '74' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_duplicate_ids_error.yaml new file mode 100644 index 000000000000..01d2e365e374 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_duplicate_ids_error.yaml @@ -0,0 +1,42 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "hello world", "language": "en"}, {"id": + "1", "text": "I did not like the hotel we stayed at.", "language": "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '150' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request + contains duplicated Ids. Make sure each document has a unique Id."}}}' + headers: + apim-request-id: + - 90e9260e-8f04-438e-a0f5-63af6d3933ee + content-type: + - application/json; charset=utf-8 + date: + - Wed, 22 Jul 2020 15:42:22 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '5' + status: + code: 400 + message: Bad Request +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_empty_credential_class.yaml new file mode 100644 index 000000000000..577aa11eb21c --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_empty_credential_class.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "This is written in English.", "language": + "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '85' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"error":{"code":"401","message":"Access denied due to invalid subscription + key or wrong API endpoint. Make sure to provide a valid key for an active + subscription and use a correct regional API endpoint for your resource."}}' + headers: + content-length: + - '224' + date: + - Wed, 22 Jul 2020 15:42:23 GMT + status: + code: 401 + message: PermissionDenied +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_all_errors.yaml new file mode 100644 index 000000000000..3637e7689408 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_all_errors.yaml @@ -0,0 +1,47 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "", "language": "en"}, {"id": "2", "text": + "Hola", "language": "Spanish"}, {"id": "3", "text": "", "language": "de"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '153' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"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: + - 7889c2ee-e26a-4192-b115-c1653a6a76af + content-type: + - application/json; charset=utf-8 + date: + - Wed, 22 Jul 2020 15:42:23 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '2' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_some_errors.yaml new file mode 100644 index 000000000000..eb88c662e2a3 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_some_errors.yaml @@ -0,0 +1,49 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "hola", "language": "es"}, {"id": "2", + "text": "", "language": "en"}, {"id": "3", "text": "Is 998.214.865-68 your Brazilian + CPF number?", "language": "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '192' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"3","entities":[{"text":"998.214.865-68","category":"Brazil + CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - ef4fe81e-114f-4c88-a719-61260e339679 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Wed, 22 Jul 2020 15:42:24 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '80' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_docs.yaml new file mode 100644 index 000000000000..73183f710f3b --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_docs.yaml @@ -0,0 +1,43 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "This should fail because we''re passing + in an invalid language hint", "language": "notalanguage"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '134' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - bce4767a-7dc9-490e-a8c9-67a0d700c6ba + content-type: + - application/json; charset=utf-8 + date: + - Wed, 22 Jul 2020 15:42:24 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '1' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_method.yaml new file mode 100644 index 000000000000..b272938c7451 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_method.yaml @@ -0,0 +1,43 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "This should fail because we''re passing + in an invalid language hint", "language": "notalanguage"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '134' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 833870fa-a34c-4e0b-a416-476ed1a814c6 + content-type: + - application/json; charset=utf-8 + date: + - Wed, 22 Jul 2020 15:42:24 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '2' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_english.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_english.yaml new file mode 100644 index 000000000000..fe78b6c6e2cc --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_english.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "Bill Gates is the CEO of Microsoft.", + "language": "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '93' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true + response: + body: + string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","statistics":{"charactersCount":35,"transactionsCount":1},"entities":[{"text":"Bill + Gates","category":"Person","offset":0,"length":10,"confidenceScore":0.81},{"text":"Microsoft","category":"Organization","offset":25,"length":9,"confidenceScore":0.64}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 52d7b215-8f46-4f3a-88b6-86fbe5dece23 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Wed, 22 Jul 2020 15:42:25 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '71' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_spanish.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_spanish.yaml new file mode 100644 index 000000000000..16708cb52ae7 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_spanish.yaml @@ -0,0 +1,43 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "Bill Gates is the CEO of Microsoft.", + "language": "es"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '93' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true + response: + body: + string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 3e6f5b79-e64a-4267-a8e4-16c9017c5843 + content-type: + - application/json; charset=utf-8 + date: + - Wed, 22 Jul 2020 14:50:20 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '420' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_length_with_emoji.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_length_with_emoji.yaml new file mode 100644 index 000000000000..31172ce1b2db --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_length_with_emoji.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\ud83d\udc69 SSN: 123-12-1234", "language": + "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '87' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"123-12-1234","category":"U.S. + Social Security Number (SSN)","offset":7,"length":11,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - b2a4bc80-04a9-4ebd-a3cf-f120c9def163 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Wed, 22 Jul 2020 15:42:25 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '76' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_out_of_order_ids.yaml new file mode 100644 index 000000000000..d46754114453 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_out_of_order_ids.yaml @@ -0,0 +1,47 @@ +interactions: +- request: + body: '{"documents": [{"id": "56", "text": ":)", "language": "en"}, {"id": "0", + "text": ":(", "language": "en"}, {"id": "22", "text": "", "language": "en"}, + {"id": "19", "text": ":P", "language": "en"}, {"id": "1", "text": ":D", "language": + "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '241' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 2c7e1bfe-6b13-42e3-9d2a-edaf42180bed + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=4 + date: + - Wed, 22 Jul 2020 15:42:26 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '90' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_output_same_order_as_input.yaml new file mode 100644 index 000000000000..b585e68e4ffa --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_output_same_order_as_input.yaml @@ -0,0 +1,45 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "one", "language": "en"}, {"id": "2", + "text": "two", "language": "en"}, {"id": "3", "text": "three", "language": "en"}, + {"id": "4", "text": "four", "language": "en"}, {"id": "5", "text": "five", "language": + "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '249' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]},{"id":"4","entities":[],"warnings":[]},{"id":"5","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - fc87fd4a-2e8c-4ab5-a481-16d4e4e9e36b + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=5 + date: + - Wed, 22 Jul 2020 15:42:26 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '68' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_pass_cls.yaml new file mode 100644 index 000000000000..19669d386a08 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_pass_cls.yaml @@ -0,0 +1,43 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "Test passing cls to endpoint", "language": + "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '86' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 5aacd6e8-9005-4b19-a482-1782ce5663b8 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Wed, 22 Jul 2020 15:42:26 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '80' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_passing_only_string.yaml new file mode 100644 index 000000000000..1ed7b4776861 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_passing_only_string.yaml @@ -0,0 +1,52 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "My SSN is 555-55-5555.", "language": + "en"}, {"id": "1", "text": "Your ABA number - 111000025 - is the first 9 digits + in the lower left hand corner of your personal check.", "language": "en"}, {"id": + "2", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": "en"}, + {"id": "3", "text": "", "language": "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '358' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true + response: + body: + string: '{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"0","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"555-55-5555","category":"U.S. + Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.85}],"warnings":[]},{"id":"1","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone + Number","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABA + Routing Number","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"id":"2","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil + CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"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: + - a1fadb45-9f8f-4dcb-ba8e-05cf978be574 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=3 + date: + - Wed, 22 Jul 2020 15:42:27 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '104' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_per_item_dont_use_language_hint.yaml new file mode 100644 index 000000000000..9f49e9639633 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_per_item_dont_use_language_hint.yaml @@ -0,0 +1,45 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": + ""}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": + ""}, {"id": "3", "text": "The restaurant had really good food.", "language": + "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '236' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - f3ae32ad-6161-49cb-b666-d410ce2bb25c + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=3 + date: + - Wed, 22 Jul 2020 15:42:27 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '124' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_rotate_subscription_key.yaml new file mode 100644 index 000000000000..082ce73add93 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_rotate_subscription_key.yaml @@ -0,0 +1,121 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": + "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": + "en"}, {"id": "3", "text": "The restaurant had really good food.", "language": + "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '240' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 1e1a2d45-8aa2-42dc-af56-fbb87d9f772d + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=3 + date: + - Wed, 22 Jul 2020 15:42:28 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '103' + status: + code: 200 + message: OK +- request: + body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": + "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": + "en"}, {"id": "3", "text": "The restaurant had really good food.", "language": + "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '240' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"error":{"code":"401","message":"Access denied due to invalid subscription + key or wrong API endpoint. Make sure to provide a valid key for an active + subscription and use a correct regional API endpoint for your resource."}}' + headers: + content-length: + - '224' + date: + - Wed, 22 Jul 2020 15:42:28 GMT + status: + code: 401 + message: PermissionDenied +- request: + body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": + "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": + "en"}, {"id": "3", "text": "The restaurant had really good food.", "language": + "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '240' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - c5ce3d0b-f8bd-4a4e-8b08-82a99b308596 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=3 + date: + - Wed, 22 Jul 2020 15:42:28 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '83' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_show_stats_and_model_version.yaml new file mode 100644 index 000000000000..5764f641da86 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_show_stats_and_model_version.yaml @@ -0,0 +1,47 @@ +interactions: +- request: + body: '{"documents": [{"id": "56", "text": ":)", "language": "en"}, {"id": "0", + "text": ":(", "language": "en"}, {"id": "22", "text": "", "language": "en"}, + {"id": "19", "text": ":P", "language": "en"}, {"id": "1", "text": ":D", "language": + "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '241' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true + response: + body: + string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 3744b6da-292c-4dc5-a0df-ca58e065bb15 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=4 + date: + - Wed, 22 Jul 2020 15:42:29 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '85' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_too_many_documents.yaml new file mode 100644 index 000000000000..9ee694379416 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_too_many_documents.yaml @@ -0,0 +1,48 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "One", "language": "en"}, {"id": "1", + "text": "Two", "language": "en"}, {"id": "2", "text": "Three", "language": "en"}, + {"id": "3", "text": "Four", "language": "en"}, {"id": "4", "text": "Five", "language": + "en"}, {"id": "5", "text": "Six", "language": "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '295' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]},{"id":"4","entities":[],"warnings":[]},{"id":"5","entities":[],"warnings":[]}],"errors":[{"id":"","error":{"code":"InvalidRequest","message":"The + request has exceeded the allowed document limits.","innererror":{"code":"InvalidDocumentBatch","message":"The + number of documents in the request have exceeded the data limitations. See + https://aka.ms/text-analytics-data-limits for additional information"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 5dce91e4-9361-430c-9212-86740b654d45 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=6 + date: + - Wed, 22 Jul 2020 15:42:29 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '68' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_user_agent.yaml new file mode 100644 index 000000000000..f9258283244e --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_user_agent.yaml @@ -0,0 +1,45 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": + "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": + "en"}, {"id": "3", "text": "The restaurant had really good food.", "language": + "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '240' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 981024dd-93c0-47e9-aaca-1abe767a9490 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=3 + date: + - Wed, 22 Jul 2020 15:42:29 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '111' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_dont_use_language_hint.yaml new file mode 100644 index 000000000000..1c86003c93d3 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_dont_use_language_hint.yaml @@ -0,0 +1,45 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "This was the best day of my life.", + "language": ""}, {"id": "1", "text": "I did not like the hotel we stayed at. + It was too expensive.", "language": ""}, {"id": "2", "text": "The restaurant + was not as good as I hoped.", "language": ""}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '273' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 1141db4f-3b2f-46ca-b80c-44bebdbc89fe + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=3 + date: + - Wed, 22 Jul 2020 15:42:30 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '80' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint.yaml new file mode 100644 index 000000000000..c321b12266e3 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint.yaml @@ -0,0 +1,49 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "This was the best day of my life.", + "language": "fr"}, {"id": "1", "text": "I did not like the hotel we stayed at. + It was too expensive.", "language": "fr"}, {"id": "2", "text": "The restaurant + was not as good as I hoped.", "language": "fr"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '279' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 24c22a21-8e3e-46fe-b2d3-20ee4dc6c236 + content-type: + - application/json; charset=utf-8 + date: + - Wed, 22 Jul 2020 15:42:30 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '3' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml new file mode 100644 index 000000000000..0737d9b3a289 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -0,0 +1,49 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": + "es"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": + "es"}, {"id": "3", "text": "The restaurant had really good food.", "language": + "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '240' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"3","entities":[],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 8b921391-5fe4-4e0f-a495-e070c62d293d + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Wed, 22 Jul 2020 15:42:30 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '78' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_input.yaml new file mode 100644 index 000000000000..d5288550f9b9 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_input.yaml @@ -0,0 +1,49 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "I should take my cat to the veterinarian.", + "language": "de"}, {"id": "4", "text": "Este es un document escrito en Espa\u00f1ol.", + "language": "de"}, {"id": "3", "text": "\u732b\u306f\u5e78\u305b", "language": + "de"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '253' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"4","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - 320c086e-f163-4754-833c-bcc10a98605a + content-type: + - application/json; charset=utf-8 + date: + - Wed, 22 Jul 2020 15:42:32 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '2' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml new file mode 100644 index 000000000000..f0f81adfef65 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -0,0 +1,49 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "I should take my cat to the veterinarian.", + "language": "es"}, {"id": "2", "text": "Este es un document escrito en Espa\u00f1ol.", + "language": "es"}, {"id": "3", "text": "\u732b\u306f\u5e78\u305b", "language": + "en"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '253' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"3","entities":[],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: + - de7841b4-2001-4130-a21d-28aa8bdde9be + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Wed, 22 Jul 2020 15:42:31 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '72' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_dict.yaml new file mode 100644 index 000000000000..1aa8f6e97661 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_dict.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "My SSN is 555-55-5555.", "language": + "en"}, {"id": "2", "text": "Your ABA number - 111000025 - is the first 9 digits + in the lower left hand corner of your personal check.", "language": "en"}, {"id": + "3", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '315' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true + response: + body: + string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"555-55-5555","category":"U.S. + Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.85}],"warnings":[]},{"id":"2","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone + Number","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABA + Routing Number","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil + CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 9779320f-d441-4dd4-b883-3dfe994a0063 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 + date: Wed, 22 Jul 2020 17:57:54 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '107' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_text_document_input.yaml new file mode 100644 index 000000000000..f00d4563e77d --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_text_document_input.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "My SSN is 555-55-5555.", "language": + "en"}, {"id": "2", "text": "Your ABA number - 111000025 - is the first 9 digits + in the lower left hand corner of your personal check.", "language": "en"}, {"id": + "3", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '315' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true + response: + body: + string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"555-55-5555","category":"U.S. + Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.85}],"warnings":[]},{"id":"2","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone + Number","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABA + Routing Number","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil + CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 96b5dccc-4d7b-4e4f-94ce-07c50a99e744 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 + date: Wed, 22 Jul 2020 17:57:55 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '289' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_credentials.yaml new file mode 100644 index 000000000000..41279d957e78 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_credentials.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "This is written in English.", "language": + "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '85' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"error":{"code":"401","message":"Access denied due to invalid subscription + key or wrong API endpoint. Make sure to provide a valid key for an active + subscription and use a correct regional API endpoint for your resource."}}' + headers: + content-length: '224' + date: Wed, 22 Jul 2020 17:57:55 GMT + status: + code: 401 + message: PermissionDenied + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_model_version_error.yaml new file mode 100644 index 000000000000..de1df197f345 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_model_version_error.yaml @@ -0,0 +1,32 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "I did not like the hotel we stayed + at.", "language": "english"}]}' + headers: + Accept: + - application/json + Content-Length: + - '101' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=bad&showStats=false + response: + body: + string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid + model version. Possible values are: latest,2020-04-01,2019-10-01,2020-02-01"}}}' + headers: + apim-request-id: 97c6120d-45db-4f9f-9548-785672722770 + content-type: application/json; charset=utf-8 + date: Wed, 22 Jul 2020 17:57:55 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '5' + status: + code: 400 + message: Bad Request + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=bad&showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit.yaml new file mode 100644 index 000000000000..885e086206b6 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit.yaml @@ -0,0 +1,776 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "hello world", "language": "en"}, {"id": + "1", "text": "hello world", "language": "en"}, {"id": "2", "text": "hello world", + "language": "en"}, {"id": "3", "text": "hello world", "language": "en"}, {"id": + "4", "text": "hello world", "language": "en"}, {"id": "5", "text": "hello world", + "language": "en"}, {"id": "6", "text": "hello world", "language": "en"}, {"id": + "7", "text": "hello world", "language": "en"}, {"id": "8", "text": "hello world", + "language": "en"}, {"id": "9", "text": "hello world", "language": "en"}, {"id": + "10", "text": "hello world", "language": "en"}, {"id": "11", "text": "hello + world", "language": "en"}, {"id": "12", "text": "hello world", "language": "en"}, + {"id": "13", "text": "hello world", "language": "en"}, {"id": "14", "text": + "hello world", "language": "en"}, {"id": "15", "text": "hello world", "language": + "en"}, {"id": "16", "text": "hello world", "language": "en"}, {"id": "17", "text": + "hello world", "language": "en"}, {"id": "18", "text": "hello world", "language": + "en"}, {"id": "19", "text": "hello world", "language": "en"}, {"id": "20", "text": + "hello world", "language": "en"}, {"id": "21", "text": "hello world", "language": + "en"}, {"id": "22", "text": "hello world", "language": "en"}, {"id": "23", "text": + "hello world", "language": "en"}, {"id": "24", "text": "hello world", "language": + "en"}, {"id": "25", "text": "hello world", "language": "en"}, {"id": "26", "text": + "hello world", "language": "en"}, {"id": "27", "text": "hello world", "language": + "en"}, {"id": "28", "text": "hello world", "language": "en"}, {"id": "29", "text": + "hello world", "language": "en"}, {"id": "30", "text": "hello world", "language": + "en"}, {"id": "31", "text": "hello world", "language": "en"}, {"id": "32", "text": + "hello world", "language": "en"}, {"id": "33", "text": "hello world", "language": + "en"}, {"id": "34", "text": "hello world", "language": "en"}, {"id": "35", "text": + "hello world", "language": "en"}, {"id": "36", "text": "hello world", "language": + "en"}, {"id": "37", "text": "hello world", "language": "en"}, {"id": "38", "text": + "hello world", "language": "en"}, {"id": "39", "text": "hello world", "language": + "en"}, {"id": "40", "text": "hello world", "language": "en"}, {"id": "41", "text": + "hello world", "language": "en"}, {"id": "42", "text": "hello world", "language": + "en"}, {"id": "43", "text": "hello world", "language": "en"}, {"id": "44", "text": + "hello world", "language": "en"}, {"id": "45", "text": "hello world", "language": + "en"}, {"id": "46", "text": "hello world", "language": "en"}, {"id": "47", "text": + "hello world", "language": "en"}, {"id": "48", "text": "hello world", "language": + "en"}, {"id": "49", "text": "hello world", "language": "en"}, {"id": "50", "text": + "hello world", "language": "en"}, {"id": "51", "text": "hello world", "language": + "en"}, {"id": "52", "text": "hello world", "language": "en"}, {"id": "53", "text": + "hello world", "language": "en"}, {"id": "54", "text": "hello world", "language": + "en"}, {"id": "55", "text": "hello world", "language": "en"}, {"id": "56", "text": + "hello world", "language": "en"}, {"id": "57", "text": "hello world", "language": + "en"}, {"id": "58", "text": "hello world", "language": "en"}, {"id": "59", "text": + "hello world", "language": "en"}, {"id": "60", "text": "hello world", "language": + "en"}, {"id": "61", "text": "hello world", "language": "en"}, {"id": "62", "text": + "hello world", "language": "en"}, {"id": "63", "text": "hello world", "language": + "en"}, {"id": "64", "text": "hello world", "language": "en"}, {"id": "65", "text": + "hello world", "language": "en"}, {"id": "66", "text": "hello world", "language": + "en"}, {"id": "67", "text": "hello world", "language": "en"}, {"id": "68", "text": + "hello world", "language": "en"}, {"id": "69", "text": "hello world", "language": + "en"}, {"id": "70", "text": "hello world", "language": "en"}, {"id": "71", "text": + "hello world", "language": "en"}, {"id": "72", "text": "hello world", "language": + "en"}, {"id": "73", "text": "hello world", "language": "en"}, {"id": "74", "text": + "hello world", "language": "en"}, {"id": "75", "text": "hello world", "language": + "en"}, {"id": "76", "text": "hello world", "language": "en"}, {"id": "77", "text": + "hello world", "language": "en"}, {"id": "78", "text": "hello world", "language": + "en"}, {"id": "79", "text": "hello world", "language": "en"}, {"id": "80", "text": + "hello world", "language": "en"}, {"id": "81", "text": "hello world", "language": + "en"}, {"id": "82", "text": "hello world", "language": "en"}, {"id": "83", "text": + "hello world", "language": "en"}, {"id": "84", "text": "hello world", "language": + "en"}, {"id": "85", "text": "hello world", "language": "en"}, {"id": "86", "text": + "hello world", "language": "en"}, {"id": "87", "text": "hello world", "language": + "en"}, {"id": "88", "text": "hello world", "language": "en"}, {"id": "89", "text": + "hello world", "language": "en"}, {"id": "90", "text": "hello world", "language": + "en"}, {"id": "91", "text": "hello world", "language": "en"}, {"id": "92", "text": + "hello world", "language": "en"}, {"id": "93", "text": "hello world", "language": + "en"}, {"id": "94", "text": "hello world", "language": "en"}, {"id": "95", "text": + "hello world", "language": "en"}, {"id": "96", "text": "hello world", "language": + "en"}, {"id": "97", "text": "hello world", "language": "en"}, {"id": "98", "text": + "hello world", "language": "en"}, {"id": "99", "text": "hello world", "language": + "en"}, {"id": "100", "text": "hello world", "language": "en"}, {"id": "101", + "text": "hello world", "language": "en"}, {"id": "102", "text": "hello world", + "language": "en"}, {"id": "103", "text": "hello world", "language": "en"}, {"id": + "104", "text": "hello world", "language": "en"}, {"id": "105", "text": "hello + world", "language": "en"}, {"id": "106", "text": "hello world", "language": + "en"}, {"id": "107", "text": "hello world", "language": "en"}, {"id": "108", + "text": "hello world", "language": "en"}, {"id": "109", "text": "hello world", + "language": "en"}, {"id": "110", "text": "hello world", "language": "en"}, {"id": + "111", "text": "hello world", "language": "en"}, {"id": "112", "text": "hello + world", "language": "en"}, {"id": "113", "text": "hello world", "language": + "en"}, {"id": "114", "text": "hello world", "language": "en"}, {"id": "115", + "text": "hello world", "language": "en"}, {"id": "116", "text": "hello world", + "language": "en"}, {"id": "117", "text": "hello world", "language": "en"}, {"id": + "118", "text": "hello world", "language": "en"}, {"id": "119", "text": "hello + world", "language": "en"}, {"id": "120", "text": "hello world", "language": + "en"}, {"id": "121", "text": "hello world", "language": "en"}, {"id": "122", + "text": "hello world", "language": "en"}, {"id": "123", "text": "hello world", + "language": "en"}, {"id": "124", "text": "hello world", "language": "en"}, {"id": + "125", "text": "hello world", "language": "en"}, {"id": "126", "text": "hello + world", "language": "en"}, {"id": "127", "text": "hello world", "language": + "en"}, {"id": "128", "text": "hello world", "language": "en"}, {"id": "129", + "text": "hello world", "language": "en"}, {"id": "130", "text": "hello world", + "language": "en"}, {"id": "131", "text": "hello world", "language": "en"}, {"id": + "132", "text": "hello world", "language": "en"}, {"id": "133", "text": "hello + world", "language": "en"}, {"id": "134", "text": "hello world", "language": + "en"}, {"id": "135", "text": "hello world", "language": "en"}, {"id": "136", + "text": "hello world", "language": "en"}, {"id": "137", "text": "hello world", + "language": "en"}, {"id": "138", "text": "hello world", "language": "en"}, {"id": + "139", "text": "hello world", "language": "en"}, {"id": "140", "text": "hello + world", "language": "en"}, {"id": "141", "text": "hello world", "language": + "en"}, {"id": "142", "text": "hello world", "language": "en"}, {"id": "143", + "text": "hello world", "language": "en"}, {"id": "144", "text": "hello world", + "language": "en"}, {"id": "145", "text": "hello world", "language": "en"}, {"id": + "146", "text": "hello world", "language": "en"}, {"id": "147", "text": "hello + world", "language": "en"}, {"id": "148", "text": "hello world", "language": + "en"}, {"id": "149", "text": "hello world", "language": "en"}, {"id": "150", + "text": "hello world", "language": "en"}, {"id": "151", "text": "hello world", + "language": "en"}, {"id": "152", "text": "hello world", "language": "en"}, {"id": + "153", "text": "hello world", "language": "en"}, {"id": "154", "text": "hello + world", "language": "en"}, {"id": "155", "text": "hello world", "language": + "en"}, {"id": "156", "text": "hello world", "language": "en"}, {"id": "157", + "text": "hello world", "language": "en"}, {"id": "158", "text": "hello world", + "language": "en"}, {"id": "159", "text": "hello world", "language": "en"}, {"id": + "160", "text": "hello world", "language": "en"}, {"id": "161", "text": "hello + world", "language": "en"}, {"id": "162", "text": "hello world", "language": + "en"}, {"id": "163", "text": "hello world", "language": "en"}, {"id": "164", + "text": "hello world", "language": "en"}, {"id": "165", "text": "hello world", + "language": "en"}, {"id": "166", "text": "hello world", "language": "en"}, {"id": + "167", "text": "hello world", "language": "en"}, {"id": "168", "text": "hello + world", "language": "en"}, {"id": "169", "text": "hello world", "language": + "en"}, {"id": "170", "text": "hello world", "language": "en"}, {"id": "171", + "text": "hello world", "language": "en"}, {"id": "172", "text": "hello world", + "language": "en"}, {"id": "173", "text": "hello world", "language": "en"}, {"id": + "174", "text": "hello world", "language": "en"}, {"id": "175", "text": "hello + world", "language": "en"}, {"id": "176", "text": "hello world", "language": + "en"}, {"id": "177", "text": "hello world", "language": "en"}, {"id": "178", + "text": "hello world", "language": "en"}, {"id": "179", "text": "hello world", + "language": "en"}, {"id": "180", "text": "hello world", "language": "en"}, {"id": + "181", "text": "hello world", "language": "en"}, {"id": "182", "text": "hello + world", "language": "en"}, {"id": "183", "text": "hello world", "language": + "en"}, {"id": "184", "text": "hello world", "language": "en"}, {"id": "185", + "text": "hello world", "language": "en"}, {"id": "186", "text": "hello world", + "language": "en"}, {"id": "187", "text": "hello world", "language": "en"}, {"id": + "188", "text": "hello world", "language": "en"}, {"id": "189", "text": "hello + world", "language": "en"}, {"id": "190", "text": "hello world", "language": + "en"}, {"id": "191", "text": "hello world", "language": "en"}, {"id": "192", + "text": "hello world", "language": "en"}, {"id": "193", "text": "hello world", + "language": "en"}, {"id": "194", "text": "hello world", "language": "en"}, {"id": + "195", "text": "hello world", "language": "en"}, {"id": "196", "text": "hello + world", "language": "en"}, {"id": "197", "text": "hello world", "language": + "en"}, {"id": "198", "text": "hello world", "language": "en"}, {"id": "199", + "text": "hello world", "language": "en"}, {"id": "200", "text": "hello world", + "language": "en"}, {"id": "201", "text": "hello world", "language": "en"}, {"id": + "202", "text": "hello world", "language": "en"}, {"id": "203", "text": "hello + world", "language": "en"}, {"id": "204", "text": "hello world", "language": + "en"}, {"id": "205", "text": "hello world", "language": "en"}, {"id": "206", + "text": "hello world", "language": "en"}, {"id": "207", "text": "hello world", + "language": "en"}, {"id": "208", "text": "hello world", "language": "en"}, {"id": + "209", "text": "hello world", "language": "en"}, {"id": "210", "text": "hello + world", "language": "en"}, {"id": "211", "text": "hello world", "language": + "en"}, {"id": "212", "text": "hello world", "language": "en"}, {"id": "213", + "text": "hello world", "language": "en"}, {"id": "214", "text": "hello world", + "language": "en"}, {"id": "215", "text": "hello world", "language": "en"}, {"id": + "216", "text": "hello world", "language": "en"}, {"id": "217", "text": "hello + world", "language": "en"}, {"id": "218", "text": "hello world", "language": + "en"}, {"id": "219", "text": "hello world", "language": "en"}, {"id": "220", + "text": "hello world", "language": "en"}, {"id": "221", "text": "hello world", + "language": "en"}, {"id": "222", "text": "hello world", "language": "en"}, {"id": + "223", "text": "hello world", "language": "en"}, {"id": "224", "text": "hello + world", "language": "en"}, {"id": "225", "text": "hello world", "language": + "en"}, {"id": "226", "text": "hello world", "language": "en"}, {"id": "227", + "text": "hello world", "language": "en"}, {"id": "228", "text": "hello world", + "language": "en"}, {"id": "229", "text": "hello world", "language": "en"}, {"id": + "230", "text": "hello world", "language": "en"}, {"id": "231", "text": "hello + world", "language": "en"}, {"id": "232", "text": "hello world", "language": + "en"}, {"id": "233", "text": "hello world", "language": "en"}, {"id": "234", + "text": "hello world", "language": "en"}, {"id": "235", "text": "hello world", + "language": "en"}, {"id": "236", "text": "hello world", "language": "en"}, {"id": + "237", "text": "hello world", "language": "en"}, {"id": "238", "text": "hello + world", "language": "en"}, {"id": "239", "text": "hello world", "language": + "en"}, {"id": "240", "text": "hello world", "language": "en"}, {"id": "241", + "text": "hello world", "language": "en"}, {"id": "242", "text": "hello world", + "language": "en"}, {"id": "243", "text": "hello world", "language": "en"}, {"id": + "244", "text": "hello world", "language": "en"}, {"id": "245", "text": "hello + world", "language": "en"}, {"id": "246", "text": "hello world", "language": + "en"}, {"id": "247", "text": "hello world", "language": "en"}, {"id": "248", + "text": "hello world", "language": "en"}, {"id": "249", "text": "hello world", + "language": "en"}, {"id": "250", "text": "hello world", "language": "en"}, {"id": + "251", "text": "hello world", "language": "en"}, {"id": "252", "text": "hello + world", "language": "en"}, {"id": "253", "text": "hello world", "language": + "en"}, {"id": "254", "text": "hello world", "language": "en"}, {"id": "255", + "text": "hello world", "language": "en"}, {"id": "256", "text": "hello world", + "language": "en"}, {"id": "257", "text": "hello world", "language": "en"}, {"id": + "258", "text": "hello world", "language": "en"}, {"id": "259", "text": "hello + world", "language": "en"}, {"id": "260", "text": "hello world", "language": + "en"}, {"id": "261", "text": "hello world", "language": "en"}, {"id": "262", + "text": "hello world", "language": "en"}, {"id": "263", "text": "hello world", + "language": "en"}, {"id": "264", "text": "hello world", "language": "en"}, {"id": + "265", "text": "hello world", "language": "en"}, {"id": "266", "text": "hello + world", "language": "en"}, {"id": "267", "text": "hello world", "language": + "en"}, {"id": "268", "text": "hello world", "language": "en"}, {"id": "269", + "text": "hello world", "language": "en"}, {"id": "270", "text": "hello world", + "language": "en"}, {"id": "271", "text": "hello world", "language": "en"}, {"id": + "272", "text": "hello world", "language": "en"}, {"id": "273", "text": "hello + world", "language": "en"}, {"id": "274", "text": "hello world", "language": + "en"}, {"id": "275", "text": "hello world", "language": "en"}, {"id": "276", + "text": "hello world", "language": "en"}, {"id": "277", "text": "hello world", + "language": "en"}, {"id": "278", "text": "hello world", "language": "en"}, {"id": + "279", "text": "hello world", "language": "en"}, {"id": "280", "text": "hello + world", "language": "en"}, {"id": "281", "text": "hello world", "language": + "en"}, {"id": "282", "text": "hello world", "language": "en"}, {"id": "283", + "text": "hello world", "language": "en"}, {"id": "284", "text": "hello world", + "language": "en"}, {"id": "285", "text": "hello world", "language": "en"}, {"id": + "286", "text": "hello world", "language": "en"}, {"id": "287", "text": "hello + world", "language": "en"}, {"id": "288", "text": "hello world", "language": + "en"}, {"id": "289", "text": "hello world", "language": "en"}, {"id": "290", + "text": "hello world", "language": "en"}, {"id": "291", "text": "hello world", + "language": "en"}, {"id": "292", "text": "hello world", "language": "en"}, {"id": + "293", "text": "hello world", "language": "en"}, {"id": "294", "text": "hello + world", "language": "en"}, {"id": "295", "text": "hello world", "language": + "en"}, {"id": "296", "text": "hello world", "language": "en"}, {"id": "297", + "text": "hello world", "language": "en"}, {"id": "298", "text": "hello world", + "language": "en"}, {"id": "299", "text": "hello world", "language": "en"}, {"id": + "300", "text": "hello world", "language": "en"}, {"id": "301", "text": "hello + world", "language": "en"}, {"id": "302", "text": "hello world", "language": + "en"}, {"id": "303", "text": "hello world", "language": "en"}, {"id": "304", + "text": "hello world", "language": "en"}, {"id": "305", "text": "hello world", + "language": "en"}, {"id": "306", "text": "hello world", "language": "en"}, {"id": + "307", "text": "hello world", "language": "en"}, {"id": "308", "text": "hello + world", "language": "en"}, {"id": "309", "text": "hello world", "language": + "en"}, {"id": "310", "text": "hello world", "language": "en"}, {"id": "311", + "text": "hello world", "language": "en"}, {"id": "312", "text": "hello world", + "language": "en"}, {"id": "313", "text": "hello world", "language": "en"}, {"id": + "314", "text": "hello world", "language": "en"}, {"id": "315", "text": "hello + world", "language": "en"}, {"id": "316", "text": "hello world", "language": + "en"}, {"id": "317", "text": "hello world", "language": "en"}, {"id": "318", + "text": "hello world", "language": "en"}, {"id": "319", "text": "hello world", + "language": "en"}, {"id": "320", "text": "hello world", "language": "en"}, {"id": + "321", "text": "hello world", "language": "en"}, {"id": "322", "text": "hello + world", "language": "en"}, {"id": "323", "text": "hello world", "language": + "en"}, {"id": "324", "text": "hello world", "language": "en"}, {"id": "325", + "text": "hello world", "language": "en"}, {"id": "326", "text": "hello world", + "language": "en"}, {"id": "327", "text": "hello world", "language": "en"}, {"id": + "328", "text": "hello world", "language": "en"}, {"id": "329", "text": "hello + world", "language": "en"}, {"id": "330", "text": "hello world", "language": + "en"}, {"id": "331", "text": "hello world", "language": "en"}, {"id": "332", + "text": "hello world", "language": "en"}, {"id": "333", "text": "hello world", + "language": "en"}, {"id": "334", "text": "hello world", "language": "en"}, {"id": + "335", "text": "hello world", "language": "en"}, {"id": "336", "text": "hello + world", "language": "en"}, {"id": "337", "text": "hello world", "language": + "en"}, {"id": "338", "text": "hello world", "language": "en"}, {"id": "339", + "text": "hello world", "language": "en"}, {"id": "340", "text": "hello world", + "language": "en"}, {"id": "341", "text": "hello world", "language": "en"}, {"id": + "342", "text": "hello world", "language": "en"}, {"id": "343", "text": "hello + world", "language": "en"}, {"id": "344", "text": "hello world", "language": + "en"}, {"id": "345", "text": "hello world", "language": "en"}, {"id": "346", + "text": "hello world", "language": "en"}, {"id": "347", "text": "hello world", + "language": "en"}, {"id": "348", "text": "hello world", "language": "en"}, {"id": + "349", "text": "hello world", "language": "en"}, {"id": "350", "text": "hello + world", "language": "en"}, {"id": "351", "text": "hello world", "language": + "en"}, {"id": "352", "text": "hello world", "language": "en"}, {"id": "353", + "text": "hello world", "language": "en"}, {"id": "354", "text": "hello world", + "language": "en"}, {"id": "355", "text": "hello world", "language": "en"}, {"id": + "356", "text": "hello world", "language": "en"}, {"id": "357", "text": "hello + world", "language": "en"}, {"id": "358", "text": "hello world", "language": + "en"}, {"id": "359", "text": "hello world", "language": "en"}, {"id": "360", + "text": "hello world", "language": "en"}, {"id": "361", "text": "hello world", + "language": "en"}, {"id": "362", "text": "hello world", "language": "en"}, {"id": + "363", "text": "hello world", "language": "en"}, {"id": "364", "text": "hello + world", "language": "en"}, {"id": "365", "text": "hello world", "language": + "en"}, {"id": "366", "text": "hello world", "language": "en"}, {"id": "367", + "text": "hello world", "language": "en"}, {"id": "368", "text": "hello world", + "language": "en"}, {"id": "369", "text": "hello world", "language": "en"}, {"id": + "370", "text": "hello world", "language": "en"}, {"id": "371", "text": "hello + world", "language": "en"}, {"id": "372", "text": "hello world", "language": + "en"}, {"id": "373", "text": "hello world", "language": "en"}, {"id": "374", + "text": "hello world", "language": "en"}, {"id": "375", "text": "hello world", + "language": "en"}, {"id": "376", "text": "hello world", "language": "en"}, {"id": + "377", "text": "hello world", "language": "en"}, {"id": "378", "text": "hello + world", "language": "en"}, {"id": "379", "text": "hello world", "language": + "en"}, {"id": "380", "text": "hello world", "language": "en"}, {"id": "381", + "text": "hello world", "language": "en"}, {"id": "382", "text": "hello world", + "language": "en"}, {"id": "383", "text": "hello world", "language": "en"}, {"id": + "384", "text": "hello world", "language": "en"}, {"id": "385", "text": "hello + world", "language": "en"}, {"id": "386", "text": "hello world", "language": + "en"}, {"id": "387", "text": "hello world", "language": "en"}, {"id": "388", + "text": "hello world", "language": "en"}, {"id": "389", "text": "hello world", + "language": "en"}, {"id": "390", "text": "hello world", "language": "en"}, {"id": + "391", "text": "hello world", "language": "en"}, {"id": "392", "text": "hello + world", "language": "en"}, {"id": "393", "text": "hello world", "language": + "en"}, {"id": "394", "text": "hello world", "language": "en"}, {"id": "395", + "text": "hello world", "language": "en"}, {"id": "396", "text": "hello world", + "language": "en"}, {"id": "397", "text": "hello world", "language": "en"}, {"id": + "398", "text": "hello world", "language": "en"}, {"id": "399", "text": "hello + world", "language": "en"}, {"id": "400", "text": "hello world", "language": + "en"}, {"id": "401", "text": "hello world", "language": "en"}, {"id": "402", + "text": "hello world", "language": "en"}, {"id": "403", "text": "hello world", + "language": "en"}, {"id": "404", "text": "hello world", "language": "en"}, {"id": + "405", "text": "hello world", "language": "en"}, {"id": "406", "text": "hello + world", "language": "en"}, {"id": "407", "text": "hello world", "language": + "en"}, {"id": "408", "text": "hello world", "language": "en"}, {"id": "409", + "text": "hello world", "language": "en"}, {"id": "410", "text": "hello world", + "language": "en"}, {"id": "411", "text": "hello world", "language": "en"}, {"id": + "412", "text": "hello world", "language": "en"}, {"id": "413", "text": "hello + world", "language": "en"}, {"id": "414", "text": "hello world", "language": + "en"}, {"id": "415", "text": "hello world", "language": "en"}, {"id": "416", + "text": "hello world", "language": "en"}, {"id": "417", "text": "hello world", + "language": "en"}, {"id": "418", "text": "hello world", "language": "en"}, {"id": + "419", "text": "hello world", "language": "en"}, {"id": "420", "text": "hello + world", "language": "en"}, {"id": "421", "text": "hello world", "language": + "en"}, {"id": "422", "text": "hello world", "language": "en"}, {"id": "423", + "text": "hello world", "language": "en"}, {"id": "424", "text": "hello world", + "language": "en"}, {"id": "425", "text": "hello world", "language": "en"}, {"id": + "426", "text": "hello world", "language": "en"}, {"id": "427", "text": "hello + world", "language": "en"}, {"id": "428", "text": "hello world", "language": + "en"}, {"id": "429", "text": "hello world", "language": "en"}, {"id": "430", + "text": "hello world", "language": "en"}, {"id": "431", "text": "hello world", + "language": "en"}, {"id": "432", "text": "hello world", "language": "en"}, {"id": + "433", "text": "hello world", "language": "en"}, {"id": "434", "text": "hello + world", "language": "en"}, {"id": "435", "text": "hello world", "language": + "en"}, {"id": "436", "text": "hello world", "language": "en"}, {"id": "437", + "text": "hello world", "language": "en"}, {"id": "438", "text": "hello world", + "language": "en"}, {"id": "439", "text": "hello world", "language": "en"}, {"id": + "440", "text": "hello world", "language": "en"}, {"id": "441", "text": "hello + world", "language": "en"}, {"id": "442", "text": "hello world", "language": + "en"}, {"id": "443", "text": "hello world", "language": "en"}, {"id": "444", + "text": "hello world", "language": "en"}, {"id": "445", "text": "hello world", + "language": "en"}, {"id": "446", "text": "hello world", "language": "en"}, {"id": + "447", "text": "hello world", "language": "en"}, {"id": "448", "text": "hello + world", "language": "en"}, {"id": "449", "text": "hello world", "language": + "en"}, {"id": "450", "text": "hello world", "language": "en"}, {"id": "451", + "text": "hello world", "language": "en"}, {"id": "452", "text": "hello world", + "language": "en"}, {"id": "453", "text": "hello world", "language": "en"}, {"id": + "454", "text": "hello world", "language": "en"}, {"id": "455", "text": "hello + world", "language": "en"}, {"id": "456", "text": "hello world", "language": + "en"}, {"id": "457", "text": "hello world", "language": "en"}, {"id": "458", + "text": "hello world", "language": "en"}, {"id": "459", "text": "hello world", + "language": "en"}, {"id": "460", "text": "hello world", "language": "en"}, {"id": + "461", "text": "hello world", "language": "en"}, {"id": "462", "text": "hello + world", "language": "en"}, {"id": "463", "text": "hello world", "language": + "en"}, {"id": "464", "text": "hello world", "language": "en"}, {"id": "465", + "text": "hello world", "language": "en"}, {"id": "466", "text": "hello world", + "language": "en"}, {"id": "467", "text": "hello world", "language": "en"}, {"id": + "468", "text": "hello world", "language": "en"}, {"id": "469", "text": "hello + world", "language": "en"}, {"id": "470", "text": "hello world", "language": + "en"}, {"id": "471", "text": "hello world", "language": "en"}, {"id": "472", + "text": "hello world", "language": "en"}, {"id": "473", "text": "hello world", + "language": "en"}, {"id": "474", "text": "hello world", "language": "en"}, {"id": + "475", "text": "hello world", "language": "en"}, {"id": "476", "text": "hello + world", "language": "en"}, {"id": "477", "text": "hello world", "language": + "en"}, {"id": "478", "text": "hello world", "language": "en"}, {"id": "479", + "text": "hello world", "language": "en"}, {"id": "480", "text": "hello world", + "language": "en"}, {"id": "481", "text": "hello world", "language": "en"}, {"id": + "482", "text": "hello world", "language": "en"}, {"id": "483", "text": "hello + world", "language": "en"}, {"id": "484", "text": "hello world", "language": + "en"}, {"id": "485", "text": "hello world", "language": "en"}, {"id": "486", + "text": "hello world", "language": "en"}, {"id": "487", "text": "hello world", + "language": "en"}, {"id": "488", "text": "hello world", "language": "en"}, {"id": + "489", "text": "hello world", "language": "en"}, {"id": "490", "text": "hello + world", "language": "en"}, {"id": "491", "text": "hello world", "language": + "en"}, {"id": "492", "text": "hello world", "language": "en"}, {"id": "493", + "text": "hello world", "language": "en"}, {"id": "494", "text": "hello world", + "language": "en"}, {"id": "495", "text": "hello world", "language": "en"}, {"id": + "496", "text": "hello world", "language": "en"}, {"id": "497", "text": "hello + world", "language": "en"}, {"id": "498", "text": "hello world", "language": + "en"}, {"id": "499", "text": "hello world", "language": "en"}, {"id": "500", + "text": "hello world", "language": "en"}, {"id": "501", "text": "hello world", + "language": "en"}, {"id": "502", "text": "hello world", "language": "en"}, {"id": + "503", "text": "hello world", "language": "en"}, {"id": "504", "text": "hello + world", "language": "en"}, {"id": "505", "text": "hello world", "language": + "en"}, {"id": "506", "text": "hello world", "language": "en"}, {"id": "507", + "text": "hello world", "language": "en"}, {"id": "508", "text": "hello world", + "language": "en"}, {"id": "509", "text": "hello world", "language": "en"}, {"id": + "510", "text": "hello world", "language": "en"}, {"id": "511", "text": "hello + world", "language": "en"}, {"id": "512", "text": "hello world", "language": + "en"}, {"id": "513", "text": "hello world", "language": "en"}, {"id": "514", + "text": "hello world", "language": "en"}, {"id": "515", "text": "hello world", + "language": "en"}, {"id": "516", "text": "hello world", "language": "en"}, {"id": + "517", "text": "hello world", "language": "en"}, {"id": "518", "text": "hello + world", "language": "en"}, {"id": "519", "text": "hello world", "language": + "en"}, {"id": "520", "text": "hello world", "language": "en"}, {"id": "521", + "text": "hello world", "language": "en"}, {"id": "522", "text": "hello world", + "language": "en"}, {"id": "523", "text": "hello world", "language": "en"}, {"id": + "524", "text": "hello world", "language": "en"}, {"id": "525", "text": "hello + world", "language": "en"}, {"id": "526", "text": "hello world", "language": + "en"}, {"id": "527", "text": "hello world", "language": "en"}, {"id": "528", + "text": "hello world", "language": "en"}, {"id": "529", "text": "hello world", + "language": "en"}, {"id": "530", "text": "hello world", "language": "en"}, {"id": + "531", "text": "hello world", "language": "en"}, {"id": "532", "text": "hello + world", "language": "en"}, {"id": "533", "text": "hello world", "language": + "en"}, {"id": "534", "text": "hello world", "language": "en"}, {"id": "535", + "text": "hello world", "language": "en"}, {"id": "536", "text": "hello world", + "language": "en"}, {"id": "537", "text": "hello world", "language": "en"}, {"id": + "538", "text": "hello world", "language": "en"}, {"id": "539", "text": "hello + world", "language": "en"}, {"id": "540", "text": "hello world", "language": + "en"}, {"id": "541", "text": "hello world", "language": "en"}, {"id": "542", + "text": "hello world", "language": "en"}, {"id": "543", "text": "hello world", + "language": "en"}, {"id": "544", "text": "hello world", "language": "en"}, {"id": + "545", "text": "hello world", "language": "en"}, {"id": "546", "text": "hello + world", "language": "en"}, {"id": "547", "text": "hello world", "language": + "en"}, {"id": "548", "text": "hello world", "language": "en"}, {"id": "549", + "text": "hello world", "language": "en"}, {"id": "550", "text": "hello world", + "language": "en"}, {"id": "551", "text": "hello world", "language": "en"}, {"id": + "552", "text": "hello world", "language": "en"}, {"id": "553", "text": "hello + world", "language": "en"}, {"id": "554", "text": "hello world", "language": + "en"}, {"id": "555", "text": "hello world", "language": "en"}, {"id": "556", + "text": "hello world", "language": "en"}, {"id": "557", "text": "hello world", + "language": "en"}, {"id": "558", "text": "hello world", "language": "en"}, {"id": + "559", "text": "hello world", "language": "en"}, {"id": "560", "text": "hello + world", "language": "en"}, {"id": "561", "text": "hello world", "language": + "en"}, {"id": "562", "text": "hello world", "language": "en"}, {"id": "563", + "text": "hello world", "language": "en"}, {"id": "564", "text": "hello world", + "language": "en"}, {"id": "565", "text": "hello world", "language": "en"}, {"id": + "566", "text": "hello world", "language": "en"}, {"id": "567", "text": "hello + world", "language": "en"}, {"id": "568", "text": "hello world", "language": + "en"}, {"id": "569", "text": "hello world", "language": "en"}, {"id": "570", + "text": "hello world", "language": "en"}, {"id": "571", "text": "hello world", + "language": "en"}, {"id": "572", "text": "hello world", "language": "en"}, {"id": + "573", "text": "hello world", "language": "en"}, {"id": "574", "text": "hello + world", "language": "en"}, {"id": "575", "text": "hello world", "language": + "en"}, {"id": "576", "text": "hello world", "language": "en"}, {"id": "577", + "text": "hello world", "language": "en"}, {"id": "578", "text": "hello world", + "language": "en"}, {"id": "579", "text": "hello world", "language": "en"}, {"id": + "580", "text": "hello world", "language": "en"}, {"id": "581", "text": "hello + world", "language": "en"}, {"id": "582", "text": "hello world", "language": + "en"}, {"id": "583", "text": "hello world", "language": "en"}, {"id": "584", + "text": "hello world", "language": "en"}, {"id": "585", "text": "hello world", + "language": "en"}, {"id": "586", "text": "hello world", "language": "en"}, {"id": + "587", "text": "hello world", "language": "en"}, {"id": "588", "text": "hello + world", "language": "en"}, {"id": "589", "text": "hello world", "language": + "en"}, {"id": "590", "text": "hello world", "language": "en"}, {"id": "591", + "text": "hello world", "language": "en"}, {"id": "592", "text": "hello world", + "language": "en"}, {"id": "593", "text": "hello world", "language": "en"}, {"id": + "594", "text": "hello world", "language": "en"}, {"id": "595", "text": "hello + world", "language": "en"}, {"id": "596", "text": "hello world", "language": + "en"}, {"id": "597", "text": "hello world", "language": "en"}, {"id": "598", + "text": "hello world", "language": "en"}, {"id": "599", "text": "hello world", + "language": "en"}, {"id": "600", "text": "hello world", "language": "en"}, {"id": + "601", "text": "hello world", "language": "en"}, {"id": "602", "text": "hello + world", "language": "en"}, {"id": "603", "text": "hello world", "language": + "en"}, {"id": "604", "text": "hello world", "language": "en"}, {"id": "605", + "text": "hello world", "language": "en"}, {"id": "606", "text": "hello world", + "language": "en"}, {"id": "607", "text": "hello world", "language": "en"}, {"id": + "608", "text": "hello world", "language": "en"}, {"id": "609", "text": "hello + world", "language": "en"}, {"id": "610", "text": "hello world", "language": + "en"}, {"id": "611", "text": "hello world", "language": "en"}, {"id": "612", + "text": "hello world", "language": "en"}, {"id": "613", "text": "hello world", + "language": "en"}, {"id": "614", "text": "hello world", "language": "en"}, {"id": + "615", "text": "hello world", "language": "en"}, {"id": "616", "text": "hello + world", "language": "en"}, {"id": "617", "text": "hello world", "language": + "en"}, {"id": "618", "text": "hello world", "language": "en"}, {"id": "619", + "text": "hello world", "language": "en"}, {"id": "620", "text": "hello world", + "language": "en"}, {"id": "621", "text": "hello world", "language": "en"}, {"id": + "622", "text": "hello world", "language": "en"}, {"id": "623", "text": "hello + world", "language": "en"}, {"id": "624", "text": "hello world", "language": + "en"}, {"id": "625", "text": "hello world", "language": "en"}, {"id": "626", + "text": "hello world", "language": "en"}, {"id": "627", "text": "hello world", + "language": "en"}, {"id": "628", "text": "hello world", "language": "en"}, {"id": + "629", "text": "hello world", "language": "en"}, {"id": "630", "text": "hello + world", "language": "en"}, {"id": "631", "text": "hello world", "language": + "en"}, {"id": "632", "text": "hello world", "language": "en"}, {"id": "633", + "text": "hello world", "language": "en"}, {"id": "634", "text": "hello world", + "language": "en"}, {"id": "635", "text": "hello world", "language": "en"}, {"id": + "636", "text": "hello world", "language": "en"}, {"id": "637", "text": "hello + world", "language": "en"}, {"id": "638", "text": "hello world", "language": + "en"}, {"id": "639", "text": "hello world", "language": "en"}, {"id": "640", + "text": "hello world", "language": "en"}, {"id": "641", "text": "hello world", + "language": "en"}, {"id": "642", "text": "hello world", "language": "en"}, {"id": + "643", "text": "hello world", "language": "en"}, {"id": "644", "text": "hello + world", "language": "en"}, {"id": "645", "text": "hello world", "language": + "en"}, {"id": "646", "text": "hello world", "language": "en"}, {"id": "647", + "text": "hello world", "language": "en"}, {"id": "648", "text": "hello world", + "language": "en"}, {"id": "649", "text": "hello world", "language": "en"}, {"id": + "650", "text": "hello world", "language": "en"}, {"id": "651", "text": "hello + world", "language": "en"}, {"id": "652", "text": "hello world", "language": + "en"}, {"id": "653", "text": "hello world", "language": "en"}, {"id": "654", + "text": "hello world", "language": "en"}, {"id": "655", "text": "hello world", + "language": "en"}, {"id": "656", "text": "hello world", "language": "en"}, {"id": + "657", "text": "hello world", "language": "en"}, {"id": "658", "text": "hello + world", "language": "en"}, {"id": "659", "text": "hello world", "language": + "en"}, {"id": "660", "text": "hello world", "language": "en"}, {"id": "661", + "text": "hello world", "language": "en"}, {"id": "662", "text": "hello world", + "language": "en"}, {"id": "663", "text": "hello world", "language": "en"}, {"id": + "664", "text": "hello world", "language": "en"}, {"id": "665", "text": "hello + world", "language": "en"}, {"id": "666", "text": "hello world", "language": + "en"}, {"id": "667", "text": "hello world", "language": "en"}, {"id": "668", + "text": "hello world", "language": "en"}, {"id": "669", "text": "hello world", + "language": "en"}, {"id": "670", "text": "hello world", "language": "en"}, {"id": + "671", "text": "hello world", "language": "en"}, {"id": "672", "text": "hello + world", "language": "en"}, {"id": "673", "text": "hello world", "language": + "en"}, {"id": "674", "text": "hello world", "language": "en"}, {"id": "675", + "text": "hello world", "language": "en"}, {"id": "676", "text": "hello world", + "language": "en"}, {"id": "677", "text": "hello world", "language": "en"}, {"id": + "678", "text": "hello world", "language": "en"}, {"id": "679", "text": "hello + world", "language": "en"}, {"id": "680", "text": "hello world", "language": + "en"}, {"id": "681", "text": "hello world", "language": "en"}, {"id": "682", + "text": "hello world", "language": "en"}, {"id": "683", "text": "hello world", + "language": "en"}, {"id": "684", "text": "hello world", "language": "en"}, {"id": + "685", "text": "hello world", "language": "en"}, {"id": "686", "text": "hello + world", "language": "en"}, {"id": "687", "text": "hello world", "language": + "en"}, {"id": "688", "text": "hello world", "language": "en"}, {"id": "689", + "text": "hello world", "language": "en"}, {"id": "690", "text": "hello world", + "language": "en"}, {"id": "691", "text": "hello world", "language": "en"}, {"id": + "692", "text": "hello world", "language": "en"}, {"id": "693", "text": "hello + world", "language": "en"}, {"id": "694", "text": "hello world", "language": + "en"}, {"id": "695", "text": "hello world", "language": "en"}, {"id": "696", + "text": "hello world", "language": "en"}, {"id": "697", "text": "hello world", + "language": "en"}, {"id": "698", "text": "hello world", "language": "en"}, {"id": + "699", "text": "hello world", "language": "en"}, {"id": "700", "text": "hello + world", "language": "en"}, {"id": "701", "text": "hello world", "language": + "en"}, {"id": "702", "text": "hello world", "language": "en"}, {"id": "703", + "text": "hello world", "language": "en"}, {"id": "704", "text": "hello world", + "language": "en"}, {"id": "705", "text": "hello world", "language": "en"}, {"id": + "706", "text": "hello world", "language": "en"}, {"id": "707", "text": "hello + world", "language": "en"}, {"id": "708", "text": "hello world", "language": + "en"}, {"id": "709", "text": "hello world", "language": "en"}, {"id": "710", + "text": "hello world", "language": "en"}, {"id": "711", "text": "hello world", + "language": "en"}, {"id": "712", "text": "hello world", "language": "en"}, {"id": + "713", "text": "hello world", "language": "en"}, {"id": "714", "text": "hello + world", "language": "en"}, {"id": "715", "text": "hello world", "language": + "en"}, {"id": "716", "text": "hello world", "language": "en"}, {"id": "717", + "text": "hello world", "language": "en"}, {"id": "718", "text": "hello world", + "language": "en"}, {"id": "719", "text": "hello world", "language": "en"}, {"id": + "720", "text": "hello world", "language": "en"}, {"id": "721", "text": "hello + world", "language": "en"}, {"id": "722", "text": "hello world", "language": + "en"}, {"id": "723", "text": "hello world", "language": "en"}, {"id": "724", + "text": "hello world", "language": "en"}, {"id": "725", "text": "hello world", + "language": "en"}, {"id": "726", "text": "hello world", "language": "en"}, {"id": + "727", "text": "hello world", "language": "en"}, {"id": "728", "text": "hello + world", "language": "en"}, {"id": "729", "text": "hello world", "language": + "en"}, {"id": "730", "text": "hello world", "language": "en"}, {"id": "731", + "text": "hello world", "language": "en"}, {"id": "732", "text": "hello world", + "language": "en"}, {"id": "733", "text": "hello world", "language": "en"}, {"id": + "734", "text": "hello world", "language": "en"}, {"id": "735", "text": "hello + world", "language": "en"}, {"id": "736", "text": "hello world", "language": + "en"}, {"id": "737", "text": "hello world", "language": "en"}, {"id": "738", + "text": "hello world", "language": "en"}, {"id": "739", "text": "hello world", + "language": "en"}, {"id": "740", "text": "hello world", "language": "en"}, {"id": + "741", "text": "hello world", "language": "en"}, {"id": "742", "text": "hello + world", "language": "en"}, {"id": "743", "text": "hello world", "language": + "en"}, {"id": "744", "text": "hello world", "language": "en"}, {"id": "745", + "text": "hello world", "language": "en"}, {"id": "746", "text": "hello world", + "language": "en"}, {"id": "747", "text": "hello world", "language": "en"}, {"id": + "748", "text": "hello world", "language": "en"}, {"id": "749", "text": "hello + world", "language": "en"}, {"id": "750", "text": "hello world", "language": + "en"}, {"id": "751", "text": "hello world", "language": "en"}, {"id": "752", + "text": "hello world", "language": "en"}, {"id": "753", "text": "hello world", + "language": "en"}, {"id": "754", "text": "hello world", "language": "en"}, {"id": + "755", "text": "hello world", "language": "en"}, {"id": "756", "text": "hello + world", "language": "en"}, {"id": "757", "text": "hello world", "language": + "en"}, {"id": "758", "text": "hello world", "language": "en"}, {"id": "759", + "text": "hello world", "language": "en"}, {"id": "760", "text": "hello world", + "language": "en"}, {"id": "761", "text": "hello world", "language": "en"}, {"id": + "762", "text": "hello world", "language": "en"}, {"id": "763", "text": "hello + world", "language": "en"}, {"id": "764", "text": "hello world", "language": + "en"}, {"id": "765", "text": "hello world", "language": "en"}, {"id": "766", + "text": "hello world", "language": "en"}, {"id": "767", "text": "hello world", + "language": "en"}, {"id": "768", "text": "hello world", "language": "en"}, {"id": + "769", "text": "hello world", "language": "en"}, {"id": "770", "text": "hello + world", "language": "en"}, {"id": "771", "text": "hello world", "language": + "en"}, {"id": "772", "text": "hello world", "language": "en"}, {"id": "773", + "text": "hello world", "language": "en"}, {"id": "774", "text": "hello world", + "language": "en"}, {"id": "775", "text": "hello world", "language": "en"}, {"id": + "776", "text": "hello world", "language": "en"}, {"id": "777", "text": "hello + world", "language": "en"}, {"id": "778", "text": "hello world", "language": + "en"}, {"id": "779", "text": "hello world", "language": "en"}, {"id": "780", + "text": "hello world", "language": "en"}, {"id": "781", "text": "hello world", + "language": "en"}, {"id": "782", "text": "hello world", "language": "en"}, {"id": + "783", "text": "hello world", "language": "en"}, {"id": "784", "text": "hello + world", "language": "en"}, {"id": "785", "text": "hello world", "language": + "en"}, {"id": "786", "text": "hello world", "language": "en"}, {"id": "787", + "text": "hello world", "language": "en"}, {"id": "788", "text": "hello world", + "language": "en"}, {"id": "789", "text": "hello world", "language": "en"}, {"id": + "790", "text": "hello world", "language": "en"}, {"id": "791", "text": "hello + world", "language": "en"}, {"id": "792", "text": "hello world", "language": + "en"}, {"id": "793", "text": "hello world", "language": "en"}, {"id": "794", + "text": "hello world", "language": "en"}, {"id": "795", "text": "hello world", + "language": "en"}, {"id": "796", "text": "hello world", "language": "en"}, {"id": + "797", "text": "hello world", "language": "en"}, {"id": "798", "text": "hello + world", "language": "en"}, {"id": "799", "text": "hello world", "language": + "en"}, {"id": "800", "text": "hello world", "language": "en"}, {"id": "801", + "text": "hello world", "language": "en"}, {"id": "802", "text": "hello world", + "language": "en"}, {"id": "803", "text": "hello world", "language": "en"}, {"id": + "804", "text": "hello world", "language": "en"}, {"id": "805", "text": "hello + world", "language": "en"}, {"id": "806", "text": "hello world", "language": + "en"}, {"id": "807", "text": "hello world", "language": "en"}, {"id": "808", + "text": "hello world", "language": "en"}, {"id": "809", "text": "hello world", + "language": "en"}, {"id": "810", "text": "hello world", "language": "en"}, {"id": + "811", "text": "hello world", "language": "en"}, {"id": "812", "text": "hello + world", "language": "en"}, {"id": "813", "text": "hello world", "language": + "en"}, {"id": "814", "text": "hello world", "language": "en"}, {"id": "815", + "text": "hello world", "language": "en"}, {"id": "816", "text": "hello world", + "language": "en"}, {"id": "817", "text": "hello world", "language": "en"}, {"id": + "818", "text": "hello world", "language": "en"}, {"id": "819", "text": "hello + world", "language": "en"}, {"id": "820", "text": "hello world", "language": + "en"}, {"id": "821", "text": "hello world", "language": "en"}, {"id": "822", + "text": "hello world", "language": "en"}, {"id": "823", "text": "hello world", + "language": "en"}, {"id": "824", "text": "hello world", "language": "en"}, {"id": + "825", "text": "hello world", "language": "en"}, {"id": "826", "text": "hello + world", "language": "en"}, {"id": "827", "text": "hello world", "language": + "en"}, {"id": "828", "text": "hello world", "language": "en"}, {"id": "829", + "text": "hello world", "language": "en"}, {"id": "830", "text": "hello world", + "language": "en"}, {"id": "831", "text": "hello world", "language": "en"}, {"id": + "832", "text": "hello world", "language": "en"}, {"id": "833", "text": "hello + world", "language": "en"}, {"id": "834", "text": "hello world", "language": + "en"}, {"id": "835", "text": "hello world", "language": "en"}, {"id": "836", + "text": "hello world", "language": "en"}, {"id": "837", "text": "hello world", + "language": "en"}, {"id": "838", "text": "hello world", "language": "en"}, {"id": + "839", "text": "hello world", "language": "en"}, {"id": "840", "text": "hello + world", "language": "en"}, {"id": "841", "text": "hello world", "language": + "en"}, {"id": "842", "text": "hello world", "language": "en"}, {"id": "843", + "text": "hello world", "language": "en"}, {"id": "844", "text": "hello world", + "language": "en"}, {"id": "845", "text": "hello world", "language": "en"}, {"id": + "846", "text": "hello world", "language": "en"}, {"id": "847", "text": "hello + world", "language": "en"}, {"id": "848", "text": "hello world", "language": + "en"}, {"id": "849", "text": "hello world", "language": "en"}, {"id": "850", + "text": "hello world", "language": "en"}, {"id": "851", "text": "hello world", + "language": "en"}, {"id": "852", "text": "hello world", "language": "en"}, {"id": + "853", "text": "hello world", "language": "en"}, {"id": "854", "text": "hello + world", "language": "en"}, {"id": "855", "text": "hello world", "language": + "en"}, {"id": "856", "text": "hello world", "language": "en"}, {"id": "857", + "text": "hello world", "language": "en"}, {"id": "858", "text": "hello world", + "language": "en"}, {"id": "859", "text": "hello world", "language": "en"}, {"id": + "860", "text": "hello world", "language": "en"}, {"id": "861", "text": "hello + world", "language": "en"}, {"id": "862", "text": "hello world", "language": + "en"}, {"id": "863", "text": "hello world", "language": "en"}, {"id": "864", + "text": "hello world", "language": "en"}, {"id": "865", "text": "hello world", + "language": "en"}, {"id": "866", "text": "hello world", "language": "en"}, {"id": + "867", "text": "hello world", "language": "en"}, {"id": "868", "text": "hello + world", "language": "en"}, {"id": "869", "text": "hello world", "language": + "en"}, {"id": "870", "text": "hello world", "language": "en"}, {"id": "871", + "text": "hello world", "language": "en"}, {"id": "872", "text": "hello world", + "language": "en"}, {"id": "873", "text": "hello world", "language": "en"}, {"id": + "874", "text": "hello world", "language": "en"}, {"id": "875", "text": "hello + world", "language": "en"}, {"id": "876", "text": "hello world", "language": + "en"}, {"id": "877", "text": "hello world", "language": "en"}, {"id": "878", + "text": "hello world", "language": "en"}, {"id": "879", "text": "hello world", + "language": "en"}, {"id": "880", "text": "hello world", "language": "en"}, {"id": + "881", "text": "hello world", "language": "en"}, {"id": "882", "text": "hello + world", "language": "en"}, {"id": "883", "text": "hello world", "language": + "en"}, {"id": "884", "text": "hello world", "language": "en"}, {"id": "885", + "text": "hello world", "language": "en"}, {"id": "886", "text": "hello world", + "language": "en"}, {"id": "887", "text": "hello world", "language": "en"}, {"id": + "888", "text": "hello world", "language": "en"}, {"id": "889", "text": "hello + world", "language": "en"}, {"id": "890", "text": "hello world", "language": + "en"}, {"id": "891", "text": "hello world", "language": "en"}, {"id": "892", + "text": "hello world", "language": "en"}, {"id": "893", "text": "hello world", + "language": "en"}, {"id": "894", "text": "hello world", "language": "en"}, {"id": + "895", "text": "hello world", "language": "en"}, {"id": "896", "text": "hello + world", "language": "en"}, {"id": "897", "text": "hello world", "language": + "en"}, {"id": "898", "text": "hello world", "language": "en"}, {"id": "899", + "text": "hello world", "language": "en"}, {"id": "900", "text": "hello world", + "language": "en"}, {"id": "901", "text": "hello world", "language": "en"}, {"id": + "902", "text": "hello world", "language": "en"}, {"id": "903", "text": "hello + world", "language": "en"}, {"id": "904", "text": "hello world", "language": + "en"}, {"id": "905", "text": "hello world", "language": "en"}, {"id": "906", + "text": "hello world", "language": "en"}, {"id": "907", "text": "hello world", + "language": "en"}, {"id": "908", "text": "hello world", "language": "en"}, {"id": + "909", "text": "hello world", "language": "en"}, {"id": "910", "text": "hello + world", "language": "en"}, {"id": "911", "text": "hello world", "language": + "en"}, {"id": "912", "text": "hello world", "language": "en"}, {"id": "913", + "text": "hello world", "language": "en"}, {"id": "914", "text": "hello world", + "language": "en"}, {"id": "915", "text": "hello world", "language": "en"}, {"id": + "916", "text": "hello world", "language": "en"}, {"id": "917", "text": "hello + world", "language": "en"}, {"id": "918", "text": "hello world", "language": + "en"}, {"id": "919", "text": "hello world", "language": "en"}, {"id": "920", + "text": "hello world", "language": "en"}, {"id": "921", "text": "hello world", + "language": "en"}, {"id": "922", "text": "hello world", "language": "en"}, {"id": + "923", "text": "hello world", "language": "en"}, {"id": "924", "text": "hello + world", "language": "en"}, {"id": "925", "text": "hello world", "language": + "en"}, {"id": "926", "text": "hello world", "language": "en"}, {"id": "927", + "text": "hello world", "language": "en"}, {"id": "928", "text": "hello world", + "language": "en"}, {"id": "929", "text": "hello world", "language": "en"}, {"id": + "930", "text": "hello world", "language": "en"}, {"id": "931", "text": "hello + world", "language": "en"}, {"id": "932", "text": "hello world", "language": + "en"}, {"id": "933", "text": "hello world", "language": "en"}, {"id": "934", + "text": "hello world", "language": "en"}, {"id": "935", "text": "hello world", + "language": "en"}, {"id": "936", "text": "hello world", "language": "en"}, {"id": + "937", "text": "hello world", "language": "en"}, {"id": "938", "text": "hello + world", "language": "en"}, {"id": "939", "text": "hello world", "language": + "en"}, {"id": "940", "text": "hello world", "language": "en"}, {"id": "941", + "text": "hello world", "language": "en"}, {"id": "942", "text": "hello world", + "language": "en"}, {"id": "943", "text": "hello world", "language": "en"}, {"id": + "944", "text": "hello world", "language": "en"}, {"id": "945", "text": "hello + world", "language": "en"}, {"id": "946", "text": "hello world", "language": + "en"}, {"id": "947", "text": "hello world", "language": "en"}, {"id": "948", + "text": "hello world", "language": "en"}, {"id": "949", "text": "hello world", + "language": "en"}, {"id": "950", "text": "hello world", "language": "en"}, {"id": + "951", "text": "hello world", "language": "en"}, {"id": "952", "text": "hello + world", "language": "en"}, {"id": "953", "text": "hello world", "language": + "en"}, {"id": "954", "text": "hello world", "language": "en"}, {"id": "955", + "text": "hello world", "language": "en"}, {"id": "956", "text": "hello world", + "language": "en"}, {"id": "957", "text": "hello world", "language": "en"}, {"id": + "958", "text": "hello world", "language": "en"}, {"id": "959", "text": "hello + world", "language": "en"}, {"id": "960", "text": "hello world", "language": + "en"}, {"id": "961", "text": "hello world", "language": "en"}, {"id": "962", + "text": "hello world", "language": "en"}, {"id": "963", "text": "hello world", + "language": "en"}, {"id": "964", "text": "hello world", "language": "en"}, {"id": + "965", "text": "hello world", "language": "en"}, {"id": "966", "text": "hello + world", "language": "en"}, {"id": "967", "text": "hello world", "language": + "en"}, {"id": "968", "text": "hello world", "language": "en"}, {"id": "969", + "text": "hello world", "language": "en"}, {"id": "970", "text": "hello world", + "language": "en"}, {"id": "971", "text": "hello world", "language": "en"}, {"id": + "972", "text": "hello world", "language": "en"}, {"id": "973", "text": "hello + world", "language": "en"}, {"id": "974", "text": "hello world", "language": + "en"}, {"id": "975", "text": "hello world", "language": "en"}, {"id": "976", + "text": "hello world", "language": "en"}, {"id": "977", "text": "hello world", + "language": "en"}, {"id": "978", "text": "hello world", "language": "en"}, {"id": + "979", "text": "hello world", "language": "en"}, {"id": "980", "text": "hello + world", "language": "en"}, {"id": "981", "text": "hello world", "language": + "en"}, {"id": "982", "text": "hello world", "language": "en"}, {"id": "983", + "text": "hello world", "language": "en"}, {"id": "984", "text": "hello world", + "language": "en"}, {"id": "985", "text": "hello world", "language": "en"}, {"id": + "986", "text": "hello world", "language": "en"}, {"id": "987", "text": "hello + world", "language": "en"}, {"id": "988", "text": "hello world", "language": + "en"}, {"id": "989", "text": "hello world", "language": "en"}, {"id": "990", + "text": "hello world", "language": "en"}, {"id": "991", "text": "hello world", + "language": "en"}, {"id": "992", "text": "hello world", "language": "en"}, {"id": + "993", "text": "hello world", "language": "en"}, {"id": "994", "text": "hello + world", "language": "en"}, {"id": "995", "text": "hello world", "language": + "en"}, {"id": "996", "text": "hello world", "language": "en"}, {"id": "997", + "text": "hello world", "language": "en"}, {"id": "998", "text": "hello world", + "language": "en"}, {"id": "999", "text": "hello world", "language": "en"}, {"id": + "1000", "text": "hello world", "language": "en"}, {"id": "1001", "text": "hello + world", "language": "en"}, {"id": "1002", "text": "hello world", "language": + "en"}, {"id": "1003", "text": "hello world", "language": "en"}, {"id": "1004", + "text": "hello world", "language": "en"}, {"id": "1005", "text": "hello world", + "language": "en"}, {"id": "1006", "text": "hello world", "language": "en"}, + {"id": "1007", "text": "hello world", "language": "en"}, {"id": "1008", "text": + "hello world", "language": "en"}, {"id": "1009", "text": "hello world", "language": + "en"}, {"id": "1010", "text": "hello world", "language": "en"}, {"id": "1011", + "text": "hello world", "language": "en"}, {"id": "1012", "text": "hello world", + "language": "en"}, {"id": "1013", "text": "hello world", "language": "en"}, + {"id": "1014", "text": "hello world", "language": "en"}, {"id": "1015", "text": + "hello world", "language": "en"}, {"id": "1016", "text": "hello world", "language": + "en"}, {"id": "1017", "text": "hello world", "language": "en"}, {"id": "1018", + "text": "hello world", "language": "en"}, {"id": "1019", "text": "hello world", + "language": "en"}, {"id": "1020", "text": "hello world", "language": "en"}, + {"id": "1021", "text": "hello world", "language": "en"}, {"id": "1022", "text": + "hello world", "language": "en"}, {"id": "1023", "text": "hello world", "language": + "en"}, {"id": "1024", "text": "hello world", "language": "en"}, {"id": "1025", + "text": "hello world", "language": "en"}, {"id": "1026", "text": "hello world", + "language": "en"}, {"id": "1027", "text": "hello world", "language": "en"}, + {"id": "1028", "text": "hello world", "language": "en"}, {"id": "1029", "text": + "hello world", "language": "en"}, {"id": "1030", "text": "hello world", "language": + "en"}, {"id": "1031", "text": "hello world", "language": "en"}, {"id": "1032", + "text": "hello world", "language": "en"}, {"id": "1033", "text": "hello world", + "language": "en"}, {"id": "1034", "text": "hello world", "language": "en"}, + {"id": "1035", "text": "hello world", "language": "en"}, {"id": "1036", "text": + "hello world", "language": "en"}, {"id": "1037", "text": "hello world", "language": + "en"}, {"id": "1038", "text": "hello world", "language": "en"}, {"id": "1039", + "text": "hello world", "language": "en"}, {"id": "1040", "text": "hello world", + "language": "en"}, {"id": "1041", "text": "hello world", "language": "en"}, + {"id": "1042", "text": "hello world", "language": "en"}, {"id": "1043", "text": + "hello world", "language": "en"}, {"id": "1044", "text": "hello world", "language": + "en"}, {"id": "1045", "text": "hello world", "language": "en"}, {"id": "1046", + "text": "hello world", "language": "en"}, {"id": "1047", "text": "hello world", + "language": "en"}, {"id": "1048", "text": "hello world", "language": "en"}, + {"id": "1049", "text": "hello world", "language": "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '58755' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch + request contains too many records. Max 1000 records are permitted."}}}' + headers: + apim-request-id: 7d742832-ce7f-4a92-8768-8e137aa7b1b0 + content-type: application/json; charset=utf-8 + date: Wed, 22 Jul 2020 17:57:57 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '11' + status: + code: 400 + message: Bad Request + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit_error.yaml new file mode 100644 index 000000000000..2f1d637f20e2 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit_error.yaml @@ -0,0 +1,741 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "hello world", "language": "en"}, {"id": + "1", "text": "hello world", "language": "en"}, {"id": "2", "text": "hello world", + "language": "en"}, {"id": "3", "text": "hello world", "language": "en"}, {"id": + "4", "text": "hello world", "language": "en"}, {"id": "5", "text": "hello world", + "language": "en"}, {"id": "6", "text": "hello world", "language": "en"}, {"id": + "7", "text": "hello world", "language": "en"}, {"id": "8", "text": "hello world", + "language": "en"}, {"id": "9", "text": "hello world", "language": "en"}, {"id": + "10", "text": "hello world", "language": "en"}, {"id": "11", "text": "hello + world", "language": "en"}, {"id": "12", "text": "hello world", "language": "en"}, + {"id": "13", "text": "hello world", "language": "en"}, {"id": "14", "text": + "hello world", "language": "en"}, {"id": "15", "text": "hello world", "language": + "en"}, {"id": "16", "text": "hello world", "language": "en"}, {"id": "17", "text": + "hello world", "language": "en"}, {"id": "18", "text": "hello world", "language": + "en"}, {"id": "19", "text": "hello world", "language": "en"}, {"id": "20", "text": + "hello world", "language": "en"}, {"id": "21", "text": "hello world", "language": + "en"}, {"id": "22", "text": "hello world", "language": "en"}, {"id": "23", "text": + "hello world", "language": "en"}, {"id": "24", "text": "hello world", "language": + "en"}, {"id": "25", "text": "hello world", "language": "en"}, {"id": "26", "text": + "hello world", "language": "en"}, {"id": "27", "text": "hello world", "language": + "en"}, {"id": "28", "text": "hello world", "language": "en"}, {"id": "29", "text": + "hello world", "language": "en"}, {"id": "30", "text": "hello world", "language": + "en"}, {"id": "31", "text": "hello world", "language": "en"}, {"id": "32", "text": + "hello world", "language": "en"}, {"id": "33", "text": "hello world", "language": + "en"}, {"id": "34", "text": "hello world", "language": "en"}, {"id": "35", "text": + "hello world", "language": "en"}, {"id": "36", "text": "hello world", "language": + "en"}, {"id": "37", "text": "hello world", "language": "en"}, {"id": "38", "text": + "hello world", "language": "en"}, {"id": "39", "text": "hello world", "language": + "en"}, {"id": "40", "text": "hello world", "language": "en"}, {"id": "41", "text": + "hello world", "language": "en"}, {"id": "42", "text": "hello world", "language": + "en"}, {"id": "43", "text": "hello world", "language": "en"}, {"id": "44", "text": + "hello world", "language": "en"}, {"id": "45", "text": "hello world", "language": + "en"}, {"id": "46", "text": "hello world", "language": "en"}, {"id": "47", "text": + "hello world", "language": "en"}, {"id": "48", "text": "hello world", "language": + "en"}, {"id": "49", "text": "hello world", "language": "en"}, {"id": "50", "text": + "hello world", "language": "en"}, {"id": "51", "text": "hello world", "language": + "en"}, {"id": "52", "text": "hello world", "language": "en"}, {"id": "53", "text": + "hello world", "language": "en"}, {"id": "54", "text": "hello world", "language": + "en"}, {"id": "55", "text": "hello world", "language": "en"}, {"id": "56", "text": + "hello world", "language": "en"}, {"id": "57", "text": "hello world", "language": + "en"}, {"id": "58", "text": "hello world", "language": "en"}, {"id": "59", "text": + "hello world", "language": "en"}, {"id": "60", "text": "hello world", "language": + "en"}, {"id": "61", "text": "hello world", "language": "en"}, {"id": "62", "text": + "hello world", "language": "en"}, {"id": "63", "text": "hello world", "language": + "en"}, {"id": "64", "text": "hello world", "language": "en"}, {"id": "65", "text": + "hello world", "language": "en"}, {"id": "66", "text": "hello world", "language": + "en"}, {"id": "67", "text": "hello world", "language": "en"}, {"id": "68", "text": + "hello world", "language": "en"}, {"id": "69", "text": "hello world", "language": + "en"}, {"id": "70", "text": "hello world", "language": "en"}, {"id": "71", "text": + "hello world", "language": "en"}, {"id": "72", "text": "hello world", "language": + "en"}, {"id": "73", "text": "hello world", "language": "en"}, {"id": "74", "text": + "hello world", "language": "en"}, {"id": "75", "text": "hello world", "language": + "en"}, {"id": "76", "text": "hello world", "language": "en"}, {"id": "77", "text": + "hello world", "language": "en"}, {"id": "78", "text": "hello world", "language": + "en"}, {"id": "79", "text": "hello world", "language": "en"}, {"id": "80", "text": + "hello world", "language": "en"}, {"id": "81", "text": "hello world", "language": + "en"}, {"id": "82", "text": "hello world", "language": "en"}, {"id": "83", "text": + "hello world", "language": "en"}, {"id": "84", "text": "hello world", "language": + "en"}, {"id": "85", "text": "hello world", "language": "en"}, {"id": "86", "text": + "hello world", "language": "en"}, {"id": "87", "text": "hello world", "language": + "en"}, {"id": "88", "text": "hello world", "language": "en"}, {"id": "89", "text": + "hello world", "language": "en"}, {"id": "90", "text": "hello world", "language": + "en"}, {"id": "91", "text": "hello world", "language": "en"}, {"id": "92", "text": + "hello world", "language": "en"}, {"id": "93", "text": "hello world", "language": + "en"}, {"id": "94", "text": "hello world", "language": "en"}, {"id": "95", "text": + "hello world", "language": "en"}, {"id": "96", "text": "hello world", "language": + "en"}, {"id": "97", "text": "hello world", "language": "en"}, {"id": "98", "text": + "hello world", "language": "en"}, {"id": "99", "text": "hello world", "language": + "en"}, {"id": "100", "text": "hello world", "language": "en"}, {"id": "101", + "text": "hello world", "language": "en"}, {"id": "102", "text": "hello world", + "language": "en"}, {"id": "103", "text": "hello world", "language": "en"}, {"id": + "104", "text": "hello world", "language": "en"}, {"id": "105", "text": "hello + world", "language": "en"}, {"id": "106", "text": "hello world", "language": + "en"}, {"id": "107", "text": "hello world", "language": "en"}, {"id": "108", + "text": "hello world", "language": "en"}, {"id": "109", "text": "hello world", + "language": "en"}, {"id": "110", "text": "hello world", "language": "en"}, {"id": + "111", "text": "hello world", "language": "en"}, {"id": "112", "text": "hello + world", "language": "en"}, {"id": "113", "text": "hello world", "language": + "en"}, {"id": "114", "text": "hello world", "language": "en"}, {"id": "115", + "text": "hello world", "language": "en"}, {"id": "116", "text": "hello world", + "language": "en"}, {"id": "117", "text": "hello world", "language": "en"}, {"id": + "118", "text": "hello world", "language": "en"}, {"id": "119", "text": "hello + world", "language": "en"}, {"id": "120", "text": "hello world", "language": + "en"}, {"id": "121", "text": "hello world", "language": "en"}, {"id": "122", + "text": "hello world", "language": "en"}, {"id": "123", "text": "hello world", + "language": "en"}, {"id": "124", "text": "hello world", "language": "en"}, {"id": + "125", "text": "hello world", "language": "en"}, {"id": "126", "text": "hello + world", "language": "en"}, {"id": "127", "text": "hello world", "language": + "en"}, {"id": "128", "text": "hello world", "language": "en"}, {"id": "129", + "text": "hello world", "language": "en"}, {"id": "130", "text": "hello world", + "language": "en"}, {"id": "131", "text": "hello world", "language": "en"}, {"id": + "132", "text": "hello world", "language": "en"}, {"id": "133", "text": "hello + world", "language": "en"}, {"id": "134", "text": "hello world", "language": + "en"}, {"id": "135", "text": "hello world", "language": "en"}, {"id": "136", + "text": "hello world", "language": "en"}, {"id": "137", "text": "hello world", + "language": "en"}, {"id": "138", "text": "hello world", "language": "en"}, {"id": + "139", "text": "hello world", "language": "en"}, {"id": "140", "text": "hello + world", "language": "en"}, {"id": "141", "text": "hello world", "language": + "en"}, {"id": "142", "text": "hello world", "language": "en"}, {"id": "143", + "text": "hello world", "language": "en"}, {"id": "144", "text": "hello world", + "language": "en"}, {"id": "145", "text": "hello world", "language": "en"}, {"id": + "146", "text": "hello world", "language": "en"}, {"id": "147", "text": "hello + world", "language": "en"}, {"id": "148", "text": "hello world", "language": + "en"}, {"id": "149", "text": "hello world", "language": "en"}, {"id": "150", + "text": "hello world", "language": "en"}, {"id": "151", "text": "hello world", + "language": "en"}, {"id": "152", "text": "hello world", "language": "en"}, {"id": + "153", "text": "hello world", "language": "en"}, {"id": "154", "text": "hello + world", "language": "en"}, {"id": "155", "text": "hello world", "language": + "en"}, {"id": "156", "text": "hello world", "language": "en"}, {"id": "157", + "text": "hello world", "language": "en"}, {"id": "158", "text": "hello world", + "language": "en"}, {"id": "159", "text": "hello world", "language": "en"}, {"id": + "160", "text": "hello world", "language": "en"}, {"id": "161", "text": "hello + world", "language": "en"}, {"id": "162", "text": "hello world", "language": + "en"}, {"id": "163", "text": "hello world", "language": "en"}, {"id": "164", + "text": "hello world", "language": "en"}, {"id": "165", "text": "hello world", + "language": "en"}, {"id": "166", "text": "hello world", "language": "en"}, {"id": + "167", "text": "hello world", "language": "en"}, {"id": "168", "text": "hello + world", "language": "en"}, {"id": "169", "text": "hello world", "language": + "en"}, {"id": "170", "text": "hello world", "language": "en"}, {"id": "171", + "text": "hello world", "language": "en"}, {"id": "172", "text": "hello world", + "language": "en"}, {"id": "173", "text": "hello world", "language": "en"}, {"id": + "174", "text": "hello world", "language": "en"}, {"id": "175", "text": "hello + world", "language": "en"}, {"id": "176", "text": "hello world", "language": + "en"}, {"id": "177", "text": "hello world", "language": "en"}, {"id": "178", + "text": "hello world", "language": "en"}, {"id": "179", "text": "hello world", + "language": "en"}, {"id": "180", "text": "hello world", "language": "en"}, {"id": + "181", "text": "hello world", "language": "en"}, {"id": "182", "text": "hello + world", "language": "en"}, {"id": "183", "text": "hello world", "language": + "en"}, {"id": "184", "text": "hello world", "language": "en"}, {"id": "185", + "text": "hello world", "language": "en"}, {"id": "186", "text": "hello world", + "language": "en"}, {"id": "187", "text": "hello world", "language": "en"}, {"id": + "188", "text": "hello world", "language": "en"}, {"id": "189", "text": "hello + world", "language": "en"}, {"id": "190", "text": "hello world", "language": + "en"}, {"id": "191", "text": "hello world", "language": "en"}, {"id": "192", + "text": "hello world", "language": "en"}, {"id": "193", "text": "hello world", + "language": "en"}, {"id": "194", "text": "hello world", "language": "en"}, {"id": + "195", "text": "hello world", "language": "en"}, {"id": "196", "text": "hello + world", "language": "en"}, {"id": "197", "text": "hello world", "language": + "en"}, {"id": "198", "text": "hello world", "language": "en"}, {"id": "199", + "text": "hello world", "language": "en"}, {"id": "200", "text": "hello world", + "language": "en"}, {"id": "201", "text": "hello world", "language": "en"}, {"id": + "202", "text": "hello world", "language": "en"}, {"id": "203", "text": "hello + world", "language": "en"}, {"id": "204", "text": "hello world", "language": + "en"}, {"id": "205", "text": "hello world", "language": "en"}, {"id": "206", + "text": "hello world", "language": "en"}, {"id": "207", "text": "hello world", + "language": "en"}, {"id": "208", "text": "hello world", "language": "en"}, {"id": + "209", "text": "hello world", "language": "en"}, {"id": "210", "text": "hello + world", "language": "en"}, {"id": "211", "text": "hello world", "language": + "en"}, {"id": "212", "text": "hello world", "language": "en"}, {"id": "213", + "text": "hello world", "language": "en"}, {"id": "214", "text": "hello world", + "language": "en"}, {"id": "215", "text": "hello world", "language": "en"}, {"id": + "216", "text": "hello world", "language": "en"}, {"id": "217", "text": "hello + world", "language": "en"}, {"id": "218", "text": "hello world", "language": + "en"}, {"id": "219", "text": "hello world", "language": "en"}, {"id": "220", + "text": "hello world", "language": "en"}, {"id": "221", "text": "hello world", + "language": "en"}, {"id": "222", "text": "hello world", "language": "en"}, {"id": + "223", "text": "hello world", "language": "en"}, {"id": "224", "text": "hello + world", "language": "en"}, {"id": "225", "text": "hello world", "language": + "en"}, {"id": "226", "text": "hello world", "language": "en"}, {"id": "227", + "text": "hello world", "language": "en"}, {"id": "228", "text": "hello world", + "language": "en"}, {"id": "229", "text": "hello world", "language": "en"}, {"id": + "230", "text": "hello world", "language": "en"}, {"id": "231", "text": "hello + world", "language": "en"}, {"id": "232", "text": "hello world", "language": + "en"}, {"id": "233", "text": "hello world", "language": "en"}, {"id": "234", + "text": "hello world", "language": "en"}, {"id": "235", "text": "hello world", + "language": "en"}, {"id": "236", "text": "hello world", "language": "en"}, {"id": + "237", "text": "hello world", "language": "en"}, {"id": "238", "text": "hello + world", "language": "en"}, {"id": "239", "text": "hello world", "language": + "en"}, {"id": "240", "text": "hello world", "language": "en"}, {"id": "241", + "text": "hello world", "language": "en"}, {"id": "242", "text": "hello world", + "language": "en"}, {"id": "243", "text": "hello world", "language": "en"}, {"id": + "244", "text": "hello world", "language": "en"}, {"id": "245", "text": "hello + world", "language": "en"}, {"id": "246", "text": "hello world", "language": + "en"}, {"id": "247", "text": "hello world", "language": "en"}, {"id": "248", + "text": "hello world", "language": "en"}, {"id": "249", "text": "hello world", + "language": "en"}, {"id": "250", "text": "hello world", "language": "en"}, {"id": + "251", "text": "hello world", "language": "en"}, {"id": "252", "text": "hello + world", "language": "en"}, {"id": "253", "text": "hello world", "language": + "en"}, {"id": "254", "text": "hello world", "language": "en"}, {"id": "255", + "text": "hello world", "language": "en"}, {"id": "256", "text": "hello world", + "language": "en"}, {"id": "257", "text": "hello world", "language": "en"}, {"id": + "258", "text": "hello world", "language": "en"}, {"id": "259", "text": "hello + world", "language": "en"}, {"id": "260", "text": "hello world", "language": + "en"}, {"id": "261", "text": "hello world", "language": "en"}, {"id": "262", + "text": "hello world", "language": "en"}, {"id": "263", "text": "hello world", + "language": "en"}, {"id": "264", "text": "hello world", "language": "en"}, {"id": + "265", "text": "hello world", "language": "en"}, {"id": "266", "text": "hello + world", "language": "en"}, {"id": "267", "text": "hello world", "language": + "en"}, {"id": "268", "text": "hello world", "language": "en"}, {"id": "269", + "text": "hello world", "language": "en"}, {"id": "270", "text": "hello world", + "language": "en"}, {"id": "271", "text": "hello world", "language": "en"}, {"id": + "272", "text": "hello world", "language": "en"}, {"id": "273", "text": "hello + world", "language": "en"}, {"id": "274", "text": "hello world", "language": + "en"}, {"id": "275", "text": "hello world", "language": "en"}, {"id": "276", + "text": "hello world", "language": "en"}, {"id": "277", "text": "hello world", + "language": "en"}, {"id": "278", "text": "hello world", "language": "en"}, {"id": + "279", "text": "hello world", "language": "en"}, {"id": "280", "text": "hello + world", "language": "en"}, {"id": "281", "text": "hello world", "language": + "en"}, {"id": "282", "text": "hello world", "language": "en"}, {"id": "283", + "text": "hello world", "language": "en"}, {"id": "284", "text": "hello world", + "language": "en"}, {"id": "285", "text": "hello world", "language": "en"}, {"id": + "286", "text": "hello world", "language": "en"}, {"id": "287", "text": "hello + world", "language": "en"}, {"id": "288", "text": "hello world", "language": + "en"}, {"id": "289", "text": "hello world", "language": "en"}, {"id": "290", + "text": "hello world", "language": "en"}, {"id": "291", "text": "hello world", + "language": "en"}, {"id": "292", "text": "hello world", "language": "en"}, {"id": + "293", "text": "hello world", "language": "en"}, {"id": "294", "text": "hello + world", "language": "en"}, {"id": "295", "text": "hello world", "language": + "en"}, {"id": "296", "text": "hello world", "language": "en"}, {"id": "297", + "text": "hello world", "language": "en"}, {"id": "298", "text": "hello world", + "language": "en"}, {"id": "299", "text": "hello world", "language": "en"}, {"id": + "300", "text": "hello world", "language": "en"}, {"id": "301", "text": "hello + world", "language": "en"}, {"id": "302", "text": "hello world", "language": + "en"}, {"id": "303", "text": "hello world", "language": "en"}, {"id": "304", + "text": "hello world", "language": "en"}, {"id": "305", "text": "hello world", + "language": "en"}, {"id": "306", "text": "hello world", "language": "en"}, {"id": + "307", "text": "hello world", "language": "en"}, {"id": "308", "text": "hello + world", "language": "en"}, {"id": "309", "text": "hello world", "language": + "en"}, {"id": "310", "text": "hello world", "language": "en"}, {"id": "311", + "text": "hello world", "language": "en"}, {"id": "312", "text": "hello world", + "language": "en"}, {"id": "313", "text": "hello world", "language": "en"}, {"id": + "314", "text": "hello world", "language": "en"}, {"id": "315", "text": "hello + world", "language": "en"}, {"id": "316", "text": "hello world", "language": + "en"}, {"id": "317", "text": "hello world", "language": "en"}, {"id": "318", + "text": "hello world", "language": "en"}, {"id": "319", "text": "hello world", + "language": "en"}, {"id": "320", "text": "hello world", "language": "en"}, {"id": + "321", "text": "hello world", "language": "en"}, {"id": "322", "text": "hello + world", "language": "en"}, {"id": "323", "text": "hello world", "language": + "en"}, {"id": "324", "text": "hello world", "language": "en"}, {"id": "325", + "text": "hello world", "language": "en"}, {"id": "326", "text": "hello world", + "language": "en"}, {"id": "327", "text": "hello world", "language": "en"}, {"id": + "328", "text": "hello world", "language": "en"}, {"id": "329", "text": "hello + world", "language": "en"}, {"id": "330", "text": "hello world", "language": + "en"}, {"id": "331", "text": "hello world", "language": "en"}, {"id": "332", + "text": "hello world", "language": "en"}, {"id": "333", "text": "hello world", + "language": "en"}, {"id": "334", "text": "hello world", "language": "en"}, {"id": + "335", "text": "hello world", "language": "en"}, {"id": "336", "text": "hello + world", "language": "en"}, {"id": "337", "text": "hello world", "language": + "en"}, {"id": "338", "text": "hello world", "language": "en"}, {"id": "339", + "text": "hello world", "language": "en"}, {"id": "340", "text": "hello world", + "language": "en"}, {"id": "341", "text": "hello world", "language": "en"}, {"id": + "342", "text": "hello world", "language": "en"}, {"id": "343", "text": "hello + world", "language": "en"}, {"id": "344", "text": "hello world", "language": + "en"}, {"id": "345", "text": "hello world", "language": "en"}, {"id": "346", + "text": "hello world", "language": "en"}, {"id": "347", "text": "hello world", + "language": "en"}, {"id": "348", "text": "hello world", "language": "en"}, {"id": + "349", "text": "hello world", "language": "en"}, {"id": "350", "text": "hello + world", "language": "en"}, {"id": "351", "text": "hello world", "language": + "en"}, {"id": "352", "text": "hello world", "language": "en"}, {"id": "353", + "text": "hello world", "language": "en"}, {"id": "354", "text": "hello world", + "language": "en"}, {"id": "355", "text": "hello world", "language": "en"}, {"id": + "356", "text": "hello world", "language": "en"}, {"id": "357", "text": "hello + world", "language": "en"}, {"id": "358", "text": "hello world", "language": + "en"}, {"id": "359", "text": "hello world", "language": "en"}, {"id": "360", + "text": "hello world", "language": "en"}, {"id": "361", "text": "hello world", + "language": "en"}, {"id": "362", "text": "hello world", "language": "en"}, {"id": + "363", "text": "hello world", "language": "en"}, {"id": "364", "text": "hello + world", "language": "en"}, {"id": "365", "text": "hello world", "language": + "en"}, {"id": "366", "text": "hello world", "language": "en"}, {"id": "367", + "text": "hello world", "language": "en"}, {"id": "368", "text": "hello world", + "language": "en"}, {"id": "369", "text": "hello world", "language": "en"}, {"id": + "370", "text": "hello world", "language": "en"}, {"id": "371", "text": "hello + world", "language": "en"}, {"id": "372", "text": "hello world", "language": + "en"}, {"id": "373", "text": "hello world", "language": "en"}, {"id": "374", + "text": "hello world", "language": "en"}, {"id": "375", "text": "hello world", + "language": "en"}, {"id": "376", "text": "hello world", "language": "en"}, {"id": + "377", "text": "hello world", "language": "en"}, {"id": "378", "text": "hello + world", "language": "en"}, {"id": "379", "text": "hello world", "language": + "en"}, {"id": "380", "text": "hello world", "language": "en"}, {"id": "381", + "text": "hello world", "language": "en"}, {"id": "382", "text": "hello world", + "language": "en"}, {"id": "383", "text": "hello world", "language": "en"}, {"id": + "384", "text": "hello world", "language": "en"}, {"id": "385", "text": "hello + world", "language": "en"}, {"id": "386", "text": "hello world", "language": + "en"}, {"id": "387", "text": "hello world", "language": "en"}, {"id": "388", + "text": "hello world", "language": "en"}, {"id": "389", "text": "hello world", + "language": "en"}, {"id": "390", "text": "hello world", "language": "en"}, {"id": + "391", "text": "hello world", "language": "en"}, {"id": "392", "text": "hello + world", "language": "en"}, {"id": "393", "text": "hello world", "language": + "en"}, {"id": "394", "text": "hello world", "language": "en"}, {"id": "395", + "text": "hello world", "language": "en"}, {"id": "396", "text": "hello world", + "language": "en"}, {"id": "397", "text": "hello world", "language": "en"}, {"id": + "398", "text": "hello world", "language": "en"}, {"id": "399", "text": "hello + world", "language": "en"}, {"id": "400", "text": "hello world", "language": + "en"}, {"id": "401", "text": "hello world", "language": "en"}, {"id": "402", + "text": "hello world", "language": "en"}, {"id": "403", "text": "hello world", + "language": "en"}, {"id": "404", "text": "hello world", "language": "en"}, {"id": + "405", "text": "hello world", "language": "en"}, {"id": "406", "text": "hello + world", "language": "en"}, {"id": "407", "text": "hello world", "language": + "en"}, {"id": "408", "text": "hello world", "language": "en"}, {"id": "409", + "text": "hello world", "language": "en"}, {"id": "410", "text": "hello world", + "language": "en"}, {"id": "411", "text": "hello world", "language": "en"}, {"id": + "412", "text": "hello world", "language": "en"}, {"id": "413", "text": "hello + world", "language": "en"}, {"id": "414", "text": "hello world", "language": + "en"}, {"id": "415", "text": "hello world", "language": "en"}, {"id": "416", + "text": "hello world", "language": "en"}, {"id": "417", "text": "hello world", + "language": "en"}, {"id": "418", "text": "hello world", "language": "en"}, {"id": + "419", "text": "hello world", "language": "en"}, {"id": "420", "text": "hello + world", "language": "en"}, {"id": "421", "text": "hello world", "language": + "en"}, {"id": "422", "text": "hello world", "language": "en"}, {"id": "423", + "text": "hello world", "language": "en"}, {"id": "424", "text": "hello world", + "language": "en"}, {"id": "425", "text": "hello world", "language": "en"}, {"id": + "426", "text": "hello world", "language": "en"}, {"id": "427", "text": "hello + world", "language": "en"}, {"id": "428", "text": "hello world", "language": + "en"}, {"id": "429", "text": "hello world", "language": "en"}, {"id": "430", + "text": "hello world", "language": "en"}, {"id": "431", "text": "hello world", + "language": "en"}, {"id": "432", "text": "hello world", "language": "en"}, {"id": + "433", "text": "hello world", "language": "en"}, {"id": "434", "text": "hello + world", "language": "en"}, {"id": "435", "text": "hello world", "language": + "en"}, {"id": "436", "text": "hello world", "language": "en"}, {"id": "437", + "text": "hello world", "language": "en"}, {"id": "438", "text": "hello world", + "language": "en"}, {"id": "439", "text": "hello world", "language": "en"}, {"id": + "440", "text": "hello world", "language": "en"}, {"id": "441", "text": "hello + world", "language": "en"}, {"id": "442", "text": "hello world", "language": + "en"}, {"id": "443", "text": "hello world", "language": "en"}, {"id": "444", + "text": "hello world", "language": "en"}, {"id": "445", "text": "hello world", + "language": "en"}, {"id": "446", "text": "hello world", "language": "en"}, {"id": + "447", "text": "hello world", "language": "en"}, {"id": "448", "text": "hello + world", "language": "en"}, {"id": "449", "text": "hello world", "language": + "en"}, {"id": "450", "text": "hello world", "language": "en"}, {"id": "451", + "text": "hello world", "language": "en"}, {"id": "452", "text": "hello world", + "language": "en"}, {"id": "453", "text": "hello world", "language": "en"}, {"id": + "454", "text": "hello world", "language": "en"}, {"id": "455", "text": "hello + world", "language": "en"}, {"id": "456", "text": "hello world", "language": + "en"}, {"id": "457", "text": "hello world", "language": "en"}, {"id": "458", + "text": "hello world", "language": "en"}, {"id": "459", "text": "hello world", + "language": "en"}, {"id": "460", "text": "hello world", "language": "en"}, {"id": + "461", "text": "hello world", "language": "en"}, {"id": "462", "text": "hello + world", "language": "en"}, {"id": "463", "text": "hello world", "language": + "en"}, {"id": "464", "text": "hello world", "language": "en"}, {"id": "465", + "text": "hello world", "language": "en"}, {"id": "466", "text": "hello world", + "language": "en"}, {"id": "467", "text": "hello world", "language": "en"}, {"id": + "468", "text": "hello world", "language": "en"}, {"id": "469", "text": "hello + world", "language": "en"}, {"id": "470", "text": "hello world", "language": + "en"}, {"id": "471", "text": "hello world", "language": "en"}, {"id": "472", + "text": "hello world", "language": "en"}, {"id": "473", "text": "hello world", + "language": "en"}, {"id": "474", "text": "hello world", "language": "en"}, {"id": + "475", "text": "hello world", "language": "en"}, {"id": "476", "text": "hello + world", "language": "en"}, {"id": "477", "text": "hello world", "language": + "en"}, {"id": "478", "text": "hello world", "language": "en"}, {"id": "479", + "text": "hello world", "language": "en"}, {"id": "480", "text": "hello world", + "language": "en"}, {"id": "481", "text": "hello world", "language": "en"}, {"id": + "482", "text": "hello world", "language": "en"}, {"id": "483", "text": "hello + world", "language": "en"}, {"id": "484", "text": "hello world", "language": + "en"}, {"id": "485", "text": "hello world", "language": "en"}, {"id": "486", + "text": "hello world", "language": "en"}, {"id": "487", "text": "hello world", + "language": "en"}, {"id": "488", "text": "hello world", "language": "en"}, {"id": + "489", "text": "hello world", "language": "en"}, {"id": "490", "text": "hello + world", "language": "en"}, {"id": "491", "text": "hello world", "language": + "en"}, {"id": "492", "text": "hello world", "language": "en"}, {"id": "493", + "text": "hello world", "language": "en"}, {"id": "494", "text": "hello world", + "language": "en"}, {"id": "495", "text": "hello world", "language": "en"}, {"id": + "496", "text": "hello world", "language": "en"}, {"id": "497", "text": "hello + world", "language": "en"}, {"id": "498", "text": "hello world", "language": + "en"}, {"id": "499", "text": "hello world", "language": "en"}, {"id": "500", + "text": "hello world", "language": "en"}, {"id": "501", "text": "hello world", + "language": "en"}, {"id": "502", "text": "hello world", "language": "en"}, {"id": + "503", "text": "hello world", "language": "en"}, {"id": "504", "text": "hello + world", "language": "en"}, {"id": "505", "text": "hello world", "language": + "en"}, {"id": "506", "text": "hello world", "language": "en"}, {"id": "507", + "text": "hello world", "language": "en"}, {"id": "508", "text": "hello world", + "language": "en"}, {"id": "509", "text": "hello world", "language": "en"}, {"id": + "510", "text": "hello world", "language": "en"}, {"id": "511", "text": "hello + world", "language": "en"}, {"id": "512", "text": "hello world", "language": + "en"}, {"id": "513", "text": "hello world", "language": "en"}, {"id": "514", + "text": "hello world", "language": "en"}, {"id": "515", "text": "hello world", + "language": "en"}, {"id": "516", "text": "hello world", "language": "en"}, {"id": + "517", "text": "hello world", "language": "en"}, {"id": "518", "text": "hello + world", "language": "en"}, {"id": "519", "text": "hello world", "language": + "en"}, {"id": "520", "text": "hello world", "language": "en"}, {"id": "521", + "text": "hello world", "language": "en"}, {"id": "522", "text": "hello world", + "language": "en"}, {"id": "523", "text": "hello world", "language": "en"}, {"id": + "524", "text": "hello world", "language": "en"}, {"id": "525", "text": "hello + world", "language": "en"}, {"id": "526", "text": "hello world", "language": + "en"}, {"id": "527", "text": "hello world", "language": "en"}, {"id": "528", + "text": "hello world", "language": "en"}, {"id": "529", "text": "hello world", + "language": "en"}, {"id": "530", "text": "hello world", "language": "en"}, {"id": + "531", "text": "hello world", "language": "en"}, {"id": "532", "text": "hello + world", "language": "en"}, {"id": "533", "text": "hello world", "language": + "en"}, {"id": "534", "text": "hello world", "language": "en"}, {"id": "535", + "text": "hello world", "language": "en"}, {"id": "536", "text": "hello world", + "language": "en"}, {"id": "537", "text": "hello world", "language": "en"}, {"id": + "538", "text": "hello world", "language": "en"}, {"id": "539", "text": "hello + world", "language": "en"}, {"id": "540", "text": "hello world", "language": + "en"}, {"id": "541", "text": "hello world", "language": "en"}, {"id": "542", + "text": "hello world", "language": "en"}, {"id": "543", "text": "hello world", + "language": "en"}, {"id": "544", "text": "hello world", "language": "en"}, {"id": + "545", "text": "hello world", "language": "en"}, {"id": "546", "text": "hello + world", "language": "en"}, {"id": "547", "text": "hello world", "language": + "en"}, {"id": "548", "text": "hello world", "language": "en"}, {"id": "549", + "text": "hello world", "language": "en"}, {"id": "550", "text": "hello world", + "language": "en"}, {"id": "551", "text": "hello world", "language": "en"}, {"id": + "552", "text": "hello world", "language": "en"}, {"id": "553", "text": "hello + world", "language": "en"}, {"id": "554", "text": "hello world", "language": + "en"}, {"id": "555", "text": "hello world", "language": "en"}, {"id": "556", + "text": "hello world", "language": "en"}, {"id": "557", "text": "hello world", + "language": "en"}, {"id": "558", "text": "hello world", "language": "en"}, {"id": + "559", "text": "hello world", "language": "en"}, {"id": "560", "text": "hello + world", "language": "en"}, {"id": "561", "text": "hello world", "language": + "en"}, {"id": "562", "text": "hello world", "language": "en"}, {"id": "563", + "text": "hello world", "language": "en"}, {"id": "564", "text": "hello world", + "language": "en"}, {"id": "565", "text": "hello world", "language": "en"}, {"id": + "566", "text": "hello world", "language": "en"}, {"id": "567", "text": "hello + world", "language": "en"}, {"id": "568", "text": "hello world", "language": + "en"}, {"id": "569", "text": "hello world", "language": "en"}, {"id": "570", + "text": "hello world", "language": "en"}, {"id": "571", "text": "hello world", + "language": "en"}, {"id": "572", "text": "hello world", "language": "en"}, {"id": + "573", "text": "hello world", "language": "en"}, {"id": "574", "text": "hello + world", "language": "en"}, {"id": "575", "text": "hello world", "language": + "en"}, {"id": "576", "text": "hello world", "language": "en"}, {"id": "577", + "text": "hello world", "language": "en"}, {"id": "578", "text": "hello world", + "language": "en"}, {"id": "579", "text": "hello world", "language": "en"}, {"id": + "580", "text": "hello world", "language": "en"}, {"id": "581", "text": "hello + world", "language": "en"}, {"id": "582", "text": "hello world", "language": + "en"}, {"id": "583", "text": "hello world", "language": "en"}, {"id": "584", + "text": "hello world", "language": "en"}, {"id": "585", "text": "hello world", + "language": "en"}, {"id": "586", "text": "hello world", "language": "en"}, {"id": + "587", "text": "hello world", "language": "en"}, {"id": "588", "text": "hello + world", "language": "en"}, {"id": "589", "text": "hello world", "language": + "en"}, {"id": "590", "text": "hello world", "language": "en"}, {"id": "591", + "text": "hello world", "language": "en"}, {"id": "592", "text": "hello world", + "language": "en"}, {"id": "593", "text": "hello world", "language": "en"}, {"id": + "594", "text": "hello world", "language": "en"}, {"id": "595", "text": "hello + world", "language": "en"}, {"id": "596", "text": "hello world", "language": + "en"}, {"id": "597", "text": "hello world", "language": "en"}, {"id": "598", + "text": "hello world", "language": "en"}, {"id": "599", "text": "hello world", + "language": "en"}, {"id": "600", "text": "hello world", "language": "en"}, {"id": + "601", "text": "hello world", "language": "en"}, {"id": "602", "text": "hello + world", "language": "en"}, {"id": "603", "text": "hello world", "language": + "en"}, {"id": "604", "text": "hello world", "language": "en"}, {"id": "605", + "text": "hello world", "language": "en"}, {"id": "606", "text": "hello world", + "language": "en"}, {"id": "607", "text": "hello world", "language": "en"}, {"id": + "608", "text": "hello world", "language": "en"}, {"id": "609", "text": "hello + world", "language": "en"}, {"id": "610", "text": "hello world", "language": + "en"}, {"id": "611", "text": "hello world", "language": "en"}, {"id": "612", + "text": "hello world", "language": "en"}, {"id": "613", "text": "hello world", + "language": "en"}, {"id": "614", "text": "hello world", "language": "en"}, {"id": + "615", "text": "hello world", "language": "en"}, {"id": "616", "text": "hello + world", "language": "en"}, {"id": "617", "text": "hello world", "language": + "en"}, {"id": "618", "text": "hello world", "language": "en"}, {"id": "619", + "text": "hello world", "language": "en"}, {"id": "620", "text": "hello world", + "language": "en"}, {"id": "621", "text": "hello world", "language": "en"}, {"id": + "622", "text": "hello world", "language": "en"}, {"id": "623", "text": "hello + world", "language": "en"}, {"id": "624", "text": "hello world", "language": + "en"}, {"id": "625", "text": "hello world", "language": "en"}, {"id": "626", + "text": "hello world", "language": "en"}, {"id": "627", "text": "hello world", + "language": "en"}, {"id": "628", "text": "hello world", "language": "en"}, {"id": + "629", "text": "hello world", "language": "en"}, {"id": "630", "text": "hello + world", "language": "en"}, {"id": "631", "text": "hello world", "language": + "en"}, {"id": "632", "text": "hello world", "language": "en"}, {"id": "633", + "text": "hello world", "language": "en"}, {"id": "634", "text": "hello world", + "language": "en"}, {"id": "635", "text": "hello world", "language": "en"}, {"id": + "636", "text": "hello world", "language": "en"}, {"id": "637", "text": "hello + world", "language": "en"}, {"id": "638", "text": "hello world", "language": + "en"}, {"id": "639", "text": "hello world", "language": "en"}, {"id": "640", + "text": "hello world", "language": "en"}, {"id": "641", "text": "hello world", + "language": "en"}, {"id": "642", "text": "hello world", "language": "en"}, {"id": + "643", "text": "hello world", "language": "en"}, {"id": "644", "text": "hello + world", "language": "en"}, {"id": "645", "text": "hello world", "language": + "en"}, {"id": "646", "text": "hello world", "language": "en"}, {"id": "647", + "text": "hello world", "language": "en"}, {"id": "648", "text": "hello world", + "language": "en"}, {"id": "649", "text": "hello world", "language": "en"}, {"id": + "650", "text": "hello world", "language": "en"}, {"id": "651", "text": "hello + world", "language": "en"}, {"id": "652", "text": "hello world", "language": + "en"}, {"id": "653", "text": "hello world", "language": "en"}, {"id": "654", + "text": "hello world", "language": "en"}, {"id": "655", "text": "hello world", + "language": "en"}, {"id": "656", "text": "hello world", "language": "en"}, {"id": + "657", "text": "hello world", "language": "en"}, {"id": "658", "text": "hello + world", "language": "en"}, {"id": "659", "text": "hello world", "language": + "en"}, {"id": "660", "text": "hello world", "language": "en"}, {"id": "661", + "text": "hello world", "language": "en"}, {"id": "662", "text": "hello world", + "language": "en"}, {"id": "663", "text": "hello world", "language": "en"}, {"id": + "664", "text": "hello world", "language": "en"}, {"id": "665", "text": "hello + world", "language": "en"}, {"id": "666", "text": "hello world", "language": + "en"}, {"id": "667", "text": "hello world", "language": "en"}, {"id": "668", + "text": "hello world", "language": "en"}, {"id": "669", "text": "hello world", + "language": "en"}, {"id": "670", "text": "hello world", "language": "en"}, {"id": + "671", "text": "hello world", "language": "en"}, {"id": "672", "text": "hello + world", "language": "en"}, {"id": "673", "text": "hello world", "language": + "en"}, {"id": "674", "text": "hello world", "language": "en"}, {"id": "675", + "text": "hello world", "language": "en"}, {"id": "676", "text": "hello world", + "language": "en"}, {"id": "677", "text": "hello world", "language": "en"}, {"id": + "678", "text": "hello world", "language": "en"}, {"id": "679", "text": "hello + world", "language": "en"}, {"id": "680", "text": "hello world", "language": + "en"}, {"id": "681", "text": "hello world", "language": "en"}, {"id": "682", + "text": "hello world", "language": "en"}, {"id": "683", "text": "hello world", + "language": "en"}, {"id": "684", "text": "hello world", "language": "en"}, {"id": + "685", "text": "hello world", "language": "en"}, {"id": "686", "text": "hello + world", "language": "en"}, {"id": "687", "text": "hello world", "language": + "en"}, {"id": "688", "text": "hello world", "language": "en"}, {"id": "689", + "text": "hello world", "language": "en"}, {"id": "690", "text": "hello world", + "language": "en"}, {"id": "691", "text": "hello world", "language": "en"}, {"id": + "692", "text": "hello world", "language": "en"}, {"id": "693", "text": "hello + world", "language": "en"}, {"id": "694", "text": "hello world", "language": + "en"}, {"id": "695", "text": "hello world", "language": "en"}, {"id": "696", + "text": "hello world", "language": "en"}, {"id": "697", "text": "hello world", + "language": "en"}, {"id": "698", "text": "hello world", "language": "en"}, {"id": + "699", "text": "hello world", "language": "en"}, {"id": "700", "text": "hello + world", "language": "en"}, {"id": "701", "text": "hello world", "language": + "en"}, {"id": "702", "text": "hello world", "language": "en"}, {"id": "703", + "text": "hello world", "language": "en"}, {"id": "704", "text": "hello world", + "language": "en"}, {"id": "705", "text": "hello world", "language": "en"}, {"id": + "706", "text": "hello world", "language": "en"}, {"id": "707", "text": "hello + world", "language": "en"}, {"id": "708", "text": "hello world", "language": + "en"}, {"id": "709", "text": "hello world", "language": "en"}, {"id": "710", + "text": "hello world", "language": "en"}, {"id": "711", "text": "hello world", + "language": "en"}, {"id": "712", "text": "hello world", "language": "en"}, {"id": + "713", "text": "hello world", "language": "en"}, {"id": "714", "text": "hello + world", "language": "en"}, {"id": "715", "text": "hello world", "language": + "en"}, {"id": "716", "text": "hello world", "language": "en"}, {"id": "717", + "text": "hello world", "language": "en"}, {"id": "718", "text": "hello world", + "language": "en"}, {"id": "719", "text": "hello world", "language": "en"}, {"id": + "720", "text": "hello world", "language": "en"}, {"id": "721", "text": "hello + world", "language": "en"}, {"id": "722", "text": "hello world", "language": + "en"}, {"id": "723", "text": "hello world", "language": "en"}, {"id": "724", + "text": "hello world", "language": "en"}, {"id": "725", "text": "hello world", + "language": "en"}, {"id": "726", "text": "hello world", "language": "en"}, {"id": + "727", "text": "hello world", "language": "en"}, {"id": "728", "text": "hello + world", "language": "en"}, {"id": "729", "text": "hello world", "language": + "en"}, {"id": "730", "text": "hello world", "language": "en"}, {"id": "731", + "text": "hello world", "language": "en"}, {"id": "732", "text": "hello world", + "language": "en"}, {"id": "733", "text": "hello world", "language": "en"}, {"id": + "734", "text": "hello world", "language": "en"}, {"id": "735", "text": "hello + world", "language": "en"}, {"id": "736", "text": "hello world", "language": + "en"}, {"id": "737", "text": "hello world", "language": "en"}, {"id": "738", + "text": "hello world", "language": "en"}, {"id": "739", "text": "hello world", + "language": "en"}, {"id": "740", "text": "hello world", "language": "en"}, {"id": + "741", "text": "hello world", "language": "en"}, {"id": "742", "text": "hello + world", "language": "en"}, {"id": "743", "text": "hello world", "language": + "en"}, {"id": "744", "text": "hello world", "language": "en"}, {"id": "745", + "text": "hello world", "language": "en"}, {"id": "746", "text": "hello world", + "language": "en"}, {"id": "747", "text": "hello world", "language": "en"}, {"id": + "748", "text": "hello world", "language": "en"}, {"id": "749", "text": "hello + world", "language": "en"}, {"id": "750", "text": "hello world", "language": + "en"}, {"id": "751", "text": "hello world", "language": "en"}, {"id": "752", + "text": "hello world", "language": "en"}, {"id": "753", "text": "hello world", + "language": "en"}, {"id": "754", "text": "hello world", "language": "en"}, {"id": + "755", "text": "hello world", "language": "en"}, {"id": "756", "text": "hello + world", "language": "en"}, {"id": "757", "text": "hello world", "language": + "en"}, {"id": "758", "text": "hello world", "language": "en"}, {"id": "759", + "text": "hello world", "language": "en"}, {"id": "760", "text": "hello world", + "language": "en"}, {"id": "761", "text": "hello world", "language": "en"}, {"id": + "762", "text": "hello world", "language": "en"}, {"id": "763", "text": "hello + world", "language": "en"}, {"id": "764", "text": "hello world", "language": + "en"}, {"id": "765", "text": "hello world", "language": "en"}, {"id": "766", + "text": "hello world", "language": "en"}, {"id": "767", "text": "hello world", + "language": "en"}, {"id": "768", "text": "hello world", "language": "en"}, {"id": + "769", "text": "hello world", "language": "en"}, {"id": "770", "text": "hello + world", "language": "en"}, {"id": "771", "text": "hello world", "language": + "en"}, {"id": "772", "text": "hello world", "language": "en"}, {"id": "773", + "text": "hello world", "language": "en"}, {"id": "774", "text": "hello world", + "language": "en"}, {"id": "775", "text": "hello world", "language": "en"}, {"id": + "776", "text": "hello world", "language": "en"}, {"id": "777", "text": "hello + world", "language": "en"}, {"id": "778", "text": "hello world", "language": + "en"}, {"id": "779", "text": "hello world", "language": "en"}, {"id": "780", + "text": "hello world", "language": "en"}, {"id": "781", "text": "hello world", + "language": "en"}, {"id": "782", "text": "hello world", "language": "en"}, {"id": + "783", "text": "hello world", "language": "en"}, {"id": "784", "text": "hello + world", "language": "en"}, {"id": "785", "text": "hello world", "language": + "en"}, {"id": "786", "text": "hello world", "language": "en"}, {"id": "787", + "text": "hello world", "language": "en"}, {"id": "788", "text": "hello world", + "language": "en"}, {"id": "789", "text": "hello world", "language": "en"}, {"id": + "790", "text": "hello world", "language": "en"}, {"id": "791", "text": "hello + world", "language": "en"}, {"id": "792", "text": "hello world", "language": + "en"}, {"id": "793", "text": "hello world", "language": "en"}, {"id": "794", + "text": "hello world", "language": "en"}, {"id": "795", "text": "hello world", + "language": "en"}, {"id": "796", "text": "hello world", "language": "en"}, {"id": + "797", "text": "hello world", "language": "en"}, {"id": "798", "text": "hello + world", "language": "en"}, {"id": "799", "text": "hello world", "language": + "en"}, {"id": "800", "text": "hello world", "language": "en"}, {"id": "801", + "text": "hello world", "language": "en"}, {"id": "802", "text": "hello world", + "language": "en"}, {"id": "803", "text": "hello world", "language": "en"}, {"id": + "804", "text": "hello world", "language": "en"}, {"id": "805", "text": "hello + world", "language": "en"}, {"id": "806", "text": "hello world", "language": + "en"}, {"id": "807", "text": "hello world", "language": "en"}, {"id": "808", + "text": "hello world", "language": "en"}, {"id": "809", "text": "hello world", + "language": "en"}, {"id": "810", "text": "hello world", "language": "en"}, {"id": + "811", "text": "hello world", "language": "en"}, {"id": "812", "text": "hello + world", "language": "en"}, {"id": "813", "text": "hello world", "language": + "en"}, {"id": "814", "text": "hello world", "language": "en"}, {"id": "815", + "text": "hello world", "language": "en"}, {"id": "816", "text": "hello world", + "language": "en"}, {"id": "817", "text": "hello world", "language": "en"}, {"id": + "818", "text": "hello world", "language": "en"}, {"id": "819", "text": "hello + world", "language": "en"}, {"id": "820", "text": "hello world", "language": + "en"}, {"id": "821", "text": "hello world", "language": "en"}, {"id": "822", + "text": "hello world", "language": "en"}, {"id": "823", "text": "hello world", + "language": "en"}, {"id": "824", "text": "hello world", "language": "en"}, {"id": + "825", "text": "hello world", "language": "en"}, {"id": "826", "text": "hello + world", "language": "en"}, {"id": "827", "text": "hello world", "language": + "en"}, {"id": "828", "text": "hello world", "language": "en"}, {"id": "829", + "text": "hello world", "language": "en"}, {"id": "830", "text": "hello world", + "language": "en"}, {"id": "831", "text": "hello world", "language": "en"}, {"id": + "832", "text": "hello world", "language": "en"}, {"id": "833", "text": "hello + world", "language": "en"}, {"id": "834", "text": "hello world", "language": + "en"}, {"id": "835", "text": "hello world", "language": "en"}, {"id": "836", + "text": "hello world", "language": "en"}, {"id": "837", "text": "hello world", + "language": "en"}, {"id": "838", "text": "hello world", "language": "en"}, {"id": + "839", "text": "hello world", "language": "en"}, {"id": "840", "text": "hello + world", "language": "en"}, {"id": "841", "text": "hello world", "language": + "en"}, {"id": "842", "text": "hello world", "language": "en"}, {"id": "843", + "text": "hello world", "language": "en"}, {"id": "844", "text": "hello world", + "language": "en"}, {"id": "845", "text": "hello world", "language": "en"}, {"id": + "846", "text": "hello world", "language": "en"}, {"id": "847", "text": "hello + world", "language": "en"}, {"id": "848", "text": "hello world", "language": + "en"}, {"id": "849", "text": "hello world", "language": "en"}, {"id": "850", + "text": "hello world", "language": "en"}, {"id": "851", "text": "hello world", + "language": "en"}, {"id": "852", "text": "hello world", "language": "en"}, {"id": + "853", "text": "hello world", "language": "en"}, {"id": "854", "text": "hello + world", "language": "en"}, {"id": "855", "text": "hello world", "language": + "en"}, {"id": "856", "text": "hello world", "language": "en"}, {"id": "857", + "text": "hello world", "language": "en"}, {"id": "858", "text": "hello world", + "language": "en"}, {"id": "859", "text": "hello world", "language": "en"}, {"id": + "860", "text": "hello world", "language": "en"}, {"id": "861", "text": "hello + world", "language": "en"}, {"id": "862", "text": "hello world", "language": + "en"}, {"id": "863", "text": "hello world", "language": "en"}, {"id": "864", + "text": "hello world", "language": "en"}, {"id": "865", "text": "hello world", + "language": "en"}, {"id": "866", "text": "hello world", "language": "en"}, {"id": + "867", "text": "hello world", "language": "en"}, {"id": "868", "text": "hello + world", "language": "en"}, {"id": "869", "text": "hello world", "language": + "en"}, {"id": "870", "text": "hello world", "language": "en"}, {"id": "871", + "text": "hello world", "language": "en"}, {"id": "872", "text": "hello world", + "language": "en"}, {"id": "873", "text": "hello world", "language": "en"}, {"id": + "874", "text": "hello world", "language": "en"}, {"id": "875", "text": "hello + world", "language": "en"}, {"id": "876", "text": "hello world", "language": + "en"}, {"id": "877", "text": "hello world", "language": "en"}, {"id": "878", + "text": "hello world", "language": "en"}, {"id": "879", "text": "hello world", + "language": "en"}, {"id": "880", "text": "hello world", "language": "en"}, {"id": + "881", "text": "hello world", "language": "en"}, {"id": "882", "text": "hello + world", "language": "en"}, {"id": "883", "text": "hello world", "language": + "en"}, {"id": "884", "text": "hello world", "language": "en"}, {"id": "885", + "text": "hello world", "language": "en"}, {"id": "886", "text": "hello world", + "language": "en"}, {"id": "887", "text": "hello world", "language": "en"}, {"id": + "888", "text": "hello world", "language": "en"}, {"id": "889", "text": "hello + world", "language": "en"}, {"id": "890", "text": "hello world", "language": + "en"}, {"id": "891", "text": "hello world", "language": "en"}, {"id": "892", + "text": "hello world", "language": "en"}, {"id": "893", "text": "hello world", + "language": "en"}, {"id": "894", "text": "hello world", "language": "en"}, {"id": + "895", "text": "hello world", "language": "en"}, {"id": "896", "text": "hello + world", "language": "en"}, {"id": "897", "text": "hello world", "language": + "en"}, {"id": "898", "text": "hello world", "language": "en"}, {"id": "899", + "text": "hello world", "language": "en"}, {"id": "900", "text": "hello world", + "language": "en"}, {"id": "901", "text": "hello world", "language": "en"}, {"id": + "902", "text": "hello world", "language": "en"}, {"id": "903", "text": "hello + world", "language": "en"}, {"id": "904", "text": "hello world", "language": + "en"}, {"id": "905", "text": "hello world", "language": "en"}, {"id": "906", + "text": "hello world", "language": "en"}, {"id": "907", "text": "hello world", + "language": "en"}, {"id": "908", "text": "hello world", "language": "en"}, {"id": + "909", "text": "hello world", "language": "en"}, {"id": "910", "text": "hello + world", "language": "en"}, {"id": "911", "text": "hello world", "language": + "en"}, {"id": "912", "text": "hello world", "language": "en"}, {"id": "913", + "text": "hello world", "language": "en"}, {"id": "914", "text": "hello world", + "language": "en"}, {"id": "915", "text": "hello world", "language": "en"}, {"id": + "916", "text": "hello world", "language": "en"}, {"id": "917", "text": "hello + world", "language": "en"}, {"id": "918", "text": "hello world", "language": + "en"}, {"id": "919", "text": "hello world", "language": "en"}, {"id": "920", + "text": "hello world", "language": "en"}, {"id": "921", "text": "hello world", + "language": "en"}, {"id": "922", "text": "hello world", "language": "en"}, {"id": + "923", "text": "hello world", "language": "en"}, {"id": "924", "text": "hello + world", "language": "en"}, {"id": "925", "text": "hello world", "language": + "en"}, {"id": "926", "text": "hello world", "language": "en"}, {"id": "927", + "text": "hello world", "language": "en"}, {"id": "928", "text": "hello world", + "language": "en"}, {"id": "929", "text": "hello world", "language": "en"}, {"id": + "930", "text": "hello world", "language": "en"}, {"id": "931", "text": "hello + world", "language": "en"}, {"id": "932", "text": "hello world", "language": + "en"}, {"id": "933", "text": "hello world", "language": "en"}, {"id": "934", + "text": "hello world", "language": "en"}, {"id": "935", "text": "hello world", + "language": "en"}, {"id": "936", "text": "hello world", "language": "en"}, {"id": + "937", "text": "hello world", "language": "en"}, {"id": "938", "text": "hello + world", "language": "en"}, {"id": "939", "text": "hello world", "language": + "en"}, {"id": "940", "text": "hello world", "language": "en"}, {"id": "941", + "text": "hello world", "language": "en"}, {"id": "942", "text": "hello world", + "language": "en"}, {"id": "943", "text": "hello world", "language": "en"}, {"id": + "944", "text": "hello world", "language": "en"}, {"id": "945", "text": "hello + world", "language": "en"}, {"id": "946", "text": "hello world", "language": + "en"}, {"id": "947", "text": "hello world", "language": "en"}, {"id": "948", + "text": "hello world", "language": "en"}, {"id": "949", "text": "hello world", + "language": "en"}, {"id": "950", "text": "hello world", "language": "en"}, {"id": + "951", "text": "hello world", "language": "en"}, {"id": "952", "text": "hello + world", "language": "en"}, {"id": "953", "text": "hello world", "language": + "en"}, {"id": "954", "text": "hello world", "language": "en"}, {"id": "955", + "text": "hello world", "language": "en"}, {"id": "956", "text": "hello world", + "language": "en"}, {"id": "957", "text": "hello world", "language": "en"}, {"id": + "958", "text": "hello world", "language": "en"}, {"id": "959", "text": "hello + world", "language": "en"}, {"id": "960", "text": "hello world", "language": + "en"}, {"id": "961", "text": "hello world", "language": "en"}, {"id": "962", + "text": "hello world", "language": "en"}, {"id": "963", "text": "hello world", + "language": "en"}, {"id": "964", "text": "hello world", "language": "en"}, {"id": + "965", "text": "hello world", "language": "en"}, {"id": "966", "text": "hello + world", "language": "en"}, {"id": "967", "text": "hello world", "language": + "en"}, {"id": "968", "text": "hello world", "language": "en"}, {"id": "969", + "text": "hello world", "language": "en"}, {"id": "970", "text": "hello world", + "language": "en"}, {"id": "971", "text": "hello world", "language": "en"}, {"id": + "972", "text": "hello world", "language": "en"}, {"id": "973", "text": "hello + world", "language": "en"}, {"id": "974", "text": "hello world", "language": + "en"}, {"id": "975", "text": "hello world", "language": "en"}, {"id": "976", + "text": "hello world", "language": "en"}, {"id": "977", "text": "hello world", + "language": "en"}, {"id": "978", "text": "hello world", "language": "en"}, {"id": + "979", "text": "hello world", "language": "en"}, {"id": "980", "text": "hello + world", "language": "en"}, {"id": "981", "text": "hello world", "language": + "en"}, {"id": "982", "text": "hello world", "language": "en"}, {"id": "983", + "text": "hello world", "language": "en"}, {"id": "984", "text": "hello world", + "language": "en"}, {"id": "985", "text": "hello world", "language": "en"}, {"id": + "986", "text": "hello world", "language": "en"}, {"id": "987", "text": "hello + world", "language": "en"}, {"id": "988", "text": "hello world", "language": + "en"}, {"id": "989", "text": "hello world", "language": "en"}, {"id": "990", + "text": "hello world", "language": "en"}, {"id": "991", "text": "hello world", + "language": "en"}, {"id": "992", "text": "hello world", "language": "en"}, {"id": + "993", "text": "hello world", "language": "en"}, {"id": "994", "text": "hello + world", "language": "en"}, {"id": "995", "text": "hello world", "language": + "en"}, {"id": "996", "text": "hello world", "language": "en"}, {"id": "997", + "text": "hello world", "language": "en"}, {"id": "998", "text": "hello world", + "language": "en"}, {"id": "999", "text": "hello world", "language": "en"}, {"id": + "1000", "text": "hello world", "language": "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '55962' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch + request contains too many records. Max 1000 records are permitted."}}}' + headers: + apim-request-id: f8c1e84a-bc97-477a-b8f1-6ba3b267c43e + content-type: application/json; charset=utf-8 + date: Wed, 22 Jul 2020 17:57:58 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '15' + status: + code: 400 + message: Bad Request + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_client_passed_default_language_hint.yaml new file mode 100644 index 000000000000..b23369ddc733 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_client_passed_default_language_hint.yaml @@ -0,0 +1,108 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": + "es"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": + "es"}, {"id": "3", "text": "The restaurant had really good food.", "language": + "es"}]}' + headers: + Accept: + - application/json + Content-Length: + - '240' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 81f2f465-54cb-4985-acf7-dc538d1bc45a + content-type: application/json; charset=utf-8 + date: Wed, 22 Jul 2020 17:57:58 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '2' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +- request: + body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": + "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": + "en"}, {"id": "3", "text": "The restaurant had really good food.", "language": + "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '240' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 08a167cd-b6fb-44fc-bdb4-943bbaa35424 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 + date: Wed, 22 Jul 2020 17:57:58 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '172' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +- request: + body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": + "es"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": + "es"}, {"id": "3", "text": "The restaurant had really good food.", "language": + "es"}]}' + headers: + Accept: + - application/json + Content-Length: + - '240' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 11f34b41-e33c-4e12-af87-47939753fb90 + content-type: application/json; charset=utf-8 + date: Wed, 22 Jul 2020 17:57:58 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '2' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_no_result_attribute.yaml new file mode 100644 index 000000000000..8bd067078f5a --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_no_result_attribute.yaml @@ -0,0 +1,32 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '58' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 693ff8ec-ae25-4ce1-b85e-edd1c105c8a8 + content-type: application/json; charset=utf-8 + date: Wed, 22 Jul 2020 17:57:58 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '2' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_nonexistent_attribute.yaml new file mode 100644 index 000000000000..a10f36d0b901 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_nonexistent_attribute.yaml @@ -0,0 +1,32 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "", "language": "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '58' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 95444ce6-da60-4cbe-b0d0-da9b39757069 + content-type: application/json; charset=utf-8 + date: Wed, 22 Jul 2020 17:57:59 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '2' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_errors.yaml new file mode 100644 index 000000000000..e9f0421906d7 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_errors.yaml @@ -0,0 +1,41 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "", "language": "en"}, {"id": "2", "text": + "I did not like the hotel we stayed at.", "language": "english"}, {"id": "3", + "text": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "language": "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '5308' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"A + document within the request was too large to be processed. Limit document + size to: 5120 text elements. For additional details on the data limitations + see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 9f7b57d5-a38b-488a-ba18-16afec66a964 + content-type: application/json; charset=utf-8 + date: Wed, 22 Jul 2020 17:57:59 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '3' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_warnings.yaml new file mode 100644 index 000000000000..c42c64f081d9 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_warnings.yaml @@ -0,0 +1,32 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "This won''t actually create a warning + :''(", "language": "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '98' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 3c5948fd-5e57-4222-b579-297401b09b91 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Wed, 22 Jul 2020 17:58:00 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '79' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_duplicate_ids_error.yaml new file mode 100644 index 000000000000..90d8439ab402 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_duplicate_ids_error.yaml @@ -0,0 +1,32 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "hello world", "language": "en"}, {"id": + "1", "text": "I did not like the hotel we stayed at.", "language": "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '150' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request + contains duplicated Ids. Make sure each document has a unique Id."}}}' + headers: + apim-request-id: 73cafbd2-e328-49d4-8ec6-abd0d4e32361 + content-type: application/json; charset=utf-8 + date: Wed, 22 Jul 2020 17:58:00 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '5' + status: + code: 400 + message: Bad Request + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_empty_credential_class.yaml new file mode 100644 index 000000000000..fb46f86e2331 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_empty_credential_class.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "This is written in English.", "language": + "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '85' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"error":{"code":"401","message":"Access denied due to invalid subscription + key or wrong API endpoint. Make sure to provide a valid key for an active + subscription and use a correct regional API endpoint for your resource."}}' + headers: + content-length: '224' + date: Wed, 22 Jul 2020 17:58:00 GMT + status: + code: 401 + message: PermissionDenied + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_all_errors.yaml new file mode 100644 index 000000000000..bfbeaf134d60 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_all_errors.yaml @@ -0,0 +1,37 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "", "language": "en"}, {"id": "2", "text": + "Hola", "language": "Spanish"}, {"id": "3", "text": "", "language": "de"}]}' + headers: + Accept: + - application/json + Content-Length: + - '153' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"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: 3753aac3-eae8-445c-85f8-b97b54efc52d + content-type: application/json; charset=utf-8 + date: Wed, 22 Jul 2020 17:58:00 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '3' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_some_errors.yaml new file mode 100644 index 000000000000..271a74e2ee1f --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_some_errors.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "hola", "language": "es"}, {"id": "2", + "text": "", "language": "en"}, {"id": "3", "text": "Is 998.214.865-68 your Brazilian + CPF number?", "language": "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '192' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"3","entities":[{"text":"998.214.865-68","category":"Brazil + CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: d5424f92-095b-4b4e-846c-296ecdbd6ee7 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Wed, 22 Jul 2020 17:58:01 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '82' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_docs.yaml new file mode 100644 index 000000000000..2fadfe43aa94 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_docs.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "This should fail because we''re passing + in an invalid language hint", "language": "notalanguage"}]}' + headers: + Accept: + - application/json + Content-Length: + - '134' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: ce012a59-13f9-4e3f-b456-ce67ce38e974 + content-type: application/json; charset=utf-8 + date: Wed, 22 Jul 2020 17:58:02 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '2' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_method.yaml new file mode 100644 index 000000000000..ef510b9aa468 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_method.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "This should fail because we''re passing + in an invalid language hint", "language": "notalanguage"}]}' + headers: + Accept: + - application/json + Content-Length: + - '134' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: a6576cc1-60ef-43bf-b14b-c29cec86751e + content-type: application/json; charset=utf-8 + date: Wed, 22 Jul 2020 17:58:02 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '2' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_language_kwarg_english.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_language_kwarg_english.yaml new file mode 100644 index 000000000000..422e042bd5b5 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_language_kwarg_english.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "Bill Gates is the CEO of Microsoft.", + "language": "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '93' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true + response: + body: + string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","statistics":{"charactersCount":35,"transactionsCount":1},"entities":[{"text":"Bill + Gates","category":"Person","offset":0,"length":10,"confidenceScore":0.81},{"text":"Microsoft","category":"Organization","offset":25,"length":9,"confidenceScore":0.64}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 3e428412-5600-4c14-9f33-ce4723e74e10 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Wed, 22 Jul 2020 17:58:02 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '72' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_length_with_emoji.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_length_with_emoji.yaml new file mode 100644 index 000000000000..228d1aea98b7 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_length_with_emoji.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "\ud83d\udc69 SSN: 123-12-1234", "language": + "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '87' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"123-12-1234","category":"U.S. + Social Security Number (SSN)","offset":7,"length":11,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 9d758df2-7d6b-49ea-b340-b97b68c560a3 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Wed, 22 Jul 2020 17:58:06 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '95' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_out_of_order_ids.yaml new file mode 100644 index 000000000000..a69d0a998953 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_out_of_order_ids.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: '{"documents": [{"id": "56", "text": ":)", "language": "en"}, {"id": "0", + "text": ":(", "language": "en"}, {"id": "22", "text": "", "language": "en"}, + {"id": "19", "text": ":P", "language": "en"}, {"id": "1", "text": ":D", "language": + "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '241' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: a256c35f-7d28-443f-bceb-5ff23d7f48ad + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 + date: Wed, 22 Jul 2020 17:58:06 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '60' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_output_same_order_as_input.yaml new file mode 100644 index 000000000000..0a40a69a1e7b --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_output_same_order_as_input.yaml @@ -0,0 +1,34 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "one", "language": "en"}, {"id": "2", + "text": "two", "language": "en"}, {"id": "3", "text": "three", "language": "en"}, + {"id": "4", "text": "four", "language": "en"}, {"id": "5", "text": "five", "language": + "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '249' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]},{"id":"4","entities":[],"warnings":[]},{"id":"5","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 88901263-451b-4cec-b381-01b9564ae3c0 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=5 + date: Wed, 22 Jul 2020 17:58:06 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '71' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_pass_cls.yaml new file mode 100644 index 000000000000..22a6c17d6522 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_pass_cls.yaml @@ -0,0 +1,32 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "Test passing cls to endpoint", "language": + "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '86' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 5ee30fda-744d-4397-bf16-3e5c95934535 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Wed, 22 Jul 2020 17:58:07 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '69' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_passing_only_string.yaml new file mode 100644 index 000000000000..f5976e5b343a --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_passing_only_string.yaml @@ -0,0 +1,41 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "My SSN is 555-55-5555.", "language": + "en"}, {"id": "1", "text": "Your ABA number - 111000025 - is the first 9 digits + in the lower left hand corner of your personal check.", "language": "en"}, {"id": + "2", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": "en"}, + {"id": "3", "text": "", "language": "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '358' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true + response: + body: + string: '{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"0","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"555-55-5555","category":"U.S. + Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.85}],"warnings":[]},{"id":"1","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone + Number","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABA + Routing Number","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"id":"2","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil + CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"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: f95256ba-8298-41b4-894c-98c09f547277 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 + date: Wed, 22 Jul 2020 17:58:07 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '107' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_per_item_dont_use_language_hint.yaml new file mode 100644 index 000000000000..fa39bb6a3115 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_per_item_dont_use_language_hint.yaml @@ -0,0 +1,34 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": + ""}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": + ""}, {"id": "3", "text": "The restaurant had really good food.", "language": + "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '236' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 2a056d2f-d725-4d15-a0e6-6ffb64afd273 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 + date: Wed, 22 Jul 2020 17:58:08 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '74' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_rotate_subscription_key.yaml new file mode 100644 index 000000000000..d999a4cfe9a0 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_rotate_subscription_key.yaml @@ -0,0 +1,94 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": + "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": + "en"}, {"id": "3", "text": "The restaurant had really good food.", "language": + "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '240' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 6f86e0bd-3f1c-4705-98d8-c2427e20a894 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 + date: Wed, 22 Jul 2020 17:58:08 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '100' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +- request: + body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": + "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": + "en"}, {"id": "3", "text": "The restaurant had really good food.", "language": + "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '240' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"error":{"code":"401","message":"Access denied due to invalid subscription + key or wrong API endpoint. Make sure to provide a valid key for an active + subscription and use a correct regional API endpoint for your resource."}}' + headers: + content-length: '224' + date: Wed, 22 Jul 2020 17:58:08 GMT + status: + code: 401 + message: PermissionDenied + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +- request: + body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": + "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": + "en"}, {"id": "3", "text": "The restaurant had really good food.", "language": + "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '240' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: a2726729-47d6-4680-82db-fd3d3a81981f + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 + date: Wed, 22 Jul 2020 17:58:08 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '86' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_show_stats_and_model_version.yaml new file mode 100644 index 000000000000..2888e398d8cd --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_show_stats_and_model_version.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: '{"documents": [{"id": "56", "text": ":)", "language": "en"}, {"id": "0", + "text": ":(", "language": "en"}, {"id": "22", "text": "", "language": "en"}, + {"id": "19", "text": ":P", "language": "en"}, {"id": "1", "text": ":D", "language": + "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '241' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true + response: + body: + string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 0fa0ba0a-75c5-4dd0-bd4e-d4ed10406a3d + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 + date: Wed, 22 Jul 2020 17:58:09 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '63' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?model-version=latest&showStats=true +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_too_many_documents.yaml new file mode 100644 index 000000000000..7f0fa5aeafa3 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_too_many_documents.yaml @@ -0,0 +1,37 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "One", "language": "en"}, {"id": "1", + "text": "Two", "language": "en"}, {"id": "2", "text": "Three", "language": "en"}, + {"id": "3", "text": "Four", "language": "en"}, {"id": "4", "text": "Five", "language": + "en"}, {"id": "5", "text": "Six", "language": "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '295' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]},{"id":"4","entities":[],"warnings":[]},{"id":"5","entities":[],"warnings":[]}],"errors":[{"id":"","error":{"code":"InvalidRequest","message":"The + request has exceeded the allowed document limits.","innererror":{"code":"InvalidDocumentBatch","message":"The + number of documents in the request have exceeded the data limitations. See + https://aka.ms/text-analytics-data-limits for additional information"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: a7f3a6fe-4a25-47d9-a099-ace086210dd3 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=6 + date: Wed, 22 Jul 2020 17:58:10 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '74' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_user_agent.yaml new file mode 100644 index 000000000000..a823fd3e4f73 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_user_agent.yaml @@ -0,0 +1,34 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": + "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": + "en"}, {"id": "3", "text": "The restaurant had really good food.", "language": + "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '240' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: c4a4c7a5-da8e-4d0c-b097-afc135745e8e + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 + date: Wed, 22 Jul 2020 17:58:10 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '84' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_dont_use_language_hint.yaml new file mode 100644 index 000000000000..70a229d87226 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_dont_use_language_hint.yaml @@ -0,0 +1,34 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "This was the best day of my life.", + "language": ""}, {"id": "1", "text": "I did not like the hotel we stayed at. + It was too expensive.", "language": ""}, {"id": "2", "text": "The restaurant + was not as good as I hoped.", "language": ""}]}' + headers: + Accept: + - application/json + Content-Length: + - '273' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 35ede6e1-4ad8-4bf3-a181-cfd9105c9e4c + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 + date: Wed, 22 Jul 2020 17:58:11 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '86' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint.yaml new file mode 100644 index 000000000000..44b3dcfa8074 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint.yaml @@ -0,0 +1,39 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "This was the best day of my life.", + "language": "fr"}, {"id": "1", "text": "I did not like the hotel we stayed at. + It was too expensive.", "language": "fr"}, {"id": "2", "text": "The restaurant + was not as good as I hoped.", "language": "fr"}]}' + headers: + Accept: + - application/json + Content-Length: + - '279' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: 09743105-6d27-4a2f-b25f-9baa9c066b8c + content-type: application/json; charset=utf-8 + date: Wed, 22 Jul 2020 17:58:11 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '4' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml new file mode 100644 index 000000000000..c46329f4ce0c --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": + "es"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": + "es"}, {"id": "3", "text": "The restaurant had really good food.", "language": + "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '240' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"3","entities":[],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: b2ec660c-07a7-41e0-b787-f9f50ac5d73c + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Wed, 22 Jul 2020 17:58:11 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '72' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_input.yaml new file mode 100644 index 000000000000..4022703f98a5 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_input.yaml @@ -0,0 +1,39 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "I should take my cat to the veterinarian.", + "language": "de"}, {"id": "4", "text": "Este es un document escrito en Espa\u00f1ol.", + "language": "de"}, {"id": "3", "text": "\u732b\u306f\u5e78\u305b", "language": + "de"}]}' + headers: + Accept: + - application/json + Content-Length: + - '253' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"4","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: a25d4b3b-58fa-4d99-a9c8-3c05392a28c8 + content-type: application/json; charset=utf-8 + date: Wed, 22 Jul 2020 17:58:12 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '2' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml new file mode 100644 index 000000000000..96fb6c9f008c --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "I should take my cat to the veterinarian.", + "language": "es"}, {"id": "2", "text": "Este es un document escrito en Espa\u00f1ol.", + "language": "es"}, {"id": "3", "text": "\u732b\u306f\u5e78\u305b", "language": + "en"}]}' + headers: + Accept: + - application/json + Content-Length: + - '253' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/1.0.1 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false + response: + body: + string: '{"documents":[{"id":"3","entities":[],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' + headers: + apim-request-id: de496a4b-6885-4b95-8bb9-94f385f24aee + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Wed, 22 Jul 2020 17:58:12 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '56' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_text_analytics.test_detect_language.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_text_analytics.test_detect_language.yaml index 8055b10aca13..10509c607809 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_text_analytics.test_detect_language.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_text_analytics.test_detect_language.yaml @@ -22,13 +22,13 @@ interactions: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' headers: apim-request-id: - - 8f7eff6d-caa2-4867-9bd4-3c74cfa9436d + - c32e5f90-ac5f-4368-985e-89e8a436a74c content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Thu, 18 Jun 2020 19:52:47 GMT + - Wed, 22 Jul 2020 18:06:04 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py new file mode 100644 index 000000000000..1fad16fe59b8 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py @@ -0,0 +1,567 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +import pytest +import platform +import functools + +from azure.core.exceptions import HttpResponseError, ClientAuthenticationError +from azure.core.credentials import AzureKeyCredential +from testcase import TextAnalyticsTest, GlobalTextAnalyticsAccountPreparer +from testcase import TextAnalyticsClientPreparer as _TextAnalyticsClientPreparer +from azure.ai.textanalytics import ( + TextAnalyticsClient, + TextDocumentInput, + VERSION, + ApiVersion +) + +# pre-apply the client_cls positional argument so it needn't be explicitly passed below +# the first one +TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient, api_version=ApiVersion.V3_1_preview_1) + +# TODO: add back offset and length checks throughout this test once I add them + +class TestRecognizePIIEntities(TextAnalyticsTest): + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_no_single_input(self, client): + with self.assertRaises(TypeError): + response = client.recognize_pii_entities("hello world") + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_all_successful_passing_dict(self, client): + + docs = [{"id": "1", "text": "My SSN is 555-55-5555."}, + {"id": "2", "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."}, + {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?"}] + + response = client.recognize_pii_entities(docs, show_stats=True) + self.assertEqual(response[0].entities[0].text, "555-55-5555") + self.assertEqual(response[0].entities[0].category, "U.S. Social Security Number (SSN)") + self.assertEqual(response[1].entities[0].text, "111000025") + # self.assertEqual(response[1].entities[0].category, "ABA Routing Number") # Service is currently returning PhoneNumber here + self.assertEqual(response[2].entities[0].text, "998.214.865-68") + self.assertEqual(response[2].entities[0].category, "Brazil CPF Number") + for doc in response: + self.assertIsNotNone(doc.id) + self.assertIsNotNone(doc.statistics) + for entity in doc.entities: + self.assertIsNotNone(entity.text) + self.assertIsNotNone(entity.category) + self.assertIsNotNone(entity.confidence_score) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_all_successful_passing_text_document_input(self, client): + docs = [ + TextDocumentInput(id="1", text="My SSN is 555-55-5555."), + TextDocumentInput(id="2", text="Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."), + TextDocumentInput(id="3", text="Is 998.214.865-68 your Brazilian CPF number?") + ] + + response = client.recognize_pii_entities(docs, show_stats=True) + self.assertEqual(response[0].entities[0].text, "555-55-5555") + self.assertEqual(response[0].entities[0].category, "U.S. Social Security Number (SSN)") + self.assertEqual(response[1].entities[0].text, "111000025") + # self.assertEqual(response[1].entities[0].category, "ABA Routing Number") # Service is currently returning PhoneNumber here + self.assertEqual(response[2].entities[0].text, "998.214.865-68") + self.assertEqual(response[2].entities[0].category, "Brazil CPF Number") + for doc in response: + self.assertIsNotNone(doc.id) + self.assertIsNotNone(doc.statistics) + for entity in doc.entities: + self.assertIsNotNone(entity.text) + self.assertIsNotNone(entity.category) + self.assertIsNotNone(entity.confidence_score) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_length_with_emoji(self, client): + result = client.recognize_pii_entities(["👩 SSN: 123-12-1234"]) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_passing_only_string(self, client): + docs = [ + u"My SSN is 555-55-5555.", + u"Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + u"Is 998.214.865-68 your Brazilian CPF number?", + u"" + ] + + response = client.recognize_pii_entities(docs, show_stats=True) + self.assertEqual(response[0].entities[0].text, "555-55-5555") + self.assertEqual(response[0].entities[0].category, "U.S. Social Security Number (SSN)") + self.assertEqual(response[1].entities[0].text, "111000025") + # self.assertEqual(response[1].entities[0].category, "ABA Routing Number") # Service is currently returning PhoneNumber here + self.assertEqual(response[2].entities[0].text, "998.214.865-68") + self.assertEqual(response[2].entities[0].category, "Brazil CPF Number") + self.assertTrue(response[3].is_error) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_input_with_some_errors(self, client): + docs = [{"id": "1", "language": "es", "text": "hola"}, + {"id": "2", "text": ""}, + {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?"}] + + response = client.recognize_pii_entities(docs) + self.assertTrue(response[0].is_error) + self.assertTrue(response[1].is_error) + self.assertFalse(response[2].is_error) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_input_with_all_errors(self, client): + docs = [{"id": "1", "text": ""}, + {"id": "2", "language": "Spanish", "text": "Hola"}, + {"id": "3", "language": "de", "text": ""}] + + response = client.recognize_pii_entities(docs) + self.assertTrue(response[0].is_error) + self.assertTrue(response[1].is_error) + self.assertTrue(response[2].is_error) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_too_many_documents(self, client): + docs = ["One", "Two", "Three", "Four", "Five", "Six"] + + with pytest.raises(HttpResponseError) as excinfo: + client.recognize_pii_entities(docs) + assert excinfo.value.status_code == 400 + assert excinfo.value.error.code == "InvalidDocumentBatch" + assert "(InvalidDocumentBatch) The number of documents in the request have exceeded the data limitations" in str(excinfo.value) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_output_same_order_as_input(self, client): + docs = [ + TextDocumentInput(id="1", text="one"), + TextDocumentInput(id="2", text="two"), + TextDocumentInput(id="3", text="three"), + TextDocumentInput(id="4", text="four"), + TextDocumentInput(id="5", text="five") + ] + + response = client.recognize_pii_entities(docs) + + for idx, doc in enumerate(response): + self.assertEqual(str(idx + 1), doc.id) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"text_analytics_account_key": ""}) + def test_empty_credential_class(self, client): + with self.assertRaises(ClientAuthenticationError): + response = client.recognize_pii_entities( + ["This is written in English."] + ) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"text_analytics_account_key": "xxxxxxxxxxxx"}) + def test_bad_credentials(self, client): + with self.assertRaises(ClientAuthenticationError): + response = client.recognize_pii_entities( + ["This is written in English."] + ) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_bad_document_input(self, client): + docs = "This is the wrong type" + + with self.assertRaises(TypeError): + response = client.recognize_pii_entities(docs) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_mixing_inputs(self, client): + docs = [ + {"id": "1", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, + TextDocumentInput(id="2", text="I did not like the hotel we stayed at. It was too expensive."), + u"You cannot mix string input with the above inputs" + ] + with self.assertRaises(TypeError): + response = client.recognize_pii_entities(docs) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_out_of_order_ids(self, client): + docs = [{"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}] + + response = client.recognize_pii_entities(docs) + in_order = ["56", "0", "22", "19", "1"] + for idx, resp in enumerate(response): + self.assertEqual(resp.id, in_order[idx]) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_show_stats_and_model_version(self, client): + def callback(response): + self.assertIsNotNone(response) + self.assertIsNotNone(response.model_version, msg=response.raw_response) + self.assertIsNotNone(response.raw_response) + self.assertEqual(response.statistics.document_count, 5) + self.assertEqual(response.statistics.transaction_count, 4) + self.assertEqual(response.statistics.valid_document_count, 4) + self.assertEqual(response.statistics.erroneous_document_count, 1) + + docs = [{"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}] + + response = client.recognize_pii_entities( + docs, + show_stats=True, + model_version="latest", + raw_response_hook=callback + ) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_batch_size_over_limit(self, client): + docs = [u"hello world"] * 1050 + with self.assertRaises(HttpResponseError): + response = client.recognize_pii_entities(docs) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_whole_batch_language_hint(self, client): + def callback(resp): + language_str = "\"language\": \"fr\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 3) + + docs = [ + u"This was the best day of my life.", + u"I did not like the hotel we stayed at. It was too expensive.", + u"The restaurant was not as good as I hoped." + ] + + response = client.recognize_pii_entities(docs, language="fr", raw_response_hook=callback) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_whole_batch_dont_use_language_hint(self, client): + def callback(resp): + language_str = "\"language\": \"\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 3) + + docs = [ + u"This was the best day of my life.", + u"I did not like the hotel we stayed at. It was too expensive.", + u"The restaurant was not as good as I hoped." + ] + + response = client.recognize_pii_entities(docs, language="", raw_response_hook=callback) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_per_item_dont_use_language_hint(self, client): + def callback(resp): + language_str = "\"language\": \"\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 2) + language_str = "\"language\": \"en\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 1) + + + docs = [{"id": "1", "language": "", "text": "I will go to the park."}, + {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}] + + response = client.recognize_pii_entities(docs, raw_response_hook=callback) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_whole_batch_language_hint_and_obj_input(self, client): + def callback(resp): + language_str = "\"language\": \"de\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 3) + + docs = [ + TextDocumentInput(id="1", text="I should take my cat to the veterinarian."), + TextDocumentInput(id="4", text="Este es un document escrito en Español."), + TextDocumentInput(id="3", text="猫は幸せ"), + ] + + response = client.recognize_pii_entities(docs, language="de", raw_response_hook=callback) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_whole_batch_language_hint_and_obj_per_item_hints(self, client): + def callback(resp): + language_str = "\"language\": \"es\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 2) + language_str = "\"language\": \"en\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 1) + + docs = [ + TextDocumentInput(id="1", text="I should take my cat to the veterinarian.", language="es"), + TextDocumentInput(id="2", text="Este es un document escrito en Español.", language="es"), + TextDocumentInput(id="3", text="猫は幸せ"), + ] + + response = client.recognize_pii_entities(docs, language="en", raw_response_hook=callback) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_whole_batch_language_hint_and_dict_per_item_hints(self, client): + def callback(resp): + language_str = "\"language\": \"es\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 2) + language_str = "\"language\": \"en\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 1) + + + docs = [{"id": "1", "language": "es", "text": "I will go to the park."}, + {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}] + + response = client.recognize_pii_entities(docs, language="en", raw_response_hook=callback) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"default_language": "es"}) + def test_client_passed_default_language_hint(self, client): + def callback(resp): + language_str = "\"language\": \"es\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 3) + + def callback_2(resp): + language_str = "\"language\": \"en\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 3) + + docs = [{"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}] + + response = client.recognize_pii_entities(docs, raw_response_hook=callback) + response = client.recognize_pii_entities(docs, language="en", raw_response_hook=callback_2) + response = client.recognize_pii_entities(docs, raw_response_hook=callback) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_invalid_language_hint_method(self, client): + response = client.recognize_pii_entities( + ["This should fail because we're passing in an invalid language hint"], language="notalanguage" + ) + self.assertEqual(response[0].error.code, 'UnsupportedLanguageCode') + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_invalid_language_hint_docs(self, client): + response = client.recognize_pii_entities( + [{"id": "1", "language": "notalanguage", "text": "This should fail because we're passing in an invalid language hint"}] + ) + self.assertEqual(response[0].error.code, 'UnsupportedLanguageCode') + + @GlobalTextAnalyticsAccountPreparer() + def test_rotate_subscription_key(self, resource_group, location, text_analytics_account, text_analytics_account_key): + credential = AzureKeyCredential(text_analytics_account_key) + client = TextAnalyticsClient(text_analytics_account, credential, api_version=ApiVersion.V3_1_preview_1) + + docs = [{"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}] + + response = client.recognize_pii_entities(docs) + self.assertIsNotNone(response) + + credential.update("xxx") # Make authentication fail + with self.assertRaises(ClientAuthenticationError): + response = client.recognize_pii_entities(docs) + + credential.update(text_analytics_account_key) # Authenticate successfully again + response = client.recognize_pii_entities(docs) + self.assertIsNotNone(response) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_user_agent(self, client): + def callback(resp): + self.assertIn("azsdk-python-ai-textanalytics/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform()), + resp.http_request.headers["User-Agent"] + ) + + docs = [{"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}] + + response = client.recognize_pii_entities(docs, raw_response_hook=callback) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_document_attribute_error_no_result_attribute(self, client): + docs = [{"id": "1", "text": ""}] + response = client.recognize_pii_entities(docs) + + # Attributes on DocumentError + self.assertTrue(response[0].is_error) + self.assertEqual(response[0].id, "1") + self.assertIsNotNone(response[0].error) + + # Result attribute not on DocumentError, custom error message + try: + entities = response[0].entities + except AttributeError as custom_error: + self.assertEqual( + custom_error.args[0], + '\'DocumentError\' object has no attribute \'entities\'. ' + 'The service was unable to process this document:\nDocument Id: 1\nError: ' + 'InvalidDocument - Document text is empty.\n' + ) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_document_attribute_error_nonexistent_attribute(self, client): + docs = [{"id": "1", "text": ""}] + response = client.recognize_pii_entities(docs) + + # Attribute not found on DocumentError or result obj, default behavior/message + try: + entities = response[0].attribute_not_on_result_or_error + except AttributeError as default_behavior: + self.assertEqual( + default_behavior.args[0], + '\'DocumentError\' object has no attribute \'attribute_not_on_result_or_error\'' + ) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_bad_model_version_error(self, client): + docs = [{"id": "1", "language": "english", "text": "I did not like the hotel we stayed at."}] + + try: + result = client.recognize_pii_entities(docs, model_version="bad") + except HttpResponseError as err: + self.assertEqual(err.error.code, "ModelVersionIncorrect") + self.assertIsNotNone(err.error.message) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_document_errors(self, client): + text = "" + for _ in range(5121): + text += "x" + + docs = [{"id": "1", "text": ""}, + {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": text}] + + doc_errors = client.recognize_pii_entities(docs) + self.assertEqual(doc_errors[0].error.code, "InvalidDocument") + self.assertIsNotNone(doc_errors[0].error.message) + self.assertEqual(doc_errors[1].error.code, "UnsupportedLanguageCode") + self.assertIsNotNone(doc_errors[1].error.message) + self.assertEqual(doc_errors[2].error.code, "InvalidDocument") + self.assertIsNotNone(doc_errors[2].error.message) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_document_warnings(self, client): + # No warnings actually returned for recognize_pii_entities. Will update when they add + docs = [ + {"id": "1", "text": "This won't actually create a warning :'("}, + ] + + result = client.recognize_pii_entities(docs) + for doc in result: + doc_warnings = doc.warnings + self.assertEqual(len(doc_warnings), 0) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_not_passing_list_for_docs(self, client): + docs = {"id": "1", "text": "hello world"} + with pytest.raises(TypeError) as excinfo: + client.recognize_pii_entities(docs) + assert "Input documents cannot be a dict" in str(excinfo.value) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_missing_input_records_error(self, client): + docs = [] + with pytest.raises(ValueError) as excinfo: + client.recognize_pii_entities(docs) + assert "Input documents can not be empty or None" in str(excinfo.value) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_passing_none_docs(self, client): + with pytest.raises(ValueError) as excinfo: + client.recognize_pii_entities(None) + assert "Input documents can not be empty or None" in str(excinfo.value) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_duplicate_ids_error(self, client): + # Duplicate Ids + docs = [{"id": "1", "text": "hello world"}, + {"id": "1", "text": "I did not like the hotel we stayed at."}] + try: + result = client.recognize_pii_entities(docs) + except HttpResponseError as err: + self.assertEqual(err.error.code, "InvalidDocument") + self.assertIsNotNone(err.error.message) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_batch_size_over_limit_error(self, client): + # Batch size over limit + docs = [u"hello world"] * 1001 + try: + response = client.recognize_pii_entities(docs) + except HttpResponseError as err: + self.assertEqual(err.error.code, "InvalidDocumentBatch") + self.assertIsNotNone(err.error.message) + + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_pass_cls(self, client): + def callback(pipeline_response, deserialized, _): + return "cls result" + res = client.recognize_pii_entities( + documents=["Test passing cls to endpoint"], + cls=callback + ) + assert res == "cls result" + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_language_kwarg_english(self, client): + def callback(response): + language_str = "\"language\": \"en\"" + self.assertEqual(response.http_request.body.count(language_str), 1) + self.assertIsNotNone(response.model_version) + self.assertIsNotNone(response.statistics) + + res = client.recognize_pii_entities( + documents=["Bill Gates is the CEO of Microsoft."], + model_version="latest", + show_stats=True, + language="en", + raw_response_hook=callback + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py new file mode 100644 index 000000000000..50ca148c1c07 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py @@ -0,0 +1,567 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +import pytest +import platform +import functools + +from azure.core.exceptions import HttpResponseError, ClientAuthenticationError +from azure.core.credentials import AzureKeyCredential +from asynctestcase import AsyncTextAnalyticsTest +from testcase import GlobalTextAnalyticsAccountPreparer +from testcase import TextAnalyticsClientPreparer as _TextAnalyticsClientPreparer +from azure.ai.textanalytics.aio import TextAnalyticsClient +from azure.ai.textanalytics import ( + TextDocumentInput, + VERSION, + ApiVersion +) + +# pre-apply the client_cls positional argument so it needn't be explicitly passed below +# the first one +TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient, api_version=ApiVersion.V3_1_preview_1) +# TODO: add back offset and length checks throughout this test once I add them + +class TestRecognizePIIEntities(AsyncTextAnalyticsTest): + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_no_single_input(self, client): + with self.assertRaises(TypeError): + response = await client.recognize_pii_entities("hello world") + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_all_successful_passing_dict(self, client): + + docs = [{"id": "1", "text": "My SSN is 555-55-5555."}, + {"id": "2", "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."}, + {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?"}] + + response = await client.recognize_pii_entities(docs, show_stats=True) + self.assertEqual(response[0].entities[0].text, "555-55-5555") + self.assertEqual(response[0].entities[0].category, "U.S. Social Security Number (SSN)") + self.assertEqual(response[1].entities[0].text, "111000025") + # self.assertEqual(response[1].entities[0].category, "ABA Routing Number") # Service is currently returning PhoneNumber here + self.assertEqual(response[2].entities[0].text, "998.214.865-68") + self.assertEqual(response[2].entities[0].category, "Brazil CPF Number") + for doc in response: + self.assertIsNotNone(doc.id) + self.assertIsNotNone(doc.statistics) + for entity in doc.entities: + self.assertIsNotNone(entity.text) + self.assertIsNotNone(entity.category) + self.assertIsNotNone(entity.confidence_score) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_all_successful_passing_text_document_input(self, client): + docs = [ + TextDocumentInput(id="1", text="My SSN is 555-55-5555."), + TextDocumentInput(id="2", text="Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."), + TextDocumentInput(id="3", text="Is 998.214.865-68 your Brazilian CPF number?") + ] + + response = await client.recognize_pii_entities(docs, show_stats=True) + self.assertEqual(response[0].entities[0].text, "555-55-5555") + self.assertEqual(response[0].entities[0].category, "U.S. Social Security Number (SSN)") + self.assertEqual(response[1].entities[0].text, "111000025") + # self.assertEqual(response[1].entities[0].category, "ABA Routing Number") # Service is currently returning PhoneNumber here + self.assertEqual(response[2].entities[0].text, "998.214.865-68") + self.assertEqual(response[2].entities[0].category, "Brazil CPF Number") + for doc in response: + self.assertIsNotNone(doc.id) + self.assertIsNotNone(doc.statistics) + for entity in doc.entities: + self.assertIsNotNone(entity.text) + self.assertIsNotNone(entity.category) + self.assertIsNotNone(entity.confidence_score) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_length_with_emoji(self, client): + result = await client.recognize_pii_entities(["👩 SSN: 123-12-1234"]) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_passing_only_string(self, client): + docs = [ + u"My SSN is 555-55-5555.", + u"Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + u"Is 998.214.865-68 your Brazilian CPF number?", + u"" + ] + + response = await client.recognize_pii_entities(docs, show_stats=True) + self.assertEqual(response[0].entities[0].text, "555-55-5555") + self.assertEqual(response[0].entities[0].category, "U.S. Social Security Number (SSN)") + self.assertEqual(response[1].entities[0].text, "111000025") + # self.assertEqual(response[1].entities[0].category, "ABA Routing Number") # Service is currently returning PhoneNumber here + self.assertEqual(response[2].entities[0].text, "998.214.865-68") + self.assertEqual(response[2].entities[0].category, "Brazil CPF Number") + self.assertTrue(response[3].is_error) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_input_with_some_errors(self, client): + docs = [{"id": "1", "language": "es", "text": "hola"}, + {"id": "2", "text": ""}, + {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?"}] + + response = await client.recognize_pii_entities(docs) + self.assertTrue(response[0].is_error) + self.assertTrue(response[1].is_error) + self.assertFalse(response[2].is_error) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_input_with_all_errors(self, client): + docs = [{"id": "1", "text": ""}, + {"id": "2", "language": "Spanish", "text": "Hola"}, + {"id": "3", "language": "de", "text": ""}] + + response = await client.recognize_pii_entities(docs) + self.assertTrue(response[0].is_error) + self.assertTrue(response[1].is_error) + self.assertTrue(response[2].is_error) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_too_many_documents(self, client): + docs = ["One", "Two", "Three", "Four", "Five", "Six"] + + with pytest.raises(HttpResponseError) as excinfo: + await client.recognize_pii_entities(docs) + assert excinfo.value.status_code == 400 + assert excinfo.value.error.code == "InvalidDocumentBatch" + assert "(InvalidDocumentBatch) The number of documents in the request have exceeded the data limitations" in str(excinfo.value) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_output_same_order_as_input(self, client): + docs = [ + TextDocumentInput(id="1", text="one"), + TextDocumentInput(id="2", text="two"), + TextDocumentInput(id="3", text="three"), + TextDocumentInput(id="4", text="four"), + TextDocumentInput(id="5", text="five") + ] + + response = await client.recognize_pii_entities(docs) + + for idx, doc in enumerate(response): + self.assertEqual(str(idx + 1), doc.id) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"text_analytics_account_key": ""}) + async def test_empty_credential_class(self, client): + with self.assertRaises(ClientAuthenticationError): + response = await client.recognize_pii_entities( + ["This is written in English."] + ) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"text_analytics_account_key": "xxxxxxxxxxxx"}) + async def test_bad_credentials(self, client): + with self.assertRaises(ClientAuthenticationError): + response = await client.recognize_pii_entities( + ["This is written in English."] + ) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_bad_document_input(self, client): + docs = "This is the wrong type" + + with self.assertRaises(TypeError): + response = await client.recognize_pii_entities(docs) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_mixing_inputs(self, client): + docs = [ + {"id": "1", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, + TextDocumentInput(id="2", text="I did not like the hotel we stayed at. It was too expensive."), + u"You cannot mix string input with the above inputs" + ] + with self.assertRaises(TypeError): + response = await client.recognize_pii_entities(docs) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_out_of_order_ids(self, client): + docs = [{"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}] + + response = await client.recognize_pii_entities(docs) + in_order = ["56", "0", "22", "19", "1"] + for idx, resp in enumerate(response): + self.assertEqual(resp.id, in_order[idx]) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_show_stats_and_model_version(self, client): + def callback(response): + self.assertIsNotNone(response) + self.assertIsNotNone(response.model_version, msg=response.raw_response) + self.assertIsNotNone(response.raw_response) + self.assertEqual(response.statistics.document_count, 5) + self.assertEqual(response.statistics.transaction_count, 4) + self.assertEqual(response.statistics.valid_document_count, 4) + self.assertEqual(response.statistics.erroneous_document_count, 1) + + docs = [{"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}] + + response = await client.recognize_pii_entities( + docs, + show_stats=True, + model_version="latest", + raw_response_hook=callback + ) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_batch_size_over_limit(self, client): + docs = [u"hello world"] * 1050 + with self.assertRaises(HttpResponseError): + response = await client.recognize_pii_entities(docs) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_whole_batch_language_hint(self, client): + def callback(resp): + language_str = "\"language\": \"fr\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 3) + + docs = [ + u"This was the best day of my life.", + u"I did not like the hotel we stayed at. It was too expensive.", + u"The restaurant was not as good as I hoped." + ] + + response = await client.recognize_pii_entities(docs, language="fr", raw_response_hook=callback) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_whole_batch_dont_use_language_hint(self, client): + def callback(resp): + language_str = "\"language\": \"\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 3) + + docs = [ + u"This was the best day of my life.", + u"I did not like the hotel we stayed at. It was too expensive.", + u"The restaurant was not as good as I hoped." + ] + + response = await client.recognize_pii_entities(docs, language="", raw_response_hook=callback) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_per_item_dont_use_language_hint(self, client): + def callback(resp): + language_str = "\"language\": \"\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 2) + language_str = "\"language\": \"en\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 1) + + + docs = [{"id": "1", "language": "", "text": "I will go to the park."}, + {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}] + + response = await client.recognize_pii_entities(docs, raw_response_hook=callback) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_whole_batch_language_hint_and_obj_input(self, client): + def callback(resp): + language_str = "\"language\": \"de\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 3) + + docs = [ + TextDocumentInput(id="1", text="I should take my cat to the veterinarian."), + TextDocumentInput(id="4", text="Este es un document escrito en Español."), + TextDocumentInput(id="3", text="猫は幸せ"), + ] + + response = await client.recognize_pii_entities(docs, language="de", raw_response_hook=callback) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_whole_batch_language_hint_and_obj_per_item_hints(self, client): + def callback(resp): + language_str = "\"language\": \"es\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 2) + language_str = "\"language\": \"en\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 1) + + docs = [ + TextDocumentInput(id="1", text="I should take my cat to the veterinarian.", language="es"), + TextDocumentInput(id="2", text="Este es un document escrito en Español.", language="es"), + TextDocumentInput(id="3", text="猫は幸せ"), + ] + + response = await client.recognize_pii_entities(docs, language="en", raw_response_hook=callback) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_whole_batch_language_hint_and_dict_per_item_hints(self, client): + def callback(resp): + language_str = "\"language\": \"es\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 2) + language_str = "\"language\": \"en\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 1) + + + docs = [{"id": "1", "language": "es", "text": "I will go to the park."}, + {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}] + + response = await client.recognize_pii_entities(docs, language="en", raw_response_hook=callback) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={"default_language": "es"}) + async def test_client_passed_default_language_hint(self, client): + def callback(resp): + language_str = "\"language\": \"es\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 3) + + def callback_2(resp): + language_str = "\"language\": \"en\"" + language = resp.http_request.body.count(language_str) + self.assertEqual(language, 3) + + docs = [{"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}] + + response = await client.recognize_pii_entities(docs, raw_response_hook=callback) + response = await client.recognize_pii_entities(docs, language="en", raw_response_hook=callback_2) + response = await client.recognize_pii_entities(docs, raw_response_hook=callback) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_invalid_language_hint_method(self, client): + response = await client.recognize_pii_entities( + ["This should fail because we're passing in an invalid language hint"], language="notalanguage" + ) + self.assertEqual(response[0].error.code, 'UnsupportedLanguageCode') + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_invalid_language_hint_docs(self, client): + response = await client.recognize_pii_entities( + [{"id": "1", "language": "notalanguage", "text": "This should fail because we're passing in an invalid language hint"}] + ) + self.assertEqual(response[0].error.code, 'UnsupportedLanguageCode') + + @GlobalTextAnalyticsAccountPreparer() + async def test_rotate_subscription_key(self, resource_group, location, text_analytics_account, text_analytics_account_key): + credential = AzureKeyCredential(text_analytics_account_key) + client = TextAnalyticsClient(text_analytics_account, credential, api_version=ApiVersion.V3_1_preview_1) + + docs = [{"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}] + + response = await client.recognize_pii_entities(docs) + self.assertIsNotNone(response) + + credential.update("xxx") # Make authentication fail + with self.assertRaises(ClientAuthenticationError): + response = await client.recognize_pii_entities(docs) + + credential.update(text_analytics_account_key) # Authenticate successfully again + response = await client.recognize_pii_entities(docs) + self.assertIsNotNone(response) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_user_agent(self, client): + def callback(resp): + self.assertIn("azsdk-python-ai-textanalytics/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform()), + resp.http_request.headers["User-Agent"] + ) + + docs = [{"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}] + + response = await client.recognize_pii_entities(docs, raw_response_hook=callback) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_document_attribute_error_no_result_attribute(self, client): + docs = [{"id": "1", "text": ""}] + response = await client.recognize_pii_entities(docs) + + # Attributes on DocumentError + self.assertTrue(response[0].is_error) + self.assertEqual(response[0].id, "1") + self.assertIsNotNone(response[0].error) + + # Result attribute not on DocumentError, custom error message + try: + entities = response[0].entities + except AttributeError as custom_error: + self.assertEqual( + custom_error.args[0], + '\'DocumentError\' object has no attribute \'entities\'. ' + 'The service was unable to process this document:\nDocument Id: 1\nError: ' + 'InvalidDocument - Document text is empty.\n' + ) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_document_attribute_error_nonexistent_attribute(self, client): + docs = [{"id": "1", "text": ""}] + response = await client.recognize_pii_entities(docs) + + # Attribute not found on DocumentError or result obj, default behavior/message + try: + entities = response[0].attribute_not_on_result_or_error + except AttributeError as default_behavior: + self.assertEqual( + default_behavior.args[0], + '\'DocumentError\' object has no attribute \'attribute_not_on_result_or_error\'' + ) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_bad_model_version_error(self, client): + docs = [{"id": "1", "language": "english", "text": "I did not like the hotel we stayed at."}] + + try: + result = await client.recognize_pii_entities(docs, model_version="bad") + except HttpResponseError as err: + self.assertEqual(err.error.code, "ModelVersionIncorrect") + self.assertIsNotNone(err.error.message) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_document_errors(self, client): + text = "" + for _ in range(5121): + text += "x" + + docs = [{"id": "1", "text": ""}, + {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": text}] + + doc_errors = await client.recognize_pii_entities(docs) + self.assertEqual(doc_errors[0].error.code, "InvalidDocument") + self.assertIsNotNone(doc_errors[0].error.message) + self.assertEqual(doc_errors[1].error.code, "UnsupportedLanguageCode") + self.assertIsNotNone(doc_errors[1].error.message) + self.assertEqual(doc_errors[2].error.code, "InvalidDocument") + self.assertIsNotNone(doc_errors[2].error.message) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_document_warnings(self, client): + # No warnings actually returned for recognize_pii_entities. Will update when they add + docs = [ + {"id": "1", "text": "This won't actually create a warning :'("}, + ] + + result = await client.recognize_pii_entities(docs) + for doc in result: + doc_warnings = doc.warnings + self.assertEqual(len(doc_warnings), 0) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_not_passing_list_for_docs(self, client): + docs = {"id": "1", "text": "hello world"} + with pytest.raises(TypeError) as excinfo: + await client.recognize_pii_entities(docs) + assert "Input documents cannot be a dict" in str(excinfo.value) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_missing_input_records_error(self, client): + docs = [] + with pytest.raises(ValueError) as excinfo: + await client.recognize_pii_entities(docs) + assert "Input documents can not be empty or None" in str(excinfo.value) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_passing_none_docs(self, client): + with pytest.raises(ValueError) as excinfo: + await client.recognize_pii_entities(None) + assert "Input documents can not be empty or None" in str(excinfo.value) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_duplicate_ids_error(self, client): + # Duplicate Ids + docs = [{"id": "1", "text": "hello world"}, + {"id": "1", "text": "I did not like the hotel we stayed at."}] + try: + result = await client.recognize_pii_entities(docs) + except HttpResponseError as err: + self.assertEqual(err.error.code, "InvalidDocument") + self.assertIsNotNone(err.error.message) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_batch_size_over_limit_error(self, client): + # Batch size over limit + docs = [u"hello world"] * 1001 + try: + response = await client.recognize_pii_entities(docs) + except HttpResponseError as err: + self.assertEqual(err.error.code, "InvalidDocumentBatch") + self.assertIsNotNone(err.error.message) + + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_pass_cls(self, client): + def callback(pipeline_response, deserialized, _): + return "cls result" + res = await client.recognize_pii_entities( + documents=["Test passing cls to endpoint"], + cls=callback + ) + assert res == "cls result" + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_language_kwarg_english(self, client): + def callback(response): + language_str = "\"language\": \"en\"" + self.assertEqual(response.http_request.body.count(language_str), 1) + self.assertIsNotNone(response.model_version) + self.assertIsNotNone(response.statistics) + + res = await client.recognize_pii_entities( + documents=["Bill Gates is the CEO of Microsoft."], + model_version="latest", + show_stats=True, + language="en", + raw_response_hook=callback + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_text_analytics.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_text_analytics.py index e424d8d67356..485eb549ff45 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_text_analytics.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_text_analytics.py @@ -32,6 +32,8 @@ def test_repr(self): categorized_entity = _models.CategorizedEntity(text="Bill Gates", category="Person", subcategory="Age", confidence_score=0.899) + pii_entity = _models.PiiEntity(text="555-55-5555", category="SSN", subcategory=None, confidence_score=0.899) + text_document_statistics = _models.TextDocumentStatistics(character_count=14, transaction_count=18) warnings = [_models.TextAnalyticsWarning(code="LongWordsInDocument", message="The document contains very long words (longer than 64 characters). These words will be truncated and may result in unreliable model predictions.")] @@ -44,6 +46,14 @@ def test_repr(self): is_error=False ) + recognize_pii_entities_result = _models.RecognizePiiEntitiesResult( + id="1", + entities=[pii_entity], + warnings=warnings, + statistics=text_document_statistics, + is_error=False + ) + detect_language_result = _models.DetectLanguageResult( id="1", primary_language=detected_language, @@ -113,6 +123,7 @@ def test_repr(self): self.assertEqual("DetectedLanguage(name=English, iso6391_name=en, confidence_score=1.0)", repr(detected_language)) self.assertEqual("CategorizedEntity(text=Bill Gates, category=Person, subcategory=Age, confidence_score=0.899)", repr(categorized_entity)) + self.assertEqual("PiiEntity(text=555-55-5555, category=SSN, subcategory=None, confidence_score=0.899)", repr(pii_entity)) self.assertEqual("TextDocumentStatistics(character_count=14, transaction_count=18)", repr(text_document_statistics)) self.assertEqual("RecognizeEntitiesResult(id=1, entities=[CategorizedEntity(text=Bill Gates, category=Person, " @@ -121,6 +132,12 @@ def test_repr(self): "These words will be truncated and may result in unreliable model predictions.)], " "statistics=TextDocumentStatistics(character_count=14, transaction_count=18), " "is_error=False)", repr(recognize_entities_result)) + self.assertEqual("RecognizePiiEntitiesResult(id=1, entities=[PiiEntity(text=555-55-5555, category=SSN, " + "subcategory=None, confidence_score=0.899)], " + "warnings=[TextAnalyticsWarning(code=LongWordsInDocument, message=The document contains very long words (longer than 64 characters). " + "These words will be truncated and may result in unreliable model predictions.)], " + "statistics=TextDocumentStatistics(character_count=14, transaction_count=18), " + "is_error=False)", repr(recognize_pii_entities_result)) self.assertEqual("DetectLanguageResult(id=1, primary_language=DetectedLanguage(name=English, " "iso6391_name=en, confidence_score=1.0), " "warnings=[TextAnalyticsWarning(code=LongWordsInDocument, message=The document contains very long words (longer than 64 characters). " diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py b/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py index 483d63cabcd3..9022655daf0b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py @@ -96,11 +96,12 @@ def create_resource(self, name, **kwargs): } class TextAnalyticsClientPreparer(AzureMgmtPreparer): - def __init__(self, client_cls, client_kwargs={}, **kwargs): + def __init__(self, client_cls, api_version=None, client_kwargs={}, **kwargs): super(TextAnalyticsClientPreparer, self).__init__( name_prefix='', random_name_length=42 ) + self.api_version = api_version self.client_kwargs = client_kwargs self.client_cls = client_cls @@ -109,6 +110,7 @@ def create_resource(self, name, **kwargs): return {"client": client} def create_text_analytics_client(self, **kwargs): + self.client_kwargs["api_version"] = self.api_version text_analytics_account = self.client_kwargs.pop("text_analytics_account", None) if text_analytics_account is None: text_analytics_account = kwargs.pop("text_analytics_account") From d7a5f3309043a31df526198b9331d8da97cc11d3 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Wed, 22 Jul 2020 17:58:30 -0400 Subject: [PATCH 04/13] add samples --- .../azure-ai-textanalytics/README.md | 36 ++++++++++ .../azure-ai-textanalytics/samples/README.md | 3 + .../sample_recognize_pii_entities_async.py | 67 +++++++++++++++++++ .../samples/sample_recognize_pii_entities.py | 59 ++++++++++++++++ 4 files changed, 165 insertions(+) create mode 100644 sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py create mode 100644 sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py diff --git a/sdk/textanalytics/azure-ai-textanalytics/README.md b/sdk/textanalytics/azure-ai-textanalytics/README.md index caf4dc27f711..75b2f40d51ab 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/README.md @@ -4,6 +4,7 @@ Text Analytics is a cloud-based service that provides advanced natural language * Sentiment Analysis * Named Entity Recognition * Linked Entity Recognition +* Personally Identifiable Information (PII) Entity Recognition * Language Detection * Key Phrase Extraction @@ -184,6 +185,7 @@ The following section provides several code snippets covering some of the most c * [Analyze Sentiment](#analyze-sentiment "Analyze sentiment") * [Recognize Entities](#recognize-entities "Recognize entities") * [Recognize Linked Entities](#recognize-linked-entities "Recognize linked entities") +* [Recognize PII Entities](#recognize-pii-entities "Recognize pii entities") * [Extract Key Phrases](#extract-key-phrases "Extract key phrases") * [Detect Language](#detect-language "Detect language") @@ -290,6 +292,35 @@ The returned response is a heterogeneous list of result and error objects: list[ Please refer to the service documentation for a conceptual discussion of [entity linking][linked_entity_recognition] and [supported types][linked_entities_categories]. +### Recognize PII entities +[recognize_pii_entities][recognize_pii_entities] recognizes and categorizes Personally Identifiable Information (PII) entities in its input text, such as +Social Security Numbers, bank account information, credit card numbers, and more. + +```python +from azure.core.credentials import AzureKeyCredential +from azure.ai.textanalytics import TextAnalyticsClient, ApiVersion + +credential = AzureKeyCredential("") +endpoint="https://.api.cognitive.microsoft.com/" + +text_analytics_client = TextAnalyticsClient(endpoint, credential, api_version=ApiVersion.V3_1_preview_1) + +documents = [ + "The employee's SSN is 555-55-5555.", + "The employee's phone number is 555-55-5555." +] +response = text_analytics_client.recognize_pii_entities(documents, language="en") +result = [doc for doc in response if not doc.is_error] +for doc in result: + for entity in doc.entities: + print("Entity: \t", entity.text, "\tCategory: \t", entity.category, + "\tConfidence Score: \t", entity.confidence_score) +``` + +The returned response is a heterogeneous list of result and error objects: list[[RecognizePiiEntitiesResult][recognize_pii_entities_result], [DocumentError][document_error]] + +Please refer to the service documentation for [supported PII entity types][pii_entity_categories]. + ### Extract key phrases [extract_key_phrases][extract_key_phrases] determines the main talking points in its input text. For example, for the input text "The food was delicious and there were wonderful staff", the API returns: "food" and "wonderful staff". @@ -412,6 +443,7 @@ Authenticate the client with a Cognitive Services/Text Analytics API key or a to In a batch of documents: * Analyze sentiment: [sample_analyze_sentiment.py][analyze_sentiment_sample] ([async version][analyze_sentiment_sample_async]) * Recognize entities: [sample_recognize_entities.py][recognize_entities_sample] ([async version][recognize_entities_sample_async]) +* Recognize personally identifiable information: [sample_recognize_pii_entities.py][recognize_pii_entities_sample] ([async version][recognize_pii_entities_sample_async]) * Recognize linked entities: [sample_recognize_linked_entities.py][recognize_linked_entities_sample] ([async version][recognize_linked_entities_sample_async]) * Extract key phrases: [sample_extract_key_phrases.py][extract_key_phrases_sample] ([async version][extract_key_phrases_sample_async]) * Detect language: [sample_detect_language.py][detect_language_sample] ([async version][detect_language_sample_async]) @@ -458,6 +490,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [document_error]: https://aka.ms/azsdk-python-textanalytics-documenterror [detect_language_result]: https://aka.ms/azsdk-python-textanalytics-detectlanguageresult [recognize_entities_result]: https://aka.ms/azsdk-python-textanalytics-recognizeentitiesresult +[recognize_pii_entities_result]: https://aka.ms/azsdk-python-textanalytics-recognizepiientitiesresult [recognize_linked_entities_result]: https://aka.ms/azsdk-python-textanalytics-recognizelinkedentitiesresult [analyze_sentiment_result]: https://aka.ms/azsdk-python-textanalytics-analyzesentimentresult [extract_key_phrases_result]: https://aka.ms/azsdk-python-textanalytics-extractkeyphrasesresult @@ -477,6 +510,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [key_phrase_extraction]: https://docs.microsoft.com/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-keyword-extraction [linked_entities_categories]: https://docs.microsoft.com/azure/cognitive-services/text-analytics/named-entity-types?tabs=general [linked_entity_recognition]: https://docs.microsoft.com/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking +[pii_entity_categories]: https://docs.microsoft.com/azure/cognitive-services/text-analytics/named-entity-types?tabs=personal [named_entity_recognition]: https://docs.microsoft.com/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking [named_entity_categories]: https://docs.microsoft.com/azure/cognitive-services/text-analytics/named-entity-types?tabs=general @@ -496,6 +530,8 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [recognize_entities_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_entities_async.py [recognize_linked_entities_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_linked_entities.py [recognize_linked_entities_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_linked_entities_async.py +[recognize_pii_entities_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py +[recognize_pii_entities_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py [cla]: https://cla.microsoft.com [code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/README.md b/sdk/textanalytics/azure-ai-textanalytics/samples/README.md index 06faea2b664e..1cbc36ad4107 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/README.md @@ -24,6 +24,7 @@ These sample programs show common scenarios for the Text Analytics client's offe |[sample_detect_language.py][detect_language] and [sample_detect_language_async.py][detect_language_async]|Detect language in documents| |[sample_recognize_entities.py][recognize_entities] and [sample_recognize_entities_async.py][recognize_entities_async]|Recognize named entities in documents| |[sample_recognize_linked_entities.py][recognize_linked_entities] and [sample_recognize_linked_entities_async.py][recognize_linked_entities_async]|Recognize linked entities in documents| +|[sample_recognize_pii_entities.py][recognize_pii_entities] and [sample_recognize_pii_entities_async.py][recognize_pii_entities_async]|Recognize personally identifiable information in documents| |[sample_extract_key_phrases.py][extract_key_phrases] and [sample_extract_key_phrases_async.py][extract_key_phrases_async]|Extract key phrases from documents| |[sample_analyze_sentiment.py][analyze_sentiment] and [sample_analyze_sentiment_async.py][analyze_sentiment_async]|Analyze the sentiment of documents| |[sample_alternative_document_input.py][sample_alternative_document_input] and [sample_alternative_document_input_async.py][sample_alternative_document_input_async]|Pass documents to an endpoint using dicts| @@ -72,6 +73,8 @@ what you can do with the Azure Text Analytics client library. [recognize_entities_async]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_entities_async.py [recognize_linked_entities]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_linked_entities.py [recognize_linked_entities_async]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_linked_entities_async.py +[recognize_pii_entities]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py +[recognize_pii_entities_async]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py [extract_key_phrases]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_extract_key_phrases.py [extract_key_phrases_async]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_extract_key_phrases_async.py [analyze_sentiment]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_sentiment.py diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py new file mode 100644 index 000000000000..29d546688fe3 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: sample_recognize_pii_entities_async.py + +DESCRIPTION: + This sample demonstrates how to recognize personally identifiable information in a batch of documents. + +USAGE: + python sample_recognize_pii_entities_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_TEXT_ANALYTICS_ENDPOINT - the endpoint to your Cognitive Services resource. + 2) AZURE_TEXT_ANALYTICS_KEY - your Text Analytics subscription key +""" + +import os +import asyncio + + +class RecognizePiiEntitiesSampleAsync(object): + + async def recognize_pii_entities_async(self): + # [START batch_recognize_pii_entities_async] + from azure.core.credentials import AzureKeyCredential + from azure.ai.textanalytics import ApiVersion + from azure.ai.textanalytics.aio import TextAnalyticsClient + + endpoint = os.environ["AZURE_TEXT_ANALYTICS_ENDPOINT"] + key = os.environ["AZURE_TEXT_ANALYTICS_KEY"] + + text_analytics_client = TextAnalyticsClient( + endpoint=endpoint, credential=AzureKeyCredential(key), api_version=ApiVersion.V3_1_preview_1 + ) + documents = [ + "The employee's SSN is 555-55-5555.", + "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + "Is 998.214.865-68 your Brazilian CPF number?" + ] + + async with text_analytics_client: + result = await text_analytics_client.recognize_pii_entities(documents) + + docs = [doc for doc in result if not doc.is_error] + + for idx, doc in enumerate(docs): + print("Document text: {}".format(documents[idx])) + for entity in doc.entities: + print("Entity: {}".format(entity.text)) + print("Category: {}".format(entity.category)) + print("Confidence Score: {}\n".format(entity.confidence_score)) + # [END batch_recognize_pii_entities_async] + + +async def main(): + sample = RecognizePiiEntitiesSampleAsync() + await sample.recognize_pii_entities_async() + +if __name__ == '__main__': + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py new file mode 100644 index 000000000000..5c1a30c5e1a4 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: sample_recognize_pii_entities.py + +DESCRIPTION: + This sample demonstrates how to recognize personally identifiable information in a batch of documents. + +USAGE: + python sample_recognize_pii_entities.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_TEXT_ANALYTICS_ENDPOINT - the endpoint to your Cognitive Services resource. + 2) AZURE_TEXT_ANALYTICS_KEY - your Text Analytics subscription key +""" + +import os + + +class RecognizePiiEntitiesSample(object): + + def recognize_pii_entities(self): + # [START batch_recognize_pii_entities] + from azure.core.credentials import AzureKeyCredential + from azure.ai.textanalytics import TextAnalyticsClient, ApiVersion + + endpoint = os.environ["AZURE_TEXT_ANALYTICS_ENDPOINT"] + key = os.environ["AZURE_TEXT_ANALYTICS_KEY"] + + text_analytics_client = TextAnalyticsClient( + endpoint=endpoint, credential=AzureKeyCredential(key), api_version=ApiVersion.V3_1_preview_1 + ) + documents = [ + "The employee's SSN is 555-55-5555.", + "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + "Is 998.214.865-68 your Brazilian CPF number?" + ] + + result = text_analytics_client.recognize_pii_entities(documents) + docs = [doc for doc in result if not doc.is_error] + + for idx, doc in enumerate(docs): + print("Document text: {}".format(documents[idx])) + for entity in doc.entities: + print("Entity: {}".format(entity.text)) + print("Category: {}".format(entity.category)) + print("Confidence Score: {}\n".format(entity.confidence_score)) + # [END batch_recognize_pii_entities] + + +if __name__ == '__main__': + sample = RecognizePiiEntitiesSample() + sample.recognize_pii_entities() From 44807d71285ea172ed37e94eb9df2584aa66a292 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Thu, 23 Jul 2020 13:12:25 -0400 Subject: [PATCH 05/13] fix docstrings --- .../azure-ai-textanalytics/CHANGELOG.md | 4 ++-- sdk/textanalytics/azure-ai-textanalytics/README.md | 1 + .../azure/ai/textanalytics/_models.py | 14 +++++++------- .../ai/textanalytics/_text_analytics_client.py | 1 - .../aio/_text_analytics_client_async.py | 1 - 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md index 7a4f4861272a..9912ab7d6f64 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md +++ b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md @@ -2,9 +2,9 @@ ## 1.0.1 (Unreleased) -**New featurest** +**New features** -- We have added an endpoint `recognize_pii_entities` which returns entities containing personal information for a batch of documents. Only available for version v3.1-preview.1 and up. +- We have added an API `recognize_pii_entities` which returns entities containing personal information for a batch of documents. Only available for version v3.1-preview.1 and up. ## 1.0.0 (2020-06-09) diff --git a/sdk/textanalytics/azure-ai-textanalytics/README.md b/sdk/textanalytics/azure-ai-textanalytics/README.md index 75b2f40d51ab..94e9a87def4e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/README.md @@ -500,6 +500,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [analyze_sentiment]: https://aka.ms/azsdk-python-textanalytics-analyzesentiment [recognize_entities]: https://aka.ms/azsdk-python-textanalytics-recognizeentities +[recognize_pii_entities]: https://aka.ms/azsdk-python-textanalytics-recognizepiientities [recognize_linked_entities]: https://aka.ms/azsdk-python-textanalytics-recognizelinkedentities [extract_key_phrases]: https://aka.ms/azsdk-python-textanalytics-extractkeyphrases [detect_language]: https://aka.ms/azsdk-python-textanalytics-detectlanguage diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py index a33ddcf6d2af..3bf8aad17a6e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py @@ -102,7 +102,7 @@ class RecognizeEntitiesResult(DictMixin): :vartype entities: list[~azure.ai.textanalytics.CategorizedEntity] :ivar warnings: Warnings encountered while processing document. Results will still be returned - if there are warnings, but they may not be fully accurate. + if there are warnings, but they may not be fully accurate. :vartype warnings: list[~azure.ai.textanalytics.TextAnalyticsWarning] :ivar statistics: If show_stats=true was specified in the request this field will contain information about the document payload. @@ -128,7 +128,7 @@ class RecognizePiiEntitiesResult(DictMixin): """RecognizePiiEntitiesResult is a result object which contains the recognized Personally Identifiable Information (PII) entities from a particular document. - + :ivar str id: Unique, non-empty document identifier that matches the document id that was passed in with the request. If not specified in the request, an id is assigned for the document. @@ -136,7 +136,7 @@ class RecognizePiiEntitiesResult(DictMixin): :vartype entities: list[~azure.ai.textanalytics.PiiEntity] :ivar warnings: Warnings encountered while processing document. Results will still be returned - if there are warnings, but they may not be fully accurate. + if there are warnings, but they may not be fully accurate. :vartype warnings: list[~azure.ai.textanalytics.TextAnalyticsWarning] :ivar statistics: If show_stats=true was specified in the request this field will contain information about the document payload. @@ -169,7 +169,7 @@ class DetectLanguageResult(DictMixin): :ivar primary_language: The primary language detected in the document. :vartype primary_language: ~azure.ai.textanalytics.DetectedLanguage :ivar warnings: Warnings encountered while processing document. Results will still be returned - if there are warnings, but they may not be fully accurate. + if there are warnings, but they may not be fully accurate. :vartype warnings: list[~azure.ai.textanalytics.TextAnalyticsWarning] :ivar statistics: If show_stats=true was specified in the request this field will contain information about the document payload. @@ -341,7 +341,7 @@ class ExtractKeyPhrasesResult(DictMixin): in the input document. :vartype key_phrases: list[str] :ivar warnings: Warnings encountered while processing document. Results will still be returned - if there are warnings, but they may not be fully accurate. + if there are warnings, but they may not be fully accurate. :vartype warnings: list[~azure.ai.textanalytics.TextAnalyticsWarning] :ivar statistics: If show_stats=true was specified in the request this field will contain information about the document payload. @@ -375,7 +375,7 @@ class RecognizeLinkedEntitiesResult(DictMixin): :vartype entities: list[~azure.ai.textanalytics.LinkedEntity] :ivar warnings: Warnings encountered while processing document. Results will still be returned - if there are warnings, but they may not be fully accurate. + if there are warnings, but they may not be fully accurate. :vartype warnings: list[~azure.ai.textanalytics.TextAnalyticsWarning] :ivar statistics: If show_stats=true was specified in the request this field will contain information about the document payload. @@ -411,7 +411,7 @@ class AnalyzeSentimentResult(DictMixin): 'neutral', 'negative', 'mixed' :vartype sentiment: str :ivar warnings: Warnings encountered while processing document. Results will still be returned - if there are warnings, but they may not be fully accurate. + if there are warnings, but they may not be fully accurate. :vartype warnings: list[~azure.ai.textanalytics.TextAnalyticsWarning] :ivar statistics: If show_stats=true was specified in the request this field will contain information about the document payload. 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 9d236eed3ddf..d2c460650eea 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 @@ -236,7 +236,6 @@ def recognize_pii_entities( # type: ignore Returns a list of personal information entities ("SSN", "Bank Account", etc) in the document. For the list of supported entity types, check https://aka.ms/tanerpii - for document length limits, maximum batch size, and supported text encoding. See https://docs.microsoft.com/azure/cognitive-services/text-analytics/overview#data-limits for document length limits, maximum batch size, and supported text encoding. 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 db2b5777c025..61f02fc75f23 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 @@ -238,7 +238,6 @@ async def recognize_pii_entities( # type: ignore Returns a list of personal information entities ("SSN", "Bank Account", etc) in the document. For the list of supported entity types, check https://aka.ms/tanerpii - for document length limits, maximum batch size, and supported text encoding. See https://docs.microsoft.com/azure/cognitive-services/text-analytics/overview#data-limits for document length limits, maximum batch size, and supported text encoding. From 0721cf2797ac427f57fa4b2adfcc5b64f5f594ca Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Thu, 23 Jul 2020 13:21:09 -0400 Subject: [PATCH 06/13] switch to TA team recommended SSN example --- .../azure-ai-textanalytics/README.md | 4 ++-- .../sample_recognize_pii_entities_async.py | 2 +- .../samples/sample_recognize_pii_entities.py | 2 +- ...ntities.test_all_successful_passing_dict.yaml | 12 ++++++------ ...l_successful_passing_text_document_input.yaml | 12 ++++++------ ...ognize_pii_entities.test_bad_credentials.yaml | 2 +- ...ii_entities.test_bad_model_version_error.yaml | 6 +++--- ..._pii_entities.test_batch_size_over_limit.yaml | 6 +++--- ...ntities.test_batch_size_over_limit_error.yaml | 6 +++--- ...test_client_passed_default_language_hint.yaml | 16 ++++++++-------- ...ment_attribute_error_no_result_attribute.yaml | 6 +++--- ...nt_attribute_error_nonexistent_attribute.yaml | 4 ++-- ...ognize_pii_entities.test_document_errors.yaml | 4 ++-- ...nize_pii_entities.test_document_warnings.yaml | 6 +++--- ...ze_pii_entities.test_duplicate_ids_error.yaml | 4 ++-- ...pii_entities.test_empty_credential_class.yaml | 2 +- ..._pii_entities.test_input_with_all_errors.yaml | 4 ++-- ...pii_entities.test_input_with_some_errors.yaml | 6 +++--- ...entities.test_invalid_language_hint_docs.yaml | 6 +++--- ...tities.test_invalid_language_hint_method.yaml | 4 ++-- ...pii_entities.test_language_kwarg_english.yaml | 6 +++--- ...nize_pii_entities.test_length_with_emoji.yaml | 6 +++--- ...gnize_pii_entities.test_out_of_order_ids.yaml | 6 +++--- ...entities.test_output_same_order_as_input.yaml | 6 +++--- ...est_recognize_pii_entities.test_pass_cls.yaml | 6 +++--- ...ze_pii_entities.test_passing_only_string.yaml | 12 ++++++------ ...ies.test_per_item_dont_use_language_hint.yaml | 6 +++--- ...ii_entities.test_rotate_subscription_key.yaml | 14 +++++++------- ...tities.test_show_stats_and_model_version.yaml | 6 +++--- ...ize_pii_entities.test_too_many_documents.yaml | 6 +++--- ...t_recognize_pii_entities.test_user_agent.yaml | 6 +++--- ....test_whole_batch_dont_use_language_hint.yaml | 6 +++--- ..._entities.test_whole_batch_language_hint.yaml | 6 +++--- ...ch_language_hint_and_dict_per_item_hints.yaml | 6 +++--- ..._whole_batch_language_hint_and_obj_input.yaml | 4 ++-- ...tch_language_hint_and_obj_per_item_hints.yaml | 6 +++--- ...s_async.test_all_successful_passing_dict.yaml | 12 ++++++------ ...l_successful_passing_text_document_input.yaml | 12 ++++++------ ..._pii_entities_async.test_bad_credentials.yaml | 2 +- ...ities_async.test_bad_model_version_error.yaml | 6 +++--- ...ntities_async.test_batch_size_over_limit.yaml | 4 ++-- ...s_async.test_batch_size_over_limit_error.yaml | 6 +++--- ...test_client_passed_default_language_hint.yaml | 14 +++++++------- ...ment_attribute_error_no_result_attribute.yaml | 4 ++-- ...nt_attribute_error_nonexistent_attribute.yaml | 4 ++-- ..._pii_entities_async.test_document_errors.yaml | 6 +++--- ...ii_entities_async.test_document_warnings.yaml | 4 ++-- ..._entities_async.test_duplicate_ids_error.yaml | 4 ++-- ...tities_async.test_empty_credential_class.yaml | 2 +- ...ntities_async.test_input_with_all_errors.yaml | 6 +++--- ...tities_async.test_input_with_some_errors.yaml | 6 +++--- ...es_async.test_invalid_language_hint_docs.yaml | 4 ++-- ..._async.test_invalid_language_hint_method.yaml | 4 ++-- ...tities_async.test_language_kwarg_english.yaml | 4 ++-- ...ii_entities_async.test_length_with_emoji.yaml | 6 +++--- ...pii_entities_async.test_out_of_order_ids.yaml | 6 +++--- ...es_async.test_output_same_order_as_input.yaml | 6 +++--- ...cognize_pii_entities_async.test_pass_cls.yaml | 6 +++--- ..._entities_async.test_passing_only_string.yaml | 12 ++++++------ ...ync.test_per_item_dont_use_language_hint.yaml | 6 +++--- ...ities_async.test_rotate_subscription_key.yaml | 14 +++++++------- ..._async.test_show_stats_and_model_version.yaml | 6 +++--- ...i_entities_async.test_too_many_documents.yaml | 4 ++-- ...gnize_pii_entities_async.test_user_agent.yaml | 6 +++--- ....test_whole_batch_dont_use_language_hint.yaml | 6 +++--- ...ies_async.test_whole_batch_language_hint.yaml | 6 +++--- ...ch_language_hint_and_dict_per_item_hints.yaml | 6 +++--- ..._whole_batch_language_hint_and_obj_input.yaml | 6 +++--- ...tch_language_hint_and_obj_per_item_hints.yaml | 6 +++--- .../tests/test_recognize_pii_entities.py | 12 ++++++------ .../tests/test_recognize_pii_entities_async.py | 12 ++++++------ .../tests/test_text_analytics.py | 6 +++--- 72 files changed, 229 insertions(+), 229 deletions(-) diff --git a/sdk/textanalytics/azure-ai-textanalytics/README.md b/sdk/textanalytics/azure-ai-textanalytics/README.md index 94e9a87def4e..447662f0b9e3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/README.md @@ -306,8 +306,8 @@ endpoint="https://.api.cognitive.microsoft.com/" text_analytics_client = TextAnalyticsClient(endpoint, credential, api_version=ApiVersion.V3_1_preview_1) documents = [ - "The employee's SSN is 555-55-5555.", - "The employee's phone number is 555-55-5555." + "The employee's SSN is 859-98-0987.", + "The employee's phone number is 555-555-5555." ] response = text_analytics_client.recognize_pii_entities(documents, language="en") result = [doc for doc in response if not doc.is_error] diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py index 29d546688fe3..157ecb97395b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py @@ -39,7 +39,7 @@ async def recognize_pii_entities_async(self): endpoint=endpoint, credential=AzureKeyCredential(key), api_version=ApiVersion.V3_1_preview_1 ) documents = [ - "The employee's SSN is 555-55-5555.", + "The employee's SSN is 859-98-0987.", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", "Is 998.214.865-68 your Brazilian CPF number?" ] diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py index 5c1a30c5e1a4..b0e7efd4fbbc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py @@ -37,7 +37,7 @@ def recognize_pii_entities(self): endpoint=endpoint, credential=AzureKeyCredential(key), api_version=ApiVersion.V3_1_preview_1 ) documents = [ - "The employee's SSN is 555-55-5555.", + "The employee's SSN is 859-98-0987.", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", "Is 998.214.865-68 your Brazilian CPF number?" ] diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_dict.yaml index 7f68100d5652..6115f8866337 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_dict.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"documents": [{"id": "1", "text": "My SSN is 555-55-5555.", "language": + body: '{"documents": [{"id": "1", "text": "My SSN is 859-98-0987.", "language": "en"}, {"id": "2", "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", "language": "en"}, {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": "en"}]}' @@ -21,20 +21,20 @@ interactions: uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true response: body: - string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"555-55-5555","category":"U.S. - Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.85}],"warnings":[]},{"id":"2","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone + string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]},{"id":"2","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone Number","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABA Routing Number","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 2ba78094-50da-41e5-a1eb-6cf31353c399 + - 13864f85-984d-4a9b-8df3-c1409f0731b2 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Wed, 22 Jul 2020 15:42:16 GMT + - Thu, 23 Jul 2020 17:18:42 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '798' + - '155' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_text_document_input.yaml index 16823339d529..83aef7498df7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_text_document_input.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"documents": [{"id": "1", "text": "My SSN is 555-55-5555.", "language": + body: '{"documents": [{"id": "1", "text": "My SSN is 859-98-0987.", "language": "en"}, {"id": "2", "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", "language": "en"}, {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": "en"}]}' @@ -21,20 +21,20 @@ interactions: uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true response: body: - string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"555-55-5555","category":"U.S. - Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.85}],"warnings":[]},{"id":"2","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone + string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]},{"id":"2","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone Number","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABA Routing Number","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - fe4b4b94-91ad-411d-9000-66c71e569f0d + - 276ffd38-55e9-4b8a-b4c8-a4af7c8286d9 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Wed, 22 Jul 2020 15:42:16 GMT + - Thu, 23 Jul 2020 17:18:42 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '111' + - '116' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_credentials.yaml index 55f370b006c0..43251cb00dd4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_credentials.yaml @@ -26,7 +26,7 @@ interactions: content-length: - '224' date: - - Wed, 22 Jul 2020 15:42:17 GMT + - Thu, 23 Jul 2020 17:18:42 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_model_version_error.yaml index 623e9fcbcba7..f1724aa7e308 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_model_version_error.yaml @@ -23,11 +23,11 @@ interactions: model version. Possible values are: latest,2020-04-01,2019-10-01,2020-02-01"}}}' headers: apim-request-id: - - 706ab128-3c70-4fa5-9e2e-d1127db48393 + - c999c1e5-ba3b-4351-b65d-4356362357c6 content-type: - application/json; charset=utf-8 date: - - Wed, 22 Jul 2020 15:42:17 GMT + - Thu, 23 Jul 2020 17:18:43 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5' + - '4' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit.yaml index b2511e69dab8..e6d9bfac4ea9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit.yaml @@ -767,11 +767,11 @@ interactions: request contains too many records. Max 1000 records are permitted."}}}' headers: apim-request-id: - - ec0a5fa0-f002-48d4-8494-b5fc0a061aff + - e5020bb3-4385-4907-a1b3-61723f79cc79 content-type: - application/json; charset=utf-8 date: - - Wed, 22 Jul 2020 15:42:18 GMT + - Thu, 23 Jul 2020 17:18:44 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -779,7 +779,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '184' + - '12' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit_error.yaml index 71deeb3ec706..6df091febc9b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit_error.yaml @@ -732,11 +732,11 @@ interactions: request contains too many records. Max 1000 records are permitted."}}}' headers: apim-request-id: - - 4ddaa1e8-0682-4c46-b710-8367320ffe60 + - 6218bc52-cde1-4519-8dc8-4b4092efdf08 content-type: - application/json; charset=utf-8 date: - - Wed, 22 Jul 2020 15:42:19 GMT + - Thu, 23 Jul 2020 17:18:44 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -744,7 +744,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '10' + - '12' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_client_passed_default_language_hint.yaml index 64776799457b..3c9c62ee0c6a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_client_passed_default_language_hint.yaml @@ -30,11 +30,11 @@ interactions: language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 27dd8397-2d02-47c7-94bd-89603065c425 + - e517622a-4ba2-4b27-8be3-ffd90abfb08a content-type: - application/json; charset=utf-8 date: - - Wed, 22 Jul 2020 15:42:19 GMT + - Thu, 23 Jul 2020 17:18:44 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '1' + - '2' status: code: 200 message: OK @@ -71,13 +71,13 @@ interactions: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - ca2e051f-01a2-4061-b6ef-39787b77acf0 + - 8e0ca8ea-a7f1-4d04-842d-754d62659c85 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Wed, 22 Jul 2020 15:42:20 GMT + - Thu, 23 Jul 2020 17:18:46 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -85,7 +85,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '101' + - '105' status: code: 200 message: OK @@ -120,11 +120,11 @@ interactions: language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 745f298d-3c82-414c-912d-3c3c74849718 + - e78f6c84-2db5-49ed-8225-d4cde4b86ffe content-type: - application/json; charset=utf-8 date: - - Wed, 22 Jul 2020 15:42:20 GMT + - Thu, 23 Jul 2020 17:18:46 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_no_result_attribute.yaml index 79e1d7ae4350..0bb07ba438d7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_no_result_attribute.yaml @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 150adaf0-49bc-4795-a129-6d712619698f + - 4dba7af2-29bb-432a-9178-13ef624f7d00 content-type: - application/json; charset=utf-8 date: - - Wed, 22 Jul 2020 15:42:21 GMT + - Thu, 23 Jul 2020 17:18:45 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '1' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_nonexistent_attribute.yaml index b1ac6ff5cade..bf373a45aa29 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_nonexistent_attribute.yaml @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 4b943a67-30de-4bba-a0c9-e4d5a7c2a1d7 + - 166e1ed8-b99e-4510-b4d1-5d75ea2f8657 content-type: - application/json; charset=utf-8 date: - - Wed, 22 Jul 2020 15:42:21 GMT + - Thu, 23 Jul 2020 17:18:46 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_errors.yaml index 9c84ab6b0021..33172475a45f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_errors.yaml @@ -32,11 +32,11 @@ interactions: see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - fde2af85-e654-4e50-bcc8-8b0b7e6b4108 + - 860c6f8f-a447-4ec6-9b05-97c5608db3be content-type: - application/json; charset=utf-8 date: - - Wed, 22 Jul 2020 15:42:21 GMT + - Thu, 23 Jul 2020 17:18:47 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_warnings.yaml index 37d14dee96d9..b71ea37404f9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_warnings.yaml @@ -22,13 +22,13 @@ interactions: string: '{"documents":[{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 26cb730a-49d2-4991-8690-f64b4b76d0d8 + - ae9db402-9b0d-4553-b16c-253ece9ed33d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Wed, 22 Jul 2020 15:42:22 GMT + - Thu, 23 Jul 2020 17:18:47 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '74' + - '89' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_duplicate_ids_error.yaml index 01d2e365e374..a99d43e7817f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_duplicate_ids_error.yaml @@ -23,11 +23,11 @@ interactions: contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: apim-request-id: - - 90e9260e-8f04-438e-a0f5-63af6d3933ee + - 30ffe8c5-5001-4d47-800f-eaabba1d0476 content-type: - application/json; charset=utf-8 date: - - Wed, 22 Jul 2020 15:42:22 GMT + - Thu, 23 Jul 2020 17:18:47 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_empty_credential_class.yaml index 577aa11eb21c..e1b1c1696e6d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_empty_credential_class.yaml @@ -26,7 +26,7 @@ interactions: content-length: - '224' date: - - Wed, 22 Jul 2020 15:42:23 GMT + - Thu, 23 Jul 2020 17:18:47 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_all_errors.yaml index 3637e7689408..2cb6dac5da50 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_all_errors.yaml @@ -28,11 +28,11 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 7889c2ee-e26a-4192-b115-c1653a6a76af + - 7fe78d0f-6593-4b2f-9ae1-b60130cd536e content-type: - application/json; charset=utf-8 date: - - Wed, 22 Jul 2020 15:42:23 GMT + - Thu, 23 Jul 2020 17:18:48 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_some_errors.yaml index eb88c662e2a3..8919d3d7bcdb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_some_errors.yaml @@ -28,13 +28,13 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - ef4fe81e-114f-4c88-a719-61260e339679 + - 51708468-566e-4842-8040-bba767c70b62 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Wed, 22 Jul 2020 15:42:24 GMT + - Thu, 23 Jul 2020 17:18:49 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '80' + - '81' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_docs.yaml index 73183f710f3b..9aab4df07b0d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_docs.yaml @@ -24,11 +24,11 @@ interactions: language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - bce4767a-7dc9-490e-a8c9-67a0d700c6ba + - 12a8aace-0a2e-4d2f-8f8f-eda36292b9c4 content-type: - application/json; charset=utf-8 date: - - Wed, 22 Jul 2020 15:42:24 GMT + - Thu, 23 Jul 2020 17:18:48 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '1' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_method.yaml index b272938c7451..e12d677551cf 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_method.yaml @@ -24,11 +24,11 @@ interactions: language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 833870fa-a34c-4e0b-a416-476ed1a814c6 + - 091a3f26-8289-46b5-84e9-53e768af8099 content-type: - application/json; charset=utf-8 date: - - Wed, 22 Jul 2020 15:42:24 GMT + - Thu, 23 Jul 2020 17:18:49 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_english.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_english.yaml index fe78b6c6e2cc..630dc3868ef0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_english.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_english.yaml @@ -23,13 +23,13 @@ interactions: Gates","category":"Person","offset":0,"length":10,"confidenceScore":0.81},{"text":"Microsoft","category":"Organization","offset":25,"length":9,"confidenceScore":0.64}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 52d7b215-8f46-4f3a-88b6-86fbe5dece23 + - 985c402a-0b74-4e08-99b6-c3e7bd65cb6c content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Wed, 22 Jul 2020 15:42:25 GMT + - Thu, 23 Jul 2020 17:18:50 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '71' + - '76' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_length_with_emoji.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_length_with_emoji.yaml index 31172ce1b2db..e075ff77154d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_length_with_emoji.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_length_with_emoji.yaml @@ -23,13 +23,13 @@ interactions: Social Security Number (SSN)","offset":7,"length":11,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - b2a4bc80-04a9-4ebd-a3cf-f120c9def163 + - f3e0cf88-545b-44f3-818e-55313dec114e content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Wed, 22 Jul 2020 15:42:25 GMT + - Thu, 23 Jul 2020 17:18:50 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '76' + - '82' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_out_of_order_ids.yaml index d46754114453..915900cec00e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_out_of_order_ids.yaml @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 2c7e1bfe-6b13-42e3-9d2a-edaf42180bed + - f418d976-9a1d-470a-bf54-f651eae438f4 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4 date: - - Wed, 22 Jul 2020 15:42:26 GMT + - Thu, 23 Jul 2020 17:18:51 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '90' + - '71' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_output_same_order_as_input.yaml index b585e68e4ffa..52010d6d45cd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_output_same_order_as_input.yaml @@ -24,13 +24,13 @@ interactions: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]},{"id":"4","entities":[],"warnings":[]},{"id":"5","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - fc87fd4a-2e8c-4ab5-a481-16d4e4e9e36b + - b73d414c-77b4-4732-985f-8429761f6f6e content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=5 date: - - Wed, 22 Jul 2020 15:42:26 GMT + - Thu, 23 Jul 2020 17:18:51 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '68' + - '64' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_pass_cls.yaml index 19669d386a08..8a11ff62aa8b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_pass_cls.yaml @@ -22,13 +22,13 @@ interactions: string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 5aacd6e8-9005-4b19-a482-1782ce5663b8 + - 610f90f1-6b0e-4da9-b901-a49a0446cb6d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Wed, 22 Jul 2020 15:42:26 GMT + - Thu, 23 Jul 2020 17:18:52 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '80' + - '77' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_passing_only_string.yaml index 1ed7b4776861..caf22991e8a1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_passing_only_string.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"documents": [{"id": "0", "text": "My SSN is 555-55-5555.", "language": + body: '{"documents": [{"id": "0", "text": "My SSN is 859-98-0987.", "language": "en"}, {"id": "1", "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", "language": "en"}, {"id": "2", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": "en"}, @@ -22,8 +22,8 @@ interactions: uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true response: body: - string: '{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"0","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"555-55-5555","category":"U.S. - Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.85}],"warnings":[]},{"id":"1","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone + string: '{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"0","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]},{"id":"1","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone Number","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABA Routing Number","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"id":"2","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid @@ -31,13 +31,13 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - a1fadb45-9f8f-4dcb-ba8e-05cf978be574 + - 09bb7695-a0b3-4468-8dde-4be27d7a2b82 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Wed, 22 Jul 2020 15:42:27 GMT + - Thu, 23 Jul 2020 17:18:52 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -45,7 +45,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '104' + - '110' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_per_item_dont_use_language_hint.yaml index 9f49e9639633..4f1f295bfaab 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_per_item_dont_use_language_hint.yaml @@ -24,13 +24,13 @@ interactions: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - f3ae32ad-6161-49cb-b666-d410ce2bb25c + - f3aaa4c2-89dd-49e8-9da7-df2a929da79d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Wed, 22 Jul 2020 15:42:27 GMT + - Thu, 23 Jul 2020 17:18:53 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '124' + - '78' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_rotate_subscription_key.yaml index 082ce73add93..16bc09074252 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_rotate_subscription_key.yaml @@ -24,13 +24,13 @@ interactions: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 1e1a2d45-8aa2-42dc-af56-fbb87d9f772d + - 62420b86-ba2f-4072-8b84-a38812d95461 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Wed, 22 Jul 2020 15:42:28 GMT + - Thu, 23 Jul 2020 17:18:53 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '103' + - '77' status: code: 200 message: OK @@ -71,7 +71,7 @@ interactions: content-length: - '224' date: - - Wed, 22 Jul 2020 15:42:28 GMT + - Thu, 23 Jul 2020 17:18:53 GMT status: code: 401 message: PermissionDenied @@ -100,13 +100,13 @@ interactions: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - c5ce3d0b-f8bd-4a4e-8b08-82a99b308596 + - 88eb6c1d-7ae6-4cde-b702-c5b9c966fa0d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Wed, 22 Jul 2020 15:42:28 GMT + - Thu, 23 Jul 2020 17:18:53 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -114,7 +114,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '83' + - '73' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_show_stats_and_model_version.yaml index 5764f641da86..a479942ee575 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_show_stats_and_model_version.yaml @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 3744b6da-292c-4dc5-a0df-ca58e065bb15 + - 8b7f87bf-9f61-49a9-8922-df3b7eae9483 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4 date: - - Wed, 22 Jul 2020 15:42:29 GMT + - Thu, 23 Jul 2020 17:18:54 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '85' + - '61' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_too_many_documents.yaml index 9ee694379416..420bbcc096da 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_too_many_documents.yaml @@ -27,13 +27,13 @@ interactions: https://aka.ms/text-analytics-data-limits for additional information"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 5dce91e4-9361-430c-9212-86740b654d45 + - 83d12e97-5e75-482f-ac1b-877e700662b8 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=6 date: - - Wed, 22 Jul 2020 15:42:29 GMT + - Thu, 23 Jul 2020 17:18:54 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '68' + - '69' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_user_agent.yaml index f9258283244e..8c49dbc2c0ba 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_user_agent.yaml @@ -24,13 +24,13 @@ interactions: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 981024dd-93c0-47e9-aaca-1abe767a9490 + - 739b9ff6-e3f2-4041-b78b-c2d390ca9ed6 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Wed, 22 Jul 2020 15:42:29 GMT + - Thu, 23 Jul 2020 17:18:54 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '111' + - '77' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_dont_use_language_hint.yaml index 1c86003c93d3..ebedb39b5cbb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_dont_use_language_hint.yaml @@ -24,13 +24,13 @@ interactions: string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 1141db4f-3b2f-46ca-b80c-44bebdbc89fe + - 0f25d1cb-0166-4738-8795-84c423d91cea content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3 date: - - Wed, 22 Jul 2020 15:42:30 GMT + - Thu, 23 Jul 2020 17:18:55 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '80' + - '89' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint.yaml index c321b12266e3..3662a1b3e496 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint.yaml @@ -30,11 +30,11 @@ interactions: language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 24c22a21-8e3e-46fe-b2d3-20ee4dc6c236 + - cb56e9a0-cd4c-4993-8dfd-73de11e11b05 content-type: - application/json; charset=utf-8 date: - - Wed, 22 Jul 2020 15:42:30 GMT + - Thu, 23 Jul 2020 17:18:55 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '3' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index 0737d9b3a289..4ae9d2f8c7b1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -28,13 +28,13 @@ interactions: language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 8b921391-5fe4-4e0f-a495-e070c62d293d + - 1fbd838e-78e4-4f31-82ab-a938eadcc52a content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Wed, 22 Jul 2020 15:42:30 GMT + - Thu, 23 Jul 2020 17:18:55 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '78' + - '68' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_input.yaml index d5288550f9b9..ce527caa8a66 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_input.yaml @@ -30,11 +30,11 @@ interactions: language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 320c086e-f163-4754-833c-bcc10a98605a + - bd493308-10ac-4a0c-a559-9f7a74ac4850 content-type: - application/json; charset=utf-8 date: - - Wed, 22 Jul 2020 15:42:32 GMT + - Thu, 23 Jul 2020 17:18:56 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index f0f81adfef65..c1da00e77783 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -28,13 +28,13 @@ interactions: language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - de7841b4-2001-4130-a21d-28aa8bdde9be + - 29a834cb-81ac-47dd-951a-5662f273892f content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1 date: - - Wed, 22 Jul 2020 15:42:31 GMT + - Thu, 23 Jul 2020 17:18:56 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '72' + - '60' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_dict.yaml index 1aa8f6e97661..04a4bc7abfd3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_dict.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"documents": [{"id": "1", "text": "My SSN is 555-55-5555.", "language": + body: '{"documents": [{"id": "1", "text": "My SSN is 859-98-0987.", "language": "en"}, {"id": "2", "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", "language": "en"}, {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": "en"}]}' @@ -17,20 +17,20 @@ interactions: uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true response: body: - string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"555-55-5555","category":"U.S. - Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.85}],"warnings":[]},{"id":"2","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone + string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]},{"id":"2","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone Number","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABA Routing Number","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 9779320f-d441-4dd4-b883-3dfe994a0063 + apim-request-id: c4e0391d-522b-418c-a87e-f72c6c97f98b content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Wed, 22 Jul 2020 17:57:54 GMT + date: Thu, 23 Jul 2020 17:19:44 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '107' + x-envoy-upstream-service-time: '108' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_text_document_input.yaml index f00d4563e77d..6d1ee80da1d7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_text_document_input.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"documents": [{"id": "1", "text": "My SSN is 555-55-5555.", "language": + body: '{"documents": [{"id": "1", "text": "My SSN is 859-98-0987.", "language": "en"}, {"id": "2", "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", "language": "en"}, {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": "en"}]}' @@ -17,20 +17,20 @@ interactions: uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true response: body: - string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"555-55-5555","category":"U.S. - Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.85}],"warnings":[]},{"id":"2","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone + string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]},{"id":"2","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone Number","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABA Routing Number","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 96b5dccc-4d7b-4e4f-94ce-07c50a99e744 + apim-request-id: 4d0ae1a3-25c0-4790-ab39-081afa0a43a3 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Wed, 22 Jul 2020 17:57:55 GMT + date: Thu, 23 Jul 2020 17:19:45 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '289' + x-envoy-upstream-service-time: '109' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_credentials.yaml index 41279d957e78..96d6c3d4a0b8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_credentials.yaml @@ -20,7 +20,7 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Wed, 22 Jul 2020 17:57:55 GMT + date: Thu, 23 Jul 2020 17:19:45 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_model_version_error.yaml index de1df197f345..4e1306e98bde 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_model_version_error.yaml @@ -18,13 +18,13 @@ interactions: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid model version. Possible values are: latest,2020-04-01,2019-10-01,2020-02-01"}}}' headers: - apim-request-id: 97c6120d-45db-4f9f-9548-785672722770 + apim-request-id: ba42b7a5-d3b0-4c87-a0f5-0436156f76b1 content-type: application/json; charset=utf-8 - date: Wed, 22 Jul 2020 17:57:55 GMT + date: Thu, 23 Jul 2020 17:19:45 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '4' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit.yaml index 885e086206b6..0fe34da57c2b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit.yaml @@ -762,9 +762,9 @@ interactions: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 1000 records are permitted."}}}' headers: - apim-request-id: 7d742832-ce7f-4a92-8768-8e137aa7b1b0 + apim-request-id: 995c6d23-0bc5-4396-b3af-96c997a2e97c content-type: application/json; charset=utf-8 - date: Wed, 22 Jul 2020 17:57:57 GMT + date: Thu, 23 Jul 2020 17:19:46 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit_error.yaml index 2f1d637f20e2..3f1f1d23f729 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit_error.yaml @@ -727,13 +727,13 @@ interactions: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 1000 records are permitted."}}}' headers: - apim-request-id: f8c1e84a-bc97-477a-b8f1-6ba3b267c43e + apim-request-id: aa9589a7-7057-4899-8853-64e9a9a4588e content-type: application/json; charset=utf-8 - date: Wed, 22 Jul 2020 17:57:58 GMT + date: Thu, 23 Jul 2020 17:19:47 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '15' + x-envoy-upstream-service-time: '10' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_client_passed_default_language_hint.yaml index b23369ddc733..5669a1da3adb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_client_passed_default_language_hint.yaml @@ -25,9 +25,9 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 81f2f465-54cb-4985-acf7-dc538d1bc45a + apim-request-id: 63a32671-e4f1-4ecf-b8dd-5c58051ebda9 content-type: application/json; charset=utf-8 - date: Wed, 22 Jul 2020 17:57:58 GMT + date: Thu, 23 Jul 2020 17:19:47 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -56,14 +56,14 @@ interactions: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 08a167cd-b6fb-44fc-bdb4-943bbaa35424 + apim-request-id: 272a4c80-6b40-476f-9d05-701c2a54ea72 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Wed, 22 Jul 2020 17:57:58 GMT + date: Thu, 23 Jul 2020 17:19:47 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '172' + x-envoy-upstream-service-time: '92' status: code: 200 message: OK @@ -94,9 +94,9 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 11f34b41-e33c-4e12-af87-47939753fb90 + apim-request-id: f344bd29-a1d2-4109-8499-fc1817740a61 content-type: application/json; charset=utf-8 - date: Wed, 22 Jul 2020 17:57:58 GMT + date: Thu, 23 Jul 2020 17:19:47 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_no_result_attribute.yaml index 8bd067078f5a..8fe2598fc88b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_no_result_attribute.yaml @@ -18,9 +18,9 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 693ff8ec-ae25-4ce1-b85e-edd1c105c8a8 + apim-request-id: 2d1f109a-17ed-4b83-b1aa-ee11406f4c72 content-type: application/json; charset=utf-8 - date: Wed, 22 Jul 2020 17:57:58 GMT + date: Thu, 23 Jul 2020 17:19:48 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_nonexistent_attribute.yaml index a10f36d0b901..032e12b2f14b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_nonexistent_attribute.yaml @@ -18,9 +18,9 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 95444ce6-da60-4cbe-b0d0-da9b39757069 + apim-request-id: f363c9a3-910b-4437-95f5-b3bfb7d1038c content-type: application/json; charset=utf-8 - date: Wed, 22 Jul 2020 17:57:59 GMT + date: Thu, 23 Jul 2020 17:19:48 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_errors.yaml index e9f0421906d7..ca234b3ee88c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_errors.yaml @@ -27,13 +27,13 @@ interactions: size to: 5120 text elements. For additional details on the data limitations see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 9f7b57d5-a38b-488a-ba18-16afec66a964 + apim-request-id: f7e35a3b-dfe2-494c-82b7-f3ab5759b8c3 content-type: application/json; charset=utf-8 - date: Wed, 22 Jul 2020 17:57:59 GMT + date: Thu, 23 Jul 2020 17:19:49 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '3' + x-envoy-upstream-service-time: '4' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_warnings.yaml index c42c64f081d9..164878ac9be1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_warnings.yaml @@ -17,10 +17,10 @@ interactions: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 3c5948fd-5e57-4222-b579-297401b09b91 + apim-request-id: c4071053-3e6e-4bfa-bc65-6a85f13e053f content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Wed, 22 Jul 2020 17:58:00 GMT + date: Thu, 23 Jul 2020 17:19:49 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_duplicate_ids_error.yaml index 90d8439ab402..b5208e4b463e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_duplicate_ids_error.yaml @@ -18,9 +18,9 @@ interactions: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: - apim-request-id: 73cafbd2-e328-49d4-8ec6-abd0d4e32361 + apim-request-id: eb8ac9bb-71d3-4895-925d-be0bd9e70da7 content-type: application/json; charset=utf-8 - date: Wed, 22 Jul 2020 17:58:00 GMT + date: Thu, 23 Jul 2020 17:19:50 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_empty_credential_class.yaml index fb46f86e2331..0fcb79963484 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_empty_credential_class.yaml @@ -20,7 +20,7 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Wed, 22 Jul 2020 17:58:00 GMT + date: Thu, 23 Jul 2020 17:19:49 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_all_errors.yaml index bfbeaf134d60..0bbd383679e5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_all_errors.yaml @@ -23,13 +23,13 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 3753aac3-eae8-445c-85f8-b97b54efc52d + apim-request-id: 04aae24c-cda5-46df-82d8-d00ce1b997e0 content-type: application/json; charset=utf-8 - date: Wed, 22 Jul 2020 17:58:00 GMT + date: Thu, 23 Jul 2020 17:19:50 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '3' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_some_errors.yaml index 271a74e2ee1f..a1bd4c36a655 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_some_errors.yaml @@ -23,14 +23,14 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: d5424f92-095b-4b4e-846c-296ecdbd6ee7 + apim-request-id: b41905c9-2f2d-40ee-821e-2482d4882b61 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Wed, 22 Jul 2020 17:58:01 GMT + date: Thu, 23 Jul 2020 17:19:50 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '82' + x-envoy-upstream-service-time: '79' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_docs.yaml index 2fadfe43aa94..07bf4a04c6db 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_docs.yaml @@ -19,9 +19,9 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: ce012a59-13f9-4e3f-b456-ce67ce38e974 + apim-request-id: a77e3fea-6c23-477f-8a72-3885cb74e89f content-type: application/json; charset=utf-8 - date: Wed, 22 Jul 2020 17:58:02 GMT + date: Thu, 23 Jul 2020 17:19:51 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_method.yaml index ef510b9aa468..ab4b47342a6b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_method.yaml @@ -19,9 +19,9 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: a6576cc1-60ef-43bf-b14b-c29cec86751e + apim-request-id: 439917d9-3122-42b3-923f-f45d5927a520 content-type: application/json; charset=utf-8 - date: Wed, 22 Jul 2020 17:58:02 GMT + date: Thu, 23 Jul 2020 17:19:51 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_language_kwarg_english.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_language_kwarg_english.yaml index 422e042bd5b5..4c931318f80b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_language_kwarg_english.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_language_kwarg_english.yaml @@ -18,10 +18,10 @@ interactions: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","statistics":{"charactersCount":35,"transactionsCount":1},"entities":[{"text":"Bill Gates","category":"Person","offset":0,"length":10,"confidenceScore":0.81},{"text":"Microsoft","category":"Organization","offset":25,"length":9,"confidenceScore":0.64}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 3e428412-5600-4c14-9f33-ce4723e74e10 + apim-request-id: e612f043-5b57-4974-ac8f-8eaca05cdffe content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Wed, 22 Jul 2020 17:58:02 GMT + date: Thu, 23 Jul 2020 17:19:52 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_length_with_emoji.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_length_with_emoji.yaml index 228d1aea98b7..0b6ee9b2eff7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_length_with_emoji.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_length_with_emoji.yaml @@ -18,14 +18,14 @@ interactions: string: '{"documents":[{"id":"0","entities":[{"text":"123-12-1234","category":"U.S. Social Security Number (SSN)","offset":7,"length":11,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 9d758df2-7d6b-49ea-b340-b97b68c560a3 + apim-request-id: d85eded0-4738-4ad8-a913-eec883d4d280 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Wed, 22 Jul 2020 17:58:06 GMT + date: Thu, 23 Jul 2020 17:19:52 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '95' + x-envoy-upstream-service-time: '71' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_out_of_order_ids.yaml index a69d0a998953..8854aaac4d1a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_out_of_order_ids.yaml @@ -21,14 +21,14 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: a256c35f-7d28-443f-bceb-5ff23d7f48ad + apim-request-id: d2c34707-fd54-46d1-afcb-6428d916171f content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 - date: Wed, 22 Jul 2020 17:58:06 GMT + date: Thu, 23 Jul 2020 17:19:52 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '60' + x-envoy-upstream-service-time: '65' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_output_same_order_as_input.yaml index 0a40a69a1e7b..5f4753385eab 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_output_same_order_as_input.yaml @@ -19,14 +19,14 @@ interactions: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]},{"id":"4","entities":[],"warnings":[]},{"id":"5","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 88901263-451b-4cec-b381-01b9564ae3c0 + apim-request-id: 10d501bf-1bf5-48be-85bd-818a8a4d6bb3 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=5 - date: Wed, 22 Jul 2020 17:58:06 GMT + date: Thu, 23 Jul 2020 17:19:53 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '71' + x-envoy-upstream-service-time: '75' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_pass_cls.yaml index 22a6c17d6522..61672923a812 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_pass_cls.yaml @@ -17,14 +17,14 @@ interactions: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 5ee30fda-744d-4397-bf16-3e5c95934535 + apim-request-id: 6ab92cde-4042-45d2-913b-d6dad6184a02 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Wed, 22 Jul 2020 17:58:07 GMT + date: Thu, 23 Jul 2020 17:19:53 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '69' + x-envoy-upstream-service-time: '67' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_passing_only_string.yaml index f5976e5b343a..49919db5c1a5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_passing_only_string.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"documents": [{"id": "0", "text": "My SSN is 555-55-5555.", "language": + body: '{"documents": [{"id": "0", "text": "My SSN is 859-98-0987.", "language": "en"}, {"id": "1", "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", "language": "en"}, {"id": "2", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": "en"}, @@ -18,22 +18,22 @@ interactions: uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=true response: body: - string: '{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"0","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"555-55-5555","category":"U.S. - Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.85}],"warnings":[]},{"id":"1","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone + string: '{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"0","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"859-98-0987","category":"U.S. + Social Security Number (SSN)","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]},{"id":"1","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"Phone Number","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABA Routing Number","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"id":"2","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[{"text":"998.214.865-68","category":"Brazil CPF Number","offset":3,"length":14,"confidenceScore":0.85}],"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: f95256ba-8298-41b4-894c-98c09f547277 + apim-request-id: 21f124c4-b892-42b9-be5e-3a0e28bc5a7b content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Wed, 22 Jul 2020 17:58:07 GMT + date: Thu, 23 Jul 2020 17:19:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '107' + x-envoy-upstream-service-time: '138' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_per_item_dont_use_language_hint.yaml index fa39bb6a3115..41c33df290da 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_per_item_dont_use_language_hint.yaml @@ -19,14 +19,14 @@ interactions: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 2a056d2f-d725-4d15-a0e6-6ffb64afd273 + apim-request-id: 6fa308e2-4146-49ac-8ce0-0a2e16abfe4b content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Wed, 22 Jul 2020 17:58:08 GMT + date: Thu, 23 Jul 2020 17:19:55 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '74' + x-envoy-upstream-service-time: '76' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_rotate_subscription_key.yaml index d999a4cfe9a0..7240fb83ad83 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_rotate_subscription_key.yaml @@ -19,14 +19,14 @@ interactions: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 6f86e0bd-3f1c-4705-98d8-c2427e20a894 + apim-request-id: e2afbde5-c8c3-449e-a0e2-bb5614441303 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Wed, 22 Jul 2020 17:58:08 GMT + date: Thu, 23 Jul 2020 17:19:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '100' + x-envoy-upstream-service-time: '89' status: code: 200 message: OK @@ -54,7 +54,7 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: content-length: '224' - date: Wed, 22 Jul 2020 17:58:08 GMT + date: Thu, 23 Jul 2020 17:19:54 GMT status: code: 401 message: PermissionDenied @@ -79,14 +79,14 @@ interactions: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: a2726729-47d6-4680-82db-fd3d3a81981f + apim-request-id: 2b14ce51-9676-4d12-9b44-097d78573dfb content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Wed, 22 Jul 2020 17:58:08 GMT + date: Thu, 23 Jul 2020 17:19:55 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '86' + x-envoy-upstream-service-time: '93' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_show_stats_and_model_version.yaml index 2888e398d8cd..84d162bbfe7c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_show_stats_and_model_version.yaml @@ -21,14 +21,14 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 0fa0ba0a-75c5-4dd0-bd4e-d4ed10406a3d + apim-request-id: 78db8b35-0650-43b1-a905-2cd921c8d718 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 - date: Wed, 22 Jul 2020 17:58:09 GMT + date: Thu, 23 Jul 2020 17:19:55 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '63' + x-envoy-upstream-service-time: '66' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_too_many_documents.yaml index 7f0fa5aeafa3..43a8e7242ceb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_too_many_documents.yaml @@ -22,10 +22,10 @@ interactions: number of documents in the request have exceeded the data limitations. See https://aka.ms/text-analytics-data-limits for additional information"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: a7f3a6fe-4a25-47d9-a099-ace086210dd3 + apim-request-id: 66c2a87a-f154-4c39-b802-7b8d814ff3f9 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=6 - date: Wed, 22 Jul 2020 17:58:10 GMT + date: Thu, 23 Jul 2020 17:19:55 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_user_agent.yaml index a823fd3e4f73..d8f59385c858 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_user_agent.yaml @@ -19,14 +19,14 @@ interactions: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: c4a4c7a5-da8e-4d0c-b097-afc135745e8e + apim-request-id: 0893dd3a-bf7e-41d4-bcab-e428b9b5d47d content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Wed, 22 Jul 2020 17:58:10 GMT + date: Thu, 23 Jul 2020 17:19:57 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '84' + x-envoy-upstream-service-time: '83' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_dont_use_language_hint.yaml index 70a229d87226..621a498dac4e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_dont_use_language_hint.yaml @@ -19,14 +19,14 @@ interactions: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 35ede6e1-4ad8-4bf3-a181-cfd9105c9e4c + apim-request-id: 5bb21583-5cc7-4ab1-a81e-b7fcf1236fad content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 - date: Wed, 22 Jul 2020 17:58:11 GMT + date: Thu, 23 Jul 2020 17:19:58 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '86' + x-envoy-upstream-service-time: '131' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint.yaml index 44b3dcfa8074..afb081801c19 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint.yaml @@ -25,13 +25,13 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 09743105-6d27-4a2f-b25f-9baa9c066b8c + apim-request-id: e8eae430-8838-4fda-9dd5-ae283cbdd325 content-type: application/json; charset=utf-8 - date: Wed, 22 Jul 2020 17:58:11 GMT + date: Thu, 23 Jul 2020 17:19:58 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '4' + x-envoy-upstream-service-time: '3' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index c46329f4ce0c..57c8e5b5bf65 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -23,14 +23,14 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: b2ec660c-07a7-41e0-b787-f9f50ac5d73c + apim-request-id: 79b03f0e-bebb-4096-8010-14fb8734dadd content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Wed, 22 Jul 2020 17:58:11 GMT + date: Thu, 23 Jul 2020 17:19:57 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '72' + x-envoy-upstream-service-time: '80' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_input.yaml index 4022703f98a5..d94542bb0494 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_input.yaml @@ -25,13 +25,13 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: a25d4b3b-58fa-4d99-a9c8-3c05392a28c8 + apim-request-id: c6aa447e-1084-4062-965a-ad3db86ab494 content-type: application/json; charset=utf-8 - date: Wed, 22 Jul 2020 17:58:12 GMT + date: Thu, 23 Jul 2020 17:19:59 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '2' + x-envoy-upstream-service-time: '1' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index 96fb6c9f008c..b6435020ea8f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -23,14 +23,14 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: de496a4b-6885-4b95-8bb9-94f385f24aee + apim-request-id: 718b9664-7ee9-49ed-8d15-243f632afe44 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 - date: Wed, 22 Jul 2020 17:58:12 GMT + date: Thu, 23 Jul 2020 17:19:58 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '56' + x-envoy-upstream-service-time: '64' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py index 1fad16fe59b8..bde20590a89f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py @@ -37,12 +37,12 @@ def test_no_single_input(self, client): @TextAnalyticsClientPreparer() def test_all_successful_passing_dict(self, client): - docs = [{"id": "1", "text": "My SSN is 555-55-5555."}, + docs = [{"id": "1", "text": "My SSN is 859-98-0987."}, {"id": "2", "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."}, {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?"}] response = client.recognize_pii_entities(docs, show_stats=True) - self.assertEqual(response[0].entities[0].text, "555-55-5555") + self.assertEqual(response[0].entities[0].text, "859-98-0987") self.assertEqual(response[0].entities[0].category, "U.S. Social Security Number (SSN)") self.assertEqual(response[1].entities[0].text, "111000025") # self.assertEqual(response[1].entities[0].category, "ABA Routing Number") # Service is currently returning PhoneNumber here @@ -60,13 +60,13 @@ def test_all_successful_passing_dict(self, client): @TextAnalyticsClientPreparer() def test_all_successful_passing_text_document_input(self, client): docs = [ - TextDocumentInput(id="1", text="My SSN is 555-55-5555."), + TextDocumentInput(id="1", text="My SSN is 859-98-0987."), TextDocumentInput(id="2", text="Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."), TextDocumentInput(id="3", text="Is 998.214.865-68 your Brazilian CPF number?") ] response = client.recognize_pii_entities(docs, show_stats=True) - self.assertEqual(response[0].entities[0].text, "555-55-5555") + self.assertEqual(response[0].entities[0].text, "859-98-0987") self.assertEqual(response[0].entities[0].category, "U.S. Social Security Number (SSN)") self.assertEqual(response[1].entities[0].text, "111000025") # self.assertEqual(response[1].entities[0].category, "ABA Routing Number") # Service is currently returning PhoneNumber here @@ -89,14 +89,14 @@ def test_length_with_emoji(self, client): @TextAnalyticsClientPreparer() def test_passing_only_string(self, client): docs = [ - u"My SSN is 555-55-5555.", + u"My SSN is 859-98-0987.", u"Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", u"Is 998.214.865-68 your Brazilian CPF number?", u"" ] response = client.recognize_pii_entities(docs, show_stats=True) - self.assertEqual(response[0].entities[0].text, "555-55-5555") + self.assertEqual(response[0].entities[0].text, "859-98-0987") self.assertEqual(response[0].entities[0].category, "U.S. Social Security Number (SSN)") self.assertEqual(response[1].entities[0].text, "111000025") # self.assertEqual(response[1].entities[0].category, "ABA Routing Number") # Service is currently returning PhoneNumber here diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py index 50ca148c1c07..c779779ef8a3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py @@ -37,12 +37,12 @@ async def test_no_single_input(self, client): @TextAnalyticsClientPreparer() async def test_all_successful_passing_dict(self, client): - docs = [{"id": "1", "text": "My SSN is 555-55-5555."}, + docs = [{"id": "1", "text": "My SSN is 859-98-0987."}, {"id": "2", "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."}, {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?"}] response = await client.recognize_pii_entities(docs, show_stats=True) - self.assertEqual(response[0].entities[0].text, "555-55-5555") + self.assertEqual(response[0].entities[0].text, "859-98-0987") self.assertEqual(response[0].entities[0].category, "U.S. Social Security Number (SSN)") self.assertEqual(response[1].entities[0].text, "111000025") # self.assertEqual(response[1].entities[0].category, "ABA Routing Number") # Service is currently returning PhoneNumber here @@ -60,13 +60,13 @@ async def test_all_successful_passing_dict(self, client): @TextAnalyticsClientPreparer() async def test_all_successful_passing_text_document_input(self, client): docs = [ - TextDocumentInput(id="1", text="My SSN is 555-55-5555."), + TextDocumentInput(id="1", text="My SSN is 859-98-0987."), TextDocumentInput(id="2", text="Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."), TextDocumentInput(id="3", text="Is 998.214.865-68 your Brazilian CPF number?") ] response = await client.recognize_pii_entities(docs, show_stats=True) - self.assertEqual(response[0].entities[0].text, "555-55-5555") + self.assertEqual(response[0].entities[0].text, "859-98-0987") self.assertEqual(response[0].entities[0].category, "U.S. Social Security Number (SSN)") self.assertEqual(response[1].entities[0].text, "111000025") # self.assertEqual(response[1].entities[0].category, "ABA Routing Number") # Service is currently returning PhoneNumber here @@ -89,14 +89,14 @@ async def test_length_with_emoji(self, client): @TextAnalyticsClientPreparer() async def test_passing_only_string(self, client): docs = [ - u"My SSN is 555-55-5555.", + u"My SSN is 859-98-0987.", u"Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", u"Is 998.214.865-68 your Brazilian CPF number?", u"" ] response = await client.recognize_pii_entities(docs, show_stats=True) - self.assertEqual(response[0].entities[0].text, "555-55-5555") + self.assertEqual(response[0].entities[0].text, "859-98-0987") self.assertEqual(response[0].entities[0].category, "U.S. Social Security Number (SSN)") self.assertEqual(response[1].entities[0].text, "111000025") # self.assertEqual(response[1].entities[0].category, "ABA Routing Number") # Service is currently returning PhoneNumber here diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_text_analytics.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_text_analytics.py index 485eb549ff45..d49a4a0cc3e4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_text_analytics.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_text_analytics.py @@ -32,7 +32,7 @@ def test_repr(self): categorized_entity = _models.CategorizedEntity(text="Bill Gates", category="Person", subcategory="Age", confidence_score=0.899) - pii_entity = _models.PiiEntity(text="555-55-5555", category="SSN", subcategory=None, confidence_score=0.899) + pii_entity = _models.PiiEntity(text="859-98-0987", category="SSN", subcategory=None, confidence_score=0.899) text_document_statistics = _models.TextDocumentStatistics(character_count=14, transaction_count=18) @@ -123,7 +123,7 @@ def test_repr(self): self.assertEqual("DetectedLanguage(name=English, iso6391_name=en, confidence_score=1.0)", repr(detected_language)) self.assertEqual("CategorizedEntity(text=Bill Gates, category=Person, subcategory=Age, confidence_score=0.899)", repr(categorized_entity)) - self.assertEqual("PiiEntity(text=555-55-5555, category=SSN, subcategory=None, confidence_score=0.899)", repr(pii_entity)) + self.assertEqual("PiiEntity(text=859-98-0987, category=SSN, subcategory=None, confidence_score=0.899)", repr(pii_entity)) self.assertEqual("TextDocumentStatistics(character_count=14, transaction_count=18)", repr(text_document_statistics)) self.assertEqual("RecognizeEntitiesResult(id=1, entities=[CategorizedEntity(text=Bill Gates, category=Person, " @@ -132,7 +132,7 @@ def test_repr(self): "These words will be truncated and may result in unreliable model predictions.)], " "statistics=TextDocumentStatistics(character_count=14, transaction_count=18), " "is_error=False)", repr(recognize_entities_result)) - self.assertEqual("RecognizePiiEntitiesResult(id=1, entities=[PiiEntity(text=555-55-5555, category=SSN, " + self.assertEqual("RecognizePiiEntitiesResult(id=1, entities=[PiiEntity(text=859-98-0987, category=SSN, " "subcategory=None, confidence_score=0.899)], " "warnings=[TextAnalyticsWarning(code=LongWordsInDocument, message=The document contains very long words (longer than 64 characters). " "These words will be truncated and may result in unreliable model predictions.)], " From 1e4349680436d5bd1a48629092fa9acb2f6f96e2 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Thu, 23 Jul 2020 13:22:12 -0400 Subject: [PATCH 07/13] remove unnecessary second result_set.update call --- .../azure-ai-textanalytics/azure/ai/textanalytics/_models.py | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py index 3bf8aad17a6e..109c60c5fb95 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py @@ -500,7 +500,6 @@ def __getattr__(self, attr): + DetectLanguageResult().keys() + RecognizeLinkedEntitiesResult().keys() + AnalyzeSentimentResult().keys() + ExtractKeyPhrasesResult().keys() ) - result_set.update() result_attrs = result_set.difference(DocumentError().keys()) if attr in result_attrs: raise AttributeError( From fa34686893f096687500f68e3b3db1dd14e5d131 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Fri, 24 Jul 2020 12:09:10 -0400 Subject: [PATCH 08/13] switch sample from ABA to phone number --- .../async_samples/sample_recognize_pii_entities_async.py | 4 ++-- .../samples/sample_recognize_pii_entities.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py index 157ecb97395b..a7c09d66d105 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py @@ -40,8 +40,8 @@ async def recognize_pii_entities_async(self): ) documents = [ "The employee's SSN is 859-98-0987.", - "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", - "Is 998.214.865-68 your Brazilian CPF number?" + "Is 998.214.865-68 your Brazilian CPF number?", + "My phone number is 555-555-5555" ] async with text_analytics_client: diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py index b0e7efd4fbbc..829fa7dc0376 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py @@ -38,8 +38,8 @@ def recognize_pii_entities(self): ) documents = [ "The employee's SSN is 859-98-0987.", - "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", - "Is 998.214.865-68 your Brazilian CPF number?" + "Is 998.214.865-68 your Brazilian CPF number?", + "My phone number is 555-555-5555" ] result = text_analytics_client.recognize_pii_entities(documents) From bccca0df86c313d198e2a8933f7ecc1690f6773c Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Wed, 29 Jul 2020 15:29:41 -0400 Subject: [PATCH 09/13] change tests since default api version is now v3.1-preview.1 --- .../tests/test_recognize_pii_entities.py | 7 +++---- .../tests/test_recognize_pii_entities_async.py | 4 ++-- sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py | 4 +--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py index bde20590a89f..a35ccf655264 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py @@ -15,13 +15,12 @@ from azure.ai.textanalytics import ( TextAnalyticsClient, TextDocumentInput, - VERSION, - ApiVersion + VERSION ) # pre-apply the client_cls positional argument so it needn't be explicitly passed below # the first one -TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient, api_version=ApiVersion.V3_1_preview_1) +TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) # TODO: add back offset and length checks throughout this test once I add them @@ -379,7 +378,7 @@ def test_invalid_language_hint_docs(self, client): @GlobalTextAnalyticsAccountPreparer() def test_rotate_subscription_key(self, resource_group, location, text_analytics_account, text_analytics_account_key): credential = AzureKeyCredential(text_analytics_account_key) - client = TextAnalyticsClient(text_analytics_account, credential, api_version=ApiVersion.V3_1_preview_1) + client = TextAnalyticsClient(text_analytics_account, credential) docs = [{"id": "1", "text": "I will go to the park."}, {"id": "2", "text": "I did not like the hotel we stayed at."}, diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py index c779779ef8a3..c8e38af984dd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py @@ -22,7 +22,7 @@ # pre-apply the client_cls positional argument so it needn't be explicitly passed below # the first one -TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient, api_version=ApiVersion.V3_1_preview_1) +TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) # TODO: add back offset and length checks throughout this test once I add them class TestRecognizePIIEntities(AsyncTextAnalyticsTest): @@ -379,7 +379,7 @@ async def test_invalid_language_hint_docs(self, client): @GlobalTextAnalyticsAccountPreparer() async def test_rotate_subscription_key(self, resource_group, location, text_analytics_account, text_analytics_account_key): credential = AzureKeyCredential(text_analytics_account_key) - client = TextAnalyticsClient(text_analytics_account, credential, api_version=ApiVersion.V3_1_preview_1) + client = TextAnalyticsClient(text_analytics_account, credential) docs = [{"id": "1", "text": "I will go to the park."}, {"id": "2", "text": "I did not like the hotel we stayed at."}, diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py b/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py index 9022655daf0b..483d63cabcd3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py @@ -96,12 +96,11 @@ def create_resource(self, name, **kwargs): } class TextAnalyticsClientPreparer(AzureMgmtPreparer): - def __init__(self, client_cls, api_version=None, client_kwargs={}, **kwargs): + def __init__(self, client_cls, client_kwargs={}, **kwargs): super(TextAnalyticsClientPreparer, self).__init__( name_prefix='', random_name_length=42 ) - self.api_version = api_version self.client_kwargs = client_kwargs self.client_cls = client_cls @@ -110,7 +109,6 @@ def create_resource(self, name, **kwargs): return {"client": client} def create_text_analytics_client(self, **kwargs): - self.client_kwargs["api_version"] = self.api_version text_analytics_account = self.client_kwargs.pop("text_analytics_account", None) if text_analytics_account is None: text_analytics_account = kwargs.pop("text_analytics_account") From e5451eaa6ca92de0624ac2d3cc0eaa8e41183844 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Wed, 29 Jul 2020 15:38:04 -0400 Subject: [PATCH 10/13] polished multiapi tests --- .../tests/test_multiapi.py | 22 +++++++++---------- .../tests/test_multiapi_async.py | 22 +++++++++---------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi.py index 64633222a99a..bd4ec13abde5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi.py @@ -3,29 +3,27 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +import functools from azure.core.credentials import AzureKeyCredential from azure.ai.textanalytics import TextAnalyticsClient, ApiVersion from testcase import TextAnalyticsTest, GlobalTextAnalyticsAccountPreparer +from testcase import TextAnalyticsClientPreparer as _TextAnalyticsClientPreparer +# pre-apply the client_cls positional argument so it needn't be explicitly passed below +TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) class TestRecognizeEntities(TextAnalyticsTest): @GlobalTextAnalyticsAccountPreparer() - def test_default_api_version(self, resource_group, location, text_analytics_account, text_analytics_account_key): - credential = AzureKeyCredential(text_analytics_account_key) - client = TextAnalyticsClient(text_analytics_account, credential) - + @TextAnalyticsClientPreparer() + def test_default_api_version(self, client): assert "v3.1-preview.1" in client._client._client._base_url @GlobalTextAnalyticsAccountPreparer() - def test_v3_0_api_version(self, resource_group, location, text_analytics_account, text_analytics_account_key): - credential = AzureKeyCredential(text_analytics_account_key) - client = TextAnalyticsClient(text_analytics_account, credential, api_version=ApiVersion.V3_0) - + @TextAnalyticsClientPreparer(client_kwargs={"api_version": ApiVersion.V3_0}) + def test_v3_0_api_version(self, client): assert "v3.0" in client._client._client._base_url @GlobalTextAnalyticsAccountPreparer() - def test_v3_1_preview_1_api_version(self, resource_group, location, text_analytics_account, text_analytics_account_key): - credential = AzureKeyCredential(text_analytics_account_key) - client = TextAnalyticsClient(text_analytics_account, credential, api_version=ApiVersion.V3_1_PREVIEW_1) - + @TextAnalyticsClientPreparer(client_kwargs={"api_version": ApiVersion.V3_1_PREVIEW_1}) + def test_v3_1_preview_1_api_version(self, client): assert "v3.1-preview.1" in client._client._client._base_url \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi_async.py index dbd20a22218e..830072716808 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi_async.py @@ -3,30 +3,28 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ +import functools from azure.core.credentials import AzureKeyCredential from azure.ai.textanalytics import ApiVersion from azure.ai.textanalytics.aio import TextAnalyticsClient from testcase import TextAnalyticsTest, GlobalTextAnalyticsAccountPreparer +from testcase import TextAnalyticsClientPreparer as _TextAnalyticsClientPreparer +# pre-apply the client_cls positional argument so it needn't be explicitly passed below +TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) class TestRecognizeEntities(TextAnalyticsTest): @GlobalTextAnalyticsAccountPreparer() - def test_default_api_version(self, resource_group, location, text_analytics_account, text_analytics_account_key): - credential = AzureKeyCredential(text_analytics_account_key) - client = TextAnalyticsClient(text_analytics_account, credential) - + @TextAnalyticsClientPreparer() + def test_default_api_version(self, client): assert "v3.1-preview.1" in client._client._client._base_url @GlobalTextAnalyticsAccountPreparer() - def test_v3_0_api_version(self, resource_group, location, text_analytics_account, text_analytics_account_key): - credential = AzureKeyCredential(text_analytics_account_key) - client = TextAnalyticsClient(text_analytics_account, credential, api_version=ApiVersion.V3_0) - + @TextAnalyticsClientPreparer(client_kwargs={"api_version": ApiVersion.V3_0}) + def test_v3_0_api_version(self, client): assert "v3.0" in client._client._client._base_url @GlobalTextAnalyticsAccountPreparer() - def test_v3_1_preview_1_api_version(self, resource_group, location, text_analytics_account, text_analytics_account_key): - credential = AzureKeyCredential(text_analytics_account_key) - client = TextAnalyticsClient(text_analytics_account, credential, api_version=ApiVersion.V3_1_PREVIEW_1) - + @TextAnalyticsClientPreparer(client_kwargs={"api_version": ApiVersion.V3_1_PREVIEW_1}) + def test_v3_1_preview_1_api_version(self, client): assert "v3.1-preview.1" in client._client._client._base_url \ No newline at end of file From f85ae53622cb379d49041fc289c270f5da7c7f49 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Wed, 29 Jul 2020 15:38:18 -0400 Subject: [PATCH 11/13] fixed mentions to v3.1-preview.1 in code and docstrings --- sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md | 2 +- sdk/textanalytics/azure-ai-textanalytics/README.md | 4 ++-- .../azure/ai/textanalytics/_text_analytics_client.py | 2 +- .../ai/textanalytics/aio/_text_analytics_client_async.py | 2 +- .../async_samples/sample_recognize_pii_entities_async.py | 3 ++- .../samples/sample_recognize_pii_entities.py | 3 ++- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md index fe4fc057e516..8cbe2435b6d8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md +++ b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md @@ -5,7 +5,7 @@ **New features** - We are now targeting the service's v3.1-preview.1 API as the default. If you would like to still use version v3.0 of the service, pass in `v3.0` to the kwarg `api_version` when creating your TextAnalyticsClient -- We have added an API `recognize_pii_entities` which returns entities containing personal information for a batch of documents. Only available for version v3.1-preview.1 and up. +- We have added an API `recognize_pii_entities` which returns entities containing personal information for a batch of documents. Only available for API version v3.1-preview.1 and up. ## 5.0.0 (2020-07-27) diff --git a/sdk/textanalytics/azure-ai-textanalytics/README.md b/sdk/textanalytics/azure-ai-textanalytics/README.md index 447662f0b9e3..3d96e6bdc004 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/README.md @@ -294,7 +294,7 @@ and [supported types][linked_entities_categories]. ### Recognize PII entities [recognize_pii_entities][recognize_pii_entities] recognizes and categorizes Personally Identifiable Information (PII) entities in its input text, such as -Social Security Numbers, bank account information, credit card numbers, and more. +Social Security Numbers, bank account information, credit card numbers, and more. This endpoint is only available for v3.1-preview.1 and up. ```python from azure.core.credentials import AzureKeyCredential @@ -303,7 +303,7 @@ from azure.ai.textanalytics import TextAnalyticsClient, ApiVersion credential = AzureKeyCredential("") endpoint="https://.api.cognitive.microsoft.com/" -text_analytics_client = TextAnalyticsClient(endpoint, credential, api_version=ApiVersion.V3_1_preview_1) +text_analytics_client = TextAnalyticsClient(endpoint, credential) documents = [ "The employee's SSN is 859-98-0987.", 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 d2c460650eea..c3a52be62102 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 @@ -289,7 +289,7 @@ def recognize_pii_entities( # type: ignore except AttributeError as error: if "'TextAnalyticsClient' object has no attribute 'entities_recognition_pii'" in str(error): raise NotImplementedError( - "'recognize_pii_entities' endpoint is only available for API version v3.1-preview.1" + "'recognize_pii_entities' endpoint is only available for API version v3.1-preview.1 and up" ) raise error except HttpResponseError as error: 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 61f02fc75f23..89ac9fc6c943 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 @@ -291,7 +291,7 @@ async def recognize_pii_entities( # type: ignore except AttributeError as error: if "'TextAnalyticsClient' object has no attribute 'entities_recognition_pii'" in str(error): raise NotImplementedError( - "'recognize_pii_entities' endpoint is only available for API version v3.1-preview.1" + "'recognize_pii_entities' endpoint is only available for API version v3.1-preview.1 and up" ) raise error except HttpResponseError as error: diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py index a7c09d66d105..aefd69fc2723 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py @@ -11,6 +11,7 @@ DESCRIPTION: This sample demonstrates how to recognize personally identifiable information in a batch of documents. + The endpoint recognize_pii_entities is only available for API version v3.1-preview.1 and up. USAGE: python sample_recognize_pii_entities_async.py @@ -36,7 +37,7 @@ async def recognize_pii_entities_async(self): key = os.environ["AZURE_TEXT_ANALYTICS_KEY"] text_analytics_client = TextAnalyticsClient( - endpoint=endpoint, credential=AzureKeyCredential(key), api_version=ApiVersion.V3_1_preview_1 + endpoint=endpoint, credential=AzureKeyCredential(key) ) documents = [ "The employee's SSN is 859-98-0987.", diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py index 829fa7dc0376..9ee9e18b644c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py @@ -11,6 +11,7 @@ DESCRIPTION: This sample demonstrates how to recognize personally identifiable information in a batch of documents. + The endpoint recognize_pii_entities is only available for API version v3.1-preview.1 and up. USAGE: python sample_recognize_pii_entities.py @@ -34,7 +35,7 @@ def recognize_pii_entities(self): key = os.environ["AZURE_TEXT_ANALYTICS_KEY"] text_analytics_client = TextAnalyticsClient( - endpoint=endpoint, credential=AzureKeyCredential(key), api_version=ApiVersion.V3_1_preview_1 + endpoint=endpoint, credential=AzureKeyCredential(key) ) documents = [ "The employee's SSN is 859-98-0987.", From 1bd7ac8be9ce6d1f586d467606151a254481582b Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Wed, 29 Jul 2020 16:37:28 -0400 Subject: [PATCH 12/13] make sample links highlighted text to pass verification step --- sdk/textanalytics/azure-ai-textanalytics/README.md | 4 ++-- sdk/textanalytics/azure-ai-textanalytics/samples/README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/textanalytics/azure-ai-textanalytics/README.md b/sdk/textanalytics/azure-ai-textanalytics/README.md index 3d96e6bdc004..2095fa97f2f0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/README.md @@ -531,8 +531,8 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [recognize_entities_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_entities_async.py [recognize_linked_entities_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_linked_entities.py [recognize_linked_entities_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_linked_entities_async.py -[recognize_pii_entities_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py -[recognize_pii_entities_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py +[recognize_pii_entities_sample]: `https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py` +[recognize_pii_entities_sample_async]: `https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py` [cla]: https://cla.microsoft.com [code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/README.md b/sdk/textanalytics/azure-ai-textanalytics/samples/README.md index 1cbc36ad4107..e312d2f08e86 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/README.md @@ -73,8 +73,8 @@ what you can do with the Azure Text Analytics client library. [recognize_entities_async]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_entities_async.py [recognize_linked_entities]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_linked_entities.py [recognize_linked_entities_async]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_linked_entities_async.py -[recognize_pii_entities]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py -[recognize_pii_entities_async]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py +[recognize_pii_entities]: `https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py` +[recognize_pii_entities_async]: `https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py` [extract_key_phrases]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_extract_key_phrases.py [extract_key_phrases_async]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_extract_key_phrases_async.py [analyze_sentiment]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_sentiment.py From ca141845129ee8e8722b942cf732c2832fa493cd Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Wed, 29 Jul 2020 16:52:21 -0400 Subject: [PATCH 13/13] remove square brackets from links --- sdk/textanalytics/azure-ai-textanalytics/README.md | 4 +--- sdk/textanalytics/azure-ai-textanalytics/samples/README.md | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sdk/textanalytics/azure-ai-textanalytics/README.md b/sdk/textanalytics/azure-ai-textanalytics/README.md index 2095fa97f2f0..135d48dca39c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/README.md @@ -443,7 +443,7 @@ Authenticate the client with a Cognitive Services/Text Analytics API key or a to In a batch of documents: * Analyze sentiment: [sample_analyze_sentiment.py][analyze_sentiment_sample] ([async version][analyze_sentiment_sample_async]) * Recognize entities: [sample_recognize_entities.py][recognize_entities_sample] ([async version][recognize_entities_sample_async]) -* Recognize personally identifiable information: [sample_recognize_pii_entities.py][recognize_pii_entities_sample] ([async version][recognize_pii_entities_sample_async]) +* Recognize personally identifiable information: [sample_recognize_pii_entities.py](`https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py`)([async version](`https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py`)) * Recognize linked entities: [sample_recognize_linked_entities.py][recognize_linked_entities_sample] ([async version][recognize_linked_entities_sample_async]) * Extract key phrases: [sample_extract_key_phrases.py][extract_key_phrases_sample] ([async version][extract_key_phrases_sample_async]) * Detect language: [sample_detect_language.py][detect_language_sample] ([async version][detect_language_sample_async]) @@ -531,8 +531,6 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [recognize_entities_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_entities_async.py [recognize_linked_entities_sample]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_linked_entities.py [recognize_linked_entities_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_linked_entities_async.py -[recognize_pii_entities_sample]: `https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py` -[recognize_pii_entities_sample_async]: `https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py` [cla]: https://cla.microsoft.com [code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/README.md b/sdk/textanalytics/azure-ai-textanalytics/samples/README.md index e312d2f08e86..fcb2361c8b30 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/README.md @@ -24,7 +24,7 @@ These sample programs show common scenarios for the Text Analytics client's offe |[sample_detect_language.py][detect_language] and [sample_detect_language_async.py][detect_language_async]|Detect language in documents| |[sample_recognize_entities.py][recognize_entities] and [sample_recognize_entities_async.py][recognize_entities_async]|Recognize named entities in documents| |[sample_recognize_linked_entities.py][recognize_linked_entities] and [sample_recognize_linked_entities_async.py][recognize_linked_entities_async]|Recognize linked entities in documents| -|[sample_recognize_pii_entities.py][recognize_pii_entities] and [sample_recognize_pii_entities_async.py][recognize_pii_entities_async]|Recognize personally identifiable information in documents| +|[sample_recognize_pii_entities.py](`https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py`) and [sample_recognize_pii_entities_async.py](`https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py`)|Recognize personally identifiable information in documents| |[sample_extract_key_phrases.py][extract_key_phrases] and [sample_extract_key_phrases_async.py][extract_key_phrases_async]|Extract key phrases from documents| |[sample_analyze_sentiment.py][analyze_sentiment] and [sample_analyze_sentiment_async.py][analyze_sentiment_async]|Analyze the sentiment of documents| |[sample_alternative_document_input.py][sample_alternative_document_input] and [sample_alternative_document_input_async.py][sample_alternative_document_input_async]|Pass documents to an endpoint using dicts| @@ -73,8 +73,6 @@ what you can do with the Azure Text Analytics client library. [recognize_entities_async]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_entities_async.py [recognize_linked_entities]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_linked_entities.py [recognize_linked_entities_async]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_linked_entities_async.py -[recognize_pii_entities]: `https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py` -[recognize_pii_entities_async]: `https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py` [extract_key_phrases]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_extract_key_phrases.py [extract_key_phrases_async]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_extract_key_phrases_async.py [analyze_sentiment]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_sentiment.py