You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/applied-ai-services/form-recognizer/quickstarts/try-v3-csharp-sdk.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,10 @@ ms.date: 03/14/2022
11
11
ms.author: lajanuar
12
12
recommendations: false
13
13
---
14
+
14
15
<!-- markdownlint-disable MD025 -->
16
+
<!-- markdownlint-disable MD036 -->
17
+
15
18
# Get started: Form Recognizer C# SDK v3.0 | Preview
16
19
17
20
>[!NOTE]
@@ -152,7 +155,7 @@ Analyze and extract text, tables, structure, key-value pairs, and named entities
152
155
> * We've added the file URI value to the `Uri fileUri` variable at the top of the script.
153
156
> * 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 the [General document](../concept-general-document.md#named-entity-recognition-ner-categories) concept page.
154
157
155
-
**Add the following code sample to the Program.cs file:**
158
+
**Add the following code sample to the Program.cs file. Make sure you update the key and endpoint variables with values from your Form Recognizer instance in the Azure portal:**
156
159
157
160
```csharp
158
161
usingAzure;
@@ -280,7 +283,7 @@ Extract text, selection marks, text styles, table structures, and bounding regio
280
283
> * We've added the file URI value to the `Uri fileUri` variable at the top of the script.
281
284
> * To extract the layout from a given file at a URI, use the `StartAnalyzeDocumentFromUri` method and pass `prebuilt-layout` as the model ID. The returned value is an `AnalyzeResult` object containing data from the submitted document.
282
285
283
-
**Add the following code sample to the Program.cs file:**
286
+
**Add the following code sample to the Program.cs file. Make sure you update the key and endpoint variables with values from your Form Recognizer instance in the Azure portal:**
284
287
285
288
```csharp
286
289
usingAzure;
@@ -368,7 +371,6 @@ for (int i = 0; i < result.Tables.Count; i++)
368
371
369
372
Visit the Azure samples repository on GitHub to view the [layout model output](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/dotnet/FormRecognizer/v3-csharp-sdk-layout-output.md).
370
373
371
-
372
374
## Prebuilt model
373
375
374
376
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.
@@ -383,7 +385,7 @@ Analyze and extract common fields from specific document types using a prebuilt
383
385
> * To analyze a given file at a URI, use the `StartAnalyzeDocumentFromUri` method and pass `prebuilt-invoice` as the model ID. The returned value is an `AnalyzeResult` object containing data from the submitted document.
384
386
> * 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.
385
387
386
-
**Add the following code sample to your Program.cs file:**
388
+
**Add the following code sample to your Program.cs file. Make sure you update the key and endpoint variables with values from your Form Recognizer instance in the Azure portal:**
Copy file name to clipboardExpand all lines: articles/applied-ai-services/form-recognizer/quickstarts/try-v3-java-sdk.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ In this quickstart you'll use following features to analyze and extract data and
60
60
61
61
## Set up
62
62
63
-
####Create a new Gradle project
63
+
### Create a new Gradle project
64
64
65
65
1. In console window (such as cmd, PowerShell, or Bash), create a new directory for your app called **form-recognizer-app**, and navigate to it.
66
66
@@ -78,7 +78,7 @@ In this quickstart you'll use following features to analyze and extract data and
78
78
79
79
1. Accept the default project name (form-recognizer-app)
80
80
81
-
#### Install the client library
81
+
### Install the client library
82
82
83
83
This quickstart uses the Gradle dependency manager. You can find the client library and information for other dependency managers on the [Maven Central Repository](https://mvnrepository.com/artifact/com.azure/azure-ai-formrecognizer).
84
84
@@ -100,7 +100,7 @@ This quickstart uses the Gradle dependency manager. You can find the client libr
100
100
}
101
101
```
102
102
103
-
#### Create a Java application
103
+
### Create a Java application
104
104
105
105
To interact with the Form Recognizer service, you'll need to create an instance of the `DocumentAnalysisClient` class. To do so, you'll create an `AzureKeyCredential` with your key from the Azure portal and a `DocumentAnalysisClient` instance with the `AzureKeyCredential` and your Form Recognizer `endpoint`.
106
106
@@ -145,7 +145,7 @@ Extract text, tables, structure, key-value pairs, and named entities from docume
145
145
> * We've added the file URI value to the `documentUrl` variable in the main method.
146
146
> * 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.
147
147
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` class. Make sure you update the key and endpoint variables with values from your Form Recognizer instance in the Azure portal:**
149
149
150
150
```java
151
151
@@ -164,16 +164,19 @@ Extract text, tables, structure, key-value pairs, and named entities from docume
164
164
165
165
public class FormRecognizer {
166
166
167
-
private static final String key = "PASTE_YOUR_FORM_RECOGNIZER_SUBSCRIPTION_KEY_HERE";
168
-
private static final String endpoint = "PASTE_YOUR_FORM_RECOGNIZER_ENDPOINT_HERE";
167
+
// set `<your-endpoint>` and `<your-key>` variables with the values from the Azure portal
168
+
private static final String endpoint = "<your-endpoint>";
169
+
private static final String key = "<your-key>";
169
170
170
171
public static void main(String[] args) {
171
172
173
+
// create your `DocumentAnalysisClient` instance and `AzureKeyCredential` variable
172
174
DocumentAnalysisClient client = new DocumentAnalysisClientBuilder()
Copy file name to clipboardExpand all lines: articles/applied-ai-services/form-recognizer/quickstarts/try-v3-python-sdk.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,7 +89,7 @@ Extract text, tables, structure, key-value pairs, and named entities from docume
89
89
> * 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.
90
90
91
91
<!-- markdownlint-disable MD036 -->
92
-
**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**
92
+
**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:**
93
93
94
94
```python
95
95
@@ -239,7 +239,7 @@ Extract text, selection marks, text styles, table structures, and bounding regio
239
239
> * We've added the file URL value to the `formUrl` variable in the `analyze_layout` function.
240
240
> * To analyze a given file at a URL, you'll use the `begin_analyze_document_from_url` method and pass in `prebuilt-layout` as the model Id. The returned value is a `result` object containing data about the submitted document.
241
241
242
-
**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**
242
+
**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:**
243
243
244
244
```python
245
245
@@ -370,7 +370,7 @@ Analyze and extract common fields from specific document types using a prebuilt
370
370
> * 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.
371
371
> * 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.
372
372
373
-
**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**
373
+
**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:**
0 commit comments