Skip to content

fix: make FORMULAS feature conditional in DocumentIntelligenceConverter#1647

Open
thakoreh wants to merge 1 commit intomicrosoft:mainfrom
thakoreh:fix/conditional-formulas-feature
Open

fix: make FORMULAS feature conditional in DocumentIntelligenceConverter#1647
thakoreh wants to merge 1 commit intomicrosoft: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
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

1 participant