Skip to content

fix: remove FORMULAS from default Document Intelligence features (fixes #1536) - #1975

Closed
hanhan761 wants to merge 2 commits into
microsoft:mainfrom
hanhan761:fix-1536-remove-default-formulas
Closed

hanhan761 wants to merge 2 commits into
microsoft:mainfrom
hanhan761:fix-1536-remove-default-formulas

Conversation

@hanhan761

Copy link
Copy Markdown
Contributor

Summary

Removes DocumentAnalysisFeature.FORMULAS from the default analysis features in DocumentIntelligenceConverter. Formula extraction degrades recognition accuracy for documents without mathematical formulas and was previously impossible to disable.

Issue

Closes #1536

Change

Deleted one line in _doc_intel_converter.py:232:

 return [
-    DocumentAnalysisFeature.FORMULAS,
     DocumentAnalysisFeature.OCR_HIGH_RESOLUTION,
     DocumentAnalysisFeature.STYLE_FONT,
 ]

Edge Cases Not Covered

  • Users who need formula extraction can still enable it by passing a custom features list via kwargs to convert() — but that path is not currently exposed as a constructor parameter. This fix only changes the default behavior.

Verification

Tested with mocked Azure dependencies (the converter requires azure-ai-documentintelligence):

PDF features OK: {'OCR_HIGH_RESOLUTION', 'STYLE_FONT'}
Office docs empty features: OK

hanhan761 added 2 commits May 30, 2026 16:01
Closes microsoft#1536

DocumentAnalysisFeature.FORMULAS is unconditionally included in the
analysis features, which degrades recognition accuracy for documents
without mathematical formulas. Users had no way to disable it.

Remove FORMULAS from the default feature list. Users who need formula
extraction can still enable it by passing features via kwargs.
@chienyuanchang

Copy link
Copy Markdown
Member

Thanks, hanhan761, for opening this PR and proposing a fix for the formula extraction behavior. #1913 has now merged and resolves the concern from #1536. The final implementation goes further by enabling no paid analysis add-ons by default; formula extraction and other add-ons now require explicit opt-in. Closing this PR as superseded by #1913.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FORMULAS feature is unconditionally set in Azure Document Intelligence converter

2 participants