This video demonstrates how to utilize Azure Document Intelligence services within SAS Studio without the need for coding. It covers various examples of text, forms, queries, and tables, showcasing the ease of performing OCR tasks on SAS Viya.
- No coding required for OCR in SAS Studio
- Demonstrates text, form, query, and table examples
- Easily integrates Azure AI Document Intelligence
- Prerequisites for setup are discussed
- Links to additional resources provided
Transparency Note: This summary was generated by an AI.
Example: Azure Document Intelligence
python
from azure.ai.formrecognizer import DocumentAnalysisClientfrom azure.core.credentials import AzureKeyCredential# Replace with your Azure endpoint and API keyendpoint = "https://<your-resource-name>.cognitiveservices.azure.com/"api_key = "<your-api-key>"# Initialize the clientclient = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(api_key))# Path to your PDF filefile_path = "path/to/sample.pdf"# Analyze the documentwith open(file_path, "rb") as pdf_file:poller = client.begin_analyze_document("prebuilt-document", pdf_file)result = poller.result()# Print the resultsfor page in result.pages:print(f"Page number: {page.page_number}")for line in page.lines:print(f" Line: {line.content}")for table in page.tables:print(f" Table with {len(table.cells)} cells:")for cell in table.cells:print(f" Cell text: {cell.content}")print("Document analysis complete.")