-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[formrecognizer] Add missing pages comments and tests (#17197)
* add missing pages comments * update polling declaration in fr clients in custom forms * adding tests and recordings * updating changelog * remove extra pages tests in content tests
- Loading branch information
1 parent
81129a4
commit 46d6979
Showing
43 changed files
with
4,421 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
112 changes: 112 additions & 0 deletions
112
...ure-ai-formrecognizer/tests/recordings/test_business_card.test_pages_kwarg_specified.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
interactions: | ||
- request: | ||
body: '!!! The request body has been omitted from the recording because its size | ||
915108 is larger than 128KB. !!!' | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '915108' | ||
Content-Type: | ||
- image/jpeg | ||
User-Agent: | ||
- azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) | ||
method: POST | ||
uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyze?includeTextDetails=false&pages=1 | ||
response: | ||
body: | ||
string: '' | ||
headers: | ||
apim-request-id: | ||
- e800b802-37c0-46c9-9381-7f3670e3e8e4 | ||
content-length: | ||
- '0' | ||
date: | ||
- Thu, 11 Mar 2021 17:47:07 GMT | ||
operation-location: | ||
- https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyzeResults/e800b802-37c0-46c9-9381-7f3670e3e8e4 | ||
strict-transport-security: | ||
- max-age=31536000; includeSubDomains; preload | ||
x-content-type-options: | ||
- nosniff | ||
x-envoy-upstream-service-time: | ||
- '454' | ||
status: | ||
code: 202 | ||
message: Accepted | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) | ||
method: GET | ||
uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyzeResults/e800b802-37c0-46c9-9381-7f3670e3e8e4 | ||
response: | ||
body: | ||
string: '{"status": "succeeded", "createdDateTime": "2021-03-11T17:47:07Z", | ||
"lastUpdatedDateTime": "2021-03-11T17:47:11Z", "analyzeResult": {"version": | ||
"2.1.0", "readResults": [{"page": 1, "angle": -16.6836, "width": 4032, "height": | ||
3024, "unit": "pixel"}], "documentResults": [{"docType": "prebuilt:businesscard", | ||
"pageRange": [1, 1], "fields": {"Addresses": {"type": "array", "valueArray": | ||
[{"type": "string", "valueString": "2 Kingdom Street Paddington, London, W2 | ||
6BD", "text": "2 Kingdom Street Paddington, London, W2 6BD", "boundingBox": | ||
[1227.3, 2138.3, 2520.2, 1690.5, 2597, 1912.3, 1304.1, 2360.1], "page": 1, | ||
"confidence": 0.98}]}, "CompanyNames": {"type": "array", "valueArray": [{"type": | ||
"string", "valueString": "Contoso", "text": "Contoso", "boundingBox": [1146, | ||
1926, 2224, 1587, 2285, 1756, 1202, 2099], "page": 1, "confidence": 0.168}]}, | ||
"ContactNames": {"type": "array", "valueArray": [{"type": "object", "valueObject": | ||
{"FirstName": {"type": "string", "valueString": "Avery", "text": "Avery", | ||
"boundingBox": [666, 1102, 1111, 995, 1140, 1114, 696, 1216], "page": 1}, | ||
"LastName": {"type": "string", "valueString": "Smith", "text": "Smith", "boundingBox": | ||
[1170, 981, 1571, 881, 1600, 1000, 1200, 1100], "page": 1}}, "text": "Dr. | ||
Avery Smith", "boundingBox": [414.1, 1153, 1572, 880.8, 1601.3, 1005.6, 443.5, | ||
1277.9], "page": 1, "confidence": 0.979}]}, "Departments": {"type": "array", | ||
"valueArray": [{"type": "string", "valueString": "Cloud & Al Department", | ||
"text": "Cloud & Al Department", "boundingBox": [473.6, 1409.5, 1586, 1134, | ||
1607.3, 1219.8, 494.9, 1495.3], "page": 1, "confidence": 0.989}]}, "Emails": | ||
{"type": "array", "valueArray": [{"type": "string", "valueString": "[email protected]", | ||
"text": "[email protected]", "boundingBox": [2106, 934, 2908, 706, 2921, | ||
769, 2122, 993], "page": 1, "confidence": 0.99}]}, "Faxes": {"type": "array", | ||
"valueArray": [{"type": "phoneNumber", "text": "+44 (0) 20 6789 2345", "boundingBox": | ||
[2520.4, 1195.5, 3191.8, 983.5, 3215.8, 1059.2, 2544.3, 1271.3], "page": 1, | ||
"confidence": 0.99}]}, "JobTitles": {"type": "array", "valueArray": [{"type": | ||
"string", "valueString": "Senior Researcher", "text": "Senior Researcher", | ||
"boundingBox": [451, 1312, 1315.9, 1103.6, 1334.7, 1181.7, 469.8, 1390], "page": | ||
1, "confidence": 0.99}]}, "MobilePhones": {"type": "array", "valueArray": | ||
[{"type": "phoneNumber", "text": "+44 (0) 7911 123456", "boundingBox": [2426.8, | ||
1040.1, 3065.5, 846, 3087.2, 917.6, 2448.5, 1111.7], "page": 1, "confidence": | ||
0.99}]}, "Websites": {"type": "array", "valueArray": [{"type": "string", "valueString": | ||
"https://www.contoso.com/", "text": "https://www.contoso.com/", "boundingBox": | ||
[2120, 1003, 2981, 757, 3006, 824, 2139, 1075], "page": 1, "confidence": 0.99}]}, | ||
"WorkPhones": {"type": "array", "valueArray": [{"type": "phoneNumber", "text": | ||
"+44 (0) 20 9876 5432", "boundingBox": [2468.2, 1118.1, 3130.3, 914.6, 3152.9, | ||
988.2, 2490.8, 1191.6], "page": 1, "confidence": 0.989}]}}}]}}' | ||
headers: | ||
apim-request-id: | ||
- 1b20e12c-ddd7-4ca4-80bc-35b899311ddd | ||
content-length: | ||
- '2684' | ||
content-type: | ||
- application/json; charset=utf-8 | ||
date: | ||
- Thu, 11 Mar 2021 17:47:12 GMT | ||
strict-transport-security: | ||
- max-age=31536000; includeSubDomains; preload | ||
x-content-type-options: | ||
- nosniff | ||
x-envoy-upstream-service-time: | ||
- '18' | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
Oops, something went wrong.