diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/CHANGELOG.md b/sdk/formrecognizer/Azure.AI.FormRecognizer/CHANGELOG.md index 32bcb6e9266d1..355cb9883360c 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/CHANGELOG.md +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/CHANGELOG.md @@ -7,6 +7,7 @@ ### New Features - Added support for pre-built business card recognition. +- Added support for providing locale info when recognizing receipts and business cards. Supported locales include support EN-US, EN-AU, EN-CA, EN-GB, EN-IN. - Added support to train and recognize custom forms with selection marks such as check boxes and radio buttons. This functionality is only available in train with labels scenarios. - Added ability to create a composed model from the `FormTrainingClient` by calling method `StartCreateComposedModel`. - Added the properties `ModelName` and `Properties` to types `CustomFormModel` and `CustomFormModelInfo`. diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/README.md b/sdk/formrecognizer/Azure.AI.FormRecognizer/README.md index 0be9ecff155c5..b35ab91f8900a 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/README.md +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/README.md @@ -3,8 +3,12 @@ Azure Cognitive Services Form Recognizer is a cloud service that uses machine le - Recognize Custom Forms - Recognize and extract form fields and other content from your custom forms, using models you trained with your own form types. - Recognize Form Content - Recognize and extract tables, lines, words, and selection marks like radio buttons and check boxes in forms documents, without the need to train a model. +<<<<<<< HEAD - Recognize Receipts - Recognize and extract common fields from US receipts, using a pre-trained receipt model. - Recognize Business Card - Recognize and extract common fields from business cards, using a pre-trained business cards model. +======= +- Recognize Receipts - Recognize and extract common fields from receipts, using a pre-trained receipt model. +>>>>>>> locale tests [Source code][formreco_client_src] | [Package (NuGet)][formreco_nuget_package] | [API reference documentation][formreco_refdocs] | [Product documentation][formreco_docs] | [Samples][formreco_samples] @@ -103,7 +107,7 @@ var client = new FormRecognizerClient(new Uri(endpoint), new DefaultAzureCredent - Recognizing form fields and content, using custom models trained to recognize your custom forms. These values are returned in a collection of `RecognizedForm` objects. See example [Recognize Custom Forms](#recognize-custom-forms). - Recognizing form content, including tables, lines, words, and selection marks like radio buttons and check boxes without the need to train a model. Form content is returned in a collection of `FormPage` objects. See example [Recognize Content](#recognize-content). - - Recognizing common fields from US receipts, using a pre-trained receipt model on the Form Recognizer service. These fields and meta-data are returned in a collection of `RecognizedForm` objects. See example [Recognize Receipts](#recognize-receipts). + - Recognizing common fields from receipts, using a pre-trained receipt model on the Form Recognizer service. These fields and meta-data are returned in a collection of `RecognizedForm` objects. See example [Recognize Receipts](#recognize-receipts). - Recognizing common fields from business cards, using a pre-trained business cards model on the Form Recognizer service. These fields and meta-data are returned in a collection of `RecognizedForm` objects. See example [Recognize Business Cards](#recognize-business-cards). ### FormTrainingClient @@ -207,12 +211,13 @@ foreach (RecognizedForm form in forms) ``` ### Recognize Receipts -Recognize data from US sales receipts using a prebuilt model. Receipt fields recognized by the service can be found [here][service_recognize_receipt_fields]. +Recognize data from sales receipts using a prebuilt model. Receipt fields recognized by the service can be found [here][service_recognize_receipt_fields]. ```C# Snippet:FormRecognizerSampleRecognizeReceiptFileStream using (FileStream stream = new FileStream(receiptPath, FileMode.Open)) { - RecognizedFormCollection receipts = await client.StartRecognizeReceiptsAsync(stream).WaitForCompletionAsync(); + var options = new RecognizeReceiptsOptions() { Locale = "en-US" }; + RecognizedFormCollection receipts = await client.StartRecognizeReceiptsAsync(stream, options).WaitForCompletionAsync(); // To see the list of the supported fields returned by service and its corresponding types, consult: // https://aka.ms/formrecognizer/receiptfields @@ -300,7 +305,8 @@ Recognize data from business cards using a prebuilt model. Business card fields ```C# Snippet:FormRecognizerSampleRecognizeBusinessCardFileStream using (FileStream stream = new FileStream(busienssCardsPath, FileMode.Open)) { - RecognizedFormCollection businessCards = await client.StartRecognizeBusinessCardsAsync(stream).WaitForCompletionAsync(); + var options = new RecognizeBusinessCardsOptions() { Locale = "en-US" }; + RecognizedFormCollection businessCards = await client.StartRecognizeBusinessCardsAsync(stream, options).WaitForCompletionAsync(); // To see the list of the supported fields returned by service and its corresponding types, consult: // https://aka.ms/formrecognizer/businesscardfields diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/samples/README.md b/sdk/formrecognizer/Azure.AI.FormRecognizer/samples/README.md index 96827db9d46de..66d888eb556df 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/samples/README.md +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/samples/README.md @@ -15,7 +15,7 @@ Azure Cognitive Services Form Recognizer is a cloud service that uses machine le - Recognize form content - Recognize and extract tables, lines, words, and selection marks like radio buttons and check boxes in forms documents, without the need to train a model. - Recognize custom forms - Recognize and extract form fields and other content from your custom forms, using models you trained with your own form types. -- Recognize receipts - Recognize and extract common fields from US receipts, using a pre-trained receipt model. +- Recognize receipts - Recognize and extract common fields from receipts, using a pre-trained receipt model. - Recognize business cards - Recognize and extract common fields from business cards, using a pre-trained business cards model. ## Common scenarios samples diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/samples/Sample3_RecognizeReceipts.md b/sdk/formrecognizer/Azure.AI.FormRecognizer/samples/Sample3_RecognizeReceipts.md index b4ac6d508cfd2..3e3160124215d 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/samples/Sample3_RecognizeReceipts.md +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/samples/Sample3_RecognizeReceipts.md @@ -1,6 +1,6 @@ # Recognize receipts -This sample demonstrates how to recognize and extract common fields from US receipts, using a pre-trained receipt model. For a suggested approach to extracting information from receipts, see [strongly-typing a recognized form][strongly_typing_a_recognized_form]. +This sample demonstrates how to recognize and extract common fields from receipts, using a pre-trained receipt model. For a suggested approach to extracting information from receipts, see [strongly-typing a recognized form][strongly_typing_a_recognized_form]. To get started you'll need a Cognitive Services resource or a Form Recognizer resource. See [README][README] for prerequisites and instructions. diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/FormRecognizerClient/FormRecognizerClientLiveTests.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/FormRecognizerClient/FormRecognizerClientLiveTests.cs index 9f59d3fb989ac..a32768260cd8b 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/FormRecognizerClient/FormRecognizerClientLiveTests.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/FormRecognizerClient/FormRecognizerClientLiveTests.cs @@ -822,6 +822,54 @@ public void StartRecognizeReceiptsFromUriThrowsForNonExistingContent() Assert.AreEqual("FailedToDownloadImage", ex.ErrorCode); } + [Test] + [TestCase("en-US")] + [TestCase("")] + public async Task StartRecognizeReceiptsWithSupportedLocale(string locale) + { + var client = CreateFormRecognizerClient(); + var options = new RecognizeReceiptsOptions() + { + IncludeFieldElements = true, + Locale = locale + }; + RecognizeReceiptsOperation operation; + + using var stream = FormRecognizerTestEnvironment.CreateStream(TestFile.ReceiptJpg); + using (Recording.DisableRequestBodyRecording()) + { + operation = await client.StartRecognizeReceiptsAsync(stream, options); + } + + RecognizedFormCollection recognizedForms = await operation.WaitForCompletionAsync(PollingInterval); + + var receipt = recognizedForms.Single(); + + ValidatePrebuiltForm( + receipt, + includeFieldElements: true, + expectedFirstPageNumber: 1, + expectedLastPageNumber: 1); + + Assert.Greater(receipt.Fields.Count, 0); + + var receiptPage = receipt.Pages.Single(); + + Assert.Greater(receiptPage.Lines.Count, 0); + Assert.AreEqual(0, receiptPage.SelectionMarks.Count); + Assert.AreEqual(0, receiptPage.Tables.Count); + } + + [Test] + public void StartRecognizeReceiptsWithWrongLocale() + { + var client = CreateFormRecognizerClient(); + + var receiptUri = FormRecognizerTestEnvironment.CreateUri(TestFile.ReceiptJpg); + RequestFailedException ex = Assert.ThrowsAsync(async () => await client.StartRecognizeReceiptsFromUriAsync(receiptUri, new RecognizeReceiptsOptions() { Locale = "not-locale" })); + Assert.AreEqual("UnsupportedLocale", ex.ErrorCode); + } + #endregion #region StartRecognizeBusinessCards diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/FormRecognizerClient/FormRecognizerClientMockTests.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/FormRecognizerClient/FormRecognizerClientMockTests.cs index f19ca75c90ea4..662d151fd85c8 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/FormRecognizerClient/FormRecognizerClientMockTests.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/FormRecognizerClient/FormRecognizerClientMockTests.cs @@ -181,6 +181,30 @@ public async Task StartRecognizeReceiptsFromUriEncodesBlankSpaces() } } + [Test] + [TestCase("")] + [TestCase("en-US")] + public async Task StartRecognizeReceiptsSendsUserSpecifiedLocale(string locale) + { + var mockResponse = new MockResponse(202); + mockResponse.AddHeader(new HttpHeader(Constants.OperationLocationHeader, "host/prebuilt/receipt/analyzeResults/00000000000000000000000000000000")); + + var mockTransport = new MockTransport(new[] { mockResponse, mockResponse }); + var options = new FormRecognizerClientOptions() { Transport = mockTransport }; + var client = CreateInstrumentedClient(options); + + using var stream = FormRecognizerTestEnvironment.CreateStream(TestFile.InvoiceLeTiff); + var recognizeOptions = new RecognizeReceiptsOptions { Locale = locale }; + await client.StartRecognizeReceiptsAsync(stream, recognizeOptions); + + var requestUriQuery = mockTransport.Requests.Single().Uri.Query; + + var localeQuery = "locale="; + var index = requestUriQuery.IndexOf(localeQuery); + var length = requestUriQuery.Length - (index + localeQuery.Length); + Assert.AreEqual(locale, requestUriQuery.Substring(index + localeQuery.Length, length)); + } + #endregion #region Recognize Business Cards @@ -250,6 +274,30 @@ public async Task StartRecognizeBusinessCardsFromUriEncodesBlankSpaces() } } + [Test] + [TestCase("")] + [TestCase("en-US")] + public async Task StartRecognizeBusinessCardsSendsUserSpecifiedLocale(string locale) + { + var mockResponse = new MockResponse(202); + mockResponse.AddHeader(new HttpHeader(Constants.OperationLocationHeader, "host/prebuilt/businesscards/analyzeResults/00000000000000000000000000000000")); + + var mockTransport = new MockTransport(new[] { mockResponse, mockResponse }); + var options = new FormRecognizerClientOptions() { Transport = mockTransport }; + var client = CreateInstrumentedClient(options); + + using var stream = FormRecognizerTestEnvironment.CreateStream(TestFile.InvoiceLeTiff); + var recognizeOptions = new RecognizeReceiptsOptions { Locale = locale }; + await client.StartRecognizeReceiptsAsync(stream, recognizeOptions); + + var requestUriQuery = mockTransport.Requests.Single().Uri.Query; + + var localeQuery = "locale="; + var index = requestUriQuery.IndexOf(localeQuery); + var length = requestUriQuery.Length - (index + localeQuery.Length); + Assert.AreEqual(locale, requestUriQuery.Substring(index + localeQuery.Length, length)); + } + #endregion #region Recognize Custom Forms diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeBusinessCardsWithSupportedLocale(%%).json b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeBusinessCardsWithSupportedLocale(%%).json new file mode 100644 index 0000000000000..b5f2b45b41324 --- /dev/null +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeBusinessCardsWithSupportedLocale(%%).json @@ -0,0 +1,1136 @@ +{ + "Entries": [ + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyze?includeTextDetails=true\u0026locale=", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "279674", + "Content-Type": "image/jpeg", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-3cab1f5a2053b248a8f9bfdeefd21f6d-2d7fb6efaf96c549-00", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "88792ec4ff928b8d521341c391325950", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "19cb0b48-28fc-4a82-b79c-b35378498537", + "Content-Length": "0", + "Date": "Thu, 15 Oct 2020 23:59:05 GMT", + "Operation-Location": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/19cb0b48-28fc-4a82-b79c-b35378498537", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "417" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/19cb0b48-28fc-4a82-b79c-b35378498537", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "13a84ab0c34ba4f117693304a5e57fe5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d0ddce20-4a48-4b68-ad89-9a8f2e0c3196", + "Content-Length": "109", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:05 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "83" + }, + "ResponseBody": { + "status": "notStarted", + "createdDateTime": "2020-10-15T23:59:05Z", + "lastUpdatedDateTime": "2020-10-15T23:59:05Z" + } + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/19cb0b48-28fc-4a82-b79c-b35378498537", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "6f0b6adfbb82697d74b2e1d5f2b73eee", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "0aaf70e1-3bb3-4ee2-a71b-caed783c5d28", + "Content-Length": "106", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:06 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "13" + }, + "ResponseBody": { + "status": "running", + "createdDateTime": "2020-10-15T23:59:05Z", + "lastUpdatedDateTime": "2020-10-15T23:59:06Z" + } + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/19cb0b48-28fc-4a82-b79c-b35378498537", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "0832d7893f3f015b3cd57028cb88e56c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6d8ef234-fc31-4247-957d-a7d8345227f0", + "Content-Length": "106", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:07 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "34" + }, + "ResponseBody": { + "status": "running", + "createdDateTime": "2020-10-15T23:59:05Z", + "lastUpdatedDateTime": "2020-10-15T23:59:06Z" + } + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/19cb0b48-28fc-4a82-b79c-b35378498537", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "26e45c94e927f4cdcd3e9e98e11cb160", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "b17d7d5d-36a4-4ebd-9bd0-f71db3b10268", + "Content-Length": "6571", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:08 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "20" + }, + "ResponseBody": { + "status": "succeeded", + "createdDateTime": "2020-10-15T23:59:05Z", + "lastUpdatedDateTime": "2020-10-15T23:59:08Z", + "analyzeResult": { + "version": "2.1.0", + "readResults": [ + { + "page": 1, + "angle": 0.2511, + "width": 1688, + "height": 3000, + "unit": "pixel", + "lines": [ + { + "text": "Contoso", + "boundingBox": [ + 619, + 291, + 1051, + 284, + 1053, + 384, + 620, + 396 + ], + "words": [ + { + "text": "Contoso", + "boundingBox": [ + 623, + 292, + 1051, + 284, + 1052, + 383, + 624, + 397 + ], + "confidence": 0.959 + } + ] + }, + { + "text": "Contoso", + "boundingBox": [ + 322, + 591, + 501, + 601, + 498, + 654, + 319, + 644 + ], + "words": [ + { + "text": "Contoso", + "boundingBox": [ + 328, + 591, + 500, + 602, + 498, + 654, + 325, + 644 + ], + "confidence": 0.727 + } + ] + }, + { + "text": "123 Main Street", + "boundingBox": [ + 319, + 690, + 655, + 695, + 654, + 757, + 318, + 752 + ], + "words": [ + { + "text": "123", + "boundingBox": [ + 323, + 690, + 387, + 692, + 383, + 754, + 319, + 753 + ], + "confidence": 0.958 + }, + { + "text": "Main", + "boundingBox": [ + 399, + 692, + 502, + 694, + 498, + 756, + 395, + 754 + ], + "confidence": 0.958 + }, + { + "text": "Street", + "boundingBox": [ + 514, + 695, + 656, + 698, + 653, + 758, + 510, + 756 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "Redmond, WA 98052", + "boundingBox": [ + 317, + 795, + 751, + 795, + 752, + 859, + 317, + 860 + ], + "words": [ + { + "text": "Redmond,", + "boundingBox": [ + 321, + 795, + 523, + 795, + 520, + 861, + 317, + 858 + ], + "confidence": 0.573 + }, + { + "text": "WA", + "boundingBox": [ + 535, + 795, + 597, + 795, + 595, + 861, + 532, + 861 + ], + "confidence": 0.958 + }, + { + "text": "98052", + "boundingBox": [ + 610, + 795, + 749, + 796, + 747, + 858, + 607, + 861 + ], + "confidence": 0.937 + } + ] + }, + { + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 618, + 1011, + 616, + 1068, + 305, + 1062 + ], + "words": [ + { + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 617, + 1012, + 615, + 1069, + 305, + 1064 + ], + "confidence": 0.937 + } + ] + }, + { + "text": "6/10/2019 13:59", + "boundingBox": [ + 303, + 1223, + 630, + 1225, + 629, + 1289, + 302, + 1286 + ], + "words": [ + { + "text": "6/10/2019", + "boundingBox": [ + 304, + 1224, + 506, + 1224, + 505, + 1289, + 303, + 1288 + ], + "confidence": 0.762 + }, + { + "text": "13:59", + "boundingBox": [ + 518, + 1225, + 629, + 1228, + 627, + 1290, + 517, + 1289 + ], + "confidence": 0.943 + } + ] + }, + { + "text": "Sales Associate: Paul", + "boundingBox": [ + 294, + 1335, + 768, + 1335, + 768, + 1401, + 294, + 1399 + ], + "words": [ + { + "text": "Sales", + "boundingBox": [ + 302, + 1336, + 418, + 1335, + 416, + 1399, + 301, + 1399 + ], + "confidence": 0.959 + }, + { + "text": "Associate:", + "boundingBox": [ + 430, + 1335, + 649, + 1336, + 646, + 1401, + 428, + 1399 + ], + "confidence": 0.943 + }, + { + "text": "Paul", + "boundingBox": [ + 661, + 1336, + 767, + 1336, + 764, + 1402, + 659, + 1401 + ], + "confidence": 0.959 + } + ] + }, + { + "text": "1 Surface Pro 6", + "boundingBox": [ + 336, + 1560, + 679, + 1561, + 678, + 1625, + 336, + 1623 + ], + "words": [ + { + "text": "1", + "boundingBox": [ + 337, + 1560, + 360, + 1561, + 360, + 1625, + 337, + 1625 + ], + "confidence": 0.799 + }, + { + "text": "Surface", + "boundingBox": [ + 373, + 1561, + 542, + 1562, + 542, + 1624, + 373, + 1625 + ], + "confidence": 0.958 + }, + { + "text": "Pro", + "boundingBox": [ + 555, + 1562, + 631, + 1563, + 631, + 1625, + 555, + 1624 + ], + "confidence": 0.909 + }, + { + "text": "6", + "boundingBox": [ + 644, + 1563, + 676, + 1563, + 675, + 1625, + 643, + 1625 + ], + "confidence": 0.762 + } + ] + }, + { + "text": "256GB / Intel Core i5 /", + "boundingBox": [ + 372, + 1669, + 846, + 1669, + 846, + 1743, + 372, + 1742 + ], + "words": [ + { + "text": "256GB", + "boundingBox": [ + 375, + 1670, + 506, + 1671, + 503, + 1740, + 373, + 1740 + ], + "confidence": 0.95 + }, + { + "text": "/", + "boundingBox": [ + 520, + 1671, + 533, + 1671, + 531, + 1740, + 517, + 1740 + ], + "confidence": 0.876 + }, + { + "text": "Intel", + "boundingBox": [ + 547, + 1671, + 648, + 1671, + 646, + 1741, + 545, + 1740 + ], + "confidence": 0.939 + }, + { + "text": "Core", + "boundingBox": [ + 662, + 1671, + 758, + 1670, + 756, + 1743, + 660, + 1741 + ], + "confidence": 0.942 + }, + { + "text": "i5", + "boundingBox": [ + 772, + 1670, + 808, + 1670, + 807, + 1744, + 770, + 1743 + ], + "confidence": 0.82 + }, + { + "text": "/", + "boundingBox": [ + 822, + 1670, + 847, + 1670, + 846, + 1744, + 820, + 1744 + ], + "confidence": 0.84 + } + ] + }, + { + "text": "8GB RAM (Black)", + "boundingBox": [ + 370, + 1783, + 732, + 1785, + 731, + 1853, + 370, + 1850 + ], + "words": [ + { + "text": "8GB", + "boundingBox": [ + 374, + 1783, + 451, + 1783, + 448, + 1850, + 370, + 1850 + ], + "confidence": 0.799 + }, + { + "text": "RAM", + "boundingBox": [ + 465, + 1783, + 561, + 1784, + 559, + 1851, + 461, + 1850 + ], + "confidence": 0.958 + }, + { + "text": "(Black)", + "boundingBox": [ + 575, + 1784, + 731, + 1785, + 729, + 1854, + 572, + 1852 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "$ 999.00", + "boundingBox": [ + 937, + 1785, + 1139, + 1790, + 1137, + 1862, + 936, + 1859 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 939, + 1785, + 959, + 1785, + 958, + 1859, + 938, + 1859 + ], + "confidence": 0.895 + }, + { + "text": "999.00", + "boundingBox": [ + 974, + 1786, + 1134, + 1789, + 1133, + 1863, + 973, + 1860 + ], + "confidence": 0.873 + } + ] + }, + { + "text": "1 SurfacePen", + "boundingBox": [ + 320, + 2019, + 627, + 2013, + 629, + 2076, + 321, + 2083 + ], + "words": [ + { + "text": "1", + "boundingBox": [ + 321, + 2021, + 348, + 2020, + 349, + 2084, + 322, + 2084 + ], + "confidence": 0.819 + }, + { + "text": "SurfacePen", + "boundingBox": [ + 360, + 2020, + 626, + 2014, + 628, + 2077, + 362, + 2083 + ], + "confidence": 0.938 + } + ] + }, + { + "text": "$ 99.99", + "boundingBox": [ + 967, + 2028, + 1128, + 2029, + 1127, + 2091, + 967, + 2091 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 969, + 2028, + 994, + 2028, + 994, + 2091, + 969, + 2091 + ], + "confidence": 0.887 + }, + { + "text": "99.99", + "boundingBox": [ + 1007, + 2028, + 1127, + 2028, + 1126, + 2091, + 1007, + 2091 + ], + "confidence": 0.912 + } + ] + }, + { + "text": "Sub-Total", + "boundingBox": [ + 474, + 2242, + 697, + 2244, + 697, + 2310, + 473, + 2308 + ], + "words": [ + { + "text": "Sub-Total", + "boundingBox": [ + 476, + 2242, + 695, + 2245, + 694, + 2310, + 474, + 2308 + ], + "confidence": 0.917 + } + ] + }, + { + "text": "$ 1098.99", + "boundingBox": [ + 922, + 2259, + 1136, + 2253, + 1138, + 2318, + 924, + 2325 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 924, + 2261, + 950, + 2260, + 954, + 2326, + 928, + 2326 + ], + "confidence": 0.881 + }, + { + "text": "1098.99", + "boundingBox": [ + 963, + 2260, + 1136, + 2254, + 1137, + 2320, + 966, + 2325 + ], + "confidence": 0.941 + } + ] + }, + { + "text": "Tax", + "boundingBox": [ + 570, + 2355, + 655, + 2357, + 654, + 2415, + 568, + 2413 + ], + "words": [ + { + "text": "Tax", + "boundingBox": [ + 571, + 2355, + 654, + 2357, + 653, + 2415, + 570, + 2413 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "$ 104.40", + "boundingBox": [ + 941, + 2368, + 1134, + 2364, + 1137, + 2433, + 942, + 2438 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 943, + 2368, + 966, + 2367, + 968, + 2437, + 944, + 2438 + ], + "confidence": 0.892 + }, + { + "text": "104.40", + "boundingBox": [ + 980, + 2367, + 1132, + 2364, + 1133, + 2434, + 982, + 2437 + ], + "confidence": 0.957 + } + ] + }, + { + "text": "Total", + "boundingBox": [ + 551, + 2591, + 672, + 2584, + 675, + 2652, + 554, + 2659 + ], + "words": [ + { + "text": "Total", + "boundingBox": [ + 551, + 2591, + 668, + 2584, + 672, + 2652, + 554, + 2659 + ], + "confidence": 0.727 + } + ] + }, + { + "text": "$ 1203.39", + "boundingBox": [ + 918, + 2589, + 1123, + 2611, + 1116, + 2677, + 912, + 2656 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 918, + 2590, + 942, + 2592, + 936, + 2659, + 912, + 2657 + ], + "confidence": 0.886 + }, + { + "text": "1203.39", + "boundingBox": [ + 955, + 2594, + 1124, + 2611, + 1115, + 2678, + 949, + 2661 + ], + "confidence": 0.951 + } + ] + } + ] + } + ], + "documentResults": [ + { + "docType": "prebuilt:businesscard", + "pageRange": [ + 1, + 1 + ], + "fields": { + "CompanyNames": { + "type": "array", + "valueArray": [ + { + "type": "string", + "valueString": "Contoso Contoso", + "text": "Contoso Contoso", + "boundingBox": [ + 349.3, + 241.3, + 1058, + 284.4, + 1033.5, + 687.1, + 324.8, + 644 + ], + "page": 1, + "confidence": 0.879, + "elements": [ + "#/readResults/0/lines/0/words/0", + "#/readResults/0/lines/1/words/0" + ] + } + ] + }, + "Addresses": { + "type": "array", + "valueArray": [ + { + "type": "string", + "valueString": "123 Main Street Redmond, WA 98052", + "text": "123 Main Street Redmond, WA 98052", + "boundingBox": [ + 319.9, + 689.9, + 750.7, + 697.5, + 747.8, + 865.6, + 317, + 858 + ], + "page": 1, + "confidence": 0.988, + "elements": [ + "#/readResults/0/lines/2/words/0", + "#/readResults/0/lines/2/words/1", + "#/readResults/0/lines/2/words/2", + "#/readResults/0/lines/3/words/0", + "#/readResults/0/lines/3/words/1", + "#/readResults/0/lines/3/words/2" + ] + } + ] + }, + "OtherPhones": { + "type": "array", + "valueArray": [ + { + "type": "phoneNumber", + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 617, + 1012, + 615, + 1069, + 305, + 1064 + ], + "page": 1, + "confidence": 0.99, + "elements": [ + "#/readResults/0/lines/4/words/0" + ] + } + ] + } + } + } + ] + } + } + } + ], + "Variables": { + "FORM_RECOGNIZER_API_KEY": "Sanitized", + "FORM_RECOGNIZER_ENDPOINT": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/", + "RandomSeed": "84403959" + } +} \ No newline at end of file diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeBusinessCardsWithSupportedLocale(%%)Async.json b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeBusinessCardsWithSupportedLocale(%%)Async.json new file mode 100644 index 0000000000000..63bd7b805aa56 --- /dev/null +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeBusinessCardsWithSupportedLocale(%%)Async.json @@ -0,0 +1,1106 @@ +{ + "Entries": [ + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyze?includeTextDetails=true\u0026locale=", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "279674", + "Content-Type": "image/jpeg", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6dbdfb463f873b4ab6cfb441f8bedcdc-9b046c679c3a324c-00", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "da116df558b3da3d2019368fab51681a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "246250e4-2faf-4eef-9ef3-c82425388365", + "Content-Length": "0", + "Date": "Thu, 15 Oct 2020 23:59:18 GMT", + "Operation-Location": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/246250e4-2faf-4eef-9ef3-c82425388365", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "232" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/246250e4-2faf-4eef-9ef3-c82425388365", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "01416f34aec50afdd9d70ea54b15089d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "19ca4a08-c608-4711-b14c-015072914fcf", + "Content-Length": "109", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:18 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "10" + }, + "ResponseBody": { + "status": "notStarted", + "createdDateTime": "2020-10-15T23:59:18Z", + "lastUpdatedDateTime": "2020-10-15T23:59:18Z" + } + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/246250e4-2faf-4eef-9ef3-c82425388365", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "dd50a676f11b9f782a9bc0fd1b0243b8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "1500f654-a2dc-4295-8786-c63f7ca31d9a", + "Content-Length": "106", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:19 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "11" + }, + "ResponseBody": { + "status": "running", + "createdDateTime": "2020-10-15T23:59:18Z", + "lastUpdatedDateTime": "2020-10-15T23:59:19Z" + } + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/246250e4-2faf-4eef-9ef3-c82425388365", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "110cc3d870da47866f0600dc4a978f0b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "9c5e265b-1d69-4a58-85c0-8817008cd30a", + "Content-Length": "6571", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:20 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "19" + }, + "ResponseBody": { + "status": "succeeded", + "createdDateTime": "2020-10-15T23:59:18Z", + "lastUpdatedDateTime": "2020-10-15T23:59:20Z", + "analyzeResult": { + "version": "2.1.0", + "readResults": [ + { + "page": 1, + "angle": 0.2511, + "width": 1688, + "height": 3000, + "unit": "pixel", + "lines": [ + { + "text": "Contoso", + "boundingBox": [ + 619, + 291, + 1051, + 284, + 1053, + 384, + 620, + 396 + ], + "words": [ + { + "text": "Contoso", + "boundingBox": [ + 623, + 292, + 1051, + 284, + 1052, + 383, + 624, + 397 + ], + "confidence": 0.959 + } + ] + }, + { + "text": "Contoso", + "boundingBox": [ + 322, + 591, + 501, + 601, + 498, + 654, + 319, + 644 + ], + "words": [ + { + "text": "Contoso", + "boundingBox": [ + 328, + 591, + 500, + 602, + 498, + 654, + 325, + 644 + ], + "confidence": 0.727 + } + ] + }, + { + "text": "123 Main Street", + "boundingBox": [ + 319, + 690, + 655, + 695, + 654, + 757, + 318, + 752 + ], + "words": [ + { + "text": "123", + "boundingBox": [ + 323, + 690, + 387, + 692, + 383, + 754, + 319, + 753 + ], + "confidence": 0.958 + }, + { + "text": "Main", + "boundingBox": [ + 399, + 692, + 502, + 694, + 498, + 756, + 395, + 754 + ], + "confidence": 0.958 + }, + { + "text": "Street", + "boundingBox": [ + 514, + 695, + 656, + 698, + 653, + 758, + 510, + 756 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "Redmond, WA 98052", + "boundingBox": [ + 317, + 795, + 751, + 795, + 752, + 859, + 317, + 860 + ], + "words": [ + { + "text": "Redmond,", + "boundingBox": [ + 321, + 795, + 523, + 795, + 520, + 861, + 317, + 858 + ], + "confidence": 0.573 + }, + { + "text": "WA", + "boundingBox": [ + 535, + 795, + 597, + 795, + 595, + 861, + 532, + 861 + ], + "confidence": 0.958 + }, + { + "text": "98052", + "boundingBox": [ + 610, + 795, + 749, + 796, + 747, + 858, + 607, + 861 + ], + "confidence": 0.937 + } + ] + }, + { + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 618, + 1011, + 616, + 1068, + 305, + 1062 + ], + "words": [ + { + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 617, + 1012, + 615, + 1069, + 305, + 1064 + ], + "confidence": 0.937 + } + ] + }, + { + "text": "6/10/2019 13:59", + "boundingBox": [ + 303, + 1223, + 630, + 1225, + 629, + 1289, + 302, + 1286 + ], + "words": [ + { + "text": "6/10/2019", + "boundingBox": [ + 304, + 1224, + 506, + 1224, + 505, + 1289, + 303, + 1288 + ], + "confidence": 0.762 + }, + { + "text": "13:59", + "boundingBox": [ + 518, + 1225, + 629, + 1228, + 627, + 1290, + 517, + 1289 + ], + "confidence": 0.943 + } + ] + }, + { + "text": "Sales Associate: Paul", + "boundingBox": [ + 294, + 1335, + 768, + 1335, + 768, + 1401, + 294, + 1399 + ], + "words": [ + { + "text": "Sales", + "boundingBox": [ + 302, + 1336, + 418, + 1335, + 416, + 1399, + 301, + 1399 + ], + "confidence": 0.959 + }, + { + "text": "Associate:", + "boundingBox": [ + 430, + 1335, + 649, + 1336, + 646, + 1401, + 428, + 1399 + ], + "confidence": 0.943 + }, + { + "text": "Paul", + "boundingBox": [ + 661, + 1336, + 767, + 1336, + 764, + 1402, + 659, + 1401 + ], + "confidence": 0.959 + } + ] + }, + { + "text": "1 Surface Pro 6", + "boundingBox": [ + 336, + 1560, + 679, + 1561, + 678, + 1625, + 336, + 1623 + ], + "words": [ + { + "text": "1", + "boundingBox": [ + 337, + 1560, + 360, + 1561, + 360, + 1625, + 337, + 1625 + ], + "confidence": 0.799 + }, + { + "text": "Surface", + "boundingBox": [ + 373, + 1561, + 542, + 1562, + 542, + 1624, + 373, + 1625 + ], + "confidence": 0.958 + }, + { + "text": "Pro", + "boundingBox": [ + 555, + 1562, + 631, + 1563, + 631, + 1625, + 555, + 1624 + ], + "confidence": 0.909 + }, + { + "text": "6", + "boundingBox": [ + 644, + 1563, + 676, + 1563, + 675, + 1625, + 643, + 1625 + ], + "confidence": 0.762 + } + ] + }, + { + "text": "256GB / Intel Core i5 /", + "boundingBox": [ + 372, + 1669, + 846, + 1669, + 846, + 1743, + 372, + 1742 + ], + "words": [ + { + "text": "256GB", + "boundingBox": [ + 375, + 1670, + 506, + 1671, + 503, + 1740, + 373, + 1740 + ], + "confidence": 0.95 + }, + { + "text": "/", + "boundingBox": [ + 520, + 1671, + 533, + 1671, + 531, + 1740, + 517, + 1740 + ], + "confidence": 0.876 + }, + { + "text": "Intel", + "boundingBox": [ + 547, + 1671, + 648, + 1671, + 646, + 1741, + 545, + 1740 + ], + "confidence": 0.939 + }, + { + "text": "Core", + "boundingBox": [ + 662, + 1671, + 758, + 1670, + 756, + 1743, + 660, + 1741 + ], + "confidence": 0.942 + }, + { + "text": "i5", + "boundingBox": [ + 772, + 1670, + 808, + 1670, + 807, + 1744, + 770, + 1743 + ], + "confidence": 0.82 + }, + { + "text": "/", + "boundingBox": [ + 822, + 1670, + 847, + 1670, + 846, + 1744, + 820, + 1744 + ], + "confidence": 0.84 + } + ] + }, + { + "text": "8GB RAM (Black)", + "boundingBox": [ + 370, + 1783, + 732, + 1785, + 731, + 1853, + 370, + 1850 + ], + "words": [ + { + "text": "8GB", + "boundingBox": [ + 374, + 1783, + 451, + 1783, + 448, + 1850, + 370, + 1850 + ], + "confidence": 0.799 + }, + { + "text": "RAM", + "boundingBox": [ + 465, + 1783, + 561, + 1784, + 559, + 1851, + 461, + 1850 + ], + "confidence": 0.958 + }, + { + "text": "(Black)", + "boundingBox": [ + 575, + 1784, + 731, + 1785, + 729, + 1854, + 572, + 1852 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "$ 999.00", + "boundingBox": [ + 937, + 1785, + 1139, + 1790, + 1137, + 1862, + 936, + 1859 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 939, + 1785, + 959, + 1785, + 958, + 1859, + 938, + 1859 + ], + "confidence": 0.895 + }, + { + "text": "999.00", + "boundingBox": [ + 974, + 1786, + 1134, + 1789, + 1133, + 1863, + 973, + 1860 + ], + "confidence": 0.873 + } + ] + }, + { + "text": "1 SurfacePen", + "boundingBox": [ + 320, + 2019, + 627, + 2013, + 629, + 2076, + 321, + 2083 + ], + "words": [ + { + "text": "1", + "boundingBox": [ + 321, + 2021, + 348, + 2020, + 349, + 2084, + 322, + 2084 + ], + "confidence": 0.819 + }, + { + "text": "SurfacePen", + "boundingBox": [ + 360, + 2020, + 626, + 2014, + 628, + 2077, + 362, + 2083 + ], + "confidence": 0.938 + } + ] + }, + { + "text": "$ 99.99", + "boundingBox": [ + 967, + 2028, + 1128, + 2029, + 1127, + 2091, + 967, + 2091 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 969, + 2028, + 994, + 2028, + 994, + 2091, + 969, + 2091 + ], + "confidence": 0.887 + }, + { + "text": "99.99", + "boundingBox": [ + 1007, + 2028, + 1127, + 2028, + 1126, + 2091, + 1007, + 2091 + ], + "confidence": 0.912 + } + ] + }, + { + "text": "Sub-Total", + "boundingBox": [ + 474, + 2242, + 697, + 2244, + 697, + 2310, + 473, + 2308 + ], + "words": [ + { + "text": "Sub-Total", + "boundingBox": [ + 476, + 2242, + 695, + 2245, + 694, + 2310, + 474, + 2308 + ], + "confidence": 0.917 + } + ] + }, + { + "text": "$ 1098.99", + "boundingBox": [ + 922, + 2259, + 1136, + 2253, + 1138, + 2318, + 924, + 2325 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 924, + 2261, + 950, + 2260, + 954, + 2326, + 928, + 2326 + ], + "confidence": 0.881 + }, + { + "text": "1098.99", + "boundingBox": [ + 963, + 2260, + 1136, + 2254, + 1137, + 2320, + 966, + 2325 + ], + "confidence": 0.941 + } + ] + }, + { + "text": "Tax", + "boundingBox": [ + 570, + 2355, + 655, + 2357, + 654, + 2415, + 568, + 2413 + ], + "words": [ + { + "text": "Tax", + "boundingBox": [ + 571, + 2355, + 654, + 2357, + 653, + 2415, + 570, + 2413 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "$ 104.40", + "boundingBox": [ + 941, + 2368, + 1134, + 2364, + 1137, + 2433, + 942, + 2438 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 943, + 2368, + 966, + 2367, + 968, + 2437, + 944, + 2438 + ], + "confidence": 0.892 + }, + { + "text": "104.40", + "boundingBox": [ + 980, + 2367, + 1132, + 2364, + 1133, + 2434, + 982, + 2437 + ], + "confidence": 0.957 + } + ] + }, + { + "text": "Total", + "boundingBox": [ + 551, + 2591, + 672, + 2584, + 675, + 2652, + 554, + 2659 + ], + "words": [ + { + "text": "Total", + "boundingBox": [ + 551, + 2591, + 668, + 2584, + 672, + 2652, + 554, + 2659 + ], + "confidence": 0.727 + } + ] + }, + { + "text": "$ 1203.39", + "boundingBox": [ + 918, + 2589, + 1123, + 2611, + 1116, + 2677, + 912, + 2656 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 918, + 2590, + 942, + 2592, + 936, + 2659, + 912, + 2657 + ], + "confidence": 0.886 + }, + { + "text": "1203.39", + "boundingBox": [ + 955, + 2594, + 1124, + 2611, + 1115, + 2678, + 949, + 2661 + ], + "confidence": 0.951 + } + ] + } + ] + } + ], + "documentResults": [ + { + "docType": "prebuilt:businesscard", + "pageRange": [ + 1, + 1 + ], + "fields": { + "CompanyNames": { + "type": "array", + "valueArray": [ + { + "type": "string", + "valueString": "Contoso Contoso", + "text": "Contoso Contoso", + "boundingBox": [ + 349.3, + 241.3, + 1058, + 284.4, + 1033.5, + 687.1, + 324.8, + 644 + ], + "page": 1, + "confidence": 0.879, + "elements": [ + "#/readResults/0/lines/0/words/0", + "#/readResults/0/lines/1/words/0" + ] + } + ] + }, + "Addresses": { + "type": "array", + "valueArray": [ + { + "type": "string", + "valueString": "123 Main Street Redmond, WA 98052", + "text": "123 Main Street Redmond, WA 98052", + "boundingBox": [ + 319.9, + 689.9, + 750.7, + 697.5, + 747.8, + 865.6, + 317, + 858 + ], + "page": 1, + "confidence": 0.988, + "elements": [ + "#/readResults/0/lines/2/words/0", + "#/readResults/0/lines/2/words/1", + "#/readResults/0/lines/2/words/2", + "#/readResults/0/lines/3/words/0", + "#/readResults/0/lines/3/words/1", + "#/readResults/0/lines/3/words/2" + ] + } + ] + }, + "OtherPhones": { + "type": "array", + "valueArray": [ + { + "type": "phoneNumber", + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 617, + 1012, + 615, + 1069, + 305, + 1064 + ], + "page": 1, + "confidence": 0.99, + "elements": [ + "#/readResults/0/lines/4/words/0" + ] + } + ] + } + } + } + ] + } + } + } + ], + "Variables": { + "FORM_RECOGNIZER_API_KEY": "Sanitized", + "FORM_RECOGNIZER_ENDPOINT": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/", + "RandomSeed": "1842160532" + } +} \ No newline at end of file diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeBusinessCardsWithSupportedLocale(%en-US%).json b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeBusinessCardsWithSupportedLocale(%en-US%).json new file mode 100644 index 0000000000000..b66a484c7ec85 --- /dev/null +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeBusinessCardsWithSupportedLocale(%en-US%).json @@ -0,0 +1,1106 @@ +{ + "Entries": [ + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyze?includeTextDetails=true\u0026locale=en-US", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "279674", + "Content-Type": "image/jpeg", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-170a05bcf740284ca5fe3cfb075b5b30-30e8656b3ee86b4d-00", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "02266b350010fcb8fc643579dac7e756", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "f4132695-0462-43ae-a416-c5d5a4ed29c7", + "Content-Length": "0", + "Date": "Thu, 15 Oct 2020 23:59:02 GMT", + "Operation-Location": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/f4132695-0462-43ae-a416-c5d5a4ed29c7", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "271" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/f4132695-0462-43ae-a416-c5d5a4ed29c7", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "e156edda9cd8b4f59ea289413011ff5d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "bdc59a33-a27d-451b-8601-19ae771edf60", + "Content-Length": "106", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:02 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "66" + }, + "ResponseBody": { + "status": "running", + "createdDateTime": "2020-10-15T23:59:02Z", + "lastUpdatedDateTime": "2020-10-15T23:59:02Z" + } + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/f4132695-0462-43ae-a416-c5d5a4ed29c7", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "40adaf570a65cbe42d94275d271215cb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "106c6ece-4600-4774-b96d-bb63bf8e4849", + "Content-Length": "106", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:03 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "16" + }, + "ResponseBody": { + "status": "running", + "createdDateTime": "2020-10-15T23:59:02Z", + "lastUpdatedDateTime": "2020-10-15T23:59:02Z" + } + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/f4132695-0462-43ae-a416-c5d5a4ed29c7", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "44f00a418417982b7571636e7777cceb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "abdc8c19-784b-43d1-af4e-4df2c0ba6395", + "Content-Length": "6571", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:04 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "20" + }, + "ResponseBody": { + "status": "succeeded", + "createdDateTime": "2020-10-15T23:59:02Z", + "lastUpdatedDateTime": "2020-10-15T23:59:04Z", + "analyzeResult": { + "version": "2.1.0", + "readResults": [ + { + "page": 1, + "angle": 0.2511, + "width": 1688, + "height": 3000, + "unit": "pixel", + "lines": [ + { + "text": "Contoso", + "boundingBox": [ + 619, + 291, + 1051, + 284, + 1053, + 384, + 620, + 396 + ], + "words": [ + { + "text": "Contoso", + "boundingBox": [ + 623, + 292, + 1051, + 284, + 1052, + 383, + 624, + 397 + ], + "confidence": 0.959 + } + ] + }, + { + "text": "Contoso", + "boundingBox": [ + 322, + 591, + 501, + 601, + 498, + 654, + 319, + 644 + ], + "words": [ + { + "text": "Contoso", + "boundingBox": [ + 328, + 591, + 500, + 602, + 498, + 654, + 325, + 644 + ], + "confidence": 0.727 + } + ] + }, + { + "text": "123 Main Street", + "boundingBox": [ + 319, + 690, + 655, + 695, + 654, + 757, + 318, + 752 + ], + "words": [ + { + "text": "123", + "boundingBox": [ + 323, + 690, + 387, + 692, + 383, + 754, + 319, + 753 + ], + "confidence": 0.958 + }, + { + "text": "Main", + "boundingBox": [ + 399, + 692, + 502, + 694, + 498, + 756, + 395, + 754 + ], + "confidence": 0.958 + }, + { + "text": "Street", + "boundingBox": [ + 514, + 695, + 656, + 698, + 653, + 758, + 510, + 756 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "Redmond, WA 98052", + "boundingBox": [ + 317, + 795, + 751, + 795, + 752, + 859, + 317, + 860 + ], + "words": [ + { + "text": "Redmond,", + "boundingBox": [ + 321, + 795, + 523, + 795, + 520, + 861, + 317, + 858 + ], + "confidence": 0.573 + }, + { + "text": "WA", + "boundingBox": [ + 535, + 795, + 597, + 795, + 595, + 861, + 532, + 861 + ], + "confidence": 0.958 + }, + { + "text": "98052", + "boundingBox": [ + 610, + 795, + 749, + 796, + 747, + 858, + 607, + 861 + ], + "confidence": 0.937 + } + ] + }, + { + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 618, + 1011, + 616, + 1068, + 305, + 1062 + ], + "words": [ + { + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 617, + 1012, + 615, + 1069, + 305, + 1064 + ], + "confidence": 0.937 + } + ] + }, + { + "text": "6/10/2019 13:59", + "boundingBox": [ + 303, + 1223, + 630, + 1225, + 629, + 1289, + 302, + 1286 + ], + "words": [ + { + "text": "6/10/2019", + "boundingBox": [ + 304, + 1224, + 506, + 1224, + 505, + 1289, + 303, + 1288 + ], + "confidence": 0.762 + }, + { + "text": "13:59", + "boundingBox": [ + 518, + 1225, + 629, + 1228, + 627, + 1290, + 517, + 1289 + ], + "confidence": 0.943 + } + ] + }, + { + "text": "Sales Associate: Paul", + "boundingBox": [ + 294, + 1335, + 768, + 1335, + 768, + 1401, + 294, + 1399 + ], + "words": [ + { + "text": "Sales", + "boundingBox": [ + 302, + 1336, + 418, + 1335, + 416, + 1399, + 301, + 1399 + ], + "confidence": 0.959 + }, + { + "text": "Associate:", + "boundingBox": [ + 430, + 1335, + 649, + 1336, + 646, + 1401, + 428, + 1399 + ], + "confidence": 0.943 + }, + { + "text": "Paul", + "boundingBox": [ + 661, + 1336, + 767, + 1336, + 764, + 1402, + 659, + 1401 + ], + "confidence": 0.959 + } + ] + }, + { + "text": "1 Surface Pro 6", + "boundingBox": [ + 336, + 1560, + 679, + 1561, + 678, + 1625, + 336, + 1623 + ], + "words": [ + { + "text": "1", + "boundingBox": [ + 337, + 1560, + 360, + 1561, + 360, + 1625, + 337, + 1625 + ], + "confidence": 0.799 + }, + { + "text": "Surface", + "boundingBox": [ + 373, + 1561, + 542, + 1562, + 542, + 1624, + 373, + 1625 + ], + "confidence": 0.958 + }, + { + "text": "Pro", + "boundingBox": [ + 555, + 1562, + 631, + 1563, + 631, + 1625, + 555, + 1624 + ], + "confidence": 0.909 + }, + { + "text": "6", + "boundingBox": [ + 644, + 1563, + 676, + 1563, + 675, + 1625, + 643, + 1625 + ], + "confidence": 0.762 + } + ] + }, + { + "text": "256GB / Intel Core i5 /", + "boundingBox": [ + 372, + 1669, + 846, + 1669, + 846, + 1743, + 372, + 1742 + ], + "words": [ + { + "text": "256GB", + "boundingBox": [ + 375, + 1670, + 506, + 1671, + 503, + 1740, + 373, + 1740 + ], + "confidence": 0.95 + }, + { + "text": "/", + "boundingBox": [ + 520, + 1671, + 533, + 1671, + 531, + 1740, + 517, + 1740 + ], + "confidence": 0.876 + }, + { + "text": "Intel", + "boundingBox": [ + 547, + 1671, + 648, + 1671, + 646, + 1741, + 545, + 1740 + ], + "confidence": 0.939 + }, + { + "text": "Core", + "boundingBox": [ + 662, + 1671, + 758, + 1670, + 756, + 1743, + 660, + 1741 + ], + "confidence": 0.942 + }, + { + "text": "i5", + "boundingBox": [ + 772, + 1670, + 808, + 1670, + 807, + 1744, + 770, + 1743 + ], + "confidence": 0.82 + }, + { + "text": "/", + "boundingBox": [ + 822, + 1670, + 847, + 1670, + 846, + 1744, + 820, + 1744 + ], + "confidence": 0.84 + } + ] + }, + { + "text": "8GB RAM (Black)", + "boundingBox": [ + 370, + 1783, + 732, + 1785, + 731, + 1853, + 370, + 1850 + ], + "words": [ + { + "text": "8GB", + "boundingBox": [ + 374, + 1783, + 451, + 1783, + 448, + 1850, + 370, + 1850 + ], + "confidence": 0.799 + }, + { + "text": "RAM", + "boundingBox": [ + 465, + 1783, + 561, + 1784, + 559, + 1851, + 461, + 1850 + ], + "confidence": 0.958 + }, + { + "text": "(Black)", + "boundingBox": [ + 575, + 1784, + 731, + 1785, + 729, + 1854, + 572, + 1852 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "$ 999.00", + "boundingBox": [ + 937, + 1785, + 1139, + 1790, + 1137, + 1862, + 936, + 1859 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 939, + 1785, + 959, + 1785, + 958, + 1859, + 938, + 1859 + ], + "confidence": 0.895 + }, + { + "text": "999.00", + "boundingBox": [ + 974, + 1786, + 1134, + 1789, + 1133, + 1863, + 973, + 1860 + ], + "confidence": 0.873 + } + ] + }, + { + "text": "1 SurfacePen", + "boundingBox": [ + 320, + 2019, + 627, + 2013, + 629, + 2076, + 321, + 2083 + ], + "words": [ + { + "text": "1", + "boundingBox": [ + 321, + 2021, + 348, + 2020, + 349, + 2084, + 322, + 2084 + ], + "confidence": 0.819 + }, + { + "text": "SurfacePen", + "boundingBox": [ + 360, + 2020, + 626, + 2014, + 628, + 2077, + 362, + 2083 + ], + "confidence": 0.938 + } + ] + }, + { + "text": "$ 99.99", + "boundingBox": [ + 967, + 2028, + 1128, + 2029, + 1127, + 2091, + 967, + 2091 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 969, + 2028, + 994, + 2028, + 994, + 2091, + 969, + 2091 + ], + "confidence": 0.887 + }, + { + "text": "99.99", + "boundingBox": [ + 1007, + 2028, + 1127, + 2028, + 1126, + 2091, + 1007, + 2091 + ], + "confidence": 0.912 + } + ] + }, + { + "text": "Sub-Total", + "boundingBox": [ + 474, + 2242, + 697, + 2244, + 697, + 2310, + 473, + 2308 + ], + "words": [ + { + "text": "Sub-Total", + "boundingBox": [ + 476, + 2242, + 695, + 2245, + 694, + 2310, + 474, + 2308 + ], + "confidence": 0.917 + } + ] + }, + { + "text": "$ 1098.99", + "boundingBox": [ + 922, + 2259, + 1136, + 2253, + 1138, + 2318, + 924, + 2325 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 924, + 2261, + 950, + 2260, + 954, + 2326, + 928, + 2326 + ], + "confidence": 0.881 + }, + { + "text": "1098.99", + "boundingBox": [ + 963, + 2260, + 1136, + 2254, + 1137, + 2320, + 966, + 2325 + ], + "confidence": 0.941 + } + ] + }, + { + "text": "Tax", + "boundingBox": [ + 570, + 2355, + 655, + 2357, + 654, + 2415, + 568, + 2413 + ], + "words": [ + { + "text": "Tax", + "boundingBox": [ + 571, + 2355, + 654, + 2357, + 653, + 2415, + 570, + 2413 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "$ 104.40", + "boundingBox": [ + 941, + 2368, + 1134, + 2364, + 1137, + 2433, + 942, + 2438 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 943, + 2368, + 966, + 2367, + 968, + 2437, + 944, + 2438 + ], + "confidence": 0.892 + }, + { + "text": "104.40", + "boundingBox": [ + 980, + 2367, + 1132, + 2364, + 1133, + 2434, + 982, + 2437 + ], + "confidence": 0.957 + } + ] + }, + { + "text": "Total", + "boundingBox": [ + 551, + 2591, + 672, + 2584, + 675, + 2652, + 554, + 2659 + ], + "words": [ + { + "text": "Total", + "boundingBox": [ + 551, + 2591, + 668, + 2584, + 672, + 2652, + 554, + 2659 + ], + "confidence": 0.727 + } + ] + }, + { + "text": "$ 1203.39", + "boundingBox": [ + 918, + 2589, + 1123, + 2611, + 1116, + 2677, + 912, + 2656 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 918, + 2590, + 942, + 2592, + 936, + 2659, + 912, + 2657 + ], + "confidence": 0.886 + }, + { + "text": "1203.39", + "boundingBox": [ + 955, + 2594, + 1124, + 2611, + 1115, + 2678, + 949, + 2661 + ], + "confidence": 0.951 + } + ] + } + ] + } + ], + "documentResults": [ + { + "docType": "prebuilt:businesscard", + "pageRange": [ + 1, + 1 + ], + "fields": { + "CompanyNames": { + "type": "array", + "valueArray": [ + { + "type": "string", + "valueString": "Contoso Contoso", + "text": "Contoso Contoso", + "boundingBox": [ + 349.3, + 241.3, + 1058, + 284.4, + 1033.5, + 687.1, + 324.8, + 644 + ], + "page": 1, + "confidence": 0.879, + "elements": [ + "#/readResults/0/lines/0/words/0", + "#/readResults/0/lines/1/words/0" + ] + } + ] + }, + "Addresses": { + "type": "array", + "valueArray": [ + { + "type": "string", + "valueString": "123 Main Street Redmond, WA 98052", + "text": "123 Main Street Redmond, WA 98052", + "boundingBox": [ + 319.9, + 689.9, + 750.7, + 697.5, + 747.8, + 865.6, + 317, + 858 + ], + "page": 1, + "confidence": 0.988, + "elements": [ + "#/readResults/0/lines/2/words/0", + "#/readResults/0/lines/2/words/1", + "#/readResults/0/lines/2/words/2", + "#/readResults/0/lines/3/words/0", + "#/readResults/0/lines/3/words/1", + "#/readResults/0/lines/3/words/2" + ] + } + ] + }, + "OtherPhones": { + "type": "array", + "valueArray": [ + { + "type": "phoneNumber", + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 617, + 1012, + 615, + 1069, + 305, + 1064 + ], + "page": 1, + "confidence": 0.99, + "elements": [ + "#/readResults/0/lines/4/words/0" + ] + } + ] + } + } + } + ] + } + } + } + ], + "Variables": { + "FORM_RECOGNIZER_API_KEY": "Sanitized", + "FORM_RECOGNIZER_ENDPOINT": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/", + "RandomSeed": "1964171681" + } +} \ No newline at end of file diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeBusinessCardsWithSupportedLocale(%en-US%)Async.json b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeBusinessCardsWithSupportedLocale(%en-US%)Async.json new file mode 100644 index 0000000000000..a01356642572f --- /dev/null +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeBusinessCardsWithSupportedLocale(%en-US%)Async.json @@ -0,0 +1,1136 @@ +{ + "Entries": [ + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyze?includeTextDetails=true\u0026locale=en-US", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "279674", + "Content-Type": "image/jpeg", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9dacca780396ca4fbd35f5bdddc289ee-9cef70b9cfd48741-00", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "ab811e1441607f86b4401e4d350cfeda", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "65e8e5cf-a6c5-4934-ac52-9f1e67627402", + "Content-Length": "0", + "Date": "Thu, 15 Oct 2020 23:59:15 GMT", + "Operation-Location": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/65e8e5cf-a6c5-4934-ac52-9f1e67627402", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "234" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/65e8e5cf-a6c5-4934-ac52-9f1e67627402", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "8cf57ed06b990572ff9d47130596e4e3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "a5095331-2fc0-4b6b-848a-cdd8df0c008c", + "Content-Length": "109", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:15 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "10" + }, + "ResponseBody": { + "status": "notStarted", + "createdDateTime": "2020-10-15T23:59:15Z", + "lastUpdatedDateTime": "2020-10-15T23:59:15Z" + } + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/65e8e5cf-a6c5-4934-ac52-9f1e67627402", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "606b50dc7a0ef8437c58270443a217b1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "67823a02-d222-4199-8b32-dc64262f38b7", + "Content-Length": "106", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:16 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "11" + }, + "ResponseBody": { + "status": "running", + "createdDateTime": "2020-10-15T23:59:15Z", + "lastUpdatedDateTime": "2020-10-15T23:59:15Z" + } + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/65e8e5cf-a6c5-4934-ac52-9f1e67627402", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "d2fae61ed3d7a84dab7cabc2f973791d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d4e77f54-240b-441b-b913-401e67a77216", + "Content-Length": "106", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:17 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "13" + }, + "ResponseBody": { + "status": "running", + "createdDateTime": "2020-10-15T23:59:15Z", + "lastUpdatedDateTime": "2020-10-15T23:59:15Z" + } + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyzeResults/65e8e5cf-a6c5-4934-ac52-9f1e67627402", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "e5713a5b9ea156cc3bfd0f40446dc25d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "9e0ec07f-89af-4d5f-9092-98e71d06b38c", + "Content-Length": "6571", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:18 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "18" + }, + "ResponseBody": { + "status": "succeeded", + "createdDateTime": "2020-10-15T23:59:15Z", + "lastUpdatedDateTime": "2020-10-15T23:59:18Z", + "analyzeResult": { + "version": "2.1.0", + "readResults": [ + { + "page": 1, + "angle": 0.2511, + "width": 1688, + "height": 3000, + "unit": "pixel", + "lines": [ + { + "text": "Contoso", + "boundingBox": [ + 619, + 291, + 1051, + 284, + 1053, + 384, + 620, + 396 + ], + "words": [ + { + "text": "Contoso", + "boundingBox": [ + 623, + 292, + 1051, + 284, + 1052, + 383, + 624, + 397 + ], + "confidence": 0.959 + } + ] + }, + { + "text": "Contoso", + "boundingBox": [ + 322, + 591, + 501, + 601, + 498, + 654, + 319, + 644 + ], + "words": [ + { + "text": "Contoso", + "boundingBox": [ + 328, + 591, + 500, + 602, + 498, + 654, + 325, + 644 + ], + "confidence": 0.727 + } + ] + }, + { + "text": "123 Main Street", + "boundingBox": [ + 319, + 690, + 655, + 695, + 654, + 757, + 318, + 752 + ], + "words": [ + { + "text": "123", + "boundingBox": [ + 323, + 690, + 387, + 692, + 383, + 754, + 319, + 753 + ], + "confidence": 0.958 + }, + { + "text": "Main", + "boundingBox": [ + 399, + 692, + 502, + 694, + 498, + 756, + 395, + 754 + ], + "confidence": 0.958 + }, + { + "text": "Street", + "boundingBox": [ + 514, + 695, + 656, + 698, + 653, + 758, + 510, + 756 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "Redmond, WA 98052", + "boundingBox": [ + 317, + 795, + 751, + 795, + 752, + 859, + 317, + 860 + ], + "words": [ + { + "text": "Redmond,", + "boundingBox": [ + 321, + 795, + 523, + 795, + 520, + 861, + 317, + 858 + ], + "confidence": 0.573 + }, + { + "text": "WA", + "boundingBox": [ + 535, + 795, + 597, + 795, + 595, + 861, + 532, + 861 + ], + "confidence": 0.958 + }, + { + "text": "98052", + "boundingBox": [ + 610, + 795, + 749, + 796, + 747, + 858, + 607, + 861 + ], + "confidence": 0.937 + } + ] + }, + { + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 618, + 1011, + 616, + 1068, + 305, + 1062 + ], + "words": [ + { + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 617, + 1012, + 615, + 1069, + 305, + 1064 + ], + "confidence": 0.937 + } + ] + }, + { + "text": "6/10/2019 13:59", + "boundingBox": [ + 303, + 1223, + 630, + 1225, + 629, + 1289, + 302, + 1286 + ], + "words": [ + { + "text": "6/10/2019", + "boundingBox": [ + 304, + 1224, + 506, + 1224, + 505, + 1289, + 303, + 1288 + ], + "confidence": 0.762 + }, + { + "text": "13:59", + "boundingBox": [ + 518, + 1225, + 629, + 1228, + 627, + 1290, + 517, + 1289 + ], + "confidence": 0.943 + } + ] + }, + { + "text": "Sales Associate: Paul", + "boundingBox": [ + 294, + 1335, + 768, + 1335, + 768, + 1401, + 294, + 1399 + ], + "words": [ + { + "text": "Sales", + "boundingBox": [ + 302, + 1336, + 418, + 1335, + 416, + 1399, + 301, + 1399 + ], + "confidence": 0.959 + }, + { + "text": "Associate:", + "boundingBox": [ + 430, + 1335, + 649, + 1336, + 646, + 1401, + 428, + 1399 + ], + "confidence": 0.943 + }, + { + "text": "Paul", + "boundingBox": [ + 661, + 1336, + 767, + 1336, + 764, + 1402, + 659, + 1401 + ], + "confidence": 0.959 + } + ] + }, + { + "text": "1 Surface Pro 6", + "boundingBox": [ + 336, + 1560, + 679, + 1561, + 678, + 1625, + 336, + 1623 + ], + "words": [ + { + "text": "1", + "boundingBox": [ + 337, + 1560, + 360, + 1561, + 360, + 1625, + 337, + 1625 + ], + "confidence": 0.799 + }, + { + "text": "Surface", + "boundingBox": [ + 373, + 1561, + 542, + 1562, + 542, + 1624, + 373, + 1625 + ], + "confidence": 0.958 + }, + { + "text": "Pro", + "boundingBox": [ + 555, + 1562, + 631, + 1563, + 631, + 1625, + 555, + 1624 + ], + "confidence": 0.909 + }, + { + "text": "6", + "boundingBox": [ + 644, + 1563, + 676, + 1563, + 675, + 1625, + 643, + 1625 + ], + "confidence": 0.762 + } + ] + }, + { + "text": "256GB / Intel Core i5 /", + "boundingBox": [ + 372, + 1669, + 846, + 1669, + 846, + 1743, + 372, + 1742 + ], + "words": [ + { + "text": "256GB", + "boundingBox": [ + 375, + 1670, + 506, + 1671, + 503, + 1740, + 373, + 1740 + ], + "confidence": 0.95 + }, + { + "text": "/", + "boundingBox": [ + 520, + 1671, + 533, + 1671, + 531, + 1740, + 517, + 1740 + ], + "confidence": 0.876 + }, + { + "text": "Intel", + "boundingBox": [ + 547, + 1671, + 648, + 1671, + 646, + 1741, + 545, + 1740 + ], + "confidence": 0.939 + }, + { + "text": "Core", + "boundingBox": [ + 662, + 1671, + 758, + 1670, + 756, + 1743, + 660, + 1741 + ], + "confidence": 0.942 + }, + { + "text": "i5", + "boundingBox": [ + 772, + 1670, + 808, + 1670, + 807, + 1744, + 770, + 1743 + ], + "confidence": 0.82 + }, + { + "text": "/", + "boundingBox": [ + 822, + 1670, + 847, + 1670, + 846, + 1744, + 820, + 1744 + ], + "confidence": 0.84 + } + ] + }, + { + "text": "8GB RAM (Black)", + "boundingBox": [ + 370, + 1783, + 732, + 1785, + 731, + 1853, + 370, + 1850 + ], + "words": [ + { + "text": "8GB", + "boundingBox": [ + 374, + 1783, + 451, + 1783, + 448, + 1850, + 370, + 1850 + ], + "confidence": 0.799 + }, + { + "text": "RAM", + "boundingBox": [ + 465, + 1783, + 561, + 1784, + 559, + 1851, + 461, + 1850 + ], + "confidence": 0.958 + }, + { + "text": "(Black)", + "boundingBox": [ + 575, + 1784, + 731, + 1785, + 729, + 1854, + 572, + 1852 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "$ 999.00", + "boundingBox": [ + 937, + 1785, + 1139, + 1790, + 1137, + 1862, + 936, + 1859 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 939, + 1785, + 959, + 1785, + 958, + 1859, + 938, + 1859 + ], + "confidence": 0.895 + }, + { + "text": "999.00", + "boundingBox": [ + 974, + 1786, + 1134, + 1789, + 1133, + 1863, + 973, + 1860 + ], + "confidence": 0.873 + } + ] + }, + { + "text": "1 SurfacePen", + "boundingBox": [ + 320, + 2019, + 627, + 2013, + 629, + 2076, + 321, + 2083 + ], + "words": [ + { + "text": "1", + "boundingBox": [ + 321, + 2021, + 348, + 2020, + 349, + 2084, + 322, + 2084 + ], + "confidence": 0.819 + }, + { + "text": "SurfacePen", + "boundingBox": [ + 360, + 2020, + 626, + 2014, + 628, + 2077, + 362, + 2083 + ], + "confidence": 0.938 + } + ] + }, + { + "text": "$ 99.99", + "boundingBox": [ + 967, + 2028, + 1128, + 2029, + 1127, + 2091, + 967, + 2091 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 969, + 2028, + 994, + 2028, + 994, + 2091, + 969, + 2091 + ], + "confidence": 0.887 + }, + { + "text": "99.99", + "boundingBox": [ + 1007, + 2028, + 1127, + 2028, + 1126, + 2091, + 1007, + 2091 + ], + "confidence": 0.912 + } + ] + }, + { + "text": "Sub-Total", + "boundingBox": [ + 474, + 2242, + 697, + 2244, + 697, + 2310, + 473, + 2308 + ], + "words": [ + { + "text": "Sub-Total", + "boundingBox": [ + 476, + 2242, + 695, + 2245, + 694, + 2310, + 474, + 2308 + ], + "confidence": 0.917 + } + ] + }, + { + "text": "$ 1098.99", + "boundingBox": [ + 922, + 2259, + 1136, + 2253, + 1138, + 2318, + 924, + 2325 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 924, + 2261, + 950, + 2260, + 954, + 2326, + 928, + 2326 + ], + "confidence": 0.881 + }, + { + "text": "1098.99", + "boundingBox": [ + 963, + 2260, + 1136, + 2254, + 1137, + 2320, + 966, + 2325 + ], + "confidence": 0.941 + } + ] + }, + { + "text": "Tax", + "boundingBox": [ + 570, + 2355, + 655, + 2357, + 654, + 2415, + 568, + 2413 + ], + "words": [ + { + "text": "Tax", + "boundingBox": [ + 571, + 2355, + 654, + 2357, + 653, + 2415, + 570, + 2413 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "$ 104.40", + "boundingBox": [ + 941, + 2368, + 1134, + 2364, + 1137, + 2433, + 942, + 2438 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 943, + 2368, + 966, + 2367, + 968, + 2437, + 944, + 2438 + ], + "confidence": 0.892 + }, + { + "text": "104.40", + "boundingBox": [ + 980, + 2367, + 1132, + 2364, + 1133, + 2434, + 982, + 2437 + ], + "confidence": 0.957 + } + ] + }, + { + "text": "Total", + "boundingBox": [ + 551, + 2591, + 672, + 2584, + 675, + 2652, + 554, + 2659 + ], + "words": [ + { + "text": "Total", + "boundingBox": [ + 551, + 2591, + 668, + 2584, + 672, + 2652, + 554, + 2659 + ], + "confidence": 0.727 + } + ] + }, + { + "text": "$ 1203.39", + "boundingBox": [ + 918, + 2589, + 1123, + 2611, + 1116, + 2677, + 912, + 2656 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 918, + 2590, + 942, + 2592, + 936, + 2659, + 912, + 2657 + ], + "confidence": 0.886 + }, + { + "text": "1203.39", + "boundingBox": [ + 955, + 2594, + 1124, + 2611, + 1115, + 2678, + 949, + 2661 + ], + "confidence": 0.951 + } + ] + } + ] + } + ], + "documentResults": [ + { + "docType": "prebuilt:businesscard", + "pageRange": [ + 1, + 1 + ], + "fields": { + "CompanyNames": { + "type": "array", + "valueArray": [ + { + "type": "string", + "valueString": "Contoso Contoso", + "text": "Contoso Contoso", + "boundingBox": [ + 349.3, + 241.3, + 1058, + 284.4, + 1033.5, + 687.1, + 324.8, + 644 + ], + "page": 1, + "confidence": 0.879, + "elements": [ + "#/readResults/0/lines/0/words/0", + "#/readResults/0/lines/1/words/0" + ] + } + ] + }, + "Addresses": { + "type": "array", + "valueArray": [ + { + "type": "string", + "valueString": "123 Main Street Redmond, WA 98052", + "text": "123 Main Street Redmond, WA 98052", + "boundingBox": [ + 319.9, + 689.9, + 750.7, + 697.5, + 747.8, + 865.6, + 317, + 858 + ], + "page": 1, + "confidence": 0.988, + "elements": [ + "#/readResults/0/lines/2/words/0", + "#/readResults/0/lines/2/words/1", + "#/readResults/0/lines/2/words/2", + "#/readResults/0/lines/3/words/0", + "#/readResults/0/lines/3/words/1", + "#/readResults/0/lines/3/words/2" + ] + } + ] + }, + "OtherPhones": { + "type": "array", + "valueArray": [ + { + "type": "phoneNumber", + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 617, + 1012, + 615, + 1069, + 305, + 1064 + ], + "page": 1, + "confidence": 0.99, + "elements": [ + "#/readResults/0/lines/4/words/0" + ] + } + ] + } + } + } + ] + } + } + } + ], + "Variables": { + "FORM_RECOGNIZER_API_KEY": "Sanitized", + "FORM_RECOGNIZER_ENDPOINT": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/", + "RandomSeed": "312413013" + } +} \ No newline at end of file diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeBusinessCardsWithWrongLocale.json b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeBusinessCardsWithWrongLocale.json new file mode 100644 index 0000000000000..81e77485e08d9 --- /dev/null +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeBusinessCardsWithWrongLocale.json @@ -0,0 +1,48 @@ +{ + "Entries": [ + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyze?includeTextDetails=false\u0026locale=not-locale", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "22", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-33b9eca0cf9666479bb91c9a916575f7-ca5f58fb0d4bb949-00", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "0c00f61b3fe264147a8e75f31ac2e787", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "source": "Sanitized" + }, + "StatusCode": 400, + "ResponseHeaders": { + "apim-request-id": "55631c36-da76-4a9e-a119-516e38209262", + "Content-Length": "200", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:01 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "655" + }, + "ResponseBody": { + "error": { + "code": "UnsupportedLocale", + "innerError": { + "requestId": "55631c36-da76-4a9e-a119-516e38209262" + }, + "message": "Locale unsupported. Supported locales include en-AU, en-CA, en-GB, en-IN and en-US." + } + } + } + ], + "Variables": { + "FORM_RECOGNIZER_API_KEY": "Sanitized", + "FORM_RECOGNIZER_ENDPOINT": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/", + "RandomSeed": "1101271057" + } +} \ No newline at end of file diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeBusinessCardsWithWrongLocaleAsync.json b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeBusinessCardsWithWrongLocaleAsync.json new file mode 100644 index 0000000000000..c081274061c26 --- /dev/null +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeBusinessCardsWithWrongLocaleAsync.json @@ -0,0 +1,48 @@ +{ + "Entries": [ + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/businessCard/analyze?includeTextDetails=false\u0026locale=not-locale", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "22", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-f331b6ea8e955c4fafd723306b431e4b-73ab2e428521cd40-00", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "0bef32c94f3dd48ff57dc7e518ff7a7b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "source": "Sanitized" + }, + "StatusCode": 400, + "ResponseHeaders": { + "apim-request-id": "988fc859-a11d-48e0-a148-fbfd07ec9b24", + "Content-Length": "200", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:13 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "512" + }, + "ResponseBody": { + "error": { + "code": "UnsupportedLocale", + "innerError": { + "requestId": "988fc859-a11d-48e0-a148-fbfd07ec9b24" + }, + "message": "Locale unsupported. Supported locales include en-AU, en-CA, en-GB, en-IN and en-US." + } + } + } + ], + "Variables": { + "FORM_RECOGNIZER_API_KEY": "Sanitized", + "FORM_RECOGNIZER_ENDPOINT": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/", + "RandomSeed": "161180304" + } +} \ No newline at end of file diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeReceiptsWithSupportedLocale(%%).json b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeReceiptsWithSupportedLocale(%%).json new file mode 100644 index 0000000000000..944375a538f58 --- /dev/null +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeReceiptsWithSupportedLocale(%%).json @@ -0,0 +1,1315 @@ +{ + "Entries": [ + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyze?includeTextDetails=true\u0026locale=", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "279674", + "Content-Type": "image/jpeg", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-ad87df827a52af48a099144908382828-19a311a85ea7304f-00", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "4df6fc9bacf2a53f024b7d45f36f4bff", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "aa6eec58-b2a2-40ad-873b-6937e02da063", + "Content-Length": "0", + "Date": "Thu, 15 Oct 2020 23:59:11 GMT", + "Operation-Location": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyzeResults/aa6eec58-b2a2-40ad-873b-6937e02da063", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "205" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyzeResults/aa6eec58-b2a2-40ad-873b-6937e02da063", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "a84ca2803020c0776420dd88f18c7183", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "7d5741ef-5845-4bb0-b198-dd3b71509d10", + "Content-Length": "109", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:11 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "11" + }, + "ResponseBody": { + "status": "notStarted", + "createdDateTime": "2020-10-15T23:59:12Z", + "lastUpdatedDateTime": "2020-10-15T23:59:12Z" + } + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyzeResults/aa6eec58-b2a2-40ad-873b-6937e02da063", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "629b9b546fb65de94918604a6f92091e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "530a63bb-f50a-462f-bd99-72343902661e", + "Content-Length": "106", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:12 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "11" + }, + "ResponseBody": { + "status": "running", + "createdDateTime": "2020-10-15T23:59:12Z", + "lastUpdatedDateTime": "2020-10-15T23:59:12Z" + } + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyzeResults/aa6eec58-b2a2-40ad-873b-6937e02da063", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "3afa947a65856b708436e9d2cfb6b476", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "2464897b-b9d8-482f-8bf8-1e797d9459c6", + "Content-Length": "8808", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:13 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "26" + }, + "ResponseBody": { + "status": "succeeded", + "createdDateTime": "2020-10-15T23:59:12Z", + "lastUpdatedDateTime": "2020-10-15T23:59:13Z", + "analyzeResult": { + "version": "2.1.0", + "readResults": [ + { + "page": 1, + "angle": 0.2511, + "width": 1688, + "height": 3000, + "unit": "pixel", + "lines": [ + { + "text": "Contoso", + "boundingBox": [ + 619, + 291, + 1051, + 284, + 1053, + 384, + 620, + 396 + ], + "words": [ + { + "text": "Contoso", + "boundingBox": [ + 623, + 292, + 1051, + 284, + 1052, + 383, + 624, + 397 + ], + "confidence": 0.959 + } + ] + }, + { + "text": "Contoso", + "boundingBox": [ + 322, + 591, + 501, + 601, + 498, + 654, + 319, + 644 + ], + "words": [ + { + "text": "Contoso", + "boundingBox": [ + 328, + 591, + 500, + 602, + 498, + 654, + 325, + 644 + ], + "confidence": 0.727 + } + ] + }, + { + "text": "123 Main Street", + "boundingBox": [ + 319, + 690, + 655, + 695, + 654, + 757, + 318, + 752 + ], + "words": [ + { + "text": "123", + "boundingBox": [ + 323, + 690, + 387, + 692, + 383, + 754, + 319, + 753 + ], + "confidence": 0.958 + }, + { + "text": "Main", + "boundingBox": [ + 399, + 692, + 502, + 694, + 498, + 756, + 395, + 754 + ], + "confidence": 0.958 + }, + { + "text": "Street", + "boundingBox": [ + 514, + 695, + 656, + 698, + 653, + 758, + 510, + 756 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "Redmond, WA 98052", + "boundingBox": [ + 317, + 795, + 751, + 795, + 752, + 859, + 317, + 860 + ], + "words": [ + { + "text": "Redmond,", + "boundingBox": [ + 321, + 795, + 523, + 795, + 520, + 861, + 317, + 858 + ], + "confidence": 0.573 + }, + { + "text": "WA", + "boundingBox": [ + 535, + 795, + 597, + 795, + 595, + 861, + 532, + 861 + ], + "confidence": 0.958 + }, + { + "text": "98052", + "boundingBox": [ + 610, + 795, + 749, + 796, + 747, + 858, + 607, + 861 + ], + "confidence": 0.937 + } + ] + }, + { + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 618, + 1011, + 616, + 1068, + 305, + 1062 + ], + "words": [ + { + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 617, + 1012, + 615, + 1069, + 305, + 1064 + ], + "confidence": 0.937 + } + ] + }, + { + "text": "6/10/2019 13:59", + "boundingBox": [ + 303, + 1223, + 630, + 1225, + 629, + 1289, + 302, + 1286 + ], + "words": [ + { + "text": "6/10/2019", + "boundingBox": [ + 304, + 1224, + 506, + 1224, + 505, + 1289, + 303, + 1288 + ], + "confidence": 0.762 + }, + { + "text": "13:59", + "boundingBox": [ + 518, + 1225, + 629, + 1228, + 627, + 1290, + 517, + 1289 + ], + "confidence": 0.943 + } + ] + }, + { + "text": "Sales Associate: Paul", + "boundingBox": [ + 294, + 1335, + 768, + 1335, + 768, + 1401, + 294, + 1399 + ], + "words": [ + { + "text": "Sales", + "boundingBox": [ + 302, + 1336, + 418, + 1335, + 416, + 1399, + 301, + 1399 + ], + "confidence": 0.959 + }, + { + "text": "Associate:", + "boundingBox": [ + 430, + 1335, + 649, + 1336, + 646, + 1401, + 428, + 1399 + ], + "confidence": 0.943 + }, + { + "text": "Paul", + "boundingBox": [ + 661, + 1336, + 767, + 1336, + 764, + 1402, + 659, + 1401 + ], + "confidence": 0.959 + } + ] + }, + { + "text": "1 Surface Pro 6", + "boundingBox": [ + 336, + 1560, + 679, + 1561, + 678, + 1625, + 336, + 1623 + ], + "words": [ + { + "text": "1", + "boundingBox": [ + 337, + 1560, + 360, + 1561, + 360, + 1625, + 337, + 1625 + ], + "confidence": 0.799 + }, + { + "text": "Surface", + "boundingBox": [ + 373, + 1561, + 542, + 1562, + 542, + 1624, + 373, + 1625 + ], + "confidence": 0.958 + }, + { + "text": "Pro", + "boundingBox": [ + 555, + 1562, + 631, + 1563, + 631, + 1625, + 555, + 1624 + ], + "confidence": 0.909 + }, + { + "text": "6", + "boundingBox": [ + 644, + 1563, + 676, + 1563, + 675, + 1625, + 643, + 1625 + ], + "confidence": 0.762 + } + ] + }, + { + "text": "256GB / Intel Core i5 /", + "boundingBox": [ + 372, + 1669, + 846, + 1669, + 846, + 1743, + 372, + 1742 + ], + "words": [ + { + "text": "256GB", + "boundingBox": [ + 375, + 1670, + 506, + 1671, + 503, + 1740, + 373, + 1740 + ], + "confidence": 0.95 + }, + { + "text": "/", + "boundingBox": [ + 520, + 1671, + 533, + 1671, + 531, + 1740, + 517, + 1740 + ], + "confidence": 0.876 + }, + { + "text": "Intel", + "boundingBox": [ + 547, + 1671, + 648, + 1671, + 646, + 1741, + 545, + 1740 + ], + "confidence": 0.939 + }, + { + "text": "Core", + "boundingBox": [ + 662, + 1671, + 758, + 1670, + 756, + 1743, + 660, + 1741 + ], + "confidence": 0.942 + }, + { + "text": "i5", + "boundingBox": [ + 772, + 1670, + 808, + 1670, + 807, + 1744, + 770, + 1743 + ], + "confidence": 0.82 + }, + { + "text": "/", + "boundingBox": [ + 822, + 1670, + 847, + 1670, + 846, + 1744, + 820, + 1744 + ], + "confidence": 0.84 + } + ] + }, + { + "text": "8GB RAM (Black)", + "boundingBox": [ + 370, + 1783, + 732, + 1785, + 731, + 1853, + 370, + 1850 + ], + "words": [ + { + "text": "8GB", + "boundingBox": [ + 374, + 1783, + 451, + 1783, + 448, + 1850, + 370, + 1850 + ], + "confidence": 0.799 + }, + { + "text": "RAM", + "boundingBox": [ + 465, + 1783, + 561, + 1784, + 559, + 1851, + 461, + 1850 + ], + "confidence": 0.958 + }, + { + "text": "(Black)", + "boundingBox": [ + 575, + 1784, + 731, + 1785, + 729, + 1854, + 572, + 1852 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "$ 999.00", + "boundingBox": [ + 937, + 1785, + 1139, + 1790, + 1137, + 1862, + 936, + 1859 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 939, + 1785, + 959, + 1785, + 958, + 1859, + 938, + 1859 + ], + "confidence": 0.895 + }, + { + "text": "999.00", + "boundingBox": [ + 974, + 1786, + 1134, + 1789, + 1133, + 1863, + 973, + 1860 + ], + "confidence": 0.873 + } + ] + }, + { + "text": "1 SurfacePen", + "boundingBox": [ + 320, + 2019, + 627, + 2013, + 629, + 2076, + 321, + 2083 + ], + "words": [ + { + "text": "1", + "boundingBox": [ + 321, + 2021, + 348, + 2020, + 349, + 2084, + 322, + 2084 + ], + "confidence": 0.819 + }, + { + "text": "SurfacePen", + "boundingBox": [ + 360, + 2020, + 626, + 2014, + 628, + 2077, + 362, + 2083 + ], + "confidence": 0.938 + } + ] + }, + { + "text": "$ 99.99", + "boundingBox": [ + 967, + 2028, + 1128, + 2029, + 1127, + 2091, + 967, + 2091 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 969, + 2028, + 994, + 2028, + 994, + 2091, + 969, + 2091 + ], + "confidence": 0.887 + }, + { + "text": "99.99", + "boundingBox": [ + 1007, + 2028, + 1127, + 2028, + 1126, + 2091, + 1007, + 2091 + ], + "confidence": 0.912 + } + ] + }, + { + "text": "Sub-Total", + "boundingBox": [ + 474, + 2242, + 697, + 2244, + 697, + 2310, + 473, + 2308 + ], + "words": [ + { + "text": "Sub-Total", + "boundingBox": [ + 476, + 2242, + 695, + 2245, + 694, + 2310, + 474, + 2308 + ], + "confidence": 0.917 + } + ] + }, + { + "text": "$ 1098.99", + "boundingBox": [ + 922, + 2259, + 1136, + 2253, + 1138, + 2318, + 924, + 2325 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 924, + 2261, + 950, + 2260, + 954, + 2326, + 928, + 2326 + ], + "confidence": 0.881 + }, + { + "text": "1098.99", + "boundingBox": [ + 963, + 2260, + 1136, + 2254, + 1137, + 2320, + 966, + 2325 + ], + "confidence": 0.941 + } + ] + }, + { + "text": "Tax", + "boundingBox": [ + 570, + 2355, + 655, + 2357, + 654, + 2415, + 568, + 2413 + ], + "words": [ + { + "text": "Tax", + "boundingBox": [ + 571, + 2355, + 654, + 2357, + 653, + 2415, + 570, + 2413 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "$ 104.40", + "boundingBox": [ + 941, + 2368, + 1134, + 2364, + 1137, + 2433, + 942, + 2438 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 943, + 2368, + 966, + 2367, + 968, + 2437, + 944, + 2438 + ], + "confidence": 0.892 + }, + { + "text": "104.40", + "boundingBox": [ + 980, + 2367, + 1132, + 2364, + 1133, + 2434, + 982, + 2437 + ], + "confidence": 0.957 + } + ] + }, + { + "text": "Total", + "boundingBox": [ + 551, + 2591, + 672, + 2584, + 675, + 2652, + 554, + 2659 + ], + "words": [ + { + "text": "Total", + "boundingBox": [ + 551, + 2591, + 668, + 2584, + 672, + 2652, + 554, + 2659 + ], + "confidence": 0.727 + } + ] + }, + { + "text": "$ 1203.39", + "boundingBox": [ + 918, + 2589, + 1123, + 2611, + 1116, + 2677, + 912, + 2656 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 918, + 2590, + 942, + 2592, + 936, + 2659, + 912, + 2657 + ], + "confidence": 0.886 + }, + { + "text": "1203.39", + "boundingBox": [ + 955, + 2594, + 1124, + 2611, + 1115, + 2678, + 949, + 2661 + ], + "confidence": 0.951 + } + ] + } + ] + } + ], + "documentResults": [ + { + "docType": "prebuilt:receipt", + "pageRange": [ + 1, + 1 + ], + "fields": { + "ReceiptType": { + "type": "string", + "valueString": "Itemized", + "confidence": 0.663 + }, + "MerchantName": { + "type": "string", + "valueString": "Contoso Contoso", + "text": "Contoso Contoso", + "boundingBox": [ + 349.3, + 241.3, + 1058, + 284.4, + 1033.5, + 687.1, + 324.8, + 644 + ], + "page": 1, + "confidence": 0.516, + "elements": [ + "#/readResults/0/lines/0/words/0", + "#/readResults/0/lines/1/words/0" + ] + }, + "MerchantAddress": { + "type": "string", + "valueString": "123 Main Street Redmond, WA 98052", + "text": "123 Main Street Redmond, WA 98052", + "boundingBox": [ + 319.9, + 689.9, + 750.7, + 697.5, + 747.8, + 865.6, + 317, + 858 + ], + "page": 1, + "confidence": 0.987, + "elements": [ + "#/readResults/0/lines/2/words/0", + "#/readResults/0/lines/2/words/1", + "#/readResults/0/lines/2/words/2", + "#/readResults/0/lines/3/words/0", + "#/readResults/0/lines/3/words/1", + "#/readResults/0/lines/3/words/2" + ] + }, + "MerchantPhoneNumber": { + "type": "phoneNumber", + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 617, + 1012, + 615, + 1069, + 305, + 1064 + ], + "page": 1, + "confidence": 0.99, + "elements": [ + "#/readResults/0/lines/4/words/0" + ] + }, + "TransactionDate": { + "type": "date", + "valueDate": "2019-06-10", + "text": "6/10/2019", + "boundingBox": [ + 304, + 1224, + 506, + 1224, + 505, + 1289, + 303, + 1288 + ], + "page": 1, + "confidence": 0.986, + "elements": [ + "#/readResults/0/lines/5/words/0" + ] + }, + "TransactionTime": { + "type": "time", + "valueTime": "13:59:00", + "text": "13:59", + "boundingBox": [ + 518, + 1225, + 629, + 1228, + 627, + 1290, + 517, + 1289 + ], + "page": 1, + "confidence": 0.97, + "elements": [ + "#/readResults/0/lines/5/words/1" + ] + }, + "Items": { + "type": "array", + "valueArray": [ + { + "type": "object", + "valueObject": { + "Name": { + "type": "string", + "valueString": "8GB RAM (Black)", + "text": "8GB RAM (Black)", + "boundingBox": [ + 370.7, + 1781.5, + 731, + 1785, + 730.3, + 1854, + 370, + 1850.6 + ], + "page": 1, + "confidence": 0.916, + "elements": [ + "#/readResults/0/lines/9/words/0", + "#/readResults/0/lines/9/words/1", + "#/readResults/0/lines/9/words/2" + ] + }, + "TotalPrice": { + "type": "number", + "valueNumber": 999, + "text": "$999.00", + "boundingBox": [ + 939, + 1784.6, + 1134.4, + 1788.3, + 1133, + 1863, + 937.6, + 1859.3 + ], + "page": 1, + "confidence": 0.559, + "elements": [ + "#/readResults/0/lines/10/words/0", + "#/readResults/0/lines/10/words/1" + ] + } + } + }, + { + "type": "object", + "valueObject": { + "Quantity": { + "type": "number", + "valueNumber": 1, + "text": "1", + "boundingBox": [ + 321, + 2021, + 348, + 2020, + 349, + 2084, + 322, + 2084 + ], + "page": 1, + "confidence": 0.858, + "elements": [ + "#/readResults/0/lines/11/words/0" + ] + }, + "Name": { + "type": "string", + "valueString": "SurfacePen", + "text": "SurfacePen", + "boundingBox": [ + 360, + 2020, + 626, + 2014, + 628, + 2077, + 362, + 2083 + ], + "page": 1, + "confidence": 0.858, + "elements": [ + "#/readResults/0/lines/11/words/1" + ] + }, + "TotalPrice": { + "type": "number", + "valueNumber": 99.99, + "text": "99.99", + "boundingBox": [ + 1007, + 2028, + 1127, + 2028, + 1126, + 2091, + 1007, + 2091 + ], + "page": 1, + "confidence": 0.386, + "elements": [ + "#/readResults/0/lines/12/words/1" + ] + } + } + } + ] + }, + "Subtotal": { + "type": "number", + "valueNumber": 1098.99, + "text": "1098.99", + "boundingBox": [ + 963, + 2260, + 1136, + 2254, + 1137, + 2320, + 966, + 2325 + ], + "page": 1, + "confidence": 0.965, + "elements": [ + "#/readResults/0/lines/14/words/1" + ] + }, + "Tax": { + "type": "number", + "valueNumber": 104.4, + "text": "$104.40", + "boundingBox": [ + 942.6, + 2367.5, + 1132, + 2363.7, + 1133.4, + 2434.2, + 944, + 2438 + ], + "page": 1, + "confidence": 0.714, + "elements": [ + "#/readResults/0/lines/16/words/0", + "#/readResults/0/lines/16/words/1" + ] + }, + "Total": { + "type": "number", + "valueNumber": 1203.39, + "text": "1203.39", + "boundingBox": [ + 955, + 2594, + 1124, + 2611, + 1115, + 2678, + 949, + 2661 + ], + "page": 1, + "confidence": 0.774, + "elements": [ + "#/readResults/0/lines/18/words/1" + ] + } + } + } + ] + } + } + } + ], + "Variables": { + "FORM_RECOGNIZER_API_KEY": "Sanitized", + "FORM_RECOGNIZER_ENDPOINT": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/", + "RandomSeed": "316388971" + } +} \ No newline at end of file diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeReceiptsWithSupportedLocale(%%)Async.json b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeReceiptsWithSupportedLocale(%%)Async.json new file mode 100644 index 0000000000000..1e9b7bb031d74 --- /dev/null +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeReceiptsWithSupportedLocale(%%)Async.json @@ -0,0 +1,1315 @@ +{ + "Entries": [ + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyze?includeTextDetails=true\u0026locale=", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "279674", + "Content-Type": "image/jpeg", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-55eaeb130d324d47aacdf14a3877125b-2a683e348b65344d-00", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "86f7b26afbf5b1326f3f28856a9b4e31", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "a80d7300-300d-4de6-b1d5-bac0a93c1282", + "Content-Length": "0", + "Date": "Thu, 15 Oct 2020 23:59:23 GMT", + "Operation-Location": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyzeResults/a80d7300-300d-4de6-b1d5-bac0a93c1282", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "277" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyzeResults/a80d7300-300d-4de6-b1d5-bac0a93c1282", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "935d5ab70d6a615759fad115cd9ad4fd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "30cf3a80-d111-48f8-b894-aac667a9ea68", + "Content-Length": "109", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:23 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "17" + }, + "ResponseBody": { + "status": "notStarted", + "createdDateTime": "2020-10-15T23:59:23Z", + "lastUpdatedDateTime": "2020-10-15T23:59:23Z" + } + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyzeResults/a80d7300-300d-4de6-b1d5-bac0a93c1282", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "f12811396f701c362c68464fbe36532d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "72ae948f-f80f-4d97-81c1-ade1d994ad19", + "Content-Length": "106", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:24 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "53" + }, + "ResponseBody": { + "status": "running", + "createdDateTime": "2020-10-15T23:59:23Z", + "lastUpdatedDateTime": "2020-10-15T23:59:23Z" + } + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyzeResults/a80d7300-300d-4de6-b1d5-bac0a93c1282", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "6242bb2313c45ce45a952cfa2a1ce4d5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "7015aaf2-95d3-43c3-8989-29fded93dcdb", + "Content-Length": "8808", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:25 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "21" + }, + "ResponseBody": { + "status": "succeeded", + "createdDateTime": "2020-10-15T23:59:23Z", + "lastUpdatedDateTime": "2020-10-15T23:59:25Z", + "analyzeResult": { + "version": "2.1.0", + "readResults": [ + { + "page": 1, + "angle": 0.2511, + "width": 1688, + "height": 3000, + "unit": "pixel", + "lines": [ + { + "text": "Contoso", + "boundingBox": [ + 619, + 291, + 1051, + 284, + 1053, + 384, + 620, + 396 + ], + "words": [ + { + "text": "Contoso", + "boundingBox": [ + 623, + 292, + 1051, + 284, + 1052, + 383, + 624, + 397 + ], + "confidence": 0.959 + } + ] + }, + { + "text": "Contoso", + "boundingBox": [ + 322, + 591, + 501, + 601, + 498, + 654, + 319, + 644 + ], + "words": [ + { + "text": "Contoso", + "boundingBox": [ + 328, + 591, + 500, + 602, + 498, + 654, + 325, + 644 + ], + "confidence": 0.727 + } + ] + }, + { + "text": "123 Main Street", + "boundingBox": [ + 319, + 690, + 655, + 695, + 654, + 757, + 318, + 752 + ], + "words": [ + { + "text": "123", + "boundingBox": [ + 323, + 690, + 387, + 692, + 383, + 754, + 319, + 753 + ], + "confidence": 0.958 + }, + { + "text": "Main", + "boundingBox": [ + 399, + 692, + 502, + 694, + 498, + 756, + 395, + 754 + ], + "confidence": 0.958 + }, + { + "text": "Street", + "boundingBox": [ + 514, + 695, + 656, + 698, + 653, + 758, + 510, + 756 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "Redmond, WA 98052", + "boundingBox": [ + 317, + 795, + 751, + 795, + 752, + 859, + 317, + 860 + ], + "words": [ + { + "text": "Redmond,", + "boundingBox": [ + 321, + 795, + 523, + 795, + 520, + 861, + 317, + 858 + ], + "confidence": 0.573 + }, + { + "text": "WA", + "boundingBox": [ + 535, + 795, + 597, + 795, + 595, + 861, + 532, + 861 + ], + "confidence": 0.958 + }, + { + "text": "98052", + "boundingBox": [ + 610, + 795, + 749, + 796, + 747, + 858, + 607, + 861 + ], + "confidence": 0.937 + } + ] + }, + { + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 618, + 1011, + 616, + 1068, + 305, + 1062 + ], + "words": [ + { + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 617, + 1012, + 615, + 1069, + 305, + 1064 + ], + "confidence": 0.937 + } + ] + }, + { + "text": "6/10/2019 13:59", + "boundingBox": [ + 303, + 1223, + 630, + 1225, + 629, + 1289, + 302, + 1286 + ], + "words": [ + { + "text": "6/10/2019", + "boundingBox": [ + 304, + 1224, + 506, + 1224, + 505, + 1289, + 303, + 1288 + ], + "confidence": 0.762 + }, + { + "text": "13:59", + "boundingBox": [ + 518, + 1225, + 629, + 1228, + 627, + 1290, + 517, + 1289 + ], + "confidence": 0.943 + } + ] + }, + { + "text": "Sales Associate: Paul", + "boundingBox": [ + 294, + 1335, + 768, + 1335, + 768, + 1401, + 294, + 1399 + ], + "words": [ + { + "text": "Sales", + "boundingBox": [ + 302, + 1336, + 418, + 1335, + 416, + 1399, + 301, + 1399 + ], + "confidence": 0.959 + }, + { + "text": "Associate:", + "boundingBox": [ + 430, + 1335, + 649, + 1336, + 646, + 1401, + 428, + 1399 + ], + "confidence": 0.943 + }, + { + "text": "Paul", + "boundingBox": [ + 661, + 1336, + 767, + 1336, + 764, + 1402, + 659, + 1401 + ], + "confidence": 0.959 + } + ] + }, + { + "text": "1 Surface Pro 6", + "boundingBox": [ + 336, + 1560, + 679, + 1561, + 678, + 1625, + 336, + 1623 + ], + "words": [ + { + "text": "1", + "boundingBox": [ + 337, + 1560, + 360, + 1561, + 360, + 1625, + 337, + 1625 + ], + "confidence": 0.799 + }, + { + "text": "Surface", + "boundingBox": [ + 373, + 1561, + 542, + 1562, + 542, + 1624, + 373, + 1625 + ], + "confidence": 0.958 + }, + { + "text": "Pro", + "boundingBox": [ + 555, + 1562, + 631, + 1563, + 631, + 1625, + 555, + 1624 + ], + "confidence": 0.909 + }, + { + "text": "6", + "boundingBox": [ + 644, + 1563, + 676, + 1563, + 675, + 1625, + 643, + 1625 + ], + "confidence": 0.762 + } + ] + }, + { + "text": "256GB / Intel Core i5 /", + "boundingBox": [ + 372, + 1669, + 846, + 1669, + 846, + 1743, + 372, + 1742 + ], + "words": [ + { + "text": "256GB", + "boundingBox": [ + 375, + 1670, + 506, + 1671, + 503, + 1740, + 373, + 1740 + ], + "confidence": 0.95 + }, + { + "text": "/", + "boundingBox": [ + 520, + 1671, + 533, + 1671, + 531, + 1740, + 517, + 1740 + ], + "confidence": 0.876 + }, + { + "text": "Intel", + "boundingBox": [ + 547, + 1671, + 648, + 1671, + 646, + 1741, + 545, + 1740 + ], + "confidence": 0.939 + }, + { + "text": "Core", + "boundingBox": [ + 662, + 1671, + 758, + 1670, + 756, + 1743, + 660, + 1741 + ], + "confidence": 0.942 + }, + { + "text": "i5", + "boundingBox": [ + 772, + 1670, + 808, + 1670, + 807, + 1744, + 770, + 1743 + ], + "confidence": 0.82 + }, + { + "text": "/", + "boundingBox": [ + 822, + 1670, + 847, + 1670, + 846, + 1744, + 820, + 1744 + ], + "confidence": 0.84 + } + ] + }, + { + "text": "8GB RAM (Black)", + "boundingBox": [ + 370, + 1783, + 732, + 1785, + 731, + 1853, + 370, + 1850 + ], + "words": [ + { + "text": "8GB", + "boundingBox": [ + 374, + 1783, + 451, + 1783, + 448, + 1850, + 370, + 1850 + ], + "confidence": 0.799 + }, + { + "text": "RAM", + "boundingBox": [ + 465, + 1783, + 561, + 1784, + 559, + 1851, + 461, + 1850 + ], + "confidence": 0.958 + }, + { + "text": "(Black)", + "boundingBox": [ + 575, + 1784, + 731, + 1785, + 729, + 1854, + 572, + 1852 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "$ 999.00", + "boundingBox": [ + 937, + 1785, + 1139, + 1790, + 1137, + 1862, + 936, + 1859 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 939, + 1785, + 959, + 1785, + 958, + 1859, + 938, + 1859 + ], + "confidence": 0.895 + }, + { + "text": "999.00", + "boundingBox": [ + 974, + 1786, + 1134, + 1789, + 1133, + 1863, + 973, + 1860 + ], + "confidence": 0.873 + } + ] + }, + { + "text": "1 SurfacePen", + "boundingBox": [ + 320, + 2019, + 627, + 2013, + 629, + 2076, + 321, + 2083 + ], + "words": [ + { + "text": "1", + "boundingBox": [ + 321, + 2021, + 348, + 2020, + 349, + 2084, + 322, + 2084 + ], + "confidence": 0.819 + }, + { + "text": "SurfacePen", + "boundingBox": [ + 360, + 2020, + 626, + 2014, + 628, + 2077, + 362, + 2083 + ], + "confidence": 0.938 + } + ] + }, + { + "text": "$ 99.99", + "boundingBox": [ + 967, + 2028, + 1128, + 2029, + 1127, + 2091, + 967, + 2091 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 969, + 2028, + 994, + 2028, + 994, + 2091, + 969, + 2091 + ], + "confidence": 0.887 + }, + { + "text": "99.99", + "boundingBox": [ + 1007, + 2028, + 1127, + 2028, + 1126, + 2091, + 1007, + 2091 + ], + "confidence": 0.912 + } + ] + }, + { + "text": "Sub-Total", + "boundingBox": [ + 474, + 2242, + 697, + 2244, + 697, + 2310, + 473, + 2308 + ], + "words": [ + { + "text": "Sub-Total", + "boundingBox": [ + 476, + 2242, + 695, + 2245, + 694, + 2310, + 474, + 2308 + ], + "confidence": 0.917 + } + ] + }, + { + "text": "$ 1098.99", + "boundingBox": [ + 922, + 2259, + 1136, + 2253, + 1138, + 2318, + 924, + 2325 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 924, + 2261, + 950, + 2260, + 954, + 2326, + 928, + 2326 + ], + "confidence": 0.881 + }, + { + "text": "1098.99", + "boundingBox": [ + 963, + 2260, + 1136, + 2254, + 1137, + 2320, + 966, + 2325 + ], + "confidence": 0.941 + } + ] + }, + { + "text": "Tax", + "boundingBox": [ + 570, + 2355, + 655, + 2357, + 654, + 2415, + 568, + 2413 + ], + "words": [ + { + "text": "Tax", + "boundingBox": [ + 571, + 2355, + 654, + 2357, + 653, + 2415, + 570, + 2413 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "$ 104.40", + "boundingBox": [ + 941, + 2368, + 1134, + 2364, + 1137, + 2433, + 942, + 2438 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 943, + 2368, + 966, + 2367, + 968, + 2437, + 944, + 2438 + ], + "confidence": 0.892 + }, + { + "text": "104.40", + "boundingBox": [ + 980, + 2367, + 1132, + 2364, + 1133, + 2434, + 982, + 2437 + ], + "confidence": 0.957 + } + ] + }, + { + "text": "Total", + "boundingBox": [ + 551, + 2591, + 672, + 2584, + 675, + 2652, + 554, + 2659 + ], + "words": [ + { + "text": "Total", + "boundingBox": [ + 551, + 2591, + 668, + 2584, + 672, + 2652, + 554, + 2659 + ], + "confidence": 0.727 + } + ] + }, + { + "text": "$ 1203.39", + "boundingBox": [ + 918, + 2589, + 1123, + 2611, + 1116, + 2677, + 912, + 2656 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 918, + 2590, + 942, + 2592, + 936, + 2659, + 912, + 2657 + ], + "confidence": 0.886 + }, + { + "text": "1203.39", + "boundingBox": [ + 955, + 2594, + 1124, + 2611, + 1115, + 2678, + 949, + 2661 + ], + "confidence": 0.951 + } + ] + } + ] + } + ], + "documentResults": [ + { + "docType": "prebuilt:receipt", + "pageRange": [ + 1, + 1 + ], + "fields": { + "ReceiptType": { + "type": "string", + "valueString": "Itemized", + "confidence": 0.663 + }, + "MerchantName": { + "type": "string", + "valueString": "Contoso Contoso", + "text": "Contoso Contoso", + "boundingBox": [ + 349.3, + 241.3, + 1058, + 284.4, + 1033.5, + 687.1, + 324.8, + 644 + ], + "page": 1, + "confidence": 0.516, + "elements": [ + "#/readResults/0/lines/0/words/0", + "#/readResults/0/lines/1/words/0" + ] + }, + "MerchantAddress": { + "type": "string", + "valueString": "123 Main Street Redmond, WA 98052", + "text": "123 Main Street Redmond, WA 98052", + "boundingBox": [ + 319.9, + 689.9, + 750.7, + 697.5, + 747.8, + 865.6, + 317, + 858 + ], + "page": 1, + "confidence": 0.987, + "elements": [ + "#/readResults/0/lines/2/words/0", + "#/readResults/0/lines/2/words/1", + "#/readResults/0/lines/2/words/2", + "#/readResults/0/lines/3/words/0", + "#/readResults/0/lines/3/words/1", + "#/readResults/0/lines/3/words/2" + ] + }, + "MerchantPhoneNumber": { + "type": "phoneNumber", + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 617, + 1012, + 615, + 1069, + 305, + 1064 + ], + "page": 1, + "confidence": 0.99, + "elements": [ + "#/readResults/0/lines/4/words/0" + ] + }, + "TransactionDate": { + "type": "date", + "valueDate": "2019-06-10", + "text": "6/10/2019", + "boundingBox": [ + 304, + 1224, + 506, + 1224, + 505, + 1289, + 303, + 1288 + ], + "page": 1, + "confidence": 0.986, + "elements": [ + "#/readResults/0/lines/5/words/0" + ] + }, + "TransactionTime": { + "type": "time", + "valueTime": "13:59:00", + "text": "13:59", + "boundingBox": [ + 518, + 1225, + 629, + 1228, + 627, + 1290, + 517, + 1289 + ], + "page": 1, + "confidence": 0.97, + "elements": [ + "#/readResults/0/lines/5/words/1" + ] + }, + "Items": { + "type": "array", + "valueArray": [ + { + "type": "object", + "valueObject": { + "Name": { + "type": "string", + "valueString": "8GB RAM (Black)", + "text": "8GB RAM (Black)", + "boundingBox": [ + 370.7, + 1781.5, + 731, + 1785, + 730.3, + 1854, + 370, + 1850.6 + ], + "page": 1, + "confidence": 0.916, + "elements": [ + "#/readResults/0/lines/9/words/0", + "#/readResults/0/lines/9/words/1", + "#/readResults/0/lines/9/words/2" + ] + }, + "TotalPrice": { + "type": "number", + "valueNumber": 999, + "text": "$999.00", + "boundingBox": [ + 939, + 1784.6, + 1134.4, + 1788.3, + 1133, + 1863, + 937.6, + 1859.3 + ], + "page": 1, + "confidence": 0.559, + "elements": [ + "#/readResults/0/lines/10/words/0", + "#/readResults/0/lines/10/words/1" + ] + } + } + }, + { + "type": "object", + "valueObject": { + "Quantity": { + "type": "number", + "valueNumber": 1, + "text": "1", + "boundingBox": [ + 321, + 2021, + 348, + 2020, + 349, + 2084, + 322, + 2084 + ], + "page": 1, + "confidence": 0.858, + "elements": [ + "#/readResults/0/lines/11/words/0" + ] + }, + "Name": { + "type": "string", + "valueString": "SurfacePen", + "text": "SurfacePen", + "boundingBox": [ + 360, + 2020, + 626, + 2014, + 628, + 2077, + 362, + 2083 + ], + "page": 1, + "confidence": 0.858, + "elements": [ + "#/readResults/0/lines/11/words/1" + ] + }, + "TotalPrice": { + "type": "number", + "valueNumber": 99.99, + "text": "99.99", + "boundingBox": [ + 1007, + 2028, + 1127, + 2028, + 1126, + 2091, + 1007, + 2091 + ], + "page": 1, + "confidence": 0.386, + "elements": [ + "#/readResults/0/lines/12/words/1" + ] + } + } + } + ] + }, + "Subtotal": { + "type": "number", + "valueNumber": 1098.99, + "text": "1098.99", + "boundingBox": [ + 963, + 2260, + 1136, + 2254, + 1137, + 2320, + 966, + 2325 + ], + "page": 1, + "confidence": 0.965, + "elements": [ + "#/readResults/0/lines/14/words/1" + ] + }, + "Tax": { + "type": "number", + "valueNumber": 104.4, + "text": "$104.40", + "boundingBox": [ + 942.6, + 2367.5, + 1132, + 2363.7, + 1133.4, + 2434.2, + 944, + 2438 + ], + "page": 1, + "confidence": 0.714, + "elements": [ + "#/readResults/0/lines/16/words/0", + "#/readResults/0/lines/16/words/1" + ] + }, + "Total": { + "type": "number", + "valueNumber": 1203.39, + "text": "1203.39", + "boundingBox": [ + 955, + 2594, + 1124, + 2611, + 1115, + 2678, + 949, + 2661 + ], + "page": 1, + "confidence": 0.774, + "elements": [ + "#/readResults/0/lines/18/words/1" + ] + } + } + } + ] + } + } + } + ], + "Variables": { + "FORM_RECOGNIZER_API_KEY": "Sanitized", + "FORM_RECOGNIZER_ENDPOINT": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/", + "RandomSeed": "1049801833" + } +} \ No newline at end of file diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeReceiptsWithSupportedLocale(%en-US%).json b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeReceiptsWithSupportedLocale(%en-US%).json new file mode 100644 index 0000000000000..6e9407d1fd534 --- /dev/null +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeReceiptsWithSupportedLocale(%en-US%).json @@ -0,0 +1,1315 @@ +{ + "Entries": [ + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyze?includeTextDetails=true\u0026locale=en-US", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "279674", + "Content-Type": "image/jpeg", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-15f92b845ce2b646a3c74b0bddd93b32-007f650f2468a945-00", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "17ab643d28e6f2c8808fced1b2bd1690", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "b21a2067-ff40-49cb-a72f-e4af763e8cb2", + "Content-Length": "0", + "Date": "Thu, 15 Oct 2020 23:59:08 GMT", + "Operation-Location": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyzeResults/b21a2067-ff40-49cb-a72f-e4af763e8cb2", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "228" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyzeResults/b21a2067-ff40-49cb-a72f-e4af763e8cb2", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "5fd23f79a12052ec47cf208170a6619c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "7edf676a-0acb-415d-b874-9a9cee638d6c", + "Content-Length": "109", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:08 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "13" + }, + "ResponseBody": { + "status": "notStarted", + "createdDateTime": "2020-10-15T23:59:09Z", + "lastUpdatedDateTime": "2020-10-15T23:59:09Z" + } + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyzeResults/b21a2067-ff40-49cb-a72f-e4af763e8cb2", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "7329a64adbd1ce4923b39e475fd352ce", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "93bb8bca-ab8f-4023-8b13-73a657562acd", + "Content-Length": "106", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:09 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "13" + }, + "ResponseBody": { + "status": "running", + "createdDateTime": "2020-10-15T23:59:09Z", + "lastUpdatedDateTime": "2020-10-15T23:59:09Z" + } + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyzeResults/b21a2067-ff40-49cb-a72f-e4af763e8cb2", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "a6c73615c1859c467858cf16074782da", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "95dd5735-ef7d-4761-9d0d-3d14cf2b236c", + "Content-Length": "8808", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:10 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "21" + }, + "ResponseBody": { + "status": "succeeded", + "createdDateTime": "2020-10-15T23:59:09Z", + "lastUpdatedDateTime": "2020-10-15T23:59:11Z", + "analyzeResult": { + "version": "2.1.0", + "readResults": [ + { + "page": 1, + "angle": 0.2511, + "width": 1688, + "height": 3000, + "unit": "pixel", + "lines": [ + { + "text": "Contoso", + "boundingBox": [ + 619, + 291, + 1051, + 284, + 1053, + 384, + 620, + 396 + ], + "words": [ + { + "text": "Contoso", + "boundingBox": [ + 623, + 292, + 1051, + 284, + 1052, + 383, + 624, + 397 + ], + "confidence": 0.959 + } + ] + }, + { + "text": "Contoso", + "boundingBox": [ + 322, + 591, + 501, + 601, + 498, + 654, + 319, + 644 + ], + "words": [ + { + "text": "Contoso", + "boundingBox": [ + 328, + 591, + 500, + 602, + 498, + 654, + 325, + 644 + ], + "confidence": 0.727 + } + ] + }, + { + "text": "123 Main Street", + "boundingBox": [ + 319, + 690, + 655, + 695, + 654, + 757, + 318, + 752 + ], + "words": [ + { + "text": "123", + "boundingBox": [ + 323, + 690, + 387, + 692, + 383, + 754, + 319, + 753 + ], + "confidence": 0.958 + }, + { + "text": "Main", + "boundingBox": [ + 399, + 692, + 502, + 694, + 498, + 756, + 395, + 754 + ], + "confidence": 0.958 + }, + { + "text": "Street", + "boundingBox": [ + 514, + 695, + 656, + 698, + 653, + 758, + 510, + 756 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "Redmond, WA 98052", + "boundingBox": [ + 317, + 795, + 751, + 795, + 752, + 859, + 317, + 860 + ], + "words": [ + { + "text": "Redmond,", + "boundingBox": [ + 321, + 795, + 523, + 795, + 520, + 861, + 317, + 858 + ], + "confidence": 0.573 + }, + { + "text": "WA", + "boundingBox": [ + 535, + 795, + 597, + 795, + 595, + 861, + 532, + 861 + ], + "confidence": 0.958 + }, + { + "text": "98052", + "boundingBox": [ + 610, + 795, + 749, + 796, + 747, + 858, + 607, + 861 + ], + "confidence": 0.937 + } + ] + }, + { + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 618, + 1011, + 616, + 1068, + 305, + 1062 + ], + "words": [ + { + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 617, + 1012, + 615, + 1069, + 305, + 1064 + ], + "confidence": 0.937 + } + ] + }, + { + "text": "6/10/2019 13:59", + "boundingBox": [ + 303, + 1223, + 630, + 1225, + 629, + 1289, + 302, + 1286 + ], + "words": [ + { + "text": "6/10/2019", + "boundingBox": [ + 304, + 1224, + 506, + 1224, + 505, + 1289, + 303, + 1288 + ], + "confidence": 0.762 + }, + { + "text": "13:59", + "boundingBox": [ + 518, + 1225, + 629, + 1228, + 627, + 1290, + 517, + 1289 + ], + "confidence": 0.943 + } + ] + }, + { + "text": "Sales Associate: Paul", + "boundingBox": [ + 294, + 1335, + 768, + 1335, + 768, + 1401, + 294, + 1399 + ], + "words": [ + { + "text": "Sales", + "boundingBox": [ + 302, + 1336, + 418, + 1335, + 416, + 1399, + 301, + 1399 + ], + "confidence": 0.959 + }, + { + "text": "Associate:", + "boundingBox": [ + 430, + 1335, + 649, + 1336, + 646, + 1401, + 428, + 1399 + ], + "confidence": 0.943 + }, + { + "text": "Paul", + "boundingBox": [ + 661, + 1336, + 767, + 1336, + 764, + 1402, + 659, + 1401 + ], + "confidence": 0.959 + } + ] + }, + { + "text": "1 Surface Pro 6", + "boundingBox": [ + 336, + 1560, + 679, + 1561, + 678, + 1625, + 336, + 1623 + ], + "words": [ + { + "text": "1", + "boundingBox": [ + 337, + 1560, + 360, + 1561, + 360, + 1625, + 337, + 1625 + ], + "confidence": 0.799 + }, + { + "text": "Surface", + "boundingBox": [ + 373, + 1561, + 542, + 1562, + 542, + 1624, + 373, + 1625 + ], + "confidence": 0.958 + }, + { + "text": "Pro", + "boundingBox": [ + 555, + 1562, + 631, + 1563, + 631, + 1625, + 555, + 1624 + ], + "confidence": 0.909 + }, + { + "text": "6", + "boundingBox": [ + 644, + 1563, + 676, + 1563, + 675, + 1625, + 643, + 1625 + ], + "confidence": 0.762 + } + ] + }, + { + "text": "256GB / Intel Core i5 /", + "boundingBox": [ + 372, + 1669, + 846, + 1669, + 846, + 1743, + 372, + 1742 + ], + "words": [ + { + "text": "256GB", + "boundingBox": [ + 375, + 1670, + 506, + 1671, + 503, + 1740, + 373, + 1740 + ], + "confidence": 0.95 + }, + { + "text": "/", + "boundingBox": [ + 520, + 1671, + 533, + 1671, + 531, + 1740, + 517, + 1740 + ], + "confidence": 0.876 + }, + { + "text": "Intel", + "boundingBox": [ + 547, + 1671, + 648, + 1671, + 646, + 1741, + 545, + 1740 + ], + "confidence": 0.939 + }, + { + "text": "Core", + "boundingBox": [ + 662, + 1671, + 758, + 1670, + 756, + 1743, + 660, + 1741 + ], + "confidence": 0.942 + }, + { + "text": "i5", + "boundingBox": [ + 772, + 1670, + 808, + 1670, + 807, + 1744, + 770, + 1743 + ], + "confidence": 0.82 + }, + { + "text": "/", + "boundingBox": [ + 822, + 1670, + 847, + 1670, + 846, + 1744, + 820, + 1744 + ], + "confidence": 0.84 + } + ] + }, + { + "text": "8GB RAM (Black)", + "boundingBox": [ + 370, + 1783, + 732, + 1785, + 731, + 1853, + 370, + 1850 + ], + "words": [ + { + "text": "8GB", + "boundingBox": [ + 374, + 1783, + 451, + 1783, + 448, + 1850, + 370, + 1850 + ], + "confidence": 0.799 + }, + { + "text": "RAM", + "boundingBox": [ + 465, + 1783, + 561, + 1784, + 559, + 1851, + 461, + 1850 + ], + "confidence": 0.958 + }, + { + "text": "(Black)", + "boundingBox": [ + 575, + 1784, + 731, + 1785, + 729, + 1854, + 572, + 1852 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "$ 999.00", + "boundingBox": [ + 937, + 1785, + 1139, + 1790, + 1137, + 1862, + 936, + 1859 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 939, + 1785, + 959, + 1785, + 958, + 1859, + 938, + 1859 + ], + "confidence": 0.895 + }, + { + "text": "999.00", + "boundingBox": [ + 974, + 1786, + 1134, + 1789, + 1133, + 1863, + 973, + 1860 + ], + "confidence": 0.873 + } + ] + }, + { + "text": "1 SurfacePen", + "boundingBox": [ + 320, + 2019, + 627, + 2013, + 629, + 2076, + 321, + 2083 + ], + "words": [ + { + "text": "1", + "boundingBox": [ + 321, + 2021, + 348, + 2020, + 349, + 2084, + 322, + 2084 + ], + "confidence": 0.819 + }, + { + "text": "SurfacePen", + "boundingBox": [ + 360, + 2020, + 626, + 2014, + 628, + 2077, + 362, + 2083 + ], + "confidence": 0.938 + } + ] + }, + { + "text": "$ 99.99", + "boundingBox": [ + 967, + 2028, + 1128, + 2029, + 1127, + 2091, + 967, + 2091 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 969, + 2028, + 994, + 2028, + 994, + 2091, + 969, + 2091 + ], + "confidence": 0.887 + }, + { + "text": "99.99", + "boundingBox": [ + 1007, + 2028, + 1127, + 2028, + 1126, + 2091, + 1007, + 2091 + ], + "confidence": 0.912 + } + ] + }, + { + "text": "Sub-Total", + "boundingBox": [ + 474, + 2242, + 697, + 2244, + 697, + 2310, + 473, + 2308 + ], + "words": [ + { + "text": "Sub-Total", + "boundingBox": [ + 476, + 2242, + 695, + 2245, + 694, + 2310, + 474, + 2308 + ], + "confidence": 0.917 + } + ] + }, + { + "text": "$ 1098.99", + "boundingBox": [ + 922, + 2259, + 1136, + 2253, + 1138, + 2318, + 924, + 2325 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 924, + 2261, + 950, + 2260, + 954, + 2326, + 928, + 2326 + ], + "confidence": 0.881 + }, + { + "text": "1098.99", + "boundingBox": [ + 963, + 2260, + 1136, + 2254, + 1137, + 2320, + 966, + 2325 + ], + "confidence": 0.941 + } + ] + }, + { + "text": "Tax", + "boundingBox": [ + 570, + 2355, + 655, + 2357, + 654, + 2415, + 568, + 2413 + ], + "words": [ + { + "text": "Tax", + "boundingBox": [ + 571, + 2355, + 654, + 2357, + 653, + 2415, + 570, + 2413 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "$ 104.40", + "boundingBox": [ + 941, + 2368, + 1134, + 2364, + 1137, + 2433, + 942, + 2438 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 943, + 2368, + 966, + 2367, + 968, + 2437, + 944, + 2438 + ], + "confidence": 0.892 + }, + { + "text": "104.40", + "boundingBox": [ + 980, + 2367, + 1132, + 2364, + 1133, + 2434, + 982, + 2437 + ], + "confidence": 0.957 + } + ] + }, + { + "text": "Total", + "boundingBox": [ + 551, + 2591, + 672, + 2584, + 675, + 2652, + 554, + 2659 + ], + "words": [ + { + "text": "Total", + "boundingBox": [ + 551, + 2591, + 668, + 2584, + 672, + 2652, + 554, + 2659 + ], + "confidence": 0.727 + } + ] + }, + { + "text": "$ 1203.39", + "boundingBox": [ + 918, + 2589, + 1123, + 2611, + 1116, + 2677, + 912, + 2656 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 918, + 2590, + 942, + 2592, + 936, + 2659, + 912, + 2657 + ], + "confidence": 0.886 + }, + { + "text": "1203.39", + "boundingBox": [ + 955, + 2594, + 1124, + 2611, + 1115, + 2678, + 949, + 2661 + ], + "confidence": 0.951 + } + ] + } + ] + } + ], + "documentResults": [ + { + "docType": "prebuilt:receipt", + "pageRange": [ + 1, + 1 + ], + "fields": { + "ReceiptType": { + "type": "string", + "valueString": "Itemized", + "confidence": 0.663 + }, + "MerchantName": { + "type": "string", + "valueString": "Contoso Contoso", + "text": "Contoso Contoso", + "boundingBox": [ + 349.3, + 241.3, + 1058, + 284.4, + 1033.5, + 687.1, + 324.8, + 644 + ], + "page": 1, + "confidence": 0.516, + "elements": [ + "#/readResults/0/lines/0/words/0", + "#/readResults/0/lines/1/words/0" + ] + }, + "MerchantAddress": { + "type": "string", + "valueString": "123 Main Street Redmond, WA 98052", + "text": "123 Main Street Redmond, WA 98052", + "boundingBox": [ + 319.9, + 689.9, + 750.7, + 697.5, + 747.8, + 865.6, + 317, + 858 + ], + "page": 1, + "confidence": 0.987, + "elements": [ + "#/readResults/0/lines/2/words/0", + "#/readResults/0/lines/2/words/1", + "#/readResults/0/lines/2/words/2", + "#/readResults/0/lines/3/words/0", + "#/readResults/0/lines/3/words/1", + "#/readResults/0/lines/3/words/2" + ] + }, + "MerchantPhoneNumber": { + "type": "phoneNumber", + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 617, + 1012, + 615, + 1069, + 305, + 1064 + ], + "page": 1, + "confidence": 0.99, + "elements": [ + "#/readResults/0/lines/4/words/0" + ] + }, + "TransactionDate": { + "type": "date", + "valueDate": "2019-06-10", + "text": "6/10/2019", + "boundingBox": [ + 304, + 1224, + 506, + 1224, + 505, + 1289, + 303, + 1288 + ], + "page": 1, + "confidence": 0.986, + "elements": [ + "#/readResults/0/lines/5/words/0" + ] + }, + "TransactionTime": { + "type": "time", + "valueTime": "13:59:00", + "text": "13:59", + "boundingBox": [ + 518, + 1225, + 629, + 1228, + 627, + 1290, + 517, + 1289 + ], + "page": 1, + "confidence": 0.97, + "elements": [ + "#/readResults/0/lines/5/words/1" + ] + }, + "Items": { + "type": "array", + "valueArray": [ + { + "type": "object", + "valueObject": { + "Name": { + "type": "string", + "valueString": "8GB RAM (Black)", + "text": "8GB RAM (Black)", + "boundingBox": [ + 370.7, + 1781.5, + 731, + 1785, + 730.3, + 1854, + 370, + 1850.6 + ], + "page": 1, + "confidence": 0.916, + "elements": [ + "#/readResults/0/lines/9/words/0", + "#/readResults/0/lines/9/words/1", + "#/readResults/0/lines/9/words/2" + ] + }, + "TotalPrice": { + "type": "number", + "valueNumber": 999, + "text": "$999.00", + "boundingBox": [ + 939, + 1784.6, + 1134.4, + 1788.3, + 1133, + 1863, + 937.6, + 1859.3 + ], + "page": 1, + "confidence": 0.559, + "elements": [ + "#/readResults/0/lines/10/words/0", + "#/readResults/0/lines/10/words/1" + ] + } + } + }, + { + "type": "object", + "valueObject": { + "Quantity": { + "type": "number", + "valueNumber": 1, + "text": "1", + "boundingBox": [ + 321, + 2021, + 348, + 2020, + 349, + 2084, + 322, + 2084 + ], + "page": 1, + "confidence": 0.858, + "elements": [ + "#/readResults/0/lines/11/words/0" + ] + }, + "Name": { + "type": "string", + "valueString": "SurfacePen", + "text": "SurfacePen", + "boundingBox": [ + 360, + 2020, + 626, + 2014, + 628, + 2077, + 362, + 2083 + ], + "page": 1, + "confidence": 0.858, + "elements": [ + "#/readResults/0/lines/11/words/1" + ] + }, + "TotalPrice": { + "type": "number", + "valueNumber": 99.99, + "text": "99.99", + "boundingBox": [ + 1007, + 2028, + 1127, + 2028, + 1126, + 2091, + 1007, + 2091 + ], + "page": 1, + "confidence": 0.386, + "elements": [ + "#/readResults/0/lines/12/words/1" + ] + } + } + } + ] + }, + "Subtotal": { + "type": "number", + "valueNumber": 1098.99, + "text": "1098.99", + "boundingBox": [ + 963, + 2260, + 1136, + 2254, + 1137, + 2320, + 966, + 2325 + ], + "page": 1, + "confidence": 0.965, + "elements": [ + "#/readResults/0/lines/14/words/1" + ] + }, + "Tax": { + "type": "number", + "valueNumber": 104.4, + "text": "$104.40", + "boundingBox": [ + 942.6, + 2367.5, + 1132, + 2363.7, + 1133.4, + 2434.2, + 944, + 2438 + ], + "page": 1, + "confidence": 0.714, + "elements": [ + "#/readResults/0/lines/16/words/0", + "#/readResults/0/lines/16/words/1" + ] + }, + "Total": { + "type": "number", + "valueNumber": 1203.39, + "text": "1203.39", + "boundingBox": [ + 955, + 2594, + 1124, + 2611, + 1115, + 2678, + 949, + 2661 + ], + "page": 1, + "confidence": 0.774, + "elements": [ + "#/readResults/0/lines/18/words/1" + ] + } + } + } + ] + } + } + } + ], + "Variables": { + "FORM_RECOGNIZER_API_KEY": "Sanitized", + "FORM_RECOGNIZER_ENDPOINT": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/", + "RandomSeed": "1679087298" + } +} \ No newline at end of file diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeReceiptsWithSupportedLocale(%en-US%)Async.json b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeReceiptsWithSupportedLocale(%en-US%)Async.json new file mode 100644 index 0000000000000..0be7385bc6c84 --- /dev/null +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeReceiptsWithSupportedLocale(%en-US%)Async.json @@ -0,0 +1,1315 @@ +{ + "Entries": [ + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyze?includeTextDetails=true\u0026locale=en-US", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "279674", + "Content-Type": "image/jpeg", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-d322d3ea5790ed4499a0e665c51f0980-f1065a9397d1004e-00", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "75af3e2abc37deef2b33dc25f0383d5c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "09684e32-32e0-4c32-99b7-431e18b7e63b", + "Content-Length": "0", + "Date": "Thu, 15 Oct 2020 23:59:21 GMT", + "Operation-Location": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyzeResults/09684e32-32e0-4c32-99b7-431e18b7e63b", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "215" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyzeResults/09684e32-32e0-4c32-99b7-431e18b7e63b", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "77f3e00d07648dba428d95aa622958fa", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "cd0bcb1c-6f29-4462-8870-072e3f8a303d", + "Content-Length": "109", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:21 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "12" + }, + "ResponseBody": { + "status": "notStarted", + "createdDateTime": "2020-10-15T23:59:21Z", + "lastUpdatedDateTime": "2020-10-15T23:59:21Z" + } + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyzeResults/09684e32-32e0-4c32-99b7-431e18b7e63b", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "4cfd66ccfe623bdd2414dcc55c6b0f23", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "34d91c7a-c5a9-414b-8eeb-327aa7a7ee28", + "Content-Length": "106", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:22 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "10" + }, + "ResponseBody": { + "status": "running", + "createdDateTime": "2020-10-15T23:59:21Z", + "lastUpdatedDateTime": "2020-10-15T23:59:21Z" + } + }, + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyzeResults/09684e32-32e0-4c32-99b7-431e18b7e63b", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "749eb7dd88b92233842132a927447c02", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "03f110e7-2519-404a-a9af-2483211f8062", + "Content-Length": "8808", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:23 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "17" + }, + "ResponseBody": { + "status": "succeeded", + "createdDateTime": "2020-10-15T23:59:21Z", + "lastUpdatedDateTime": "2020-10-15T23:59:22Z", + "analyzeResult": { + "version": "2.1.0", + "readResults": [ + { + "page": 1, + "angle": 0.2511, + "width": 1688, + "height": 3000, + "unit": "pixel", + "lines": [ + { + "text": "Contoso", + "boundingBox": [ + 619, + 291, + 1051, + 284, + 1053, + 384, + 620, + 396 + ], + "words": [ + { + "text": "Contoso", + "boundingBox": [ + 623, + 292, + 1051, + 284, + 1052, + 383, + 624, + 397 + ], + "confidence": 0.959 + } + ] + }, + { + "text": "Contoso", + "boundingBox": [ + 322, + 591, + 501, + 601, + 498, + 654, + 319, + 644 + ], + "words": [ + { + "text": "Contoso", + "boundingBox": [ + 328, + 591, + 500, + 602, + 498, + 654, + 325, + 644 + ], + "confidence": 0.727 + } + ] + }, + { + "text": "123 Main Street", + "boundingBox": [ + 319, + 690, + 655, + 695, + 654, + 757, + 318, + 752 + ], + "words": [ + { + "text": "123", + "boundingBox": [ + 323, + 690, + 387, + 692, + 383, + 754, + 319, + 753 + ], + "confidence": 0.958 + }, + { + "text": "Main", + "boundingBox": [ + 399, + 692, + 502, + 694, + 498, + 756, + 395, + 754 + ], + "confidence": 0.958 + }, + { + "text": "Street", + "boundingBox": [ + 514, + 695, + 656, + 698, + 653, + 758, + 510, + 756 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "Redmond, WA 98052", + "boundingBox": [ + 317, + 795, + 751, + 795, + 752, + 859, + 317, + 860 + ], + "words": [ + { + "text": "Redmond,", + "boundingBox": [ + 321, + 795, + 523, + 795, + 520, + 861, + 317, + 858 + ], + "confidence": 0.573 + }, + { + "text": "WA", + "boundingBox": [ + 535, + 795, + 597, + 795, + 595, + 861, + 532, + 861 + ], + "confidence": 0.958 + }, + { + "text": "98052", + "boundingBox": [ + 610, + 795, + 749, + 796, + 747, + 858, + 607, + 861 + ], + "confidence": 0.937 + } + ] + }, + { + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 618, + 1011, + 616, + 1068, + 305, + 1062 + ], + "words": [ + { + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 617, + 1012, + 615, + 1069, + 305, + 1064 + ], + "confidence": 0.937 + } + ] + }, + { + "text": "6/10/2019 13:59", + "boundingBox": [ + 303, + 1223, + 630, + 1225, + 629, + 1289, + 302, + 1286 + ], + "words": [ + { + "text": "6/10/2019", + "boundingBox": [ + 304, + 1224, + 506, + 1224, + 505, + 1289, + 303, + 1288 + ], + "confidence": 0.762 + }, + { + "text": "13:59", + "boundingBox": [ + 518, + 1225, + 629, + 1228, + 627, + 1290, + 517, + 1289 + ], + "confidence": 0.943 + } + ] + }, + { + "text": "Sales Associate: Paul", + "boundingBox": [ + 294, + 1335, + 768, + 1335, + 768, + 1401, + 294, + 1399 + ], + "words": [ + { + "text": "Sales", + "boundingBox": [ + 302, + 1336, + 418, + 1335, + 416, + 1399, + 301, + 1399 + ], + "confidence": 0.959 + }, + { + "text": "Associate:", + "boundingBox": [ + 430, + 1335, + 649, + 1336, + 646, + 1401, + 428, + 1399 + ], + "confidence": 0.943 + }, + { + "text": "Paul", + "boundingBox": [ + 661, + 1336, + 767, + 1336, + 764, + 1402, + 659, + 1401 + ], + "confidence": 0.959 + } + ] + }, + { + "text": "1 Surface Pro 6", + "boundingBox": [ + 336, + 1560, + 679, + 1561, + 678, + 1625, + 336, + 1623 + ], + "words": [ + { + "text": "1", + "boundingBox": [ + 337, + 1560, + 360, + 1561, + 360, + 1625, + 337, + 1625 + ], + "confidence": 0.799 + }, + { + "text": "Surface", + "boundingBox": [ + 373, + 1561, + 542, + 1562, + 542, + 1624, + 373, + 1625 + ], + "confidence": 0.958 + }, + { + "text": "Pro", + "boundingBox": [ + 555, + 1562, + 631, + 1563, + 631, + 1625, + 555, + 1624 + ], + "confidence": 0.909 + }, + { + "text": "6", + "boundingBox": [ + 644, + 1563, + 676, + 1563, + 675, + 1625, + 643, + 1625 + ], + "confidence": 0.762 + } + ] + }, + { + "text": "256GB / Intel Core i5 /", + "boundingBox": [ + 372, + 1669, + 846, + 1669, + 846, + 1743, + 372, + 1742 + ], + "words": [ + { + "text": "256GB", + "boundingBox": [ + 375, + 1670, + 506, + 1671, + 503, + 1740, + 373, + 1740 + ], + "confidence": 0.95 + }, + { + "text": "/", + "boundingBox": [ + 520, + 1671, + 533, + 1671, + 531, + 1740, + 517, + 1740 + ], + "confidence": 0.876 + }, + { + "text": "Intel", + "boundingBox": [ + 547, + 1671, + 648, + 1671, + 646, + 1741, + 545, + 1740 + ], + "confidence": 0.939 + }, + { + "text": "Core", + "boundingBox": [ + 662, + 1671, + 758, + 1670, + 756, + 1743, + 660, + 1741 + ], + "confidence": 0.942 + }, + { + "text": "i5", + "boundingBox": [ + 772, + 1670, + 808, + 1670, + 807, + 1744, + 770, + 1743 + ], + "confidence": 0.82 + }, + { + "text": "/", + "boundingBox": [ + 822, + 1670, + 847, + 1670, + 846, + 1744, + 820, + 1744 + ], + "confidence": 0.84 + } + ] + }, + { + "text": "8GB RAM (Black)", + "boundingBox": [ + 370, + 1783, + 732, + 1785, + 731, + 1853, + 370, + 1850 + ], + "words": [ + { + "text": "8GB", + "boundingBox": [ + 374, + 1783, + 451, + 1783, + 448, + 1850, + 370, + 1850 + ], + "confidence": 0.799 + }, + { + "text": "RAM", + "boundingBox": [ + 465, + 1783, + 561, + 1784, + 559, + 1851, + 461, + 1850 + ], + "confidence": 0.958 + }, + { + "text": "(Black)", + "boundingBox": [ + 575, + 1784, + 731, + 1785, + 729, + 1854, + 572, + 1852 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "$ 999.00", + "boundingBox": [ + 937, + 1785, + 1139, + 1790, + 1137, + 1862, + 936, + 1859 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 939, + 1785, + 959, + 1785, + 958, + 1859, + 938, + 1859 + ], + "confidence": 0.895 + }, + { + "text": "999.00", + "boundingBox": [ + 974, + 1786, + 1134, + 1789, + 1133, + 1863, + 973, + 1860 + ], + "confidence": 0.873 + } + ] + }, + { + "text": "1 SurfacePen", + "boundingBox": [ + 320, + 2019, + 627, + 2013, + 629, + 2076, + 321, + 2083 + ], + "words": [ + { + "text": "1", + "boundingBox": [ + 321, + 2021, + 348, + 2020, + 349, + 2084, + 322, + 2084 + ], + "confidence": 0.819 + }, + { + "text": "SurfacePen", + "boundingBox": [ + 360, + 2020, + 626, + 2014, + 628, + 2077, + 362, + 2083 + ], + "confidence": 0.938 + } + ] + }, + { + "text": "$ 99.99", + "boundingBox": [ + 967, + 2028, + 1128, + 2029, + 1127, + 2091, + 967, + 2091 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 969, + 2028, + 994, + 2028, + 994, + 2091, + 969, + 2091 + ], + "confidence": 0.887 + }, + { + "text": "99.99", + "boundingBox": [ + 1007, + 2028, + 1127, + 2028, + 1126, + 2091, + 1007, + 2091 + ], + "confidence": 0.912 + } + ] + }, + { + "text": "Sub-Total", + "boundingBox": [ + 474, + 2242, + 697, + 2244, + 697, + 2310, + 473, + 2308 + ], + "words": [ + { + "text": "Sub-Total", + "boundingBox": [ + 476, + 2242, + 695, + 2245, + 694, + 2310, + 474, + 2308 + ], + "confidence": 0.917 + } + ] + }, + { + "text": "$ 1098.99", + "boundingBox": [ + 922, + 2259, + 1136, + 2253, + 1138, + 2318, + 924, + 2325 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 924, + 2261, + 950, + 2260, + 954, + 2326, + 928, + 2326 + ], + "confidence": 0.881 + }, + { + "text": "1098.99", + "boundingBox": [ + 963, + 2260, + 1136, + 2254, + 1137, + 2320, + 966, + 2325 + ], + "confidence": 0.941 + } + ] + }, + { + "text": "Tax", + "boundingBox": [ + 570, + 2355, + 655, + 2357, + 654, + 2415, + 568, + 2413 + ], + "words": [ + { + "text": "Tax", + "boundingBox": [ + 571, + 2355, + 654, + 2357, + 653, + 2415, + 570, + 2413 + ], + "confidence": 0.958 + } + ] + }, + { + "text": "$ 104.40", + "boundingBox": [ + 941, + 2368, + 1134, + 2364, + 1137, + 2433, + 942, + 2438 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 943, + 2368, + 966, + 2367, + 968, + 2437, + 944, + 2438 + ], + "confidence": 0.892 + }, + { + "text": "104.40", + "boundingBox": [ + 980, + 2367, + 1132, + 2364, + 1133, + 2434, + 982, + 2437 + ], + "confidence": 0.957 + } + ] + }, + { + "text": "Total", + "boundingBox": [ + 551, + 2591, + 672, + 2584, + 675, + 2652, + 554, + 2659 + ], + "words": [ + { + "text": "Total", + "boundingBox": [ + 551, + 2591, + 668, + 2584, + 672, + 2652, + 554, + 2659 + ], + "confidence": 0.727 + } + ] + }, + { + "text": "$ 1203.39", + "boundingBox": [ + 918, + 2589, + 1123, + 2611, + 1116, + 2677, + 912, + 2656 + ], + "words": [ + { + "text": "$", + "boundingBox": [ + 918, + 2590, + 942, + 2592, + 936, + 2659, + 912, + 2657 + ], + "confidence": 0.886 + }, + { + "text": "1203.39", + "boundingBox": [ + 955, + 2594, + 1124, + 2611, + 1115, + 2678, + 949, + 2661 + ], + "confidence": 0.951 + } + ] + } + ] + } + ], + "documentResults": [ + { + "docType": "prebuilt:receipt", + "pageRange": [ + 1, + 1 + ], + "fields": { + "ReceiptType": { + "type": "string", + "valueString": "Itemized", + "confidence": 0.663 + }, + "MerchantName": { + "type": "string", + "valueString": "Contoso Contoso", + "text": "Contoso Contoso", + "boundingBox": [ + 349.3, + 241.3, + 1058, + 284.4, + 1033.5, + 687.1, + 324.8, + 644 + ], + "page": 1, + "confidence": 0.516, + "elements": [ + "#/readResults/0/lines/0/words/0", + "#/readResults/0/lines/1/words/0" + ] + }, + "MerchantAddress": { + "type": "string", + "valueString": "123 Main Street Redmond, WA 98052", + "text": "123 Main Street Redmond, WA 98052", + "boundingBox": [ + 319.9, + 689.9, + 750.7, + 697.5, + 747.8, + 865.6, + 317, + 858 + ], + "page": 1, + "confidence": 0.987, + "elements": [ + "#/readResults/0/lines/2/words/0", + "#/readResults/0/lines/2/words/1", + "#/readResults/0/lines/2/words/2", + "#/readResults/0/lines/3/words/0", + "#/readResults/0/lines/3/words/1", + "#/readResults/0/lines/3/words/2" + ] + }, + "MerchantPhoneNumber": { + "type": "phoneNumber", + "text": "123-456-7890", + "boundingBox": [ + 306, + 1005, + 617, + 1012, + 615, + 1069, + 305, + 1064 + ], + "page": 1, + "confidence": 0.99, + "elements": [ + "#/readResults/0/lines/4/words/0" + ] + }, + "TransactionDate": { + "type": "date", + "valueDate": "2019-06-10", + "text": "6/10/2019", + "boundingBox": [ + 304, + 1224, + 506, + 1224, + 505, + 1289, + 303, + 1288 + ], + "page": 1, + "confidence": 0.986, + "elements": [ + "#/readResults/0/lines/5/words/0" + ] + }, + "TransactionTime": { + "type": "time", + "valueTime": "13:59:00", + "text": "13:59", + "boundingBox": [ + 518, + 1225, + 629, + 1228, + 627, + 1290, + 517, + 1289 + ], + "page": 1, + "confidence": 0.97, + "elements": [ + "#/readResults/0/lines/5/words/1" + ] + }, + "Items": { + "type": "array", + "valueArray": [ + { + "type": "object", + "valueObject": { + "Name": { + "type": "string", + "valueString": "8GB RAM (Black)", + "text": "8GB RAM (Black)", + "boundingBox": [ + 370.7, + 1781.5, + 731, + 1785, + 730.3, + 1854, + 370, + 1850.6 + ], + "page": 1, + "confidence": 0.916, + "elements": [ + "#/readResults/0/lines/9/words/0", + "#/readResults/0/lines/9/words/1", + "#/readResults/0/lines/9/words/2" + ] + }, + "TotalPrice": { + "type": "number", + "valueNumber": 999, + "text": "$999.00", + "boundingBox": [ + 939, + 1784.6, + 1134.4, + 1788.3, + 1133, + 1863, + 937.6, + 1859.3 + ], + "page": 1, + "confidence": 0.559, + "elements": [ + "#/readResults/0/lines/10/words/0", + "#/readResults/0/lines/10/words/1" + ] + } + } + }, + { + "type": "object", + "valueObject": { + "Quantity": { + "type": "number", + "valueNumber": 1, + "text": "1", + "boundingBox": [ + 321, + 2021, + 348, + 2020, + 349, + 2084, + 322, + 2084 + ], + "page": 1, + "confidence": 0.858, + "elements": [ + "#/readResults/0/lines/11/words/0" + ] + }, + "Name": { + "type": "string", + "valueString": "SurfacePen", + "text": "SurfacePen", + "boundingBox": [ + 360, + 2020, + 626, + 2014, + 628, + 2077, + 362, + 2083 + ], + "page": 1, + "confidence": 0.858, + "elements": [ + "#/readResults/0/lines/11/words/1" + ] + }, + "TotalPrice": { + "type": "number", + "valueNumber": 99.99, + "text": "99.99", + "boundingBox": [ + 1007, + 2028, + 1127, + 2028, + 1126, + 2091, + 1007, + 2091 + ], + "page": 1, + "confidence": 0.386, + "elements": [ + "#/readResults/0/lines/12/words/1" + ] + } + } + } + ] + }, + "Subtotal": { + "type": "number", + "valueNumber": 1098.99, + "text": "1098.99", + "boundingBox": [ + 963, + 2260, + 1136, + 2254, + 1137, + 2320, + 966, + 2325 + ], + "page": 1, + "confidence": 0.965, + "elements": [ + "#/readResults/0/lines/14/words/1" + ] + }, + "Tax": { + "type": "number", + "valueNumber": 104.4, + "text": "$104.40", + "boundingBox": [ + 942.6, + 2367.5, + 1132, + 2363.7, + 1133.4, + 2434.2, + 944, + 2438 + ], + "page": 1, + "confidence": 0.714, + "elements": [ + "#/readResults/0/lines/16/words/0", + "#/readResults/0/lines/16/words/1" + ] + }, + "Total": { + "type": "number", + "valueNumber": 1203.39, + "text": "1203.39", + "boundingBox": [ + 955, + 2594, + 1124, + 2611, + 1115, + 2678, + 949, + 2661 + ], + "page": 1, + "confidence": 0.774, + "elements": [ + "#/readResults/0/lines/18/words/1" + ] + } + } + } + ] + } + } + } + ], + "Variables": { + "FORM_RECOGNIZER_API_KEY": "Sanitized", + "FORM_RECOGNIZER_ENDPOINT": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/", + "RandomSeed": "612086966" + } +} \ No newline at end of file diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeReceiptsWithWrongLocale.json b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeReceiptsWithWrongLocale.json new file mode 100644 index 0000000000000..81720cb5e8818 --- /dev/null +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeReceiptsWithWrongLocale.json @@ -0,0 +1,48 @@ +{ + "Entries": [ + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyze?includeTextDetails=false\u0026locale=not-locale", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "22", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-737b7be95cf82045aac782d32e5adb9d-80e295e93282e74a-00", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "307cfc684d40c8c378390ad52e6fc30f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "source": "Sanitized" + }, + "StatusCode": 400, + "ResponseHeaders": { + "apim-request-id": "5b50d39d-4351-450f-b96a-c3a4bd9e3c29", + "Content-Length": "200", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:02 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "422" + }, + "ResponseBody": { + "error": { + "code": "UnsupportedLocale", + "innerError": { + "requestId": "5b50d39d-4351-450f-b96a-c3a4bd9e3c29" + }, + "message": "Locale unsupported. Supported locales include en-AU, en-CA, en-GB, en-IN and en-US." + } + } + } + ], + "Variables": { + "FORM_RECOGNIZER_API_KEY": "Sanitized", + "FORM_RECOGNIZER_ENDPOINT": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/", + "RandomSeed": "1546482383" + } +} \ No newline at end of file diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeReceiptsWithWrongLocaleAsync.json b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeReceiptsWithWrongLocaleAsync.json new file mode 100644 index 0000000000000..a4e83a5e02d35 --- /dev/null +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/SessionRecords/FormRecognizerClientLiveTests/StartRecognizeReceiptsWithWrongLocaleAsync.json @@ -0,0 +1,48 @@ +{ + "Entries": [ + { + "RequestUri": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/formrecognizer/v2.1-preview.1/prebuilt/receipt/analyze?includeTextDetails=false\u0026locale=not-locale", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "22", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8434dd48e8cd584d850dab89723647b9-9ed66bb2c5c3e54c-00", + "User-Agent": [ + "azsdk-net-AI.FormRecognizer/3.1.0-alpha.20201015.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "24682f5fd4cc3697e1e40d02c063088f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "source": "Sanitized" + }, + "StatusCode": 400, + "ResponseHeaders": { + "apim-request-id": "471c471c-fcae-4324-a4a3-926f61db5364", + "Content-Length": "200", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 15 Oct 2020 23:59:15 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "133" + }, + "ResponseBody": { + "error": { + "code": "UnsupportedLocale", + "innerError": { + "requestId": "471c471c-fcae-4324-a4a3-926f61db5364" + }, + "message": "Locale unsupported. Supported locales include en-AU, en-CA, en-GB, en-IN and en-US." + } + } + } + ], + "Variables": { + "FORM_RECOGNIZER_API_KEY": "Sanitized", + "FORM_RECOGNIZER_ENDPOINT": "https://mariari-westus2-formrecognizer.cognitiveservices.azure.com/", + "RandomSeed": "2135230702" + } +} \ No newline at end of file diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/samples/Sample12_RecognizeBusinessCardsFromFile.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/samples/Sample12_RecognizeBusinessCardsFromFile.cs index 1360aeda9811c..ff758861cb3c4 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/samples/Sample12_RecognizeBusinessCardsFromFile.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/samples/Sample12_RecognizeBusinessCardsFromFile.cs @@ -27,7 +27,8 @@ public async Task RecognizeBusinessCardsFromFile() #region Snippet:FormRecognizerSampleRecognizeBusinessCardFileStream using (FileStream stream = new FileStream(busienssCardsPath, FileMode.Open)) { - RecognizedFormCollection businessCards = await client.StartRecognizeBusinessCardsAsync(stream).WaitForCompletionAsync(); + var options = new RecognizeBusinessCardsOptions() { Locale = "en-US" }; + RecognizedFormCollection businessCards = await client.StartRecognizeBusinessCardsAsync(stream, options).WaitForCompletionAsync(); // To see the list of the supported fields returned by service and its corresponding types, consult: // https://aka.ms/formrecognizer/businesscardfields diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/samples/Sample3_RecognizeReceiptsFromFile.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/samples/Sample3_RecognizeReceiptsFromFile.cs index 34ddfbe40480f..f1ad53a56353b 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/samples/Sample3_RecognizeReceiptsFromFile.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/samples/Sample3_RecognizeReceiptsFromFile.cs @@ -29,7 +29,8 @@ public async Task RecognizeReceiptsFromFile() #region Snippet:FormRecognizerSampleRecognizeReceiptFileStream using (FileStream stream = new FileStream(receiptPath, FileMode.Open)) { - RecognizedFormCollection receipts = await client.StartRecognizeReceiptsAsync(stream).WaitForCompletionAsync(); + var options = new RecognizeReceiptsOptions() { Locale = "en-US" }; + RecognizedFormCollection receipts = await client.StartRecognizeReceiptsAsync(stream, options).WaitForCompletionAsync(); // To see the list of the supported fields returned by service and its corresponding types, consult: // https://aka.ms/formrecognizer/receiptfields