Search Results for

    Show / Hide Table of Contents

    Class OcrResult.Choice

    Inheritance
    System.Object
    OcrResult.Choice
    Namespace: IronOcr
    Assembly: IronOcr.dll
    Syntax
    public class Choice : Object

    OcrResult.Choice is one alternative reading the engine considered for a character, paired with how likely it judged that reading to be. It is what you inspect when the top result for a glyph looks wrong and you want to see the runner-up candidates instead of accepting a single guess, which is useful for correction passes and for flagging low-confidence text.

    You receive choices from the Choices array on an OcrResult.Character, reached by walking an OcrResult returned from IronTesseract.Read. Each choice exposes just two members: Text, the candidate string for that reading, and Confidence, its statistical confidence as a percentage. The array is ordered so the engine's preferred reading comes first, with weaker alternatives following.

    To use it, read a character's Choices, then compare the Confidence values to decide whether the primary reading is trustworthy or whether an alternative is worth substituting. Choices are most informative on noisy or low-quality input where the engine is genuinely uncertain.

    The working with OCR results how-to covers reading per-character detail, and the result confidence how-to explains using confidence values.

    Constructors

    Choice()

    Declaration
    public Choice()

    Fields

    Confidence

    Statistical Confidence as a percentage.

    Declaration
    public double Confidence
    Field Value
    Type Description
    System.Double

    Text

    The text for this word choice.

    Declaration
    public string Text
    Field Value
    Type Description
    System.String
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget