public class ResultIterator
extends PageIterator
Java interface for the ResultIterator. Does not implement all available JNI methods, but does implement enough to be useful. Comments are adapted from original Tesseract source.
public java.lang.String getUTF8Text(int level)
Returns the text string for the current object at the given level.
level - the page iterator level. See class TessBaseAPI.PageIteratorLevel.public float confidence(int level)
Returns the mean confidence of the current object at the given level. The number should be interpreted as a percent probability (0-100).
level - the page iterator level. See class TessBaseAPI.PageIteratorLevel.public boolean isAtBeginningOf(int level)
Returns true if the iterator is at the start of an object at the given level. Possible uses include determining if a call to Next(RIL_WORD) moved to the start of a RIL_PARA.
level - the page iterator level. See class TessBaseAPI.PageIteratorLevel.true if iterator points to the start of an object at the given level.public boolean isAtFinalElement(int level,
int element)
Returns whether the iterator is positioned at the last element in a given level. (e.g. the last word in a line, the last line in a block)
level - the page iterator level. See class TessBaseAPI.PageIteratorLevel.element - the page iterator level. See class TessBaseAPI.PageIteratorLevel.true if iterator points to the last element in a given level.public java.util.List<android.util.Pair> getSymbolChoicesAndConfidence()
Returns all possible matching text strings and their confidence level for the current object.
The default matching text is blank (""). The default confidence level is zero (0.0)
public void delete()
Deletes the iterator after use