# US 2022/0035996 A1 · Generating machine renderable representations of forms using machine learning

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0035996 A1
- Document ID: US20220035996A1
- Status: Published application
- Kind: A1
- Application number: 16/940,604
- Filed: 2020-07-28
- Published: 2022-02-03
- Earliest claimed: 2020-07-28
- Assignees: Intuit Inc.
- Applicants: Intuit Inc.
- Inventors: Vinoth Jeba Kumar Radha Krishnan; Ganesh Bhat
- Web page: https://patentgrep.com/patent/US20220035996A1

## CPC

- G06F 40/174: Form filling; Merging
- G06F 40/177: of tables; using ruled lines
- G06F 16/212: {with details for data modelling support}
- G06F 16/2264: {Multidimensional index structures}
- G06F 16/285: {Clustering or classification}
- G06F 40/131: Fragmentation of text files, e.g. creating reusable text-blocks; Linking to fragments, e.g. using XInclude; Namespaces
- G06F 40/143: Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]
- G06F 40/216: using statistical methods
- G06V 10/757: {Matching configurations of points or features}
- G06V 10/7625: {Hierarchical techniques, i.e. dividing or merging patterns to obtain a tree-like representation; Dendograms}
- G06V 30/418: Document matching, e.g. of document images
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

A method may include clustering form elements into line objects and columns of a table of a structured representation by applying a trained multi-dimensional clustering model to spatial coordinates of the form elements, and assigning a table header line type to a table header line object of the line objects based on a spatial coordinate of the table header line object relative to a spatial coordinate of a topmost table data line object of the line objects, and a determination that a number of columns of the table header line object is within a threshold of a number of columns of the topmost table data line object. The topmost table data line object may be assigned a table data line type. The method may further include presenting the structured representation to a user.

## Claims

### Claim 1

A method comprising:
clustering a plurality of form elements into a plurality of line objects and a plurality of columns of a table of a structured representation by applying a trained multi-dimensional clustering model to a plurality of spatial coordinates of the plurality of form elements;
assigning a table header line type to a table header line object of the plurality of line objects based on:
a spatial coordinate of the table header line object relative to a spatial coordinate of a topmost table data line object of the plurality of line objects, wherein the topmost table data line object is assigned a table data line type, and
a determination that a number of columns of the table header line object is within a threshold of a number of columns of the topmost table data line object; and
presenting the structured representation to a user.

### Claim 2 (depends on 1)

The method of claim 1, wherein the plurality of line objects comprises a first line object and a second line object, and wherein the plurality of form elements comprises a first form element in the first line object and a second form element in the second line object, the method further comprising:
assigning, based on applying a trained classifier to the plurality of spatial coordinates of the plurality of form elements, a same column ID to the first form element and the second form element, wherein the same column ID identifies a column of the plurality of columns.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
receiving a correction to the structured representation from the user;
modifying the structured representation by re-clustering the plurality of form elements using the correction; and
retraining the trained multi-dimensional clustering model using the correction.

### Claim 4 (depends on 3)

The method of claim 3,
wherein the correction modifies a line type of a line object in the plurality of line objects, and
wherein modifying the structured representation further comprises assigning, in the structured representation, the modified line type to the line object.

### Claim 5 (depends on 1)

The method of claim 1, further comprising
obtaining a plurality of document elements from a document; and
converting the plurality of document elements to the plurality of form elements, wherein the plurality of spatial coordinates of the plurality of form elements match a plurality of spatial coordinates describing placement of the plurality of document elements within the document.

### Claim 6 (depends on 1)

The method of claim 1, wherein applying the trained multi-dimensional clustering model to the spatial coordinates of the plurality of form elements comprises:
identifying a first form component of the plurality of form elements that corresponds to a first document element of the plurality of document elements;
identifying a second form component of the plurality of form elements that corresponds to a second document element of the plurality of document elements;
calculating a distance between the first document element and the second document element using the spatial coordinates corresponding to the first document element and the spatial coordinates corresponding to the second document element; and
in response to the distance being within a threshold distance, clustering the first form element and the second form element into a same line object of the plurality of line objects.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
assigning a table data line type to a subset of the plurality of line objects, wherein the subset comprises the topmost table data line object; and
determining at least one spatial coordinate for at least one of the plurality of line objects.

### Claim 8

A system, comprising:
a computer processor;
a data repository configured to store a structured representation comprising a plurality of line objects and a plurality of columns of a table; and
a structured representation generator, executing on the computer processor and configured to:
cluster a plurality of form elements into the plurality of line objects and the plurality of columns of the table by applying a trained multi-dimensional clustering model to a plurality of spatial coordinates of the plurality of form elements,
assign a table header line type to a table header line object of the plurality of line objects based on:
a spatial coordinate of the table header line object relative to a spatial coordinate of a topmost table data line object of the plurality of line objects, wherein the topmost table data line object is assigned a table data line type, and
a determination that a number of columns of the table header line object is within a threshold of a number of columns of the topmost table data line object, and
present the structured representation to a user.

### Claim 9 (depends on 8)

The system of claim 8, wherein the plurality of line objects comprises a first line object and a second line object, wherein the plurality of form elements comprises a first form element in the first line object and a second form element in the second line object, and wherein the structured representation generator is further configured to:
assign, based on applying a trained classifier to the plurality of spatial coordinates of the plurality of form elements, a same column ID to the first form element and the second form element, wherein the same column ID identifies a column of the plurality of columns.

