Skip to content

Conversation

@ianardee
Copy link
Collaborator

@ianardee ianardee commented Sep 17, 2025

Description

Rework confidence scores, they are now always a class rather than a string.

Added >= and <= operators to compare confidence scores.

Removed the low?, medium?, etc methods as we want users to harmonize all comparison operators.

Fixes #204

Usage:

my_field = response.inference.result.fields.get('my_field')
my_field.confidence == Mindee::Parsing::V2::Field::FieldConfidence::MEDIUM
my_field.confidence >= Mindee::Parsing::V2::Field::FieldConfidence::LOW
my_field.confidence <= Mindee::Parsing::V2::Field::FieldConfidence::HIGH

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires a change to the official Guide documentation.

@ianardee ianardee force-pushed the rework-confidence branch 2 times, most recently from 01a17bd to 12542f1 Compare September 17, 2025 12:36
@ianardee ianardee merged commit a91f86a into main Sep 17, 2025
25 checks passed
@ianardee ianardee deleted the rework-confidence branch September 17, 2025 12:50
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.

Feature Request: Add comparison methods for FieldConfidence in V2 SDK

3 participants