Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import Any, Union
import re

# Azure imports
from azure.ai.documentintelligence import DocumentIntelligenceClient
Expand Down Expand Up @@ -36,6 +37,7 @@ def __init__(
api_version=self.api_version,
credential=DefaultAzureCredential(),
)
self._priority = priority

def convert(
self, local_path: str, **kwargs: Any
Expand All @@ -62,8 +64,8 @@ def convert(
with open(local_path, "rb") as f:
file_bytes = f.read()

# Certain document analysis features are not availiable for filetypes (.xlsx, .pptx, .html)
if extension.lower() in [".xlsx", ".pptx", ".html"]:
# Certain document analysis features are not availiable for office filetypes (.xlsx, .pptx, .html, .docx)
if extension.lower() in [".xlsx", ".pptx", ".html", ".docx"]:
analysis_features = []
else:
analysis_features = [
Expand Down