Patent ID: 8719700

Claim:
A computer-implemented method for generation of page templates used to layout page elements in a document without priori knowledge of a page template composition used for the document, the method comprising: receiving a document at an element labeling module; using a computer processor, identifying and labeling each page element on every page of the document; computing a set of geometric relations between the page elements co-occurring on the each page; defining a page layout for the each page including the set of the geometric relations within the each page; generating page template candidates based on the page layouts described by the geometric relations; generating a list of page template candidates, the generating the list including: comparing the candidate page templates to the page layout of each page in the document; generating a list of page templates that match page layouts within the document having a value of the geometric relations that vary no more than a predetermined amount; identifying a page template from the list of page template candidates having a highest match; removing pages in the document matching the identified page template; correcting pages in the document not matching the identified page template; repeating the identifying, removing, and correcting until the list is empty; and, outputting each identified page template to a memory.