### Claim 10 (depends on 8)

The system of claim 8, wherein the structured representation generator is further configured to:
receive a correction to the structured representation from the user;
modify the structured representation by re-clustering the plurality of form elements using the correction; and
retrain the trained multi-dimensional clustering model using the correction.

### Claim 11 (depends on 10)

The system of claim 10,
wherein the correction modifies a line type of a line object in the plurality of line objects, and
wherein modifying the structured representation further comprises assigning, in the structured representation, the modified line type to the line object.

### Claim 12 (depends on 9)

The system of claim 9, wherein the structured representation generator is further configured to:
obtain a plurality of document elements from a document; and
convert the plurality of document elements to the plurality of form elements, wherein the plurality of spatial coordinates of the plurality of form elements match a plurality of spatial coordinates describing placement of the plurality of document elements within the document.

### Claim 13 (depends on 8)

The system of claim 8, wherein applying the trained multi-dimensional clustering model to the spatial coordinates corresponding to the plurality of document elements comprises:
identifying a first form component of the plurality of form elements that corresponds to a first document element of the plurality of document elements;
identifying a second form component of the plurality of form elements that corresponds to a second document element of the plurality of document elements;
calculating a distance between the first document element and the second document element using the spatial coordinates corresponding to the first document element and the spatial coordinates corresponding to the second document element; and
in response to the distance being within a threshold distance, clustering the first form element and the second form element into a same line object of the plurality of line objects.

### Claim 14 (depends on 8)

The system of claim 8, wherein the structured representation generator is further configured to:
assign a table data line type to a subset of the plurality of line objects, wherein the subset comprises the topmost table data line object; and
determine at least one spatial coordinate for at least one of the plurality of line objects.

### Claim 15

A method comprising:
clustering an initial plurality of form elements into an initial plurality of line objects and an initial plurality of columns of an initial table of an initial structured representation by applying a trained multi-dimensional clustering model to an initial plurality of spatial coordinates of the initial plurality of form elements, the initial structured representation having a structured representation type;
assigning a table header line type to an initial table header line object of the initial plurality of line objects based on:
a spatial coordinate of the initial table header line object relative to a spatial coordinate of an initial topmost table data line object of the initial plurality of line objects, wherein the initial topmost table data line object is assigned a table data line type, and
a determination that a number of columns of the initial table header line object is within a threshold of a number of columns of the initial topmost table data line object;
adding the initial structured representation to a data repository;
clustering a next plurality of form elements into a next plurality of line objects and a next plurality of columns of a next table of a next structured representation by applying the trained multi-dimensional clustering model to a next plurality of spatial coordinates of the next plurality of form elements, the next structured representation having the structured representation type;
assigning the table header line type to a next table header line object of the next plurality of line objects based on:
a spatial coordinate of the next table header line object relative to a spatial coordinate of a next topmost table data line object of the next plurality of line objects, wherein the next topmost table data line object is assigned the table data line type, and
a determination that a number of columns of the next table header line object is within a threshold of a number of columns of the next topmost table data line object;
determining that the initial structured representation and the next structured representation are different; and
in response to determining that the initial structured representation and the next structured representation are different, replacing, in the data repository, the initial structured representation with the next structured representation.

### Claim 16 (depends on 15)

The method of claim 15, wherein determining that the initial structured representation and the next structured representation are different comprises:
determining that a number of columns of the initial table and a number of columns of the next table are different.

### Claim 17 (depends on 15)

The method of claim 15, wherein determining that the initial structured representation and the next structured representation are different comprises:
determining that a difference between a spatial coordinate of a column in the initial plurality of columns and a spatial coordinate of a corresponding column in the next plurality of columns exceeds a threshold.

### Claim 18 (depends on 15)

The method of claim 15, wherein determining that the initial structured representation and the next structured representation are different comprises:
determining that a number of line objects assigned the table header line type in the initial structured representation and a number of line objects assigned the table header line type in the next structured representation are different.

### Claim 19 (depends on 15)

The method of claim 15, further comprising
obtaining an initial plurality of document elements from an initial document and a next plurality of document elements from a next document;
converting the initial plurality of document elements to the initial plurality of form elements, wherein the initial plurality of spatial coordinates of the initial plurality of form elements match an initial plurality of spatial coordinates describing placement of the initial plurality of document elements within the initial document; and
converting the next plurality of document elements to the next plurality of form elements, wherein the next plurality of spatial coordinates of the next plurality of form elements match a next plurality of spatial coordinates describing placement of the next plurality of document elements within the next document.

### Claim 20 (depends on 15)

The method of claim 15, the method further comprising:
wherein the initial plurality of line objects comprises a first line object and a second line object,
wherein the initial plurality of form elements comprises a first form element in the first line object and a second form element in the second line object,
wherein the next plurality of line objects comprises a third line object and a fourth line object,
wherein the next plurality of form elements comprises a third form element in the third line object and a fourth form element in the fourth line object, and
wherein the method further comprises:
assigning, based on applying a trained classifier to the initial plurality of spatial coordinates of the initial plurality of form elements, an initial same column ID to the first form element and the second form element, wherein the initial same column ID identifies an initial column of the initial plurality of columns, and
assigning, based on applying the trained classifier to the next plurality of spatial coordinates of the next plurality of form elements, a next same column ID to the third form element and the fourth form element, wherein the next same column ID identifies a next column of the next plurality of columns.
