Skip to content

Commit 9b13793

Browse files
committed
update to single script
1 parent faa121c commit 9b13793

File tree

3 files changed

+20
-26
lines changed

3 files changed

+20
-26
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manager: nitinme
77
ms.service: applied-ai-services
88
ms.subservice: forms-recognizer
99
ms.topic: quickstart
10-
ms.date: 03/14/2022
10+
ms.date: 03/16/2022
1111
ms.author: lajanuar
1212
recommendations: false
1313
---
@@ -526,10 +526,7 @@ That's it, congratulations!
526526

527527
In this quickstart, you used the Form Recognizer C# SDK to analyze various forms and documents in different ways. Next, explore the reference documentation to learn about Form Recognizer API in more depth.
528528

529-
## Next steps
529+
## Next step
530530

531531
> [!div class="nextstepaction"]
532-
> [REST API v3.0 reference documentation](https://westus.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v3-0-preview-1/operations/AnalyzeDocument)
533-
534-
> [!div class="nextstepaction"]
535-
> [Form Recognizer C#/.NET reference library](/dotnet/api/overview/azure/ai.formrecognizer-readme?view=azure-dotnet&preserve-view=true)
532+
> [Learn more about Form Recognizer REST API v3.0](https://westus.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v3-0-preview-2/operations/AnalyzeDocument)

articles/applied-ai-services/form-recognizer/quickstarts/try-v3-java-sdk.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manager: nitinme
77
ms.service: applied-ai-services
88
ms.subservice: forms-recognizer
99
ms.topic: quickstart
10-
ms.date: 03/15/2022
10+
ms.date: 03/16/2022
1111
ms.author: lajanuar
1212
recommendations: false
1313
---
@@ -114,15 +114,15 @@ To interact with the Form Recognizer service, you'll need to create an instance
114114

115115
:::image type="content" source="../media/quickstarts/java-directories-2.png" alt-text="Screenshot: Java directory structure":::
116116

117-
1. Navigate to the `java` directory and create a file called **`FormRecognizer.java`**.
117+
1. Navigate to the `java` directory and create a file named **`FormRecognizer.java`**.
118118

119119
> [!TIP]
120120
>
121121
> * You can create a new file using PowerShell.
122122
> * Open a PowerShell window in your project directory by holding down the Shift key and right-clicking the folder.
123123
> * Type the following command **New-Item FormRecognizer.java**.
124124

125-
1. Open the `FormRecognizer.java` file and select one of the following code samples to copy and paste your into your application:
125+
1. Open the `FormRecognizer.java` file and select one of the following code samples to copy and paste into your application:
126126

127127
* [**General document**](#general-document-model)
128128

@@ -145,7 +145,7 @@ Extract text, tables, structure, key-value pairs, and named entities from docume
145145
> * We've added the file URI value to the `documentUrl` variable in the main method.
146146
> * For simplicity, all the entity fields that the service returns are not shown here. To see the list of all supported fields and corresponding types, see our [General document](../concept-general-document.md#named-entity-recognition-ner-categories) concept page.
147147

148-
**Add the following code sample to the `FormRecognizer` class. Make sure you update the key and endpoint variables with values from your Form Recognizer instance in the Azure portal:**
148+
**Add the following code sample to the `FormRecognizer.java` file. Make sure you update the key and endpoint variables with values from your Form Recognizer instance in the Azure portal:**
149149

150150
```java
151151

@@ -255,7 +255,7 @@ Extract text, selection marks, text styles, table structures, and bounding regio
255255
> * To analyze a given file at a URI, you'll use the `beginAnalyzeDocumentFromUrl` method and pass `prebuilt-layout` as the model Id. The returned value is an `AnalyzeResult` object containing data about the submitted document.
256256
> * We've added the file URI value to the `documentUrl` variable in the main method.
257257
258-
**Add the following code sample to the `FormRecognizer` class. Make sure you update the key and endpoint variables with values from your Form Recognizer instance in the Azure portal:**
258+
**Add the following code sample to the `FormRecognizer.java` file. Make sure you update the key and endpoint variables with values from your Form Recognizer instance in the Azure portal:**
259259

260260
```java
261261

@@ -286,6 +286,7 @@ Extract text, selection marks, text styles, table structures, and bounding regio
286286
.endpoint(endpoint)
287287
.buildClient();
288288

289+
// sample document
289290
String documentUrl = "https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/sample-layout.pdf";
290291
String modelId = "prebuilt-layout";
291292

@@ -343,7 +344,7 @@ Visit the Azure samples repository on GitHub to view the [layout model output](h
343344

344345
## Prebuilt model
345346

346-
Analyze and extract common fields from specific document types using a prebuilt model. In this example, we'll analyze an invoice using the **prebuilt-invoice** model. In this example, we'll analyze an invoice using the **prebuilt-invoice** model.
347+
Analyze and extract common fields from specific document types using a prebuilt model. In this example, we'll analyze an invoice using the **prebuilt-invoice** model.
347348

348349
> [!TIP]
349350
> You aren't limited to invoices—there are several prebuilt models to choose from, each of which has its own set of supported fields. The model to use for the analyze operation depends on the type of document to be analyzed. See [**model data extraction**](../concept-model-overview.md#model-data-extraction).
@@ -357,7 +358,7 @@ Analyze and extract common fields from specific document types using a prebuilt
357358
> * To analyze a given file at a URI, you'll use the `beginAnalyzeDocuments` method and pass `PrebuiltModels.Invoice` as the model Id. The returned value is a `result` object containing data about the submitted document.
358359
> * For simplicity, all the key-value pairs that the service returns are not shown here. To see the list of all supported fields and corresponding types, see our [Invoice](../concept-invoice.md#field-extraction) concept page.
359360
360-
**Add the following code sample to your form_recognizer_quickstart.py application. Make sure you update the key and endpoint variables with values from your Form Recognizer instance in the Azure portal:**
361+
**Add the following code sample to the `FormRecognizer.java` file. Make sure you update the key and endpoint variables with values from your Form Recognizer instance in the Azure portal:**
361362

362363
```java
363364

@@ -381,12 +382,14 @@ Analyze and extract common fields from specific document types using a prebuilt
381382
private static final String key = "<your-key>";
382383

383384
public static void main(final String[] args) throws IOException {
384-
385+
386+
// create your `DocumentAnalysisClient` instance and `AzureKeyCredential` variable
385387
DocumentAnalysisClient client = new DocumentAnalysisClientBuilder()
386388
.credential(new AzureKeyCredential(key))
387389
.endpoint(endpoint)
388390
.buildClient();
389-
391+
392+
// sample document
390393
String invoiceUrl = "https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/sample-invoice.pdf";
391394
String modelId = "prebuilt-invoice";
392395

@@ -515,7 +518,7 @@ Analyze and extract common fields from specific document types using a prebuilt
515518

516519
### Prebuilt model output
517520

518-
Visit the Azure samples repository on GitHub to view the [prebuilt invoice model output](https://github.com/Azure-Samples/cognitive-services-quickstart-code/tree/master/java/FormRecognizer)
521+
Visit the Azure samples repository on GitHub to view the [prebuilt invoice model output](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/java/FormRecognizer/v3-java-sdk-prebuilt-invoice-output.md)
519522

520523
## Build and run your application
521524

@@ -537,10 +540,7 @@ That's it, congratulations!
537540

538541
In this quickstart, you used the Form Recognizer Java SDK to analyze various forms and documents in different ways. Next, explore the reference documentation to learn about Form Recognizer API in more depth.
539542

540-
## Next steps
541-
542-
> [!div class="nextstepaction"]
543-
> [REST API v3.0 reference documentation](https://westus.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v3-0-preview-1/operations/AnalyzeDocument)
543+
## Next step
544544

545545
> [!div class="nextstepaction"]
546-
> [Form Recognizer Java library reference](https://azuresdkdocs.blob.core.windows.net/$web/java/azure-ai-formrecognizer/4.0.0-beta.1/index.html)
546+
> [Learn more about Form Recognizer REST API v3.0](https://westus.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v3-0-preview-2/operations/AnalyzeDocument)

articles/applied-ai-services/form-recognizer/quickstarts/try-v3-python-sdk.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -675,10 +675,7 @@ That's it, congratulations!
675675

676676
In this quickstart, you used the Form Recognizer Python SDK to analyze various forms in different ways. Next, explore the reference documentation to learn more about Form Recognizer v3.0 API.
677677

678-
## Next steps
678+
## Next step
679679

680680
> [!div class="nextstepaction"]
681-
> [REST API v3.0 reference documentation](https://westus.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v3-0-preview-1/operations/AnalyzeDocument)
682-
683-
> [!div class="nextstepaction"]
684-
> [Form Recognizer Python reference library](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-ai-formrecognizer/3.2.0b1/index.html)
681+
> [Learn more about Form Recognizer REST API v3.0](https://westus.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v3-0-preview-2/operations/AnalyzeDocument)

0 commit comments

Comments
 (0)