Skip to content

Main content

OCR Word Confidence Threshold Margin Tool

Calculate ocr word confidence threshold margin from explicit caller-supplied inputs.

Loading tool…

Description

Compare an OCR confidence with a threshold.

OCR and manuscript image measurements depend on coordinate scales, region definitions and confidence conventions. A transformed polygon or threshold comparison does not establish recognition accuracy, calibration or correct reading order.

Compare an OCR confidence with a threshold.

When to use this tool

Use OCR Word Confidence Threshold Margin when checking a supplied image-coordinate or OCR-confidence term.

How to use the tool and how it works

  1. Enter confidence, threshold, inclusive. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read margin, accepted. Inspect accepted before interpreting the associated values.

Compare an OCR confidence with a threshold. Require both in [0,1]; margin = confidence-threshold, and accepted uses >= when inclusive, otherwise >.1

Input fieldMeaning and unitsAccepted input
confidenceConfidenceRequired. Finite number; minimum 0; maximum 1.
thresholdThresholdRequired. Finite number; minimum 0; maximum 1.
inclusiveInclusiveRequired. Boolean.
Output fieldInterpretationReturned shape
marginSigned margin on the stated comparison; inspect its sign and boundary convention.Required. Finite number.
acceptedAcceptedRequired. Boolean.
json
{
  "input": {
    "confidence": 0.8,
    "threshold": 0.7,
    "inclusive": true
  },
  "output": {
    "margin": 0.10000000000000009,
    "accepted": true
  }
}

Limitations and assumptions

  • Confidence calibration, OCR accuracy and a suitable acceptance threshold are not established.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use verified image geometry, actual OCR data and suitable quality evaluation when recognition or editorial accuracy matters.

References

  1. Calculation and input contract: digital-humanities/ocr-word-confidence-threshold-margin — tool.io

Similar or alternative tools