Patent ID: 7752538

Claim:
A storage medium storing software that is executable on a computer or digital device to perform a method for determining a table structure, the method comprising: deriving a spatially ordered sequence of rectangular cells disposed in a two-dimensional region; and parsing the spatially ordered sequence of rectangular cells in accordance with a two-dimensional structural grammar having terminal elements corresponding to cells and non-terminal elements corresponding to structural relationship operators, the parsing producing a grammatical expression with the cells represented by terminal elements and structural relationships represented by non-terminal elements, wherein the grammatical expression is a table structure comprising a tree in which the cells are represented by leaf nodes of the tree and the structural relationships are represented by non-leaf nodes of the tree, and the parsing includes: determining a table structure respective to a first two cells of a spatially ordered sequence of rectangular cells, the table structure including elements indicative of the first two cells and at least one element indicative of a structural relationship between the first two cells, defining a minimum rectangular bounding box containing the cells of the table structure, updating the table structure with additional structure including an element indicative of a next cell of the spatially ordered sequence of rectangular cells added as a leaf node and at least one element indicative of a structural relationship between the next cell and the minimum rectangular bounding box added as a non-leaf node, and repeating the defining and updating until the cells of the ordered sequence of rectangular cells are exhausted.