Skip to content

Commit b9c49b5

Browse files
Merge pull request #203 from Azure-Samples/pafarley-updates
update tab formatting
2 parents 4d92239 + 01972b2 commit b9c49b5

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

python/FormRecognizer/rest/python-labeled-data.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ You need OCR result files in order for the service to consider the corresponding
6565
1. Call the **[Get Analyze Layout Result](https://westus2.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v2/operations/GetAnalyzeLayoutResult)** API, using the operation ID from the previous step.
6666
1. Get the response and write the content to a file. For each source form, the corresponding OCR file should have the original file name appended with `.ocr.json`. The OCR JSON output should have the following format. See the [sample OCR file](https://github.com/Azure-Samples/cognitive-services-REST-api-samples/blob/master/curl/form-recognizer/Invoice_1.pdf.ocr.json) for a full example.
6767

68-
# [v2.0](#tab/v2-0)
68+
#### [v2.0](#tab/v2-0)
6969
```json
7070
{
7171
"status": "succeeded",
@@ -114,7 +114,7 @@ You need OCR result files in order for the service to consider the corresponding
114114
},
115115
...
116116
```
117-
# [v2.1 preview](#tab/v2-1)
117+
#### [v2.1 preview](#tab/v2-1)
118118
```json
119119
{
120120
"status": "succeeded",
@@ -254,7 +254,7 @@ To train a model with labeled data, call the **[Train Custom Model](https://west
254254
1. Replace `<SAS URL>` with the Azure Blob storage container's shared access signature (SAS) URL. To retrieve the SAS URL for your custom model training data, go to your storage resource in the Azure portal and select the **Storage Explorer** tab. Navigate to your container, right-click, and select **Get shared access signature**. It's important to get the SAS for your container, not for the storage account itself. Make sure the **Read** and **List** permissions are checked, and click **Create**. Then copy the value in the **URL** section to a temporary location. It should have the form: `https://<storage account>.blob.core.windows.net/<container name>?<SAS value>`.
255255
1. Replace `<Blob folder name>` with the folder name in your blob container where the input data is located. Or, if your data is at the root, leave this blank and remove the `"prefix"` field from the body of the HTTP request.
256256

257-
# [v2.0](#tab/v2-0)
257+
#### [v2.0](#tab/v2-0)
258258
```python
259259
########### Python Form Recognizer Labeled Async Train #############
260260
import json
@@ -295,7 +295,7 @@ except Exception as e:
295295
print("POST model failed:\n%s" % str(e))
296296
quit()
297297
```
298-
# [v2.1 preview](#tab/v2-1)
298+
#### [v2.1 preview](#tab/v2-1)
299299
```python
300300
########### Python Form Recognizer Labeled Async Train #############
301301
import json
@@ -455,7 +455,7 @@ Next, you'll use your newly trained model to analyze a document and extract key-
455455
1. Replace `<file type>` with the file type. Supported types: `application/pdf`, `image/jpeg`, `image/png`, `image/tiff`.
456456
1. Replace `<subscription key>` with your subscription key.
457457

458-
# [v2.0](#tab/v2-0)
458+
#### [v2.0](#tab/v2-0)
459459
```python
460460
########### Python Form Recognizer Async Analyze #############
461461
import json
@@ -491,7 +491,7 @@ Next, you'll use your newly trained model to analyze a document and extract key-
491491
print("POST analyze failed:\n%s" % str(e))
492492
quit()
493493
```
494-
# [v2.1 preview](#tab/v2-1)
494+
#### [v2.1 preview](#tab/v2-1)
495495
```python
496496
########### Python Form Recognizer Async Analyze #############
497497
import json
@@ -575,7 +575,7 @@ print("Analyze operation did not complete within the allocated time.")
575575

576576
When the process is completed, you'll receive a `202 (Success)` response with JSON content in the following format. The response has been shortened for simplicity. The main key/value associations are in the `"documentResults"` node. The `"selectionMarks"` node (in v2.1 preview) shows every selection mark (checkbox, radio mark) and whether its status is "selected" or "unselected". The Layout API results (the content and positions of all the text in the document) are in the `"readResults"` node.
577577

578-
# [v2.0](#tab/v2-0)
578+
#### [v2.0](#tab/v2-0)
579579
```json
580580
{
581581
"status": "succeeded",
@@ -710,7 +710,7 @@ When the process is completed, you'll receive a `202 (Success)` response with JS
710710
}
711711
}
712712
```
713-
# [v 2](#tab/v2-1)
713+
#### [v 2](#tab/v2-1)
714714
```json
715715
{
716716
"status": "succeeded",

python/FormRecognizer/rest/python-layout.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ To start analyzing the layout, you call the **[Analyze Layout](https://westus2.d
3939
1. Replace `<path to your form>` with the path to your local form document.
4040
1. Replace `<subscription key>` with the subscription key you copied from the previous step.
4141

42-
# [v2.0](#tab/v2-0)
42+
#### [v2.0](#tab/v2-0)
4343
```python
4444
########### Python Form Recognizer Async Layout #############
4545

@@ -73,7 +73,7 @@ To start analyzing the layout, you call the **[Analyze Layout](https://westus2.d
7373
print("POST analyze failed:\n%s" % str(e))
7474
quit()
7575
```
76-
# [v2.1 preview](#tab/v2-1)
76+
#### [v2.1 preview](#tab/v2-1)
7777
```python
7878
########### Python Form Recognizer Async Layout #############
7979

@@ -118,11 +118,11 @@ To start analyzing the layout, you call the **[Analyze Layout](https://westus2.d
118118

119119
You'll receive a `202 (Success)` response that includes an **Operation-Location** header, which the script will print to the console. This header contains an operation ID that you can use to query the status of the asynchronous operation and get the results. In the following example value, the string after `operations/` is the operation ID.
120120

121-
# [v2.0](#tab/v2-0)
121+
#### [v2.0](#tab/v2-0)
122122
```console
123123
https://cognitiveservice/formrecognizer/v2.0/layout/operations/54f0b076-4e38-43e5-81bd-b85b8835fdfb
124124
```
125-
# [v2.1 preview](#tab/v2-1)
125+
#### [v2.1 preview](#tab/v2-1)
126126
```console
127127
https://cognitiveservice/formrecognizer/v2.1-preview.2/layout/operations/54f0b076-4e38-43e5-81bd-b85b8835fdfb
128128
```
@@ -171,7 +171,7 @@ See the following invoice image and its corresponding JSON output. The output ha
171171

172172
:::image type="content" source="../media/contoso-invoice.png" alt-text="Contoso project statement document with a table.":::
173173

174-
# [v2.0](#tab/v2-0)
174+
#### [v2.0](#tab/v2-0)
175175
```json
176176
{
177177
"status": "succeeded",
@@ -273,7 +273,7 @@ See the following invoice image and its corresponding JSON output. The output ha
273273
}
274274
```
275275

276-
# [v2.1 preview](#tab/v2-1)
276+
#### [v2.1 preview](#tab/v2-1)
277277
```json
278278
{
279279
"status": "succeeded",

python/FormRecognizer/rest/python-receipts.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ To start analyzing a receipt, you call the **[Analyze Receipt](https://westus2.d
4040
1. Replace `<path to your receipt>` with the path to your local form document.
4141
1. Replace `<subscription key>` with the subscription key you copied from the previous step.
4242

43-
# [v2.0](#tab/v2-0)
43+
#### [v2.0](#tab/v2-0)
4444

4545
```python
4646
########### Python Form Recognizer Async Receipt #############
@@ -80,7 +80,7 @@ To start analyzing a receipt, you call the **[Analyze Receipt](https://westus2.d
8080
quit()
8181
```
8282

83-
# [v2.1-preview.2](#tab/v2-1)
83+
#### [v2.1-preview.2](#tab/v2-1)
8484
```python
8585
########### Python Form Recognizer Async Receipt #############
8686

@@ -133,11 +133,11 @@ To start analyzing a receipt, you call the **[Analyze Receipt](https://westus2.d
133133

134134
You'll receive a `202 (Success)` response that includes an **Operation-Location** header, which the script will print to the console. This header contains an operation ID that you can use to query the status of the asynchronous operation and get the results. In the following example value, the string after `operations/` is the operation ID.
135135

136-
# [v2.0](#tab/v2-0)
136+
#### [v2.0](#tab/v2-0)
137137
```console
138138
https://cognitiveservice/formrecognizer/v2.0/prebuilt/receipt/operations/54f0b076-4e38-43e5-81bd-b85b8835fdfb
139139
```
140-
# [v2.1-preview.2](#tab/v2-1)
140+
#### [v2.1-preview.2](#tab/v2-1)
141141
```console
142142
https://cognitiveservice/formrecognizer/v2.1-preview.2/prebuilt/receipt/operations/54f0b076-4e38-43e5-81bd-b85b8835fdfb
143143
```

python/FormRecognizer/rest/python-train-extract.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ To train a Form Recognizer model with the documents in your Azure blob container
4747
1. Replace `<Blob folder name>` with the path to the folder in blob storage where your forms are located. If your forms are at the root of your container, leave this string empty.
4848
1. Optionally replace `<your model name>` with the friendly name you'd like to give to your model.
4949

50-
# [v2.0](#tab/v2-0)
50+
#### [v2.0](#tab/v2-0)
5151
```python
5252
########### Python Form Recognizer Labeled Async Train #############
5353
import json
@@ -89,7 +89,7 @@ To train a Form Recognizer model with the documents in your Azure blob container
8989
print("POST model failed:\n%s" % str(e))
9090
quit()
9191
```
92-
# [v2.1 preview](#tab/v2-1)
92+
#### [v2.1 preview](#tab/v2-1)
9393
```python
9494
########### Python Form Recognizer Labeled Async Train #############
9595
import json
@@ -252,7 +252,7 @@ Next, you'll use your newly trained model to analyze a document and extract key-
252252
1. Replace `<file type>` with the file type. Supported types: `application/pdf`, `image/jpeg`, `image/png`, `image/tiff`.
253253
1. Replace `<subscription key>` with your subscription key.
254254

255-
# [v2.0](#tab/v2-0)
255+
#### [v2.0](#tab/v2-0)
256256
```python
257257
########### Python Form Recognizer Async Analyze #############
258258
import json
@@ -288,7 +288,7 @@ Next, you'll use your newly trained model to analyze a document and extract key-
288288
print("POST analyze failed:\n%s" % str(e))
289289
quit()
290290
```
291-
# [v2.1 preview](#tab/v2-1)
291+
#### [v2.1 preview](#tab/v2-1)
292292
```python
293293
########### Python Form Recognizer Async Analyze #############
294294
import json
@@ -375,7 +375,7 @@ When the process is completed, you'll receive a `200 (Success)` response with JS
375375

376376
This sample JSON output has been shortened for simplicity.
377377

378-
# [v2.0](#tab/v2-0)
378+
#### [v2.0](#tab/v2-0)
379379
```JSON
380380
{
381381
"status": "succeeded",
@@ -502,7 +502,7 @@ This sample JSON output has been shortened for simplicity.
502502
}
503503
}
504504
```
505-
# [v2.1 preview](#tab/v2-1)
505+
#### [v2.1 preview](#tab/v2-1)
506506
```JSON
507507
{
508508
"status": "succeeded",

0 commit comments

Comments
 (0)