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
title: Document Processing with Azure Cognitive Services
3
-
description: Enabling document processing with Azure Cognitive Services
3
+
description: Enabling document processing with Azure Cognitive Services.
4
4
ms.date: 02/26/2024
5
5
ms.localizationpriority: high
6
6
---
@@ -15,90 +15,89 @@ You have already learned how to use webhooks with [the application](/training/mo
15
15
16
16
To set up automatic AI processing with your current SharePoint application upon a change in your container, you need to follow [Using Webhooks](./using-webhooks.md) and then:
17
17
18
-
1.Get the delta changes of the container. You are currently able to get the notification whenever there is any change in our container and will now get the files that are added or updated.
19
-
1.Call Azure Cognitive Services’s Document Intelligence service API. You will need to create an Azure AI resource to use the API to extract the fields from an image and get the extracted files. You may store them as shown in this tutorial or you may process them as you like.
18
+
1.Get the delta changes of the container. You're currently able to get the notification whenever there's any change in our container and will now get the files that are added or updated.
19
+
1.Call Azure Cognitive Services’s Document Intelligence service API. You'll need to create an Azure AI resource to use the API to extract the fields from an image and get the extracted files. You might store them as shown in this tutorial or you might process them as you like.
> To learn more about the Graph APIs used in this tutorial, see [Track changes for a Drive](/graph/api/driveitem-delta), [Get a DriveItem resource](/graph/api/driveitem-get), and [Upload or replace the contents of a DriveItem](/graph/api/driveitem-put-content).
24
-
23
+
> To learn more about the Microsoft Graph APIs used in this tutorial, see [Track changes for a Drive](/graph/api/driveitem-delta), [Get a DriveItem resource](/graph/api/driveitem-get), and [Upload or replace the contents of a DriveItem](/graph/api/driveitem-put-content).
25
24
26
25
## Get the delta changes of a container
27
26
28
27
Open **GraphProvider.ts** and implement the method `getDriveChanges` to get the list of changed items.
At this point if you restart the app along with tunneling and subscription, you should see the recently added/updated files listed in the console.
98
97
99
98
## Call Azure Cognitive Services' Document Intelligence service API
100
99
101
-
To use the Azure Cognitive Services Document Intelligence APIs, you need to create a Multi-Service or Document Intelligence resource for Azure AI Service. Follow the tutorials below to create the resource:
100
+
To use the Azure Cognitive Services Document Intelligence APIs, you need to create a Multi-Service or Document Intelligence resource for Azure AI Service. Refer to the following tutorials to create the resource:
102
101
103
102
-[Quickstart: Create a multi-service resource for Azure AI services](/azure/ai-services/multi-service-resource?tabs=windows&pivots=azportal)
104
103
-[Get started with Document Intelligence](/azure/ai-services/document-intelligence/quickstarts/get-started-sdks-rest-api?view=doc-intel-3.1.0&viewFallbackFrom=form-recog-3.0.0&preserve-view=true&pivots=programming-language-javascript)
@@ -107,74 +106,74 @@ After this step, you should have an endpoint and a key ready to use.
107
106
108
107
Now open **ReceiptProcessor.ts** to create method `dac` to store the Azure Cognitive Services credentials.
Create method `analyzeReceiptStream` to get the OCR fields through Azure Cognitive Services processing. Here we are taking the `prebuilt-invoice` model, but other models can be chosen.
134
+
Create method `analyzeReceiptStream` to get the OCR fields through Azure Cognitive Services processing. Here we're taking the `prebuilt-invoice` model, but other models can be chosen.
Now, restart the demo app and setup the tunneling using ngrok and delta change subscription on the container again.
177
+
Now, restart the demo app and set up the tunneling using ngrok and delta change subscription on the container again.
178
+
180
179
If you add/update any file (supported formats: 'JPEG', 'JPG', 'PNG', 'BMP', 'TIFF', 'PDF') in this container, you should see a new JSON file created and containing the fields extracted from the file.
0 commit comments