Skip to content

Commit b5dcbb8

Browse files
authored
Merge pull request #209402 from laujan/1981302-fr-v3-sdk-release
update sdk overview and what's new
2 parents 8889367 + b3ede29 commit b5dcbb8

File tree

4 files changed

+202
-59
lines changed

4 files changed

+202
-59
lines changed

articles/applied-ai-services/form-recognizer/quickstarts/includes/v3-csharp-sdk.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,7 @@ DocumentAnalysisClient client = new DocumentAnalysisClient(new Uri(endpoint), cr
136136
//sample form document
137137
Uri fileUri = new Uri("https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/sample-layout.pdf");
138138

139-
AnalyzeDocumentOperation operation = await client.StartAnalyzeDocumentFromUriAsync("prebuilt-document", fileUri);
140-
141-
await operation.WaitForCompletionAsync();
139+
AnalyzeDocumentOperation operation = await client.AnalyzeDocumentFromUriAsync(WaitUntil.Completed,"prebuilt-document", fileUri);
142140

143141
AnalyzeResult result = operation.Value;
144142

@@ -268,9 +266,7 @@ DocumentAnalysisClient client = new DocumentAnalysisClient(new Uri(endpoint), cr
268266
// sample form document
269267
Uri fileUri = new Uri ("https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/sample-layout.pdf");
270268

271-
AnalyzeDocumentOperation operation = await client.StartAnalyzeDocumentFromUriAsync("prebuilt-layout", fileUri);
272-
273-
await operation.WaitForCompletionAsync();
269+
AnalyzeDocumentOperation operation = await client.AnalyzeDocumentFromUriAsync(WaitUntil.Completed, "prebuilt-layout", fileUri);
274270

275271
AnalyzeResult result = operation.Value;
276272

@@ -397,9 +393,7 @@ DocumentAnalysisClient client = new DocumentAnalysisClient(new Uri(endpoint), cr
397393
398394
Uri invoiceUri = new Uri ("https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/sample-invoice.pdf");
399395

400-
AnalyzeDocumentOperation operation = await client.StartAnalyzeDocumentFromUriAsync("prebuilt-invoice", invoiceUri);
401-
402-
await operation.WaitForCompletionAsync();
396+
AnalyzeDocumentOperation operation = await client.AnalyzeDocumentFromUriAsync(WaitUntil.Completed, "prebuilt-invoice", invoiceUri);
403397

404398
AnalyzeResult result = operation.Value;
405399

articles/applied-ai-services/form-recognizer/quickstarts/includes/v3-javascript-sdk.md

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -298,61 +298,60 @@ In this example, we'll analyze an invoice using the **prebuilt-invoice** model.
298298
299299
```javascript
300300

301-
// using the PrebuiltModels object, rather than the raw model ID, adds strong typing to the model's output
302-
const { PrebuiltModels } = require("@azure/ai-form-recognizer");
301+
const { AzureKeyCredential, DocumentAnalysisClient } = require("@azure/ai-form-recognizer");
303302

304303
// set `<your-key>` and `<your-endpoint>` variables with the values from the Azure portal.
305304
const key = "<your-key>";
306305
const endpoint = "<your-endpoint>";
307306

308-
// sample document
309-
const invoiceUrl = "https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/sample-invoice.pdf";
310307

311-
async function main() {
308+
async function main() {
309+
// sample document
310+
const invoiceUrl = "https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/sample-invoice.pdf";
312311

313-
const client = new DocumentAnalysisClient(endpoint, new AzureKeyCredential(key));
312+
const client = new DocumentAnalysisClient(endpoint, new AzureKeyCredential(key));
314313

315-
const poller = await client.beginAnalyzeDocument(PrebuiltModels.Invoice, invoiceUrl);
314+
const poller = await client.beginAnalyzeDocumentFromUrl("prebuilt-invoice", invoiceUrl);
316315

317-
const {
318-
documents: [result]
319-
} = await poller.pollUntilDone();
316+
const {
317+
documents: [result]
318+
} = await poller.pollUntilDone();
320319

321-
if (result) {
322-
const invoice = result.fields;
323-
324-
console.log("Vendor Name:", invoice.vendorName?.value);
325-
console.log("Customer Name:", invoice.customerName?.value);
326-
console.log("Invoice Date:", invoice.invoiceDate?.value);
327-
console.log("Due Date:", invoice.dueDate?.value);
328-
329-
console.log("Items:");
330-
for (const {
331-
properties: item
332-
} of invoice.items?.values ?? []) {
333-
console.log("-", item.productCode?.value ?? "<no product code>");
334-
console.log(" Description:", item.description?.value);
335-
console.log(" Quantity:", item.quantity?.value);
336-
console.log(" Date:", item.date?.value);
337-
console.log(" Unit:", item.unit?.value);
338-
console.log(" Unit Price:", item.unitPrice?.value);
339-
console.log(" Tax:", item.tax?.value);
340-
console.log(" Amount:", item.amount?.value);
341-
}
320+
if (result) {
321+
const invoice = result.fields;
342322

343-
console.log("Subtotal:", invoice.subTotal?.value);
344-
console.log("Previous Unpaid Balance:", invoice.previousUnpaidBalance?.value);
345-
console.log("Tax:", invoice.totalTax?.value);
346-
console.log("Amount Due:", invoice.amountDue?.value);
347-
} else {
348-
throw new Error("Expected at least one receipt in the result.");
349-
}
350-
}
323+
console.log("Vendor Name:", invoice.vendorName?.value);
324+
console.log("Customer Name:", invoice.customerName?.value);
325+
console.log("Invoice Date:", invoice.invoiceDate?.value);
326+
console.log("Due Date:", invoice.dueDate?.value);
351327

352-
main().catch((error) => {
353-
console.error("An error occurred:", error);
354-
process.exit(1);
355-
});
328+
console.log("Items:");
329+
for (const {
330+
properties: item
331+
} of invoice.items?.values ?? []) {
332+
console.log("-", item.productCode?.value ?? "<no product code>");
333+
console.log(" Description:", item.description?.value);
334+
console.log(" Quantity:", item.quantity?.value);
335+
console.log(" Date:", item.date?.value);
336+
console.log(" Unit:", item.unit?.value);
337+
console.log(" Unit Price:", item.unitPrice?.value);
338+
console.log(" Tax:", item.tax?.value);
339+
console.log(" Amount:", item.amount?.value);
340+
}
341+
342+
console.log("Subtotal:", invoice.subTotal?.value);
343+
console.log("Previous Unpaid Balance:", invoice.previousUnpaidBalance?.value);
344+
console.log("Tax:", invoice.totalTax?.value);
345+
console.log("Amount Due:", invoice.amountDue?.value);
346+
} else {
347+
throw new Error("Expected at least one receipt in the result.");
348+
}
349+
}
350+
351+
main().catch((error) => {
352+
console.error("An error occurred:", error);
353+
process.exit(1);
354+
});
356355
```
357356
358357
**Run your application**

articles/applied-ai-services/form-recognizer/sdk-overview.md

Lines changed: 103 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ recommendations: false
1313
---
1414

1515
<!-- markdownlint-disable MD024 -->
16-
<!-- markdownlint-disable MD023 -->
16+
<!-- markdownlint-disable MD036 -->
17+
<!-- markdownlint-disable MD001 -->
1718

1819
# What is the Form Recognizer SDK?
1920

@@ -35,7 +36,107 @@ Form Recognizer SDK supports the following languages and platforms:
3536
|[JavaScript/4.0.0-beta.6](quickstarts/get-started-v3-sdk-rest-api.md?pivots=programming-language-javascript#set-up)| [npm](https://www.npmjs.com/package/@azure/ai-form-recognizer/v/4.0.0-beta.6)| [Azure SDK for JavaScript](https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-ai-form-recognizer/4.0.0-beta.6/index.html) | [2022-06-30-preview, 2022-01-30-preview, 2021-09-30-preview, **v2.1-ga**, v2.0](https://westus.dev.cognitive.microsoft.com/docs/services?pattern=form+recognizer) | [Browser, Windows, macOS, Linux](https://nodejs.org/en/download/) |
3637
|[Python/3.2.0b6](quickstarts/get-started-v3-sdk-rest-api.md?pivots=programming-language-python#set-up) | [PyPI](https://pypi.org/project/azure-ai-formrecognizer/3.2.0b6/)| [Azure SDK for Python](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-ai-formrecognizer/3.2.0b6/index.html)| [2022-06-30-preview, 2022-01-30-preview, 2021-09-30-preview, **v2.1-ga**, v2.0](https://westus.dev.cognitive.microsoft.com/docs/services?pattern=form+recognizer) |[Windows, macOS, Linux](/azure/developer/python/configure-local-development-environment?tabs=windows%2Capt%2Ccmd#use-the-azure-cli)
3738

38-
## How to use the Form Recognizer SDK in your applications
39+
## Changelog and release history
40+
41+
#### Form Recognizer SDK beta August 2022 preview release
42+
43+
>[!NOTE]
44+
> The 4.0.0-beta.5 (C#), 4.0.0-beta.6 (Java), 4.0.0-beta.6 (JavaScript) and 3.2.0b6 (Python) previews contain the same updates and bug fixes but the versioning is no longer in sync across all programming languages.
45+
46+
This release includes the following updates:
47+
48+
### [**C#**](#tab/csharp)
49+
50+
**Version 4.0.0-beta.5 (2022-08-09)**
51+
52+
[**Changelog/Release History**](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/formrecognizer/Azure.AI.FormRecognizer/CHANGELOG.md#400-beta5-2022-08-09)
53+
54+
[**Package (NuGet)**](https://www.nuget.org/packages/Azure.AI.FormRecognizer/4.0.0-beta.5)
55+
56+
[**SDK reference documentation**](/dotnet/api/overview/azure/ai.formrecognizer-readme?view=azure-dotnet-preview&preserve-view=true)
57+
58+
### [**Java**](#tab/java)
59+
60+
**Version 4.0.0-beta.6 (2022-08-10)**
61+
62+
[**Changelog/Release History**](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md#400-beta6-2022-08-10)
63+
64+
[**Package (Maven)**](https://oss.sonatype.org/#nexus-search;quick~azure-ai-formrecognizer)
65+
66+
[**SDK reference documentation**](/java/api/overview/azure/ai-formrecognizer-readme?view=azure-java-preview&preserve-view=true)
67+
68+
### [**JavaScript**](#tab/javascript)
69+
70+
**Version 4.0.0-beta.6 (2022-08-09)**
71+
72+
[**Changelog/Release History**](https://github.com/Azure/azure-sdk-for-js/blob/%40azure/ai-form-recognizer_4.0.0-beta.6/sdk/formrecognizer/ai-form-recognizer/CHANGELOG.md)
73+
74+
[**Package (npm)**](https://www.npmjs.com/package/@azure/ai-form-recognizer/v/4.0.0-beta.6)
75+
76+
[**SDK reference documentation**](/javascript/api/overview/azure/ai-form-recognizer-readme?view=azure-node-preview&preserve-view=true)
77+
78+
### [Python](#tab/python)
79+
80+
**Version 3.2.0b6 (2022-08-09)**
81+
82+
[**Changelog/Release History**](https://github.com/Azure/azure-sdk-for-python/blob/azure-ai-formrecognizer_3.2.0b6/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md)
83+
84+
[**Package (PyPi)**](https://pypi.org/project/azure-ai-formrecognizer/3.2.0b6/)
85+
86+
[**SDK reference documentation**](https://pypi.org/project/azure-ai-formrecognizer/3.2.0b6/)
87+
88+
---
89+
90+
### Form Recognizer SDK beta June 2022 preview release
91+
92+
>[!NOTE]
93+
> The 4.0.0-beta.4 (C# and JavaScript), 4.0.0-beta.5 (Java), and 3.2.0b5 (Python) previews contain the same updates and bug fixes but the versioning is no longer in sync across all programming languages.
94+
95+
This release includes the following updates:
96+
97+
### [**C#**](#tab/csharp)
98+
99+
**Version 4.0.0-beta.4 (2022-06-08)**
100+
101+
[**Changelog/Release History**](https://github.com/Azure/azure-sdk-for-net/blob/Azure.AI.FormRecognizer_4.0.0-beta.4/sdk/formrecognizer/Azure.AI.FormRecognizer/CHANGELOG.md)
102+
103+
[**Package (NuGet)**](https://www.nuget.org/packages/Azure.AI.FormRecognizer/4.0.0-beta.4)
104+
105+
[**SDK reference documentation**](/dotnet/api/azure.ai.formrecognizer?view=azure-dotnet-preview&preserve-view=true)
106+
107+
### [**Java**](#tab/java)
108+
109+
**Version 4.0.0-beta.5 (2022-06-07)**
110+
111+
[**Changelog/Release History**](https://github.com/Azure/azure-sdk-for-java/blob/azure-ai-formrecognizer_4.0.0-beta.5/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md)
112+
113+
[**Package (Maven)**](https://search.maven.org/artifact/com.azure/azure-ai-formrecognizer/4.0.0-beta.5/jar)
114+
115+
[**SDK reference documentation**](/java/api/overview/azure/ai-formrecognizer-readme?view=azure-java-preview&preserve-view=true)
116+
117+
### [**JavaScript**](#tab/javascript)
118+
119+
**Version 4.0.0-beta.4 (2022-06-07)**
120+
121+
[**Changelog/Release History**](https://github.com/Azure/azure-sdk-for-js/blob/%40azure/ai-form-recognizer_4.0.0-beta.4/sdk/formrecognizer/ai-form-recognizer/CHANGELOG.md)
122+
123+
[**Package (npm)**](https://www.npmjs.com/package/@azure/ai-form-recognizer/v/4.0.0-beta.4)
124+
125+
[**SDK reference documentation**](/javascript/api/@azure/ai-form-recognizer/?view=azure-node-preview&preserve-view=true)
126+
127+
### [Python](#tab/python)
128+
129+
**Version 3.2.0b5 (2022-06-07**
130+
131+
[**Changelog/Release History**](https://github.com/Azure/azure-sdk-for-python/blob/azure-ai-formrecognizer_3.2.0b5/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md)
132+
133+
[**Package (PyPi)**](https://pypi.org/project/azure-ai-formrecognizer/3.2.0b5/)
134+
135+
[**SDK reference documentation**](/python/api/azure-ai-formrecognizer/azure.ai.formrecognizer?view=azure-python-preview&preserve-view=true)
136+
137+
---
138+
139+
## Use Form Recognizer SDK in your applications
39140

40141
The Form Recognizer SDK enables the use and management of the Form Recognizer service in your application. The SDK builds on the underlying Form Recognizer REST API allowing you to easily use those APIs within your programming language paradigm. Here's how you use the Form Recognizer SDK for your preferred language:
41142

articles/applied-ai-services/form-recognizer/whats-new.md

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,61 @@ ms.author: lajanuar
1717

1818
Form Recognizer service is updated on an ongoing basis. Bookmark this page to stay up to date with release notes, feature enhancements, and documentation updates.
1919

20+
## September 2022
21+
22+
Form Recognizer SDK
23+
2024
## August 2022
2125

26+
#### Form Recognizer SDK beta August 2022 preview release
27+
28+
>[!NOTE]
29+
> The 4.0.0-beta.5 (C#), 4.0.0-beta.6 (Java), 4.0.0-beta.6 (JavaScript) and 3.2.0b6 (Python) previews contain the same updates and bug fixes but the versioning is no longer in sync across all programming languages.
30+
31+
This release includes the following updates:
32+
33+
### [**C#**](#tab/csharp)
34+
35+
**Version 4.0.0-beta.5 (2022-08-09)**
36+
37+
[**Changelog/Release History**](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/formrecognizer/Azure.AI.FormRecognizer/CHANGELOG.md#400-beta5-2022-08-09)
38+
39+
[**Package (NuGet)**](https://www.nuget.org/packages/Azure.AI.FormRecognizer/4.0.0-beta.5)
40+
41+
[**SDK reference documentation**](/dotnet/api/overview/azure/ai.formrecognizer-readme?view=azure-dotnet-preview&preserve-view=true)
42+
43+
### [**Java**](#tab/java)
44+
45+
**Version 4.0.0-beta.6 (2022-08-10)**
46+
47+
[**Changelog/Release History**](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md#400-beta6-2022-08-10)
48+
49+
[**Package (Maven)**](https://oss.sonatype.org/#nexus-search;quick~azure-ai-formrecognizer)
50+
51+
[**SDK reference documentation**](/java/api/overview/azure/ai-formrecognizer-readme?view=azure-java-preview&preserve-view=true)
52+
53+
### [**JavaScript**](#tab/javascript)
54+
55+
**Version 4.0.0-beta.6 (2022-08-09)**
56+
57+
[**Changelog/Release History**](https://github.com/Azure/azure-sdk-for-js/blob/%40azure/ai-form-recognizer_4.0.0-beta.6/sdk/formrecognizer/ai-form-recognizer/CHANGELOG.md)
58+
59+
[**Package (npm)**](https://www.npmjs.com/package/@azure/ai-form-recognizer/v/4.0.0-beta.6)
60+
61+
[**SDK reference documentation**](/javascript/api/overview/azure/ai-form-recognizer-readme?view=azure-node-preview&preserve-view=true)
62+
63+
### [Python](#tab/python)
64+
65+
**Version 3.2.0b6 (2022-08-09)**
66+
67+
[**Changelog/Release History**](https://github.com/Azure/azure-sdk-for-python/blob/azure-ai-formrecognizer_3.2.0b6/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md)
68+
69+
[**Package (PyPi)**](https://pypi.org/project/azure-ai-formrecognizer/3.2.0b6/)
70+
71+
[**SDK reference documentation**](https://pypi.org/project/azure-ai-formrecognizer/3.2.0b6/)
72+
73+
---
74+
2275
### Form Recognizer v3.0 generally available
2376

2477
**Form Recognizer REST API v3.0 is now generally available and ready for use in production applications!** Update your applications with [**REST API version 2022-08-31**](https://westus.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-2022-08-31/operations/AnalyzeDocument).
@@ -83,9 +136,7 @@ The **2022-06-30-preview** release presents extensive updates across the feature
83136
* [**Prebuilt ID document model**](concept-id-document.md). The ID document model now extracts DateOfIssue, Height, Weight, EyeColor, HairColor, and DocumentDiscriminator from US driver's licenses. _See_ [field extraction](concept-id-document.md).
84137
* [**Read model now supports common Microsoft Office document types**](concept-read.md). Document types like Word (docx) and PowerPoint (ppt) are now supported with the Read API. See [page extraction](concept-read.md#pages).
85138

86-
#### Form Recognizer SDK beta preview release
87-
88-
The latest beta release version of the Azure Form Recognizer SDKs incorporates new features, minor feature updates and bug fixes.
139+
#### Form Recognizer SDK beta June 2022 preview release
89140

90141
>[!NOTE]
91142
> The 4.0.0-beta.4 (C# and JavaScript), 4.0.0-beta.5 (Java), and 3.2.0b5 (Python) previews contain the same updates and bug fixes but the versioning is no longer in sync across all programming languages.
@@ -166,8 +217,6 @@ Get started with the new [REST API](https://westus.dev.cognitive.microsoft.com/d
166217

167218
#### Form Recognizer SDK beta preview release
168219

169-
The latest beta release version of the Azure Form Recognizer SDKs incorporates new features, minor feature updates and bug fixes.
170-
171220
>[!NOTE]
172221
> The 4.0.0-beta.3 (C# and JavaScript), 4.0.0-beta.4 (Java), and 3.2.0b4 (Python) previews contain the same updates and bug fixes but the versioning is no longer in sync across all programming languages.
173222

0 commit comments

Comments
 (0)