Documentation ¶
Index ¶
Constants ¶
View Source
const ( ClassPage = "ocr_page" ClassArea = "ocr_carea" ClassLine = "ocr_line" ClassWord = "ocrx_word" )
Possible classes for elements
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Element ¶
type Element struct { Class string Node xml.StartElement }
Element is used to represent text elements in the hOCR document.
func (Element) Attribute ¶
Attribute returns the attribute's value for a given key and if the attribute was found.
func (Element) BoundingBox ¶
BoundingBox returns the bounding box of the element. If the element does not have a bounding box, the empty boundingbox (0,0)-(0,0) is returned.
type Node ¶
type Node interface{}
Node represents hOCR nodes returned by the scanner. A Node is either of type Text, Element, Title or Meta.
Click to show internal directories.
Click to hide internal directories.