# US 2019/0102617 A1 · System and method of training a classifier for determining the category of a document

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

- Number: US 2019/0102617 A1
- Document ID: US20190102617A1
- Status: Published application
- Kind: A1
- Application number: 15/958,431
- Filed: 2018-04-20
- Published: 2019-04-04
- Earliest claimed: 2017-09-29
- Assignees: AO Kaspersky Lab
- Applicants: AO Kaspersky Lab
- Inventors: Dmitry S. DOROGOY; Alexander V. SHAROV; Alexander A. TUZOVSKY; Ilya A. TERESHCHENKO
- Web page: https://patentgrep.com/patent/US20190102617A1

## CPC

- G06V 30/19147: {Obtaining sets of training patterns; Bootstrap methods, e.g. bagging or boosting}
- G06F 18/214: Generating training patterns; Bootstrap methods, e.g. bagging or boosting
- G06F 18/24147: {Distances to closest patterns, e.g. nearest neighbour classification}
- G06V 30/413: Classification of content, e.g. text, photographs or tables
- G06V 30/414: Extracting the geometrical structure, e.g. layout tree; Block segmentation, e.g. bounding boxes for graphics or text
- G06V 30/416: Extracting the logical structure, e.g. chapters, sections or page numbers; Identifying elements of the document, e.g. authors
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present disclosure is directed to methods and systems for training a classifier for determining the category of a document. In an exemplary aspect, a method comprises obtaining one or more documents belonging to a first category as a training sample for a classifier, determining objects contained in each of the one or more documents, forming, by a hardware processor, a set of features consisting of the objects, constructing the classifier by selecting a classification model and training the classifier based on the set of features, obtaining additional documents belonging to the first category, calculating an error of classification of the additional documents using the classifier and when the error exceeds a given value, obtaining a second set of documents belonging to the first category or one or more new categories, otherwise, determining that the classifier is complete.

## Claims

### Claim 1

A method for training a classifier for determining the category of a document, comprising:
obtaining, by a hardware processor, one or more documents belonging to a first category as a training sample for a classifier;
determining, by a hardware processor, objects contained in each of the one or more documents;
forming, by a hardware processor, a set of features consisting of the objects;
constructing, by a hardware processor, the classifier by selecting a classification model and training the classifier based on the set of features;
obtaining additional documents belonging to the first category;
calculating an error of classification of the additional documents using the classifier; and
when the error exceeds a given value, obtaining a second set of documents belonging to the first category or one or more new categories; otherwise,
determining that the classifier is complete.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
repeating the previous steps for each new category.

### Claim 3 (depends on 1)

The method of claim 1, wherein the error of classification comprises a probability of an incorrect classification of the one or more documents.

### Claim 4 (depends on 1)

The method of claim 1, wherein the objects comprise one or more of graphic and/or text elements.

### Claim 5 (depends on 4)

The method of claim 4, wherein the one or more graphic and/or text elements comprise one or more of:
an image of a person's face, frames of a photograph of a face, a seal and/or flag of a country, a stamp, a logotype, or the entire document.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
performing preliminary processing on the one or more documents, the preliminary processing comprising one or more of:
decomposing a file into each of the one or more documents; and
correcting distortions detected in the one or more documents.

### Claim 7 (depends on 1)

The method of claim 1, wherein the set of features comprise one or more of:
presence of an object in each of the one or more documents, location of the object, quantity of the object, relationship between objects in a document, dimensions of the object, angle of inclination of the object, presence of a distortion of the object.

### Claim 8 (depends on 7)

The method of claim 7, wherein the set of features further comprise one or more of:
a histogram of colors of the object, metadata of the object, a group of objects unified by a particular feature, a number of identical objects, conformity of the histogram of colors of an object to a specified pattern, conformity of a specified combination of objects to a pattern of mutual arrangement, a Fourier transform of the histogram of colors of the object, and type of distortions in the image of the object.

### Claim 9

A system for training a classifier for determining the category of a document, comprising:
an analysis module configured to:
obtain one or more documents belonging to a first category as a training sample for a classifier; and
determine objects contained in each of the one or more documents;
a feature forming module configured to form a set of features consisting of the objects;
a classifier construction module configured to construct the classifier by selecting a classification model and training the classifier based on the set of features; and
wherein the analysis module is further configured to:
obtain additional documents belonging to the first category;
calculate an error of classification of the additional documents using the classifier; and
when the error exceeds a given value, obtain a second set of documents belonging to the first category or one or more new categories; otherwise,
determine that the classifier is complete.

### Claim 10 (depends on 9)

The system of claim 9, wherein each module repeats configuration for each new category.

### Claim 11 (depends on 9)

The system of claim 9, wherein the error of classification comprises a probability of an incorrect classification of the one or more documents.

### Claim 12 (depends on 9)

The system of claim 9, wherein the objects comprise one or more of graphic and/or text elements.

### Claim 13 (depends on 12)

The system of claim 12, wherein the one or more graphic and/or text elements comprise one or more of:
an image of a person's face, frames of a photograph of a face, a seal and/or flag of a country, a stamp, a logotype, or the entire document.

### Claim 14 (depends on 9)

The system of claim 9, further comprises a processing module configured to:
perform preliminary processing on the one or more documents, the preliminary processing comprising one or more of:
decomposing a file into each of the one or more documents; and
correcting distortions detected in the one or more documents.

### Claim 15 (depends on 9)

The system of claim 9, wherein the set of features comprise one or more of:
presence of an object in each of the one or more documents, location of the object, quantity of the object, relationship between objects in a document, dimensions of the object, angle of inclination of the object, presence of a distortion of the object.

### Claim 16 (depends on 15)

The system of claim 15, wherein the set of features further comprise one or more of:
a histogram of colors of the object, metadata of the object, a group of objects unified by a particular feature, a number of identical objects, conformity of the histogram of colors of an object to a specified pattern, conformity of a specified combination of objects to a pattern of mutual arrangement, a Fourier transform of the histogram of colors of the object, and type of distortions in the image of the object.

### Claim 17

A non-transitory computer-readable medium storing thereon computer executable instructions that when executed perform a method for training a classifier for determining the category of a document, the method comprising:
obtaining, by a hardware processor, one or more documents belonging to a first category as a training sample for a classifier;
determining, by a hardware processor, objects contained in each of the one or more documents;
forming, by a hardware processor, a set of features consisting of the objects;
constructing, by a hardware processor, the classifier by selecting a classification model and training the classifier based on the set of features;
obtaining additional documents belonging to the first category;
calculating an error of classification of the additional documents using the classifier; and
when the error exceeds a given value, obtaining a second set of documents belonging to the first category or one or more new categories; otherwise,
determining that the classifier is complete.

### Claim 18 (depends on 17)

The medium of claim 17, the instructions further comprising:
repeating the previous steps for each new category.

### Claim 19 (depends on 17)

The medium of claim 17, wherein the error of classification comprises a probability of an incorrect classification of the one or more documents.

### Claim 20 (depends on 17)

The medium of claim 17, wherein the objects comprise one or more of graphic and/or text elements.
