# US 12,216,714 B2 · Method and system of classifying documents based on layout determination

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

- Number: US 12,216,714 B2
- Document ID: US12216714B2
- Status: Granted
- Kind: B2
- Application number: 18/544,486
- Filed: 2023-12-19
- Published: 2024-12-12
- Granted: 2025-02-04
- Earliest claimed: 2023-06-09
- Assignees: L&T Technology Services Limited
- Applicants: L&T Technology Services Limited
- Inventors: Niveditha Sureshbabu; Rajesh Raj; Madhusudan Singh
- Web page: https://patentgrep.com/patent/US12216714B2

## CPC

- G06F 16/906: Clustering; Classification
- G06F 16/35: Clustering; Classification
- G06F 16/355: Creation or modification of classes or clusters
- G06F 16/93: Document management systems
- G06N 5/022: Knowledge engineering; Knowledge acquisition
- G06N 20/00: Machine learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A method and system of classifying documents is disclosed. The method includes determining line-text data for each of a plurality of lines of the document image using a text extraction technique. A set of unique keywords in the document image is determined based on a predefined list of keywords in the line-text data for each of the plurality of lines. For each keyword, two forward nodes are determined as next two subsequent keywords in the set of unique keywords based on determination of a shortest distance between the corresponding keyword and the next two subsequent keywords and based on the pre-defined reading sequence. Weights of each of the two forward nodes are determined based on the shortest distance and an angle of each of the two forward nodes with the corresponding keyword. A cluster is determined based on the feature matrix using a machine learning clustering model.

## Claims

### Claim 1

A method of classifying a document, the method comprising:
determining, by a processor, line-text data for each of a plurality of lines of the document using a text extraction technique;
determining, by the processor, a set of unique keywords in the document from a predefined list of keywords based on detection of at least one alias corresponding to each of the set of keywords in the line-text data for each of the plurality of lines,
wherein the set of unique keywords are determined in a pre-defined reading sequence of the plurality of lines of the document;
determining, by the processor, a feature matrix for the set of unique keywords by:
for each keyword in the set of unique keywords:
determining, by the processor, two forward nodes as next two subsequent keywords in the set of unique keywords based on determination of a shortest distance between position of the corresponding keyword and positions of the next two subsequent keywords and based on the pre-defined reading sequence;
determining, by the processor, weights of each of the two forward nodes based on the shortest distance and an angle of each of the two forward nodes with respect to the corresponding keyword; and
determining, by the processor, a document layout of the document by:
determining, by the processor, a cluster from a plurality of clusters based on the feature matrix using a machine learning clustering model,
wherein the each of the plurality of clusters correspond to a unique document layout from a plurality of document layouts, and
wherein the machine learning clustering model is trained based on training data comprising a plurality of documents corresponding to each of the plurality of document layouts.

### Claim 2 (depends on 1)

The method of claim 1, comprises determining a document type from a plurality of document types based on the determined set of unique keywords and the determined document layout of the document.

### Claim 3 (depends on 1)

The method of claim 1, wherein each of the plurality of document types corresponds to a predefined unique set of keywords and a pre-defined number of keywords.

### Claim 4 (depends on 1)

The method of claim 1, wherein the predefined list of keywords comprises a plurality of aliases corresponding to each of keyword, wherein each of the plurality of aliases is assigned a pre-defined search priority.

### Claim 5 (depends on 1)

The method of claim 1, wherein each keyword in the set of unique keywords is determined based on the pre-defined search priority of the at least one alias from the plurality of aliases.

### Claim 6 (depends on 1)

The method of claim 1, wherein the detection of the at least one alias in the plurality of line-text data comprises:
splitting, by the processor, the line-text data into one or more tokens based on detection of a predefined delimiter and/or an n-gram technique.

### Claim 7

