Skip to content

Commit

Permalink
Merge pull request #203 from Azure-Samples/pafarley-updates
Browse files Browse the repository at this point in the history
update tab formatting
  • Loading branch information
PatrickFarley committed Dec 31, 2020
2 parents 4d92239 + 01972b2 commit b9c49b5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
16 changes: 8 additions & 8 deletions python/FormRecognizer/rest/python-labeled-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ You need OCR result files in order for the service to consider the corresponding
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.
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.

# [v2.0](#tab/v2-0)
#### [v2.0](#tab/v2-0)
```json
{
"status": "succeeded",
Expand Down Expand Up @@ -114,7 +114,7 @@ You need OCR result files in order for the service to consider the corresponding
},
...
```
# [v2.1 preview](#tab/v2-1)
#### [v2.1 preview](#tab/v2-1)
```json
{
"status": "succeeded",
Expand Down Expand Up @@ -254,7 +254,7 @@ To train a model with labeled data, call the **[Train Custom Model](https://west
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>`.
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.

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

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

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.

# [v2.0](#tab/v2-0)
#### [v2.0](#tab/v2-0)
```json
{
"status": "succeeded",
Expand Down Expand Up @@ -710,7 +710,7 @@ When the process is completed, you'll receive a `202 (Success)` response with JS
}
}
```
# [v 2](#tab/v2-1)
#### [v 2](#tab/v2-1)
```json
{
"status": "succeeded",
Expand Down
12 changes: 6 additions & 6 deletions python/FormRecognizer/rest/python-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ To start analyzing the layout, you call the **[Analyze Layout](https://westus2.d
1. Replace `<path to your form>` with the path to your local form document.
1. Replace `<subscription key>` with the subscription key you copied from the previous step.

# [v2.0](#tab/v2-0)
#### [v2.0](#tab/v2-0)
```python
########### Python Form Recognizer Async Layout #############

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

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

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.

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

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

# [v2.0](#tab/v2-0)
#### [v2.0](#tab/v2-0)
```json
{
"status": "succeeded",
Expand Down Expand Up @@ -273,7 +273,7 @@ See the following invoice image and its corresponding JSON output. The output ha
}
```

# [v2.1 preview](#tab/v2-1)
#### [v2.1 preview](#tab/v2-1)
```json
{
"status": "succeeded",
Expand Down
8 changes: 4 additions & 4 deletions python/FormRecognizer/rest/python-receipts.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ To start analyzing a receipt, you call the **[Analyze Receipt](https://westus2.d
1. Replace `<path to your receipt>` with the path to your local form document.
1. Replace `<subscription key>` with the subscription key you copied from the previous step.

# [v2.0](#tab/v2-0)
#### [v2.0](#tab/v2-0)

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

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

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

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.

# [v2.0](#tab/v2-0)
#### [v2.0](#tab/v2-0)
```console
https://cognitiveservice/formrecognizer/v2.0/prebuilt/receipt/operations/54f0b076-4e38-43e5-81bd-b85b8835fdfb
```
# [v2.1-preview.2](#tab/v2-1)
#### [v2.1-preview.2](#tab/v2-1)
```console
https://cognitiveservice/formrecognizer/v2.1-preview.2/prebuilt/receipt/operations/54f0b076-4e38-43e5-81bd-b85b8835fdfb
```
Expand Down
12 changes: 6 additions & 6 deletions python/FormRecognizer/rest/python-train-extract.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ To train a Form Recognizer model with the documents in your Azure blob container
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.
1. Optionally replace `<your model name>` with the friendly name you'd like to give to your model.

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

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

This sample JSON output has been shortened for simplicity.

# [v2.0](#tab/v2-0)
#### [v2.0](#tab/v2-0)
```JSON
{
"status": "succeeded",
Expand Down Expand Up @@ -502,7 +502,7 @@ This sample JSON output has been shortened for simplicity.
}
}
```
# [v2.1 preview](#tab/v2-1)
#### [v2.1 preview](#tab/v2-1)
```JSON
{
"status": "succeeded",
Expand Down

0 comments on commit b9c49b5

Please sign in to comment.