Patent ID: 8176414

Claim:
A method for formatting an electronic document for display on an electronic device, comprising: receiving a first electronic document; determining a first information gain value associated with a first line that divides the first electronic document into a first portion and second portion, including by determining a difference between an entropy value associated with the first line and an entropy value associated with the first electronic document; determining a second information gain value associated with a second line that divides the first electronic document into a third portion and fourth portion, including by determining a difference between an entropy value associated with the second line and the entropy value associated with the first electronic document, wherein each of the entropy value associated with the first line, the entropy value associated with the second line, and the entropy value associated with the first electronic document is determined based at least in part on document objects in the portions created by the first Zinc, the second line, and the first electronic document, respectively; determining which of the first information gain value and second information gain value is greater; in response to determining that the first information gain value is greater, using the first information gain value to recursively divide the portions defined by the first line and defining a second electronic document that includes at least a portion defined by the first line; in response to determining that the second information gain value is greater, using the second information gain value to recursively divide the portions defined by the second line and defining a third electronic document that includes at least a portion defined by the second line; defining a document object model tree based at least in part on parsing the document objects; calculating a depth of a document object for particular pixels intersected by each of the first line and the second line; and wherein each of the first information gain value and the second information gain value is calculated as a difference between an information value of the first document before the first document is divided, and an information value for each portion of the first document after the first document is divided, and wherein each of the first information gain value and the second information gain value is determined as a function of an amount of document objects in a specified portion of the first document.