Patent ID: 6871319

Claim:
A computer-implemented method for determining an optimal uniform body pattern for a table in an electronic document, wherein the table comprises a plurality of rows and a plurality of columns, the method comprising the steps of: determining a majority cell style for the table; determining the number of odd cells in the table, wherein an odd cell comprises a cell that does not match the majority cell style; saving the number of odd cells as a first count; assuming a special row and/or column, wherein a special row or column comprises a row or column comprising cells with cell styles not matching the majority cell style, determining the following: (a) determining a majority cell style for the table excluding cells in the rows and/or columns that are assumed special; (b) determining the number of odd cells in the table excluding cells in the rows and/or columns assumed to be special, wherein an odd cell comprises a cell that does not match the majority cell style, and saving the number of odd cells as a second count; (c) for each row assumed to be special, determining a row majority cell style, determining a number of odd cells in the special row and adding the number to the second count; (d) for each column assumed to be special, determining a column majority cell style, determining a number of odd cells in the special column and adding the number to the second count; (e) for each corner cell, determining whether the row and column of the corner cell were both assumed to be special and, if so, then subtracting one from the second count; (f) saving the second count in association with an indication of the assumed special row and/or column; (g) repeating steps (a)-(f) for each combination of special row and/or column and determining which assumption has the lowest second count; and determining between the first count and second count which is lowest and saving the assumed body pattern associated with the lowest count as the optimal uniform body pattern for the table.