diff --git a/.vscode/cspell.json b/.vscode/cspell.json index a37604f44e4d..5827f1c686ac 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -105,7 +105,6 @@ "sdk/translation/azure-ai-translation-document/samples/assets/**", "sdk/translation/azure-ai-translation-document/tests/glossaries-valid.csv", "sdk/tables/azure-data-tables/**", - "sdk/textanalytics/azure-ai-textanalytics/**", "sdk/storage/azure-storage-blob/**", "eng/**/*.json", "eng/*.txt", @@ -209,11 +208,13 @@ "pschema", "PSECRET", "pygobject", + "parameterizing", "pytz", "pywin", "rdbms", "reauthenticated", "reimage", + "revascularization", "rollup", "rtsp", "rtype", @@ -239,6 +240,7 @@ "urandom", "urlsafeb", "urlunparse", + "usgov", "usdodcentral", "usdodeast", "usgovarizona", @@ -276,6 +278,51 @@ "words": [ "essai" ] + }, + { + "filename": "sdk/textanalytics/azure-ai-textanalytics/**", + "words": [ + "Forndexter", + "ESDNI", + "dinero", + "IOHTTP", + "Zocor", + "dann", + "dont", + "UMLS", + "nach", + "año", + "BRCPF", + "abril", + "zalgo", + "n'était", + "tengo", + "IDRG", + "était", + "gegründet", + "L'hôtel", + "Hola", + "hola", + "escrito", + "Coumadin", + "EUGPS", + "dokument", + "wurde", + "Detta", + "IFIC", + "Fahrt", + "documento", + "scritto", + "USUK", + "Sprache", + "PLREGON", + "Fusce", + "Inigo", + "italiano", + "skrivet", + "verfasst", + "engelska" + ] } ], "allowCompoundWords": true diff --git a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md index c88773109a0b..5e3888933d48 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md +++ b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md @@ -350,7 +350,7 @@ This version uses a next-generation code generator that *might* introduce breaki At a glance: - "is" should not be used at all. - - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be preferred. **Bugfixes** 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 e9d5512ac6fe..123680d49926 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py @@ -588,7 +588,7 @@ class HealthcareRelationRole(DictMixin): For example, in "The subject took 100 mg of ibuprofen", "100 mg" is a dosage entity fulfilling the role "Dosage" - in the extracted relation "DosageofMedication". + in the extracted relation "DosageOfMedication". :ivar name: The role of the entity in the relationship. I.e., in the relation "The subject took 100 mg of ibuprofen", the dosage entity "100 mg" has role @@ -606,10 +606,10 @@ def __init__(self, **kwargs): @staticmethod def _get_entity(healthcare_role_result, entities): - nums = _get_indices(healthcare_role_result.ref) - entity_index = nums[ + numbers = _get_indices(healthcare_role_result.ref) + entity_index = numbers[ 1 - ] # first num parsed from index is document #, second is entity index + ] # first number parsed from index is document #, second is entity index return entities[entity_index] @classmethod @@ -1559,9 +1559,9 @@ def _get_assessments( ] assessments = [] for assessment_relation in assessment_relations: - nums = _get_indices(assessment_relation) - sentence_index = nums[1] - assessment_index = nums[2] + numbers = _get_indices(assessment_relation) + sentence_index = numbers[1] + assessment_index = numbers[2] assessments.append( sentiment.sentences[sentence_index].assessments[assessment_index] ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_extract_key_phrases_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_extract_key_phrases_async.py index 69ae9c1ed008..d9dd66c1ad53 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_extract_key_phrases_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_extract_key_phrases_async.py @@ -41,7 +41,7 @@ async def sample_extract_key_phrases_async(): articles = [ """ Washington, D.C. Autumn in DC is a uniquely beautiful season. The leaves fall from the trees - in a city chockful of forrests, leaving yellow leaves on the ground and a clearer view of the + in a city chock-full of forests, leaving yellow leaves on the ground and a clearer view of the blue sky above... """, """ diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_linked_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_linked_entities_async.py index 8a1222ee183d..81200259b8d4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_linked_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_linked_entities_async.py @@ -47,7 +47,7 @@ async def sample_recognize_linked_entities_async(): Microsoft was founded by Bill Gates with some friends he met at Harvard. One of his friends, Steve Ballmer, eventually became CEO after Bill Gates as well. Steve Ballmer eventually stepped down as CEO of Microsoft, and was succeeded by Satya Nadella. - Microsoft originally moved its headquarters to Bellevue, Wahsington in Januaray 1979, but is now + Microsoft originally moved its headquarters to Bellevue, Washington in January 1979, but is now headquartered in Redmond. """ ] diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py index b4b0b70346ac..3c4b9280501b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py @@ -29,7 +29,7 @@ async def sample_recognize_pii_entities_async(): print( "In this sample we will be going through our customer's loan payment information and redacting " - "all PII (personally identifable information) before storing this information on our public website. " + "all PII (personally identifiable information) before storing this information on our public website. " "I'm also looking to explicitly extract the SSN information, so I can update my database with SSNs for " "our customers" ) @@ -73,14 +73,14 @@ async def sample_recognize_pii_entities_async(): "I also want to be fairly confident that what I'm storing is an SSN, so let's also " "ensure that we're > 60% positive the entity is a SSN" ) - ssns = [] + social_security_numbers = [] for doc in docs: for entity in doc.entities: if entity.category == 'USSocialSecurityNumber' and entity.confidence_score >= 0.6: - ssns.append(entity.text) + social_security_numbers.append(entity.text) print("We have extracted the following SSNs as well: '{}'".format( - "', '".join(ssns) + "', '".join(social_security_numbers) )) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_extract_key_phrases.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_extract_key_phrases.py index 48d28e660626..d363ec5a9499 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_extract_key_phrases.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_extract_key_phrases.py @@ -40,7 +40,7 @@ def sample_extract_key_phrases(): articles = [ """ Washington, D.C. Autumn in DC is a uniquely beautiful season. The leaves fall from the trees - in a city chockful of forrests, leaving yellow leaves on the ground and a clearer view of the + in a city chock-full of forests, leaving yellow leaves on the ground and a clearer view of the blue sky above... """, """ diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_linked_entities.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_linked_entities.py index cd80dbaf5289..1c1d6b0ff5eb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_linked_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_linked_entities.py @@ -47,7 +47,7 @@ def sample_recognize_linked_entities(): Microsoft was founded by Bill Gates with some friends he met at Harvard. One of his friends, Steve Ballmer, eventually became CEO after Bill Gates as well. Steve Ballmer eventually stepped down as CEO of Microsoft, and was succeeded by Satya Nadella. - Microsoft originally moved its headquarters to Bellevue, Wahsington in Januaray 1979, but is now + Microsoft originally moved its headquarters to Bellevue, Washington in January 1979, but is now headquartered in Redmond. """ ] diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py index 6a9334846123..f03b8a71db4a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py @@ -28,7 +28,7 @@ def sample_recognize_pii_entities(): print( "In this sample we will be going through our customer's loan payment information and redacting " - "all PII (personally identifable information) before storing this information on our public website. " + "all PII (personally identifiable information) before storing this information on our public website. " "I'm also looking to explicitly extract the SSN information, so I can update my database with SSNs for " "our customers" ) @@ -71,14 +71,14 @@ def sample_recognize_pii_entities(): "I also want to be fairly confident that what I'm storing is an SSN, so let's also " "ensure that we're > 60% positive the entity is a SSN" ) - ssns = [] + social_security_numbers = [] for doc in docs: for entity in doc.entities: if entity.category == 'USSocialSecurityNumber' and entity.confidence_score >= 0.6: - ssns.append(entity.text) + social_security_numbers.append(entity.text) print("We have extracted the following SSNs as well: '{}'".format( - "', '".join(ssns) + "', '".join(social_security_numbers) )) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.pyTestAnalyzetest_all_successful_passing_dict_extract_summary_action.json b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.pyTestAnalyzetest_all_successful_passing_dict_extract_summary_action.json index 523b392a6f1b..0173ff95310b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.pyTestAnalyzetest_all_successful_passing_dict_extract_summary_action.json +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.pyTestAnalyzetest_all_successful_passing_dict_extract_summary_action.json @@ -7,50 +7,83 @@ "Accept": "application/json, text/json", "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", - "Content-Length": "2177", + "Content-Length": "2179", "Content-Type": "application/json", "User-Agent": "azsdk-python-ai-textanalytics/5.2.0b3 Python/3.10.0 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "25293ed1-5d0f-11ec-aac3-b831b58100e8" + "x-ms-client-request-id": "6e622223-8b89-11ec-91fe-b831b58100e8" + }, + "RequestBody": { + "tasks": { + "entityRecognitionTasks": [], + "entityRecognitionPiiTasks": [], + "keyPhraseExtractionTasks": [], + "entityLinkingTasks": [], + "sentimentAnalysisTasks": [], + "extractiveSummarizationTasks": [ + { + "parameters": { + "stringIndexType": "UnicodeCodePoint" + }, + "taskName": "0" + } + ], + "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], + "customMultiClassificationTasks": [] + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "text": "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of Brexit negotiations, David Davis. Their decision to leave the government came three days after May appeared to have agreed a deal with her fractured Cabinet on the UK\u0027s post Brexit relationship with the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree about the best way of delivering our shared commitment to honoring the result of the referendum. The Prime Minister\u0027s latest political drama began late on Sunday night when Davis quit, declaring he could not support May\u0027s Brexit plan. He said it involved too close a relationship with the EU and gave only an illusion of control being returned to the UK after it left the EU. It seems to me we\u0027re giving too much away, too easily, and that\u0027s a dangerous strategy at this time, Davis said in a BBC radio interview Monday morning. Johnson\u0027s resignation came Monday afternoon local time, just before the Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said.", + "language": "en" + }, + { + "id": "2", + "text": "Microsoft fue fundado por Bill Gates y Paul Allen", + "language": "es" + } + ] + } }, - "RequestBody": "{\u0022tasks\u0022: {\u0022entityRecognitionTasks\u0022: [], \u0022entityRecognitionPiiTasks\u0022: [], \u0022keyPhraseExtractionTasks\u0022: [], \u0022entityLinkingTasks\u0022: [], \u0022sentimentAnalysisTasks\u0022: [], \u0022extractiveSummarizationTasks\u0022: [{\u0022parameters\u0022: {\u0022stringIndexType\u0022: \u0022UnicodeCodePoint\u0022}, \u0022taskName\u0022: \u00220\u0022}], \u0022customEntityRecognitionTasks\u0022: [], \u0022customSingleClassificationTasks\u0022: [], \u0022customMultiClassificationTasks\u0022: []}, \u0022analysisInput\u0022: {\u0022documents\u0022: [{\u0022id\u0022: \u00221\u0022, \u0022text\u0022: \u0022The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of Brexit negotiations, David Davis. Their decision to leave the government came three days after May appeared to have agreed a deal with herfractured Cabinet on the UK\u0027s post Brexit relationship with the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree about the best way of delivering our shared commitment to honoring the result of the referendum. The Prime Minister\u0027s latest plitical drama began late on Sunday night when Davis quit, declaring he could not support May\u0027s Brexit plan. He said it involved too close a relationship with the EU and gave only an illusion of control being returned to the UK after it left the EU. It seems to me we\u0027re giving too much away, too easily, and that\u0027s a dangerous strategy at this time, Davis said in a BBC radio interview Monday morning. Johnson\u0027s resignation came Monday afternoon local time, just before the Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said.\u0022, \u0022language\u0022: \u0022en\u0022}, {\u0022id\u0022: \u00222\u0022, \u0022text\u0022: \u0022Microsoft fue fundado por Bill Gates y Paul Allen\u0022, \u0022language\u0022: \u0022es\u0022}]}}", "StatusCode": 202, "ResponseHeaders": { - "apim-request-id": "a03b6b25-f013-4368-bd31-ad425c9179ac", - "Date": "Tue, 14 Dec 2021 18:53:37 GMT", - "operation-location": "https://fakeendpoint.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/0a0d1391-60f6-4b43-8d4f-41abe9f6f861", + "apim-request-id": "45d67f8b-1922-42c0-a6d6-7190deabb9e7", + "Date": "Fri, 11 Feb 2022 22:24:52 GMT", + "operation-location": "https://fakeendpoint.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/ffafe0bd-e704-47e3-806d-cdcbdcf27232", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "217" + "x-envoy-upstream-service-time": "149" }, "ResponseBody": null }, { - "RequestUri": "https://fakeendpoint.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/0a0d1391-60f6-4b43-8d4f-41abe9f6f861?showStats=True", + "RequestUri": "https://fakeendpoint.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/ffafe0bd-e704-47e3-806d-cdcbdcf27232?showStats=True", "RequestMethod": "GET", "RequestHeaders": { "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", "User-Agent": "azsdk-python-ai-textanalytics/5.2.0b3 Python/3.10.0 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "25293ed1-5d0f-11ec-aac3-b831b58100e8" + "x-ms-client-request-id": "6e622223-8b89-11ec-91fe-b831b58100e8" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "3fa18449-f763-4f73-b925-eae5942bf462", + "apim-request-id": "107fe20e-9cdf-4723-8766-128bad85a9b3", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 14 Dec 2021 18:53:42 GMT", + "Date": "Fri, 11 Feb 2022 22:24:57 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "114" + "x-envoy-upstream-service-time": "86" }, "ResponseBody": { - "jobId": "0a0d1391-60f6-4b43-8d4f-41abe9f6f861", - "lastUpdateDateTime": "2021-12-14T18:53:41Z", - "createdDateTime": "2021-12-14T18:53:37Z", - "expirationDateTime": "2021-12-15T18:53:37Z", + "jobId": "ffafe0bd-e704-47e3-806d-cdcbdcf27232", + "lastUpdateDateTime": "2022-02-11T22:24:55Z", + "createdDateTime": "2022-02-11T22:24:52Z", + "expirationDateTime": "2022-02-12T22:24:52Z", "status": "succeeded", "errors": [], "tasks": { @@ -60,7 +93,7 @@ "total": 1, "extractiveSummarizationTasks": [ { - "lastUpdateDateTime": "2021-12-14T18:53:41.3509318Z", + "lastUpdateDateTime": "2022-02-11T22:24:55.9540887Z", "taskName": "0", "state": "succeeded", "results": { @@ -74,7 +107,7 @@ { "id": "1", "statistics": { - "charactersCount": 1625, + "charactersCount": 1627, "transactionsCount": 2 }, "sentences": [ @@ -91,10 +124,10 @@ "length": 164 }, { - "text": "Their decision to leave the government came three days after May appeared to have agreed a deal with herfractured Cabinet on the UK\u0027s post Brexit relationship with the EU.", - "rankScore": 0.47, + "text": "Their decision to leave the government came three days after May appeared to have agreed a deal with her fractured Cabinet on the UK\u0027s post Brexit relationship with the EU.", + "rankScore": 0.56, "offset": 342, - "length": 171 + "length": 172 } ], "warnings": [] diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.pyTestAnalyzetest_extract_summary_action_with_options.json b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.pyTestAnalyzetest_extract_summary_action_with_options.json index 3a3c5a7bf80e..5acbed68fe85 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.pyTestAnalyzetest_extract_summary_action_with_options.json +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.pyTestAnalyzetest_extract_summary_action_with_options.json @@ -7,50 +7,80 @@ "Accept": "application/json, text/json", "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", - "Content-Length": "2123", + "Content-Length": "2125", "Content-Type": "application/json", "User-Agent": "azsdk-python-ai-textanalytics/5.2.0b3 Python/3.10.0 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "28adc300-5d0f-11ec-ba46-b831b58100e8" + "x-ms-client-request-id": "91fcf173-8b89-11ec-b1f7-b831b58100e8" + }, + "RequestBody": { + "tasks": { + "entityRecognitionTasks": [], + "entityRecognitionPiiTasks": [], + "keyPhraseExtractionTasks": [], + "entityLinkingTasks": [], + "sentimentAnalysisTasks": [], + "extractiveSummarizationTasks": [ + { + "parameters": { + "stringIndexType": "UnicodeCodePoint", + "sentenceCount": 5, + "sortBy": "Rank" + }, + "taskName": "0" + } + ], + "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], + "customMultiClassificationTasks": [] + }, + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of Brexit negotiations, David Davis. Their decision to leave the government came three days after May appeared to have agreed a deal with her fractured Cabinet on the UK\u0027s post Brexit relationship with the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree about the best way of delivering our shared commitment to honoring the result of the referendum. The Prime Minister\u0027s latest political drama began late on Sunday night when Davis quit, declaring he could not support May\u0027s Brexit plan. He said it involved too close a relationship with the EU and gave only an illusion of control being returned to the UK after it left the EU. It seems to me we\u0027re giving too much away, too easily, and that\u0027s a dangerous strategy at this time, Davis said in a BBC radio interview Monday morning. Johnson\u0027s resignation came Monday afternoon local time, just before the Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said.", + "language": "en" + } + ] + } }, - "RequestBody": "{\u0022tasks\u0022: {\u0022entityRecognitionTasks\u0022: [], \u0022entityRecognitionPiiTasks\u0022: [], \u0022keyPhraseExtractionTasks\u0022: [], \u0022entityLinkingTasks\u0022: [], \u0022sentimentAnalysisTasks\u0022: [], \u0022extractiveSummarizationTasks\u0022: [{\u0022parameters\u0022: {\u0022stringIndexType\u0022: \u0022UnicodeCodePoint\u0022, \u0022sentenceCount\u0022: 5, \u0022sortBy\u0022: \u0022Rank\u0022}, \u0022taskName\u0022: \u00220\u0022}], \u0022customEntityRecognitionTasks\u0022: [], \u0022customSingleClassificationTasks\u0022: [], \u0022customMultiClassificationTasks\u0022: []}, \u0022analysisInput\u0022: {\u0022documents\u0022: [{\u0022id\u0022: \u00220\u0022, \u0022text\u0022: \u0022The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of Brexit negotiations, David Davis. Their decision to leave the government came three days after May appeared to have agreed a deal with herfractured Cabinet on the UK\u0027s post Brexit relationship with the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree about the best way of delivering our shared commitment to honoring the result of the referendum. The Prime Minister\u0027s latest plitical drama began late on Sunday night when Davis quit, declaring he could not support May\u0027s Brexit plan. He said it involved too close a relationship with the EU and gave only an illusion of control being returned to the UK after it left the EU. It seems to me we\u0027re giving too much away, too easily, and that\u0027s a dangerous strategy at this time, Davis said in a BBC radio interview Monday morning. Johnson\u0027s resignation came Monday afternoon local time, just before the Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said.\u0022, \u0022language\u0022: \u0022en\u0022}]}}", "StatusCode": 202, "ResponseHeaders": { - "apim-request-id": "51650200-2a9e-4635-a3b5-db7eadaa9617", - "Date": "Tue, 14 Dec 2021 18:53:43 GMT", - "operation-location": "https://fakeendpoint.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/6df49330-1b99-4d8a-b3e1-da845654f7ef", + "apim-request-id": "58e145ee-e2b3-4822-abdf-0d5e9cd029df", + "Date": "Fri, 11 Feb 2022 22:25:51 GMT", + "operation-location": "https://fakeendpoint.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/fedb0f9a-b51f-4e7b-8ec0-b10eb1ec780e", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "166" + "x-envoy-upstream-service-time": "112" }, "ResponseBody": null }, { - "RequestUri": "https://fakeendpoint.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/6df49330-1b99-4d8a-b3e1-da845654f7ef?showStats=True", + "RequestUri": "https://fakeendpoint.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/fedb0f9a-b51f-4e7b-8ec0-b10eb1ec780e?showStats=True", "RequestMethod": "GET", "RequestHeaders": { "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", "User-Agent": "azsdk-python-ai-textanalytics/5.2.0b3 Python/3.10.0 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "28adc300-5d0f-11ec-ba46-b831b58100e8" + "x-ms-client-request-id": "91fcf173-8b89-11ec-b1f7-b831b58100e8" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "ba4f8dc3-a58e-4658-adc3-6d753fbad808", + "apim-request-id": "f16da9d6-2d8a-4b1e-a00a-18059737cb25", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 14 Dec 2021 18:53:47 GMT", + "Date": "Fri, 11 Feb 2022 22:25:56 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "48" + "x-envoy-upstream-service-time": "37" }, "ResponseBody": { - "jobId": "6df49330-1b99-4d8a-b3e1-da845654f7ef", - "lastUpdateDateTime": "2021-12-14T18:53:45Z", - "createdDateTime": "2021-12-14T18:53:43Z", - "expirationDateTime": "2021-12-15T18:53:43Z", + "jobId": "fedb0f9a-b51f-4e7b-8ec0-b10eb1ec780e", + "lastUpdateDateTime": "2022-02-11T22:25:55Z", + "createdDateTime": "2022-02-11T22:25:52Z", + "expirationDateTime": "2022-02-12T22:25:52Z", "status": "succeeded", "errors": [], "tasks": { @@ -60,7 +90,7 @@ "total": 1, "extractiveSummarizationTasks": [ { - "lastUpdateDateTime": "2021-12-14T18:53:45.9335319Z", + "lastUpdateDateTime": "2022-02-11T22:25:55.2562638Z", "taskName": "0", "state": "succeeded", "results": { @@ -74,7 +104,7 @@ { "id": "0", "statistics": { - "charactersCount": 1625, + "charactersCount": 1627, "transactionsCount": 2 }, "sentences": [ @@ -91,22 +121,22 @@ "length": 176 }, { - "text": "Their decision to leave the government came three days after May appeared to have agreed a deal with herfractured Cabinet on the UK\u0027s post Brexit relationship with the EU.", - "rankScore": 0.47, + "text": "Their decision to leave the government came three days after May appeared to have agreed a deal with her fractured Cabinet on the UK\u0027s post Brexit relationship with the EU.", + "rankScore": 0.56, "offset": 342, - "length": 171 + "length": 172 }, { "text": "That plan is now in tatters and her political future appears uncertain.", - "rankScore": 0.36, - "offset": 514, + "rankScore": 0.4, + "offset": 515, "length": 71 }, { - "text": "The Prime Minister\u0027s latest plitical drama began late on Sunday night when Davis quit, declaring he could not support May\u0027s Brexit plan.", - "rankScore": 0.26, - "offset": 918, - "length": 136 + "text": "The Prime Minister\u0027s latest political drama began late on Sunday night when Davis quit, declaring he could not support May\u0027s Brexit plan.", + "rankScore": 0.25, + "offset": 919, + "length": 137 } ], "warnings": [] diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.pyTestAnalyzeAsynctest_all_successful_passing_dict_extract_summary_action.json b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.pyTestAnalyzeAsynctest_all_successful_passing_dict_extract_summary_action.json index b04d9399f701..0819579dae9f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.pyTestAnalyzeAsynctest_all_successful_passing_dict_extract_summary_action.json +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.pyTestAnalyzeAsynctest_all_successful_passing_dict_extract_summary_action.json @@ -6,84 +6,82 @@ "RequestHeaders": { "Accept": "application/json, text/json", "Accept-Encoding": "gzip, deflate", - "Content-Length": "2177", + "Content-Length": "2179", "Content-Type": "application/json", "User-Agent": "azsdk-python-ai-textanalytics/5.2.0b3 Python/3.10.0 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "db065f18-5d0f-11ec-8e6a-b831b58100e8" + "x-ms-client-request-id": "b1bec58e-8b89-11ec-8487-b831b58100e8" + }, + "RequestBody": { + "tasks": { + "entityRecognitionTasks": [], + "entityRecognitionPiiTasks": [], + "keyPhraseExtractionTasks": [], + "entityLinkingTasks": [], + "sentimentAnalysisTasks": [], + "extractiveSummarizationTasks": [ + { + "parameters": { + "stringIndexType": "UnicodeCodePoint" + }, + "taskName": "0" + } + ], + "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], + "customMultiClassificationTasks": [] + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "text": "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of Brexit negotiations, David Davis. Their decision to leave the government came three days after May appeared to have agreed a deal with her fractured Cabinet on the UK\u0027s post Brexit relationship with the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree about the best way of delivering our shared commitment to honoring the result of the referendum. The Prime Minister\u0027s latest political drama began late on Sunday night when Davis quit, declaring he could not support May\u0027s Brexit plan. He said it involved too close a relationship with the EU and gave only an illusion of control being returned to the UK after it left the EU. It seems to me we\u0027re giving too much away, too easily, and that\u0027s a dangerous strategy at this time, Davis said in a BBC radio interview Monday morning. Johnson\u0027s resignation came Monday afternoon local time, just before the Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said.", + "language": "en" + }, + { + "id": "2", + "text": "Microsoft fue fundado por Bill Gates y Paul Allen", + "language": "es" + } + ] + } }, - "RequestBody": "{\u0022tasks\u0022: {\u0022entityRecognitionTasks\u0022: [], \u0022entityRecognitionPiiTasks\u0022: [], \u0022keyPhraseExtractionTasks\u0022: [], \u0022entityLinkingTasks\u0022: [], \u0022sentimentAnalysisTasks\u0022: [], \u0022extractiveSummarizationTasks\u0022: [{\u0022parameters\u0022: {\u0022stringIndexType\u0022: \u0022UnicodeCodePoint\u0022}, \u0022taskName\u0022: \u00220\u0022}], \u0022customEntityRecognitionTasks\u0022: [], \u0022customSingleClassificationTasks\u0022: [], \u0022customMultiClassificationTasks\u0022: []}, \u0022analysisInput\u0022: {\u0022documents\u0022: [{\u0022id\u0022: \u00221\u0022, \u0022text\u0022: \u0022The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of Brexit negotiations, David Davis. Their decision to leave the government came three days after May appeared to have agreed a deal with herfractured Cabinet on the UK\u0027s post Brexit relationship with the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree about the best way of delivering our shared commitment to honoring the result of the referendum. The Prime Minister\u0027s latest plitical drama began late on Sunday night when Davis quit, declaring he could not support May\u0027s Brexit plan. He said it involved too close a relationship with the EU and gave only an illusion of control being returned to the UK after it left the EU. It seems to me we\u0027re giving too much away, too easily, and that\u0027s a dangerous strategy at this time, Davis said in a BBC radio interview Monday morning. Johnson\u0027s resignation came Monday afternoon local time, just before the Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said.\u0022, \u0022language\u0022: \u0022en\u0022}, {\u0022id\u0022: \u00222\u0022, \u0022text\u0022: \u0022Microsoft fue fundado por Bill Gates y Paul Allen\u0022, \u0022language\u0022: \u0022es\u0022}]}}", "StatusCode": 202, "ResponseHeaders": { - "apim-request-id": "9b2afdbf-e210-4a09-951c-59f438fce346", - "Date": "Tue, 14 Dec 2021 18:58:41 GMT", - "operation-location": "https://fakeendpoint.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/5e8bae01-7027-449a-9812-a0c0eaa86c12", + "apim-request-id": "4eabb659-ffff-498f-acce-a73a82f54c54", + "Date": "Fri, 11 Feb 2022 22:26:45 GMT", + "operation-location": "https://fakeendpoint.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/46ca9200-1f5d-4e3e-8b15-6570d6e6ac8d", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "170" + "x-envoy-upstream-service-time": "155" }, "ResponseBody": null }, { - "RequestUri": "https://fakeendpoint.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/5e8bae01-7027-449a-9812-a0c0eaa86c12?showStats=True", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", - "User-Agent": "azsdk-python-ai-textanalytics/5.2.0b3 Python/3.10.0 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "db065f18-5d0f-11ec-8e6a-b831b58100e8" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "5a6b6fbe-b9f5-4353-b418-f69fde76ccab", - "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 14 Dec 2021 18:58:46 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "Transfer-Encoding": "chunked", - "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "9" - }, - "ResponseBody": { - "jobId": "5e8bae01-7027-449a-9812-a0c0eaa86c12", - "lastUpdateDateTime": "2021-12-14T18:58:42Z", - "createdDateTime": "2021-12-14T18:58:42Z", - "expirationDateTime": "2021-12-15T18:58:42Z", - "status": "running", - "errors": [], - "tasks": { - "completed": 0, - "failed": 0, - "inProgress": 1, - "total": 1 - } - } - }, - { - "RequestUri": "https://fakeendpoint.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/5e8bae01-7027-449a-9812-a0c0eaa86c12?showStats=True", + "RequestUri": "https://fakeendpoint.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/46ca9200-1f5d-4e3e-8b15-6570d6e6ac8d?showStats=True", "RequestMethod": "GET", "RequestHeaders": { "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "User-Agent": "azsdk-python-ai-textanalytics/5.2.0b3 Python/3.10.0 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "db065f18-5d0f-11ec-8e6a-b831b58100e8" + "x-ms-client-request-id": "b1bec58e-8b89-11ec-8487-b831b58100e8" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "f44af1f0-0e6a-48cd-b4da-08f725d991dd", + "apim-request-id": "7ae75274-3812-4e10-847c-dcd9c16ae86f", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 14 Dec 2021 18:58:51 GMT", + "Date": "Fri, 11 Feb 2022 22:26:50 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "43" + "x-envoy-upstream-service-time": "50" }, "ResponseBody": { - "jobId": "5e8bae01-7027-449a-9812-a0c0eaa86c12", - "lastUpdateDateTime": "2021-12-14T18:58:49Z", - "createdDateTime": "2021-12-14T18:58:42Z", - "expirationDateTime": "2021-12-15T18:58:42Z", + "jobId": "46ca9200-1f5d-4e3e-8b15-6570d6e6ac8d", + "lastUpdateDateTime": "2022-02-11T22:26:49Z", + "createdDateTime": "2022-02-11T22:26:45Z", + "expirationDateTime": "2022-02-12T22:26:45Z", "status": "succeeded", "errors": [], "tasks": { @@ -93,7 +91,7 @@ "total": 1, "extractiveSummarizationTasks": [ { - "lastUpdateDateTime": "2021-12-14T18:58:49.8675939Z", + "lastUpdateDateTime": "2022-02-11T22:26:49.0042824Z", "taskName": "0", "state": "succeeded", "results": { @@ -107,7 +105,7 @@ { "id": "1", "statistics": { - "charactersCount": 1625, + "charactersCount": 1627, "transactionsCount": 2 }, "sentences": [ @@ -124,10 +122,10 @@ "length": 164 }, { - "text": "Their decision to leave the government came three days after May appeared to have agreed a deal with herfractured Cabinet on the UK\u0027s post Brexit relationship with the EU.", - "rankScore": 0.47, + "text": "Their decision to leave the government came three days after May appeared to have agreed a deal with her fractured Cabinet on the UK\u0027s post Brexit relationship with the EU.", + "rankScore": 0.56, "offset": 342, - "length": 171 + "length": 172 } ], "warnings": [] diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.pyTestAnalyzeAsynctest_extract_summary_action_with_options.json b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.pyTestAnalyzeAsynctest_extract_summary_action_with_options.json index b40532037a3f..799533464c50 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.pyTestAnalyzeAsynctest_extract_summary_action_with_options.json +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.pyTestAnalyzeAsynctest_extract_summary_action_with_options.json @@ -6,49 +6,79 @@ "RequestHeaders": { "Accept": "application/json, text/json", "Accept-Encoding": "gzip, deflate", - "Content-Length": "2123", + "Content-Length": "2125", "Content-Type": "application/json", "User-Agent": "azsdk-python-ai-textanalytics/5.2.0b3 Python/3.10.0 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "e17f9249-5d0f-11ec-befb-b831b58100e8" + "x-ms-client-request-id": "c4c20ba5-8b89-11ec-81c6-b831b58100e8" + }, + "RequestBody": { + "tasks": { + "entityRecognitionTasks": [], + "entityRecognitionPiiTasks": [], + "keyPhraseExtractionTasks": [], + "entityLinkingTasks": [], + "sentimentAnalysisTasks": [], + "extractiveSummarizationTasks": [ + { + "parameters": { + "stringIndexType": "UnicodeCodePoint", + "sentenceCount": 5, + "sortBy": "Rank" + }, + "taskName": "0" + } + ], + "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], + "customMultiClassificationTasks": [] + }, + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of Brexit negotiations, David Davis. Their decision to leave the government came three days after May appeared to have agreed a deal with her fractured Cabinet on the UK\u0027s post Brexit relationship with the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree about the best way of delivering our shared commitment to honoring the result of the referendum. The Prime Minister\u0027s latest political drama began late on Sunday night when Davis quit, declaring he could not support May\u0027s Brexit plan. He said it involved too close a relationship with the EU and gave only an illusion of control being returned to the UK after it left the EU. It seems to me we\u0027re giving too much away, too easily, and that\u0027s a dangerous strategy at this time, Davis said in a BBC radio interview Monday morning. Johnson\u0027s resignation came Monday afternoon local time, just before the Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said.", + "language": "en" + } + ] + } }, - "RequestBody": "{\u0022tasks\u0022: {\u0022entityRecognitionTasks\u0022: [], \u0022entityRecognitionPiiTasks\u0022: [], \u0022keyPhraseExtractionTasks\u0022: [], \u0022entityLinkingTasks\u0022: [], \u0022sentimentAnalysisTasks\u0022: [], \u0022extractiveSummarizationTasks\u0022: [{\u0022parameters\u0022: {\u0022stringIndexType\u0022: \u0022UnicodeCodePoint\u0022, \u0022sentenceCount\u0022: 5, \u0022sortBy\u0022: \u0022Rank\u0022}, \u0022taskName\u0022: \u00220\u0022}], \u0022customEntityRecognitionTasks\u0022: [], \u0022customSingleClassificationTasks\u0022: [], \u0022customMultiClassificationTasks\u0022: []}, \u0022analysisInput\u0022: {\u0022documents\u0022: [{\u0022id\u0022: \u00220\u0022, \u0022text\u0022: \u0022The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of Brexit negotiations, David Davis. Their decision to leave the government came three days after May appeared to have agreed a deal with herfractured Cabinet on the UK\u0027s post Brexit relationship with the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree about the best way of delivering our shared commitment to honoring the result of the referendum. The Prime Minister\u0027s latest plitical drama began late on Sunday night when Davis quit, declaring he could not support May\u0027s Brexit plan. He said it involved too close a relationship with the EU and gave only an illusion of control being returned to the UK after it left the EU. It seems to me we\u0027re giving too much away, too easily, and that\u0027s a dangerous strategy at this time, Davis said in a BBC radio interview Monday morning. Johnson\u0027s resignation came Monday afternoon local time, just before the Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said.\u0022, \u0022language\u0022: \u0022en\u0022}]}}", "StatusCode": 202, "ResponseHeaders": { - "apim-request-id": "08ee4f67-27c2-44bf-8aa3-d9261aa48f7e", - "Date": "Tue, 14 Dec 2021 18:58:52 GMT", - "operation-location": "https://fakeendpoint.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/782677ed-1933-4641-acb1-39a8ce4f088f", + "apim-request-id": "96906545-f684-4593-929d-133cb4a8ee3d", + "Date": "Fri, 11 Feb 2022 22:27:16 GMT", + "operation-location": "https://fakeendpoint.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/ee926631-ccae-4368-9757-9ee6316e93d2", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "344" + "x-envoy-upstream-service-time": "250" }, "ResponseBody": null }, { - "RequestUri": "https://fakeendpoint.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/782677ed-1933-4641-acb1-39a8ce4f088f?showStats=True", + "RequestUri": "https://fakeendpoint.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/ee926631-ccae-4368-9757-9ee6316e93d2?showStats=True", "RequestMethod": "GET", "RequestHeaders": { "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "User-Agent": "azsdk-python-ai-textanalytics/5.2.0b3 Python/3.10.0 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "e17f9249-5d0f-11ec-befb-b831b58100e8" + "x-ms-client-request-id": "c4c20ba5-8b89-11ec-81c6-b831b58100e8" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "e2074cf2-dabd-4ec0-8e5b-5425a9016581", + "apim-request-id": "9d7cdd1d-4782-4bf8-ae93-bf6fe086642c", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 14 Dec 2021 18:58:57 GMT", + "Date": "Fri, 11 Feb 2022 22:27:22 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "41" + "x-envoy-upstream-service-time": "127" }, "ResponseBody": { - "jobId": "782677ed-1933-4641-acb1-39a8ce4f088f", - "lastUpdateDateTime": "2021-12-14T18:58:55Z", - "createdDateTime": "2021-12-14T18:58:53Z", - "expirationDateTime": "2021-12-15T18:58:53Z", + "jobId": "ee926631-ccae-4368-9757-9ee6316e93d2", + "lastUpdateDateTime": "2022-02-11T22:27:20Z", + "createdDateTime": "2022-02-11T22:27:17Z", + "expirationDateTime": "2022-02-12T22:27:17Z", "status": "succeeded", "errors": [], "tasks": { @@ -58,7 +88,7 @@ "total": 1, "extractiveSummarizationTasks": [ { - "lastUpdateDateTime": "2021-12-14T18:58:55.1037453Z", + "lastUpdateDateTime": "2022-02-11T22:27:20.6305522Z", "taskName": "0", "state": "succeeded", "results": { @@ -72,7 +102,7 @@ { "id": "0", "statistics": { - "charactersCount": 1625, + "charactersCount": 1627, "transactionsCount": 2 }, "sentences": [ @@ -89,22 +119,22 @@ "length": 176 }, { - "text": "Their decision to leave the government came three days after May appeared to have agreed a deal with herfractured Cabinet on the UK\u0027s post Brexit relationship with the EU.", - "rankScore": 0.47, + "text": "Their decision to leave the government came three days after May appeared to have agreed a deal with her fractured Cabinet on the UK\u0027s post Brexit relationship with the EU.", + "rankScore": 0.56, "offset": 342, - "length": 171 + "length": 172 }, { "text": "That plan is now in tatters and her political future appears uncertain.", - "rankScore": 0.36, - "offset": 514, + "rankScore": 0.4, + "offset": 515, "length": 71 }, { - "text": "The Prime Minister\u0027s latest plitical drama began late on Sunday night when Davis quit, declaring he could not support May\u0027s Brexit plan.", - "rankScore": 0.26, - "offset": 918, - "length": 136 + "text": "The Prime Minister\u0027s latest political drama began late on Sunday night when Davis quit, declaring he could not support May\u0027s Brexit plan.", + "rankScore": 0.25, + "offset": 919, + "length": 137 } ], "warnings": [] diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py index b35c87fc95b7..ff6c50caf6e5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py @@ -898,12 +898,12 @@ def test_all_successful_passing_dict_extract_summary_action(self, client): " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " - "appeared to have agreed a deal with herfractured Cabinet on the UK's post Brexit relationship with " + "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " "about the best way of delivering our shared commitment to honoring the result of the referendum. The " - "Prime Minister's latest plitical drama began late on Sunday night when Davis quit, declaring he could " + "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " @@ -943,12 +943,12 @@ def test_extract_summary_action_with_options(self, client): " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " - "appeared to have agreed a deal with herfractured Cabinet on the UK's post Brexit relationship with " + "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " "about the best way of delivering our shared commitment to honoring the result of the referendum. The " - "Prime Minister's latest plitical drama began late on Sunday night when Davis quit, declaring he could " + "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_async.py index 538750ec6f10..f91d456cadd2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_async.py @@ -959,12 +959,12 @@ async def test_all_successful_passing_dict_extract_summary_action(self, client): " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " - "appeared to have agreed a deal with herfractured Cabinet on the UK's post Brexit relationship with " + "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " "about the best way of delivering our shared commitment to honoring the result of the referendum. The " - "Prime Minister's latest plitical drama began late on Sunday night when Davis quit, declaring he could " + "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " @@ -1007,12 +1007,12 @@ async def test_extract_summary_action_with_options(self, client): " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " - "appeared to have agreed a deal with herfractured Cabinet on the UK's post Brexit relationship with " + "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " "about the best way of delivering our shared commitment to honoring the result of the referendum. The " - "Prime Minister's latest plitical drama began late on Sunday night when Davis quit, declaring he could " + "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_repr.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_repr.py index 9778cbc66dfd..d78568331d0e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_repr.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_repr.py @@ -389,7 +389,7 @@ def test_detect_language_result(self, detected_language, text_analytics_warning, assert repr(model) == model_repr - def test_recognized_linked_entites_result(self, linked_entity, text_analytics_warning, text_document_statistics): + def test_recognized_linked_entities_result(self, linked_entity, text_analytics_warning, text_document_statistics): model = _models.RecognizeLinkedEntitiesResult( id="1", entities=[linked_entity[0]],