A hierarchical representation of texts.
A Text contains a list
of Text.TextBlock,
and a Text.TextBlock
contains a list of Text.Line which
is composed of a list of Text.Element.
| class | Text.Element | Roughly equivalent to a space-separated "word" in most Latin languages, or a character in others. | |
| class | Text.Line | Represents a line of text. | |
| class | Text.TextBlock | A block of text (think of it as a paragraph) as deemed by the OCR engine. | |
| String |
getText()
Retrieves all the recognized text in the image.
|
| List<Text.TextBlock> |
getTextBlocks()
Gets an unmodifiable list of
Text.TextBlock,
which is a block of text and can be further decomposed to a list of
Text.Line.
|
Retrieves all the recognized text in the image. It concatenates text strings from
underlying Text.TextBlocks
separated by '\n'.
Returns an empty string if nothing is found.
Gets an unmodifiable list of Text.TextBlock,
which is a block of text and can be further decomposed to a list of Text.Line.
The recognized text is in reading order for the language. For Latin, this is top to
bottom within a Text.TextBlock,
and left-to-right within a Text.Line.
Returns an empty list if nothing is found.