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/ai-services/document-intelligence/create-sas-tokens.md
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ manager: nitinme
7
7
ms.service: azure-ai-document-intelligence
8
8
ms.custom:
9
9
- ignite-2023
10
-
ms.date: 07/18/2023
10
+
ms.date: 07/11/2024
11
11
ms.author: lajanuar
12
12
---
13
13
@@ -24,11 +24,9 @@ ms.author: lajanuar
24
24
25
25
At a high level, here's how SAS tokens work:
26
26
27
-
*Your application submits the SAS token to Azure Storage as part of a REST API request.
27
+
*First, your application submits the SAS token to Azure Storage as part of a REST API request.
28
28
29
-
* If the storage service verifies that the SAS is valid, the request is authorized.
30
-
31
-
* If the SAS token is deemed invalid, the request is declined and the error code 403 (Forbidden) is returned.
29
+
* Next, if the storage service verifies that the SAS is valid, the request is authorized. If, the SAS token is deemed invalid, the request is declined and the error code 403 (Forbidden) is returned.
32
30
33
31
Azure Blob Storage offers three resource types:
34
32
@@ -109,26 +107,26 @@ The Azure portal is a web-based console that enables you to manage your Azure su
109
107
>
110
108
> :::image type="content" source="media/sas-tokens/need-permissions.png" alt-text="Screenshot that shows the lack of permissions warning.":::
111
109
>
112
-
> *[Azure role-based access control](../../role-based-access-control/overview.md) (Azure RBAC) is the authorization system used to manage access to Azure resources. Azure RBAC helps you manage access and permissions for your Azure resources.
110
+
> *[Azure role-based access control](../../role-based-access-control/overview.md) (Azure RBAC) is the authorization system used to manage access to Azure resources. Azure RBAC helps you manage access and permissions for your Azure resources.
113
111
> *[Assign an Azure role for access to blob data](../../role-based-access-control/role-assignments-portal.yml?tabs=current) to assign a role that allows for read, write, and delete permissions for your Azure storage container. *See*[Storage Blob Data Contributor](../../role-based-access-control/built-in-roles.md#storage-blob-data-contributor).
114
112
115
113
1. Specify the signed key **Start** and **Expiry** times.
116
114
117
115
* When you create a SAS token, the default duration is 48 hours. After 48 hours, you'll need to create a new token.
118
116
* Consider setting a longer duration period for the time you're using your storage account for Document Intelligence Service operations.
119
117
* The value of the expiry time is determined by whether you're using an **Account key** or **User delegation key****Signing method**:
120
-
***Account key**: There's no imposed maximum time limit; however, best practices recommended that you configure an expiration policy to limit the interval and minimize compromise. [Configure an expiration policy for shared access signatures](/azure/storage/common/sas-expiration-policy).
121
-
***User delegation key**: The value for the expiry time is a maximum of seven days from the creation of the SAS token. The SAS is invalid after the user delegation key expires, so a SAS with an expiry time of greater than seven days will still only be valid for seven days. For more information,*see*[Use Microsoft Entra credentials to secure a SAS](/azure/storage/blobs/storage-blob-user-delegation-sas-create-cli#use-azure-ad-credentials-to-secure-a-sas).
118
+
***Account key**: No imposed maximum time limit; however, best practices recommended that you configure an expiration policy to limit the interval and minimize compromise. [Configure an expiration policy for shared access signatures](/azure/storage/common/sas-expiration-policy).
119
+
***User delegation key**: The value for the expiry time is a maximum of seven days from the creation of the SAS token. The SAS is invalid after the user delegation key expires, so a SAS with an expiry time of greater than seven days will still only be valid for seven days. For more information,*see*[Use Microsoft Entra credentials to secure a SAS](/azure/storage/blobs/storage-blob-user-delegation-sas-create-cli#use-azure-ad-credentials-to-secure-a-sas).
122
120
123
-
1. The **Allowed IP addresses** field is optional and specifies an IP address or a range of IP addresses from which to accept requests. If the request IP address doesn't match the IP address or address range specified on the SAS token, authorization fails. The IP address or a range of IP addresses must be public IPs, not private. For more information,*see*, [**Specify an IP address or IP range**](/rest/api/storageservices/create-account-sas#specify-an-ip-address-or-ip-range).
121
+
1. The **Allowed IP addresses** field is optional and specifies an IP address or a range of IP addresses from which to accept requests. If the request IP address doesn't match the IP address or address range specified on the SAS token, authorization fails. The IP address or a range of IP addresses must be public IPs, not private. For more information,*see*, [**Specify an IP address or IP range**](/rest/api/storageservices/create-account-sas#specify-an-ip-address-or-ip-range).
124
122
125
123
1. The **Allowed protocols** field is optional and specifies the protocol permitted for a request made with the SAS token. The default value is HTTPS.
126
124
127
125
1. Select **Generate SAS token and URL**.
128
126
129
127
1. The **Blob SAS token** query string and **Blob SAS URL** appear in the lower area of the window. To use the Blob SAS token, append it to a storage service URI.
130
128
131
-
1. Copy and paste the **Blob SAS token** and **Blob SAS URL** values in a secure location. They're displayed only once and can't be retrieved after the window is closed.
129
+
1. Copy and paste the **Blob SAS token** and **Blob SAS URL** values in a secure location. The values are displayed only once and can't be retrieved after the window is closed.
132
130
133
131
1. To [construct a SAS URL](#use-your-sas-url-to-grant-access), append the SAS token (URI) to the URL for a storage service.
134
132
@@ -176,7 +174,7 @@ To use your SAS URL with the [REST API](/rest/api/aiservices/document-models/bui
176
174
}
177
175
```
178
176
179
-
That's it! You've learned how to create SAS tokens to authorize how clients access your data.
177
+
That's it! You learned how to create SAS tokens to authorize how clients access your data.
@@ -32,7 +32,7 @@ The Document Intelligence Sample Labeling tool is an application that provides a
32
32
33
33
*[Run the Sample Labeling tool locally](#run-the-sample-labeling-tool-locally)
34
34
*[Deploy the Sample Labeling tool to an Azure Container Instance (ACI)](#deploy-with-azure-container-instances-aci)
35
-
*[Use and contribute to the open-source OCR Form Labeling Tool](#open-source-on-github)
35
+
*[Use and contribute to the open-source Form Labeling Tool](#open-source-on-github)
36
36
37
37
## Run the Sample Labeling tool locally
38
38
@@ -97,7 +97,7 @@ Follow these steps to create a new resource using the Azure portal:
97
97
98
98
### Continuous deployment
99
99
100
-
After you've created your web app, you can enable the continuous deployment option:
100
+
After you create your web app, you can enable the continuous deployment option:
101
101
102
102
* From the left pane, choose **Container settings**.
103
103
* In the main window, navigate to Continuous deployment and toggle between the **On** and **Off** buttons to set your preference:
@@ -116,10 +116,10 @@ As an alternative to using the Azure portal, you can create a resource using the
116
116
117
117
There's a few things you need know about this command:
118
118
119
-
*`DNS_NAME_LABEL=aci-demo-$RANDOM` generates a random DNS name.
119
+
*`DNS_NAME_LABEL=aci-demo-$RANDOM` generates a random Domain Name System (DNS) identity.
120
120
* This sample assumes that you have a resource group that you can use to create a resource. Replace `<resource_group_name>` with a valid resource group associated with your subscription.
121
121
* You need to specify where you want to create the resource. Replace `<region name>` with your desired region for the web app.
122
-
* This command automatically accepts EULA.
122
+
* This command automatically accepts End User License Agreement (EULA).
123
123
124
124
From the Azure CLI, run this command to create a web app resource for the Sample Labeling tool:
125
125
@@ -145,11 +145,11 @@ az container create \
145
145
146
146
### Connect to Microsoft Entra ID for authorization
147
147
148
-
It's recommended that you connect your web app to Microsoft Entra ID. This connection ensures that only users with valid credentials can sign in and use your web app. Follow the instructions in [Configure your App Service app](../../app-service/configure-authentication-provider-aad.md) to connect to Microsoft Entra ID.
148
+
We recommend that you connect your web app to Microsoft Entra ID. This connection ensures that only users with valid credentials can sign in and use your web app. Follow the instructions in [Configure your App Service app](../../app-service/configure-authentication-provider-aad.md) to connect to Microsoft Entra ID.
149
149
150
150
## Open source on GitHub
151
151
152
-
The OCR Form Labeling Tool is also available as an open-source project on GitHub. The tool is a web application built using React + Redux, and is written in TypeScript. To learn more or contribute, see [OCR Form Labeling Tool](https://github.com/microsoft/OCR-Form-Tools/blob/master/README.md).
152
+
The Form Labeling Tool is also available as an open-source project on GitHub. The tool is a web application built using React + Redux, and is written in TypeScript. To learn more or contribute, see [Form Labeling Tool](https://github.com/microsoft/OCR-Form-Tools/blob/master/README.md).
Copy file name to clipboardExpand all lines: articles/ai-services/document-intelligence/label-tool.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
---
2
2
title: "How-to: Analyze documents, Label forms, train a model, and analyze forms with Document Intelligence (formerly Form Recognizer)"
3
3
titleSuffix: Azure AI services
4
-
description: How to use the Document Intelligence sample tool to analyze documents, invoices, receipts etc. Label and create a custom model to extract text, tables, selection marks, structure and key-value pairs from documents.
4
+
description: How to use the Document Intelligence sample tool to analyze documents, invoices, receipts etc. Label and create a custom model to extract text, tables, selection marks, structure, and key-value pairs from documents.
5
5
author: laujan
6
6
manager: nitinme
7
7
ms.service: azure-ai-document-intelligence
8
8
ms.custom:
9
9
- ignite-2023
10
10
ms.topic: how-to
11
-
ms.date: 07/18/2023
11
+
ms.date: 07/11/2024
12
12
ms.author: lajanuar
13
13
monikerRange: 'doc-intel-2.1.0'
14
14
---
@@ -158,7 +158,7 @@ When you create or open a project, the main tag editor window opens. The tag edi
158
158
159
159
Select **Run Layout on unvisited documents** on the left pane to get the text and table layout information for each document. The labeling tool draws bounding boxes around each text element.
160
160
161
-
The labeling tool also shows which tables have been automatically extracted. Select the table/grid icon on the left hand of the document to see the extracted table. In this quickstart, because the table content is automatically extracted, we don't label the table content, but rather rely on the automated extraction.
161
+
The labeling tool also shows which tables were automatically extracted. To see extracted tables, select the table/grid icon on the left hand of the document. In this quickstart, because the table content is automatically extracted, we don't label the table content, but rather rely on the automated extraction.
162
162
163
163
:::image type="content" source="media/label-tool/table-extraction.png" alt-text="Table visualization in Sample Labeling tool.":::
164
164
@@ -249,13 +249,13 @@ At times, your data might lend itself better to being labeled as a table rather
249
249
250
250
:::image type="content" source="media/label-tool/table-tag.png" alt-text="Configuring a table tag.":::
251
251
252
-
Once you've defined your table tag, tag the cell values.
252
+
Once you define your table tag, tag the cell values.
253
253
254
254
:::image type="content" source="media/table-labeling.png" alt-text="Labeling a table.":::
255
255
256
256
## Train a custom model
257
257
258
-
Choose the Train icon on the left pane to open the Training page. Then select the **Train** button to begin training the model. Once the training process completes, you see the following information:
258
+
To open the Training page, choose the Train icon on the left pane. Then select the **Train** button to begin training the model. Once the training process completes, you see the following information:
259
259
260
260
* **Model ID** - The ID of the model that was created and trained. Each training call creates a new model with its own ID. Copy this string to a secure location; you need it if you want to do prediction calls through the [REST API](~/articles/ai-services/document-intelligence/how-to-guides/use-sdk-rest-api.md?view=doc-intel-2.1.0&preserve-view=true?pivots=programming-language-rest-api&tabs=preview%2cv2-1) or [client library guide](~/articles/ai-services/document-intelligence/how-to-guides/use-sdk-rest-api.md?view=doc-intel-2.1.0&preserve-view=true).
261
261
* **Average Accuracy** - The model's average accuracy. You can improve model accuracy by adding and labeling more forms, then retraining to create a new model. We recommend starting by labeling five forms and adding more forms as needed.
@@ -264,7 +264,7 @@ Choose the Train icon on the left pane to open the Training page. Then select th
After training finishes, examine the **Average Accuracy** value. If it's low, you should add more input documents and repeat the labeling steps. The documents you've already labeled remain in the project index.
267
+
After training finishes, examine the **Average Accuracy** value. If it's low, you should add more input documents and repeat the labeling steps. The documents you already labeled remain in the project index.
268
268
269
269
> [!TIP]
270
270
> You can also run the training process with a REST API call. To learn how to do this, see [Train with labels using Python](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/python/FormRecognizer/rest/python-labeled-data.md).
@@ -282,16 +282,16 @@ With Model Compose, you can compose up to 200 models to a single model ID. When
282
282
283
283
## Analyze a form
284
284
285
-
Select the Analyze icon from the navigation bar to test your model. Select source *Local file*. Browse for a file and select a file from the sample dataset that you unzipped in the test folder. Then choose the **Run analysis** button to get key/value pairs, text and tables predictions for the form. The tool applies tags in bounding boxes and reports the confidence of each tag.
285
+
To test your model, select the `Analyze` icon from the navigation bar. Select source *Local file*. Browse for a file and select a file from the sample dataset that you unzipped in the test folder. Then choose the **Run analysis** button to get key/value pairs, text, and tables predictions for the form. The tool applies tags in bounding boxes and reports the confidence of each tag.
286
286
287
287
:::image type="content" source="media/analyze.png" alt-text="Screenshot of analyze-a-custom-form window":::
288
288
289
289
> [!TIP]
290
-
> You can also run the Analyze API with a REST call. To learn how to do this, see [Train with labels using Python](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/python/FormRecognizer/rest/python-labeled-data.md).
290
+
> You can also run the `Analyze` API with a REST call. To learn how to do this, see [Train with labels using Python](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/python/FormRecognizer/rest/python-labeled-data.md).
291
291
292
292
## Improve results
293
293
294
-
Depending on the reported accuracy, you may want to do further training to improve the model. After you've done a prediction, examine the confidence values for each of the applied tags. If the average accuracy training value is high, but the confidence scores are low (or the results are inaccurate), add the prediction file to the training set, label it, and train again.
294
+
Depending on the reported accuracy, you may want to do further training to improve the model. After you complete a prediction, examine the confidence values for each of the applied tags. If the average accuracy training value is high, but the confidence scores are low (or the results are inaccurate), add the prediction file to the training set, label it, and train again.
295
295
296
296
The reported average accuracy, confidence scores, and actual accuracy can be inconsistent when the analyzed documents differ from documents used in training. Keep in mind that some documents look similar when viewed by people but can look distinct to the AI model. For example, you might train with a form type that has two variations, where the training set consists of 20% variation A and 80% variation B. During prediction, the confidence scores for documents of variation A are likely to be lower.
297
297
@@ -313,7 +313,7 @@ Finally, go to the main page (house icon) and select **Open Cloud Project**. The
313
313
314
314
## Next steps
315
315
316
-
In this quickstart, you've learned how to use the Document Intelligence Sample Labeling tool to train a model with manually labeled data. If you'd like to build your own utility to label training data, use the REST APIs that deal with labeled data training.
316
+
In this quickstart, you learned how to use the Document Intelligence Sample Labeling tool to train a model with manually labeled data. If you'd like to build your own utility to label training data, use the REST APIs that deal with labeled data training.
317
317
318
318
> [!div class="nextstepaction"]
319
319
> [Train with labels using Python](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/python/FormRecognizer/rest/python-labeled-data.md)
0 commit comments