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
The W-2 model analyzes and extracts key information reported in each box on a W-2 form. The model supports standard and customized forms from 2018 to the present, including both single form and multiple forms (copy A, B, C, D, 1, 2) on one page.
52
+
The W-2 model analyzes and extracts key information reported in each box on a W-2 form. The model supports standard and customized forms from 2018 to the present, including single and multiple forms on one page.
53
53
54
54
***Sample W-2 document processed using [Form Recognizer Studio](https://formrecognizer.appliedai.azure.com/studio/prebuilt?formType=tax.us.w2)***:
55
55
@@ -81,7 +81,7 @@ The W-2 model analyzes and extracts key information reported in each box on a W-
81
81
82
82
The Layout API analyzes and extracts text, tables and headers, selection marks, and structure information from forms and documents.
83
83
84
-
***Sample form processed using the [Form Recognizer Studio](https://formrecognizer.appliedai.azure.com/studio/layout)***:
84
+
***Sample document processed using the [Form Recognizer Studio](https://formrecognizer.appliedai.azure.com/studio/layout)***:
85
85
86
86
:::image type="content" source="media/studio/analyze-layout.png" alt-text="Screenshot: Screenshot of sample document processed using Form Recognizer studio":::
87
87
@@ -105,7 +105,7 @@ The invoice model analyzes and extracts key information from sales invoices. The
The receipt model analyzes and extracts key information from sales receipts. The API analyzes printed and handwritten receipts and extracts key information such as merchant name, merchant phone number, transaction date, tax, and transaction total.
108
+
The receipt model analyzes and extracts key information from printed and handwritten receipts.
109
109
110
110
***Sample receipt processed using [Form Recognizer Studio](https://formrecognizer.appliedai.azure.com/studio/prebuilt?formType=receipt)***:
111
111
@@ -118,7 +118,11 @@ The receipt model analyzes and extracts key information from sales receipts. The
The ID document model analyzes and extracts key information from U.S. Driver's Licenses (all 50 states and District of Columbia) and biographical pages from international passports (excluding visa and other travel documents). The API analyzes identity documents and extracts key information such as first name, last name, address, and date of birth.
121
+
The ID document model analyzes and extracts key information from the following documents:
122
+
123
+
* U.S. Driver's Licenses (all 50 states and District of Columbia)
124
+
125
+
* Biographical pages from international passports (excluding visa and other travel documents). The API analyzes identity documents and extracts
122
126
123
127
***Sample U.S. Driver's License processed using [Form Recognizer Studio](https://formrecognizer.appliedai.azure.com/studio/prebuilt?formType=idDocument)***:
124
128
@@ -131,7 +135,7 @@ The ID document model analyzes and extracts key information from U.S. Driver's L
The business card model analyzes and extracts key information from business card images. The API analyzes printed business card images and extracts key information such as first name, last name, company name, email address, and phone number.
138
+
The business card model analyzes and extracts key information from business card images.
135
139
136
140
***Sample business card processed using [Form Recognizer Studio](https://formrecognizer.appliedai.azure.com/studio/prebuilt?formType=businessCard)***:
Copy file name to clipboardExpand all lines: articles/applied-ai-services/form-recognizer/quickstarts/try-v3-csharp-sdk.md
+60-20Lines changed: 60 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,9 +119,10 @@ This version of the client library defaults to the 2021-09-30-preview version of
119
119
120
120
1. Choose the **Include prerelease** checkbox and select version **4.0.0-beta.3*** from the dropdown menu and install the package in your project.
121
121
<!-- --- -->
122
+
122
123
## Build your application
123
124
124
-
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`.
125
+
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`.
125
126
126
127
> [!NOTE]
127
128
>
@@ -144,6 +145,22 @@ To interact with the Form Recognizer service, you'll need to create an instance
144
145
>
145
146
> * Remember to remove the key from your code when you're done, and never post it publicly. For production, use secure methods to store and access your credentials. For more information, *see* Cognitive Services [security](../../../cognitive-services/cognitive-services-security.md).
146
147
148
+
## Run your application
149
+
150
+
Once you've added a code sample to your application, choose the green **Start** button next to formRecognizer_quickstart to build and run your program, or press **F5**.
151
+
152
+
:::image type="content" source="../media/quickstarts/run-visual-studio.png" alt-text="Screenshot: run your Visual Studio program.":::
Open your command prompt and go to the directory that contains your project and type the following:
157
+
158
+
```console
159
+
dotnet run formrecognizer-quickstart.dll
160
+
```
161
+
162
+
### [Visual Studio](#tab/vs) -->
163
+
147
164
## General document model
148
165
149
166
Analyze and extract text, tables, structure, key-value pairs, and named entities.
@@ -270,8 +287,20 @@ for (int i = 0; i < result.Tables.Count; i++)
270
287
271
288
### General document model output
272
289
273
-
Visit the Azure samples repository on GitHub to view the [general document model output](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/dotnet/FormRecognizer/v3-csharp-sdk-general-document-output.md).
274
-
___
290
+
Here's a snippet of the expected output:
291
+
292
+
```console
293
+
Detected key-value pairs:
294
+
Found key with no value: '?'
295
+
Found key-value pair: 'QUARTERLY REPORT PURSUANT TO SECTION 13 OR 15(d) OF THE SECURITIES EXCHANGE ACT OF 1934' and ':selected:'
296
+
Found key-value pair: 'For the Quarterly Period Ended March 31, 2020' and 'OR'
297
+
Found key with no value: '?'
298
+
Found key-value pair: 'TRANSITION REPORT PURSUANT TO SECTION 13 OR 15(d) OF THE SECURITIES EXCHANGE ACT OF 1934' and ':unselected:'
299
+
Found key with no value: 'For the Transition Period From'
300
+
Found key-value pair: 'to Commission File Number' and '001-37845'
301
+
```
302
+
303
+
To view the entire output, visit the Azure samples repository on GitHub to view the [general document model output](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/dotnet/FormRecognizer/v3-csharp-sdk-general-document-output.md).
275
304
276
305
## Layout model
277
306
@@ -369,7 +398,25 @@ for (int i = 0; i < result.Tables.Count; i++)
369
398
370
399
### Layout model output
371
400
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).
401
+
Here's a snippet of the expected output:
402
+
403
+
```console
404
+
Document Page 1 has 69 line(s), 425 word(s), and 15 selection mark(s).
405
+
Line 0 has content: 'UNITED STATES'.
406
+
Its bounding box is:
407
+
Upper left => X: 3.4915, Y= 0.6828
408
+
Upper right => X: 5.0116, Y= 0.6828
409
+
Lower right => X: 5.0116, Y= 0.8265
410
+
Lower left => X: 3.4915, Y= 0.8265
411
+
Line 1 has content: 'SECURITIES AND EXCHANGE COMMISSION'.
412
+
Its bounding box is:
413
+
Upper left => X: 2.1937, Y= 0.9061
414
+
Upper right => X: 6.297, Y= 0.9061
415
+
Lower right => X: 6.297, Y= 1.0498
416
+
Lower left => X: 2.1937, Y= 1.0498
417
+
```
418
+
419
+
To view the entire output, 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).
373
420
374
421
## Prebuilt model
375
422
@@ -501,26 +548,19 @@ for (int i = 0; i < result.Documents.Count; i++)
501
548
502
549
### Prebuilt model output
503
550
504
-
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/dotnet/FormRecognizer/v3-csharp-sdk-prebuilt-invoice-output.md).
Open your command prompt and go to the directory that contains your project and type the following:
551
+
Here's a snippet of the expected output:
512
552
513
553
```console
514
-
dotnet run formrecognizer-quickstart.dll
554
+
Document 0:
555
+
Vendor Name: 'CONTOSO LTD.', with confidence 0.962
556
+
Customer Name: 'MICROSOFT CORPORATION', with confidence 0.951
557
+
Item:
558
+
Description: 'Test for 23 fields', with confidence 0.899
559
+
Amount: '100', with confidence 0.902
560
+
Sub Total: '100', with confidence 0.979
515
561
```
516
562
517
-
### [Visual Studio](#tab/vs) -->
518
-
519
-
Choose the green **Start** button next to formRecognizer_quickstart to build and run your program, or press **F5**.
520
-
521
-
:::image type="content" source="../media/quickstarts/run-visual-studio.png" alt-text="Screenshot: run your Visual Studio program.":::
522
-
523
-
<!-- --- -->
563
+
To view the entire output, 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/dotnet/FormRecognizer/v3-csharp-sdk-prebuilt-invoice-output.md).
Copy file name to clipboardExpand all lines: articles/applied-ai-services/form-recognizer/quickstarts/try-v3-java-sdk.md
+75-24Lines changed: 75 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ ms.date: 03/16/2022
11
11
ms.author: lajanuar
12
12
recommendations: false
13
13
---
14
-
<!--markdownlint-disableMD025-->
14
+
<!--markdownlint-disableMD025-->
15
15
16
16
# Get started: Form Recognizer Java SDK v3.0 | Preview
17
17
@@ -100,9 +100,9 @@ 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
-
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`.
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
107
107
1. From the form-recognizer-app directory, run the following command:
108
108
@@ -134,6 +134,22 @@ To interact with the Form Recognizer service, you'll need to create an instance
134
134
>
135
135
> Remember to remove the key from your code when you're done, and never post it publicly. For production, use secure methods to store and access your credentials. For more information, see* the Cognitive Services [security](../../../cognitive-services/cognitive-services-security.md).
136
136
137
+
## Build and run your application
138
+
139
+
Once you've added a code sample to your application, navigate back to your main project directory—**form-recognizer-app**.
140
+
141
+
1. Build your application with the `build` command:
142
+
143
+
```console
144
+
gradle build
145
+
```
146
+
147
+
1. Run your application with the `run` command:
148
+
149
+
```console
150
+
gradle run
151
+
```
152
+
137
153
## General document model
138
154
139
155
Extract text, tables, structure, key-value pairs, and named entities from documents.
@@ -243,7 +259,25 @@ Extract text, tables, structure, key-value pairs, and named entities from docume
243
259
244
260
### General document model output
245
261
246
-
Visit the Azure samples repository on GitHub to view the [general document model output](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/java/FormRecognizer/v3-java-sdk-general-document-output.md).
To view the entire output, visit the Azure samples repository on GitHub to view the [general document model output](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/java/FormRecognizer/v3-java-sdk-general-document-output.md).
247
281
248
282
## Layout model
249
283
@@ -286,8 +320,9 @@ Extract text, selection marks, text styles, table structures, and bounding regio
@@ -340,7 +375,28 @@ Extract text, selection marks, text styles, table structures, and bounding regio
340
375
341
376
### Layout model output
342
377
343
-
Visit the Azure samples repository on GitHub to view the [layout model output](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/java/FormRecognizer/v3-java-sdk-layout-output.md).
378
+
Here's a snippet of the expected output:
379
+
380
+
```console
381
+
Table 0 has 5 rows and 3 columns.
382
+
Cell 'Title of each class', has row index 0 and column index 0.
383
+
Cell 'Trading Symbol', has row index 0 and column index 1.
384
+
Cell 'Name of exchange on which registered', has row index 0 and column index 2.
385
+
Cell 'Common stock, $0.00000625 par value per share', has row index 1 and column index 0.
386
+
Cell 'MSFT', has row index 1 and column index 1.
387
+
Cell 'NASDAQ', has row index 1 and column index 2.
388
+
Cell '2.125% Notes due 2021', has row index 2 and column index 0.
389
+
Cell 'MSFT', has row index 2 and column index 1.
390
+
Cell 'NASDAQ', has row index 2 and column index 2.
391
+
Cell '3.125% Notes due 2028', has row index 3 and column index 0.
392
+
Cell 'MSFT', has row index 3 and column index 1.
393
+
Cell 'NASDAQ', has row index 3 and column index 2.
394
+
Cell '2.625% Notes due 2033', has row index 4 and column index 0.
395
+
Cell 'MSFT', has row index 4 and column index 1.
396
+
Cell 'NASDAQ', has row index 4 and column index 2.
397
+
```
398
+
399
+
To view the entire output,visit the Azure samples repository on GitHub to view the [layout model output](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/java/FormRecognizer/v3-java-sdk-layout-output.md).
344
400
345
401
## Prebuilt model
346
402
@@ -349,8 +405,6 @@ Analyze and extract common fields from specific document types using a prebuilt
349
405
> [!TIP]
350
406
> 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).
351
407
352
-
#### Try the prebuilt invoice model
353
-
354
408
> [!div class="checklist"]
355
409
>
356
410
> * Analyze an invoice using the prebuilt-invoice model. You can use our [sample invoice document](https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/sample-invoice.pdf) for this quickstart.
@@ -382,13 +436,13 @@ Analyze and extract common fields from specific document types using a prebuilt
@@ -518,23 +572,20 @@ Analyze and extract common fields from specific document types using a prebuilt
518
572
519
573
### Prebuilt model output
520
574
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)
522
-
523
-
## Build and run your application
524
-
525
-
Navigate back to your main project directory—**form-recognizer-app**.
526
-
527
-
1. Build your application with the `build` command:
575
+
Here's a snippet of the expected output:
528
576
529
577
```console
530
-
gradle build
578
+
----------- Analyzing invoice 0 -----------
579
+
Analyzed document has doc type invoice with confidence : 1.00
580
+
Vendor Name: CONTOSO LTD., confidence: 0.92
581
+
Vendor address: 123 456th St New York, NY, 10001, confidence: 0.91
582
+
Customer Name: MICROSOFT CORPORATION, confidence: 0.84
583
+
Customer Address Recipient: Microsoft Corp, confidence: 0.92
584
+
Invoice ID: INV-100, confidence: 0.97
585
+
Invoice Date: 2019-11-15, confidence: 0.97
531
586
```
532
587
533
-
1. Run your application with the `run` command:
534
-
535
-
```console
536
-
gradle run
537
-
```
588
+
To view the entire output, 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)
0 commit comments