diff --git a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md index ff0619621d9f..8cbe2435b6d8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md +++ b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md @@ -2,8 +2,10 @@ ## 5.0.1 (Unreleased) +**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 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 caf4dc27f711..135d48dca39c 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. This endpoint is only available for v3.1-preview.1 and up. + +```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) + +documents = [ + "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] +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](`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]) @@ -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 @@ -467,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 @@ -477,6 +511,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 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 aff577660a71..e0ac06a728c6 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..109c60c5fb95 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. @@ -124,6 +124,40 @@ 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 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: + ~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.warnings = kwargs.get("warnings", []) + self.statistics = kwargs.get("statistics", None) + self.is_error = False + + def __repr__(self): + 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): """DetectLanguageResult is a result object which contains the detected language of a particular document. @@ -135,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. @@ -193,6 +227,39 @@ 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 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.confidence_score = kwargs.get('confidence_score', None) + + @classmethod + def _from_generated(cls, entity): + return cls( + text=entity.text, + category=entity.category, + subcategory=entity.subcategory, + confidence_score=entity.confidence_score, + ) + + def __repr__(self): + return "PiiEntity(text={}, category={}, subcategory={}, confidence_score={})".format( + self.text, self.category, self.subcategory, self.confidence_score + )[:1024] + class TextAnalyticsError(DictMixin): """TextAnalyticsError contains the error code, message, and @@ -274,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. @@ -308,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. @@ -344,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. @@ -429,7 +496,7 @@ 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() ) 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..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 @@ -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,77 @@ 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 + + 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 and up" + ) + 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..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 @@ -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,76 @@ 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 + + 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 and up" + ) + raise error + except HttpResponseError as error: + process_batch_error(error) + @distributed_trace_async async def recognize_linked_entities( # type: ignore self, diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/README.md b/sdk/textanalytics/azure-ai-textanalytics/samples/README.md index 06faea2b664e..fcb2361c8b30 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](`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| 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..aefd69fc2723 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py @@ -0,0 +1,68 @@ +# 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. + 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 + + 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) + ) + documents = [ + "The employee's SSN is 859-98-0987.", + "Is 998.214.865-68 your Brazilian CPF number?", + "My phone number is 555-555-5555" + ] + + 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..9ee9e18b644c --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py @@ -0,0 +1,60 @@ +# 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. + The endpoint recognize_pii_entities is only available for API version v3.1-preview.1 and up. + +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) + ) + documents = [ + "The employee's SSN is 859-98-0987.", + "Is 998.214.865-68 your Brazilian CPF number?", + "My phone number is 555-555-5555" + ] + + 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() 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..6115f8866337 --- /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 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"}]}' + 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":"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: + - 13864f85-984d-4a9b-8df3-c1409f0731b2 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=3 + date: + - Thu, 23 Jul 2020 17:18:42 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '155' + 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..83aef7498df7 --- /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 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"}]}' + 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":"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: + - 276ffd38-55e9-4b8a-b4c8-a4af7c8286d9 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=3 + date: + - Thu, 23 Jul 2020 17:18:42 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '116' + 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..43251cb00dd4 --- /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: + - Thu, 23 Jul 2020 17:18:42 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..f1724aa7e308 --- /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: + - c999c1e5-ba3b-4351-b65d-4356362357c6 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Jul 2020 17:18:43 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: 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..e6d9bfac4ea9 --- /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: + - e5020bb3-4385-4907-a1b3-61723f79cc79 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Jul 2020 17:18:44 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '12' + 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..6df091febc9b --- /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: + - 6218bc52-cde1-4519-8dc8-4b4092efdf08 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Jul 2020 17:18:44 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '12' + 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..3c9c62ee0c6a --- /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: + - e517622a-4ba2-4b27-8be3-ffd90abfb08a + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Jul 2020 17:18:44 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 +- 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: + - 8e0ca8ea-a7f1-4d04-842d-754d62659c85 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=3 + date: + - Thu, 23 Jul 2020 17:18:46 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '105' + 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: + - e78f6c84-2db5-49ed-8225-d4cde4b86ffe + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Jul 2020 17:18:46 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..0bb07ba438d7 --- /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: + - 4dba7af2-29bb-432a-9178-13ef624f7d00 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Jul 2020 17:18:45 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_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..bf373a45aa29 --- /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: + - 166e1ed8-b99e-4510-b4d1-5d75ea2f8657 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Jul 2020 17:18:46 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..33172475a45f --- /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: + - 860c6f8f-a447-4ec6-9b05-97c5608db3be + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Jul 2020 17:18:47 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..b71ea37404f9 --- /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: + - ae9db402-9b0d-4553-b16c-253ece9ed33d + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Thu, 23 Jul 2020 17:18:47 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '89' + 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..a99d43e7817f --- /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: + - 30ffe8c5-5001-4d47-800f-eaabba1d0476 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Jul 2020 17:18:47 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..e1b1c1696e6d --- /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: + - Thu, 23 Jul 2020 17:18:47 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..2cb6dac5da50 --- /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: + - 7fe78d0f-6593-4b2f-9ae1-b60130cd536e + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Jul 2020 17:18:48 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..8919d3d7bcdb --- /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: + - 51708468-566e-4842-8040-bba767c70b62 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Thu, 23 Jul 2020 17:18:49 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '81' + 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..9aab4df07b0d --- /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: + - 12a8aace-0a2e-4d2f-8f8f-eda36292b9c4 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Jul 2020 17:18:48 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_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..e12d677551cf --- /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: + - 091a3f26-8289-46b5-84e9-53e768af8099 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Jul 2020 17:18:49 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..630dc3868ef0 --- /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: + - 985c402a-0b74-4e08-99b6-c3e7bd65cb6c + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Thu, 23 Jul 2020 17:18:50 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_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..e075ff77154d --- /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: + - f3e0cf88-545b-44f3-818e-55313dec114e + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Thu, 23 Jul 2020 17:18:50 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 +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..915900cec00e --- /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: + - f418d976-9a1d-470a-bf54-f651eae438f4 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=4 + date: + - Thu, 23 Jul 2020 17:18:51 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_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..52010d6d45cd --- /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: + - b73d414c-77b4-4732-985f-8429761f6f6e + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=5 + date: + - Thu, 23 Jul 2020 17:18:51 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '64' + 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..8a11ff62aa8b --- /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: + - 610f90f1-6b0e-4da9-b901-a49a0446cb6d + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Thu, 23 Jul 2020 17:18:52 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '77' + 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..caf22991e8a1 --- /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 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"}, + {"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":"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: + - 09bb7695-a0b3-4468-8dde-4be27d7a2b82 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=3 + date: + - Thu, 23 Jul 2020 17:18:52 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '110' + 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..4f1f295bfaab --- /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: + - f3aaa4c2-89dd-49e8-9da7-df2a929da79d + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=3 + date: + - Thu, 23 Jul 2020 17:18:53 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_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..16bc09074252 --- /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: + - 62420b86-ba2f-4072-8b84-a38812d95461 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=3 + date: + - Thu, 23 Jul 2020 17:18:53 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '77' + 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: + - Thu, 23 Jul 2020 17:18:53 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: + - 88eb6c1d-7ae6-4cde-b702-c5b9c966fa0d + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=3 + date: + - Thu, 23 Jul 2020 17:18:53 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '73' + 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..a479942ee575 --- /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: + - 8b7f87bf-9f61-49a9-8922-df3b7eae9483 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=4 + date: + - Thu, 23 Jul 2020 17:18:54 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '61' + 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..420bbcc096da --- /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: + - 83d12e97-5e75-482f-ac1b-877e700662b8 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=6 + date: + - Thu, 23 Jul 2020 17:18:54 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 +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..8c49dbc2c0ba --- /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: + - 739b9ff6-e3f2-4041-b78b-c2d390ca9ed6 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=3 + date: + - Thu, 23 Jul 2020 17:18:54 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '77' + 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..ebedb39b5cbb --- /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: + - 0f25d1cb-0166-4738-8795-84c423d91cea + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=3 + date: + - Thu, 23 Jul 2020 17:18:55 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '89' + 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..3662a1b3e496 --- /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: + - cb56e9a0-cd4c-4993-8dfd-73de11e11b05 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Jul 2020 17:18:55 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_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..4ae9d2f8c7b1 --- /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: + - 1fbd838e-78e4-4f31-82ab-a938eadcc52a + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Thu, 23 Jul 2020 17:18:55 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_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..ce527caa8a66 --- /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: + - bd493308-10ac-4a0c-a559-9f7a74ac4850 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Jul 2020 17:18:56 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..c1da00e77783 --- /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: + - 29a834cb-81ac-47dd-951a-5662f273892f + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Thu, 23 Jul 2020 17:18:56 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 +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..04a4bc7abfd3 --- /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 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"}]}' + 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":"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: c4e0391d-522b-418c-a87e-f72c6c97f98b + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 + 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: '108' + 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..6d1ee80da1d7 --- /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 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"}]}' + 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":"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: 4d0ae1a3-25c0-4790-ab39-081afa0a43a3 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 + 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: '109' + 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..96d6c3d4a0b8 --- /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: Thu, 23 Jul 2020 17:19:45 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..4e1306e98bde --- /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: ba42b7a5-d3b0-4c87-a0f5-0436156f76b1 + content-type: application/json; charset=utf-8 + 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: '4' + 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..0fe34da57c2b --- /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: 995c6d23-0bc5-4396-b3af-96c997a2e97c + content-type: application/json; charset=utf-8 + 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 + 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..3f1f1d23f729 --- /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: aa9589a7-7057-4899-8853-64e9a9a4588e + content-type: application/json; charset=utf-8 + 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: '10' + 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..5669a1da3adb --- /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: 63a32671-e4f1-4ecf-b8dd-5c58051ebda9 + content-type: application/json; charset=utf-8 + 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: '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: 272a4c80-6b40-476f-9d05-701c2a54ea72 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 + 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: '92' + 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: f344bd29-a1d2-4109-8499-fc1817740a61 + content-type: application/json; charset=utf-8 + 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: '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..8fe2598fc88b --- /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: 2d1f109a-17ed-4b83-b1aa-ee11406f4c72 + content-type: application/json; charset=utf-8 + 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 + 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..032e12b2f14b --- /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: f363c9a3-910b-4437-95f5-b3bfb7d1038c + content-type: application/json; charset=utf-8 + 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 + 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..ca234b3ee88c --- /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: f7e35a3b-dfe2-494c-82b7-f3ab5759b8c3 + content-type: application/json; charset=utf-8 + 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: '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_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..164878ac9be1 --- /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: c4071053-3e6e-4bfa-bc65-6a85f13e053f + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + 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: '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..b5208e4b463e --- /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: eb8ac9bb-71d3-4895-925d-be0bd9e70da7 + content-type: application/json; charset=utf-8 + 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: '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..0fcb79963484 --- /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: Thu, 23 Jul 2020 17:19:49 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..0bbd383679e5 --- /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: 04aae24c-cda5-46df-82d8-d00ce1b997e0 + content-type: application/json; charset=utf-8 + 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: '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_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..a1bd4c36a655 --- /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: b41905c9-2f2d-40ee-821e-2482d4882b61 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + 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: '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_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..07bf4a04c6db --- /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: a77e3fea-6c23-477f-8a72-3885cb74e89f + content-type: application/json; charset=utf-8 + 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 + 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..ab4b47342a6b --- /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: 439917d9-3122-42b3-923f-f45d5927a520 + content-type: application/json; charset=utf-8 + 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 + 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..4c931318f80b --- /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: e612f043-5b57-4974-ac8f-8eaca05cdffe + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + 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: '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..0b6ee9b2eff7 --- /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: d85eded0-4738-4ad8-a913-eec883d4d280 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + 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: '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_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..8854aaac4d1a --- /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: d2c34707-fd54-46d1-afcb-6428d916171f + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 + 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: '65' + 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..5f4753385eab --- /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: 10d501bf-1bf5-48be-85bd-818a8a4d6bb3 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=5 + 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: '75' + 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..61672923a812 --- /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: 6ab92cde-4042-45d2-913b-d6dad6184a02 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + 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: '67' + 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..49919db5c1a5 --- /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 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"}, + {"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":"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: 21f124c4-b892-42b9-be5e-3a0e28bc5a7b + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 + 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: '138' + 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..41c33df290da --- /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: 6fa308e2-4146-49ac-8ce0-0a2e16abfe4b + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 + 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: '76' + 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..7240fb83ad83 --- /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: e2afbde5-c8c3-449e-a0e2-bb5614441303 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 + 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: '89' + 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: Thu, 23 Jul 2020 17:19:54 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: 2b14ce51-9676-4d12-9b44-097d78573dfb + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 + 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: '93' + 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..84d162bbfe7c --- /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: 78db8b35-0650-43b1-a905-2cd921c8d718 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4 + 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: '66' + 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..43a8e7242ceb --- /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: 66c2a87a-f154-4c39-b802-7b8d814ff3f9 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=6 + 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' + 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..d8f59385c858 --- /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: 0893dd3a-bf7e-41d4-bcab-e428b9b5d47d + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 + 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: '83' + 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..621a498dac4e --- /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: 5bb21583-5cc7-4ab1-a81e-b7fcf1236fad + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3 + 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: '131' + 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..afb081801c19 --- /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: e8eae430-8838-4fda-9dd5-ae283cbdd325 + content-type: application/json; charset=utf-8 + 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: '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_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..57c8e5b5bf65 --- /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: 79b03f0e-bebb-4096-8010-14fb8734dadd + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + 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: '80' + 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..d94542bb0494 --- /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: c6aa447e-1084-4062-965a-ad3db86ab494 + content-type: application/json; charset=utf-8 + 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: '1' + 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..b6435020ea8f --- /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: 718b9664-7ee9-49ed-8d15-243f632afe44 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + 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: '64' + 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/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 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..a35ccf655264 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py @@ -0,0 +1,566 @@ +# 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 +) + +# pre-apply the client_cls positional argument so it needn't be explicitly passed below +# the first one +TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) + +# 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 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, "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 + 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 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, "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 + 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 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, "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 + 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) + + 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..c8e38af984dd --- /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) +# 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 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, "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 + 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 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, "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 + 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 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, "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 + 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) + + 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..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,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="859-98-0987", 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=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, " @@ -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=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.)], " + "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). "