Patent ID: 11868387
Assignee: TATA CONSULTANCY SERVICES LIMITED
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
1. A processor implemented method for table structure recognition to generate digital representation of a table, the method comprising:
receiving, via one or more hardware processors, an image of the table;
identifying, via the one or more hardware processors, a plurality of words in the table by marking a plurality of bounding boxes defined by bounding box coordinates corresponding to the plurality of words, by using a text region bounding box technique;
generating, via the one or more hardware processors, a plurality of word pairs for each word among the plurality of words by pairing each word with one or more words among the plurality of words, wherein generating the plurality of word pairs comprising:
pairing each word with a first set of words comprising a first predefined number of immediate top neighbors of each word, wherein the first set of words are marked by a corresponding first set of bounding boxes from among the plurality of bounding boxes;
pairing each word with a second set of words comprising a second predefined number of immediate left neighbors of each word, wherein the second set of words are marked by a corresponding second set of bounding boxes from among the plurality of bounding boxes;
merging, for each word, the paired first set of words and the paired second set of words to generate a merged word pair list; and
eliminating redundant pairs from the merged word pair list to generate the plurality of word pairs, wherein elimination is based on overlapping of the bounding box coordinates of the marked plurality of bounding boxes;
generating, via the one or more hardware processors a plurality of highlighted images from the image by highlighting bounding boxes of a word pair from among the plurality of word pairs corresponding to each word with same color;

analyzing, via the one or more hardware processors, the plurality of highlighted images by a classifier trained to determine word association by identifying each word pair in each of the plurality of highlighted images into a class among a plurality of classes comprising a) a same row class, b) a same column class, c) a same cell class, and d) an unrelated class;
determining, via the one or more hardware processors, a plurality of cells of the table by processing each word pair of the plurality of word pairs of each word and a corresponding class of each word pair identified from among the plurality of classes, wherein words within each word pair are grouped together as a single cell if the identified class for corresponding word pair is the same cell class, and the words within each word pair are identified to be in standalone cells if the identified class is other than the same cell class; and
generating, via the one or more hardware processors, the digital representation of the table in the image using the determined plurality of cells by:
creating a first directed graph comprising one or more cells from the plurality of cells that comprise word pairs among the plurality of word pairs that are identified into the same row class, wherein the one or more cells are nodes of the first directed graph and a connecting edge between the one or more cells indicating the one or more cells are in a same row;
creating a second directed graph comprising one or more cells from the plurality of cells that comprise word pairs among the plurality of word pairs that are identified into the same column class, wherein the one or more cells are nodes of the second directed graph and a connecting edge between the one or more cells indicating the one or more cells are in a same column; and
applying, to the first directed graph and the second directed graph, cell spanning, matrix generation and tagging to generate the digital representation of the table.