Skip to content

fix: make FORMULAS feature conditional in DocumentIntelligenceConverter - #1647

Closed
Hiren Thakore (thakoreh) wants to merge 1 commit into
microsoft:mainfrom
thakoreh:fix/conditional-formulas-feature
Closed

Hiren Thakore (thakoreh) wants to merge 1 commit into
microsoft:mainfrom
thakoreh:fix/conditional-formulas-feature

Conversation

@thakoreh

Copy link
Copy Markdown

Fixes #1536

The DocumentAnalysisFeature.FORMULAS was unconditionally included in the features list for Azure Document Intelligence, degrading recognition accuracy for documents without mathematical formulas.

Add enable_formulas parameter (default True for backward compatibility) to DocumentIntelligenceConverter.__init__(). When set to False, the FORMULAS feature is excluded from the analysis request.

Changes:

  • __init__(): new enable_formulas: bool = True parameter
  • _analysis_features(): conditionally includes FORMULAS based on the flag

Add enable_formulas parameter (default True) to allow disabling formula
extraction when not needed. Unconditionally enabling FORMULAS degrades
recognition accuracy for documents without mathematical formulas.

Fixes microsoft#1536
@chienyuanchang

Copy link
Copy Markdown
Member

Thanks, Hiren Thakore (@thakoreh), for opening this PR and proposing conditional formula extraction. #1913 has now merged and addresses the same use case through the more general docintel_features option. No analysis add-ons are enabled by default, and callers can explicitly opt in to formulas or other features. Your proposal is credited in the merged PR. 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