Class ChoiceIterator
Inheritance
System.Object
ChoiceIterator
Implements
System.IDisposable
Assembly: IronOcr.dll
Syntax
public sealed class ChoiceIterator : DisposableBase
Walking the alternative recognition guesses Tesseract considered for one symbol runs through ChoiceIterator. For a single character position, the engine often weighs several candidate readings, and this iterator steps through them so low-level code can inspect each guess and its confidence instead of accepting only the top result.
A ChoiceIterator is obtained from the engine while reading, not constructed directly, and it is positioned at one symbol's set of choices. GetText returns the current candidate string and GetConfidence returns its score, while Next advances to the following choice and reports whether one exists. Because the type is sealed and derives from DisposableBase, it holds a native handle, so call Dispose (or wrap it in a using) once the choices have been read. This sits in the deep interop layer beneath IronOCR's reading API; the high-level result classes cover ordinary text and confidence needs, and ChoiceIterator is for code that genuinely needs the per-symbol alternatives.
The result confidence how-to explains how IronOCR surfaces confidence scores, and the read results how-to walks through the standard result model.
Methods
Dispose(Boolean)
Declaration
public override void Dispose(bool disposing)
Parameters
| Type |
Name |
Description |
| System.Boolean |
disposing |
|
Overrides
GetConfidence()
Declaration
public float GetConfidence()
Returns
| Type |
Description |
| System.Single |
|
GetText()
Declaration
Returns
| Type |
Description |
| System.String |
|
Next()
Declaration
Returns
| Type |
Description |
| System.Boolean |
|
Implements
System.IDisposable