Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Classifier ¶
type Classifier struct {
// contains filtered or unexported fields
}
Classifier is object that classifies the table
func NewClassifier ¶
func NewClassifier(logger logutil.Logger) *Classifier
func (*Classifier) Classify ¶
func (c *Classifier) Classify(t *html.Node) (Type, Reason)
Classify classifies a <table> element as layout or data type, based on the set of heuristics at http://asurkov.blogspot.com/2011/10/data-vs-layout-table.html, with some modifications to suit our distillation needs.
type Reason ¶
type Reason uint
const ( Unknown Reason = iota InsideEditableArea RoleTable RoleDescendant Datatable0 CaptionTheadTfootColgroupColTh AbbrHeadersScope OnlyHasAbbr More95PercentDocWidth Summary NestedTable LessEq1Row LessEq1Col MoreEq5Cols CellsHaveBorder DifferentlyColoredRows MoreEq20Rows LessEq10Cells EmbedObjectAppletIframe More90PercentDocHeight Default )
Click to show internal directories.
Click to hide internal directories.