A system of classifying a document, the system comprising:
a processor; and
a memory communicably coupled to the processor, wherein the memory stores processor-executable instructions, which, on execution by the processor, cause the processor to:
determine line-text data for each of a plurality of lines of the document using a text extraction technique;
determine a set of unique keywords in the document from a predefined list of keywords based on detection of at least one alias corresponding to each of the set of keywords in the line-text data for each of the plurality of lines,
wherein the set of unique keywords are determined in a pre-defined reading sequence of the plurality of lines of the document;
determine a feature matrix for the set of unique keywords by:
for each keyword in the set of unique keywords:
determine two forward nodes as next two subsequent keywords in the set of unique keywords based on determination of a shortest distance between position of the corresponding keyword and positions of the next two subsequent keywords and based on the pre-defined reading sequence; and
determine weights of each of the two forward nodes based on the shortest distance and an angle of each of the two forward nodes with respect to the corresponding keyword; and
determine a document layout of the document by:
determine a cluster from a plurality of clusters based on the feature matrix using a machine learning clustering model,
wherein the each of the plurality of clusters correspond to a unique document layout from a plurality of document layouts, and
wherein the machine learning clustering model is trained based on training data comprising a plurality of documents corresponding to each of the plurality of document layouts.

### Claim 8 (depends on 7)

The system of claim 7, wherein the processor-executable instructions cause the processor to: determine a document type from a plurality of document types based on the determined set of unique keywords and the determined document layout of the document.

### Claim 9 (depends on 7)

The system of claim 7, wherein each of the plurality of document types corresponds to a predefined unique set of keywords and a pre-defined number of keywords.

### Claim 10 (depends on 7)

The system of claim 7, wherein the predefined list of keywords comprises a plurality of aliases corresponding to each of keyword, wherein each of the plurality of aliases is assigned a pre-defined search priority.

### Claim 11 (depends on 7)

The system of claim 7, wherein each keyword in the set of unique keywords is determined based on the pre-defined search priority of the at least one alias from the plurality of aliases.

### Claim 12 (depends on 7)

The system of claim 7, wherein the processor-executable instructions cause the processor to:
detect the at least one alias in the plurality of line-text data by splitting the line-text data into one or more tokens based on detection of a predefined delimiter and/or an n-gram technique.

### Claim 13

A non-transitory computer-readable medium storing computer-executable instructions for classifying a document, the computer-executable instructions configured for:
determining line-text data for each of a plurality of lines of the document using a text extraction technique;
determining a set of unique keywords in the document from a predefined list of keywords based on detection of at least one alias corresponding to each of the set of keywords in the line-text data for each of the plurality of lines,
wherein the set of unique keywords are determined in a pre-defined reading sequence of the plurality of lines of the document;
determining a feature matrix for the set of unique keywords by:
for each keyword in the set of unique keywords:
determining two forward nodes as next two subsequent keywords in the set of unique keywords based on determination of a shortest distance between position of the corresponding keyword and positions of the next two subsequent keywords and based on the pre-defined reading sequence;
determining weights of each of the two forward nodes based on the shortest distance and an angle of each of the two forward nodes with respect to the corresponding keyword; and
determining a document layout of the document by:
determining a cluster from a plurality of clusters based on the feature matrix using a machine learning clustering model,
wherein the each of the plurality of clusters correspond to a unique document layout from a plurality of document layouts, and
wherein the machine learning clustering model is trained based on training data comprising a plurality of documents corresponding to each of the plurality of document layouts.

### Claim 14 (depends on 13)

The non-transitory computer-readable medium of claim 13, the computer-executable instructions are configured for:
determining a document type from a plurality of document types based on the determined set of unique keywords and the determined document layout of the document.

### Claim 15 (depends on 13)

The non-transitory computer-readable medium of claim 13, wherein each of the plurality of document types corresponds to a predefined unique set of keywords and a pre-defined number of keywords.

### Claim 16 (depends on 13)

The non-transitory computer-readable medium of claim 13, wherein the predefined list of keywords comprises a plurality of aliases corresponding to each of keyword, wherein each of the plurality of aliases is assigned a pre-defined search priority.

### Claim 17 (depends on 13)

The non-transitory computer-readable medium of claim 13, wherein each keyword in the set of unique keywords is determined based on the pre-defined search priority of the at least one alias from the plurality of aliases.

### Claim 18 (depends on 13)

The non-transitory computer-readable medium of claim 13, wherein the computer-executable instructions are configured to detect the at least one alias in the plurality of line-text data by:
splitting the line-text data into one or more tokens based on detection of a predefined delimiter and/or an n-gram technique.
