JP7322468B2 - Information processing device, information processing method and program - Google Patents

Information processing device, information processing method and program Download PDF

Info

Publication number
JP7322468B2
JP7322468B2 JP2019067501A JP2019067501A JP7322468B2 JP 7322468 B2 JP7322468 B2 JP 7322468B2 JP 2019067501 A JP2019067501 A JP 2019067501A JP 2019067501 A JP2019067501 A JP 2019067501A JP 7322468 B2 JP7322468 B2 JP 7322468B2
Authority
JP
Japan
Prior art keywords
character
sentence
image
image data
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2019067501A
Other languages
Japanese (ja)
Other versions
JP2020166658A (en
Inventor
遥 前田
和久 大野
聡 田端
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2019067501A priority Critical patent/JP7322468B2/en
Publication of JP2020166658A publication Critical patent/JP2020166658A/en
Application granted granted Critical
Publication of JP7322468B2 publication Critical patent/JP7322468B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、情報処理装置、情報処理方法及びプログラムに関する。 The present invention relates to an information processing device, an information processing method, and a program.

OCR(Optical Character Recognition)等の手段を用いて文書等の画像データから文字を認識し、認識した文字から文書等の誤りを検出する技術がある。例えば特許文献1では、校閲対象の原稿画像をOCR処理でテキストデータに変換し、変換したテキストデータから、原稿内の誤り表記と、誤り表記を修正した正規表記とを検出して、誤り表記及び正規表記を原稿画像に合成した校閲結果画像を生成する画像処理装置等が開示されている。 There is a technique of recognizing characters from image data of a document or the like using means such as OCR (Optical Character Recognition) and detecting errors in the document or the like from the recognized characters. For example, in Patent Document 1, an image of a document to be reviewed is converted into text data by OCR processing, and from the converted text data, erroneous notation in the manuscript and regular notation that corrects the erroneous notation are detected, and erroneous notation and An image processing apparatus and the like that generate a proofreading result image by synthesizing a regular notation with a document image have been disclosed.

特開2018-67159号公報JP 2018-67159 A

しかしながら、特許文献1に係る発明は元々の原稿の誤りを検出するのみで、画像データから文字を認識する際の誤認識も含めて誤りを検出するに至っていない。 However, the invention according to Patent Document 1 only detects errors in the original document, and does not detect errors including erroneous recognition when recognizing characters from image data.

一つの側面では、画像データから認識した文字の誤りを検出又は補正することができる情報処理装置等を提供することを目的とする。 An object of one aspect of the present invention is to provide an information processing apparatus or the like capable of detecting or correcting an error in characters recognized from image data.

一つの側面に係る情報処理装置は、文字画像を含む画像データを取得する取得部と、前記文字画像に対応する文字及び座標を認識する認識部と、前記画像データを構成する各要素を識別する際のルールを規定する構造化テーブルを参照、又は前記画像データを構成する各要素を識別する構造識別器を用いて、前記文字を含む前記画像データの各要素の構造を特定する特定部と、特定した構造に基づき、前記文字の誤りを検出、又は誤りである前記文字を補正する文字処理部とを備え、前記文字処理部は、文章群に含まれる文章のうちで正解の文章と、該正解の文章に対応する文章であって誤りの文字を含む文章とを学習済みの識別器を用いて、前記文字の誤りを検出又は補正することを特徴とする。 An information processing apparatus according to one aspect includes an acquisition unit that acquires image data including a character image, a recognition unit that recognizes characters and coordinates corresponding to the character image, and identifies each element that constitutes the image data. an identifying unit that identifies the structure of each element of the image data including the character by referring to a structured table that defines rules for processing or using a structure identifier that identifies each element that constitutes the image data; a character processing unit that detects an error in the character or corrects the erroneous character based on the identified structure , wherein the character processing unit detects a correct sentence among the sentences included in the sentence group and the correct sentence; The method is characterized by detecting or correcting an error in a character by using a classifier that has already learned a sentence corresponding to a correct sentence and including an erroneous character.

一つの側面では、画像データから認識した文字の誤りを検出又は補正することができる。 In one aspect, character errors recognized from image data can be detected or corrected.

文書処理システムの構成例を示す模式図である。1 is a schematic diagram showing a configuration example of a document processing system; FIG. サーバの構成例を示すブロック図である。It is a block diagram which shows the structural example of a server. 文字認識処理に関する説明図である。FIG. 10 is an explanatory diagram relating to character recognition processing; 構造化データ及び非構造化データの比較例を示す説明図である。FIG. 4 is an explanatory diagram showing a comparative example of structured data and unstructured data; 構造化処理に関する説明図である。FIG. 10 is an explanatory diagram relating to structuring processing; 正順序モデル及び逆順序モデルに関する説明図である。FIG. 4 is an explanatory diagram of a forward order model and a reverse order model; 誤り補正モデルに関する説明図である。FIG. 4 is an explanatory diagram relating to an error correction model; 正順序モデル及び逆順序モデルの生成処理の手順を示すフローチャートである。FIG. 10 is a flow chart showing a procedure of generation processing of a forward-order model and a reverse-order model; FIG. 誤り補正モデルの生成処理の手順を示すフローチャートである。4 is a flow chart showing the procedure of generation processing of an error correction model; 誤り検出処理の手順を示すフローチャートである。4 is a flowchart showing the procedure of error detection processing; 実施の形態2に係るサーバの構成例を示すブロック図である。FIG. 8 is a block diagram showing a configuration example of a server according to Embodiment 2; 構造化モデルに関する説明図である。FIG. 4 is an explanatory diagram of a structured model; 構造化モデルの生成処理の手順を示すフローチャートである。4 is a flow chart showing the procedure of a structured model generation process; 上述した形態のサーバの動作を示す機能ブロック図である。It is a functional block diagram which shows operation|movement of the server of the form mentioned above.

以下、本発明をその実施の形態を示す図面に基づいて詳述する。
(実施の形態1)
図1は、文書処理システムの構成例を示す模式図である。本実施の形態では、文書画像(画像データ)から文書内の文字を認識し、認識した文字の誤りを検出して正しい文字に補正する文書処理システムについて説明する。文書処理システムは、情報処理装置1及び端末2を含む。各装置は、インターネット等のネットワークNを介して相互に通信接続されている。
Hereinafter, the present invention will be described in detail based on the drawings showing its embodiments.
(Embodiment 1)
FIG. 1 is a schematic diagram showing a configuration example of a document processing system. In this embodiment, a document processing system that recognizes characters in a document from a document image (image data), detects errors in the recognized characters, and corrects the characters to correct characters will be described. The document processing system includes an information processing device 1 and a terminal 2 . Each device is interconnected for communication via a network N such as the Internet.

なお、本実施の形態では処理対象とする画像データが「文書」に係る画像であるものとするが、本システムでは文字画像を含む画像データから文字を認識し、認識した文字の誤りを検出又は補正可能であればよく、処理対象とする画像データは文書画像に限定されない。例えばイラスト、写真等を処理対象としてもよい。また、画像データに含まれる文字画像は印刷文字に限定されず、例えば手書きで記入された文字などであってもよい。 In this embodiment, the image data to be processed is an image related to a "document". In this system, characters are recognized from image data including character images, and errors in the recognized characters are detected or detected. The image data to be processed is not limited to document images as long as it can be corrected. For example, an illustration, a photograph, or the like may be processed. Further, the character image included in the image data is not limited to printed characters, and may be, for example, handwritten characters.

情報処理装置1は、種々の情報処理、情報の送受信を行う装置であり、例えばサーバ装置、パーソナルコンピュータ等である。本実施の形態において情報処理装置1はサーバ装置であるものとし、以下では簡潔のためサーバ1と読み替える。サーバ1は、テキストデータ(文字コード等)が付与されていない文書画像(例えば文書をスキャナで読み取ったPDFファイル)から、OCR等の手段で文書内の文字を認識し、認識した文字の誤りを検出、補正する。 The information processing device 1 is a device that performs various types of information processing and transmission/reception of information, and is, for example, a server device, a personal computer, or the like. In the present embodiment, the information processing device 1 is assumed to be a server device, and is replaced with the server 1 below for the sake of simplicity. The server 1 recognizes characters in the document by means of OCR or the like from a document image (for example, a PDF file obtained by scanning the document with a scanner) to which text data (character code, etc.) is not attached, and corrects errors in the recognized characters. Detect and correct.

端末2は、サーバ1に接続されたクライアント端末であり、例えばパーソナルコンピュータ等である。例えばサーバ1は、ネットワークNを介して端末2から文書画像を取得し、取得した文書画像を対象として後述の処理を行う。 The terminal 2 is a client terminal connected to the server 1, such as a personal computer. For example, the server 1 acquires a document image from the terminal 2 via the network N, and performs processing described later on the acquired document image.

なお、本実施の形態ではクラウド上のサーバ1が処理を行うものとして説明するが、ローカル装置(例えば端末2)で一連の処理を行ってもよい。 In this embodiment, the server 1 on the cloud performs the processing, but a series of processing may be performed by a local device (for example, the terminal 2).

図2は、サーバ1の構成例を示すブロック図である。サーバ1は、制御部11、主記憶部12、通信部13、補助記憶部14を有する。
制御部11は、一又は複数のCPU(Central Processing Unit)、MPU(Micro-Processing Unit)、GPU(Graphics Processing Unit)等の演算処理装置を有し、補助記憶部14に記憶されたプログラムPを読み出して実行することにより、種々の情報処理、制御処理等を行う。主記憶部12は、SRAM(Static Random Access Memory)、DRAM(Dynamic Random Access Memory)、フラッシュメモリ等の一時記憶領域であり、制御部11が演算処理を実行するために必要なデータを一時的に記憶する。通信部13は、通信に関する処理を行うための通信モジュールであり、外部と情報の送受信を行う。
FIG. 2 is a block diagram showing a configuration example of the server 1. As shown in FIG. The server 1 has a control section 11 , a main storage section 12 , a communication section 13 and an auxiliary storage section 14 .
The control unit 11 has an arithmetic processing unit such as one or more CPU (Central Processing Unit), MPU (Micro-Processing Unit), GPU (Graphics Processing Unit), etc., and executes the program P stored in the auxiliary storage unit 14. Various information processing, control processing, etc. are performed by reading and executing the data. The main storage unit 12 is a temporary storage area such as SRAM (Static Random Access Memory), DRAM (Dynamic Random Access Memory), flash memory, etc., and temporarily stores data necessary for the control unit 11 to perform arithmetic processing. Remember. The communication unit 13 is a communication module for performing processing related to communication, and transmits and receives information to and from the outside.

補助記憶部14は、ハードディスク、大容量メモリ等の不揮発性記憶領域であり、制御部11が処理を実行するために必要なプログラムP、その他のデータを記憶している。また、補助記憶部14は、構造化テーブル141、正順序モデル142、逆順序モデル143、及び誤り補正モデル144を記憶している。構造化テーブル141は、非構造化データである文書画像から構造化データに変換するためのルールを規定するテーブルである。正順序モデル142は、文章内に出現する文字列の並び順を、文章通りの正順序で学習済みの学習済みモデルである。逆順序モデル143は、文章内に出現する文字列の出現順序を、文章の並び順とは逆順序で学習済みの学習済みモデルである。誤り補正モデル144は、正しく表記された文章と、誤りを含む文章とのペアを学習することで誤りの出現パターンを学習済みの学習済みモデルである。 The auxiliary storage unit 14 is a nonvolatile storage area such as a hard disk or a large-capacity memory, and stores programs P and other data necessary for the control unit 11 to execute processing. The auxiliary storage unit 14 also stores a structured table 141 , a forward order model 142 , a reverse order model 143 , and an error correction model 144 . The structured table 141 is a table that defines rules for converting a document image, which is unstructured data, into structured data. The normal order model 142 is a trained model that has learned the order of character strings appearing in a sentence in the normal order of the sentence. The reverse order model 143 is a trained model that has learned the appearance order of character strings that appear in a sentence in the order opposite to the order in which the sentences are arranged. The error correction model 144 is a trained model that has learned error appearance patterns by learning pairs of correctly written sentences and sentences containing errors.

なお、補助記憶部14はサーバ1に接続された外部記憶装置であってもよい。また、サーバ1は複数のコンピュータからなるマルチコンピュータであっても良く、ソフトウェアによって仮想的に構築された仮想マシンであってもよい。 Incidentally, the auxiliary storage unit 14 may be an external storage device connected to the server 1 . Moreover, the server 1 may be a multicomputer consisting of a plurality of computers, or may be a virtual machine virtually constructed by software.

また、本実施の形態においてサーバ1は上記の構成に限られず、例えば操作入力を受け付ける入力部、画像を表示する表示部等を含んでもよい。また、サーバ1は、CD(Compact Disk)-ROM、DVD(Digital Versatile Disc)-ROM等の可搬型記憶媒体1aを読み取る読取部を備え、可搬型記憶媒体1aからプログラムPを読み取って実行するようにしても良い。あるいはサーバ1は、半導体メモリ1bからプログラムPを読み込んでも良い。 Moreover, in the present embodiment, the server 1 is not limited to the configuration described above, and may include, for example, an input unit for receiving operation inputs, a display unit for displaying images, and the like. The server 1 also includes a reader for reading a portable storage medium 1a such as a CD (Compact Disk)-ROM, a DVD (Digital Versatile Disc)-ROM, etc., and reads and executes the program P from the portable storage medium 1a. You can do it. Alternatively, the server 1 may read the program P from the semiconductor memory 1b.

図3は、文字認識処理に関する説明図である。図3では、文書画像内の文字と、当該文字の座標とを認識する様子を概念的に図示している。
端末2から文書画像(画像データ)を取得した場合、サーバ1は、取得した文書画像内の各文字画像(画像領域)を識別し、当該文字画像に対応する文字を認識する。例えばサーバ1は、OCR処理を行って文字画像をテキストデータに変換する。
FIG. 3 is an explanatory diagram relating to character recognition processing. FIG. 3 conceptually illustrates how characters in a document image and the coordinates of the characters are recognized.
When a document image (image data) is acquired from the terminal 2, the server 1 identifies each character image (image area) in the acquired document image and recognizes characters corresponding to the character image. For example, the server 1 performs OCR processing to convert character images into text data.

なお、本明細書で「テキストデータ」とは、文字画像に対応する文字を表すデータであって、コンピュータが文字を解釈して表示するために必要なデータを意味する。テキストデータは、例えばプレーンテキスト(文字コード情報)であってもよく、プレーンテキストに加えてフォント、文字サイズ等の情報を含むデータであってもよい。 In this specification, "text data" means data representing characters corresponding to a character image, and means data necessary for a computer to interpret and display the characters. The text data may be, for example, plain text (character code information), or may be data including information such as font and character size in addition to plain text.

サーバ1は、文字画像をテキストデータに変換すると共に、文字画像に対応する文字の文書画像内での座標を特定する。サーバ1は、特定した座標に変換したテキストデータを挿入し、文書画像に各文字の情報を付加した文書ファイルを生成する。 The server 1 converts the character image into text data and specifies the coordinates of the character corresponding to the character image within the document image. The server 1 inserts the text data converted to the specified coordinates, and generates a document file in which the information of each character is added to the document image.

サーバ1は、生成した文書ファイルを、XMLファイル等の構造化データに変換する処理を行い、文章構造を特定する。サーバ1は、特定した文章構造に基づいてテキストデータを抽出し、当該テキストデータの誤りを検出する。 The server 1 performs a process of converting the generated document file into structured data such as an XML file, and identifies the sentence structure. The server 1 extracts text data based on the identified sentence structure and detects errors in the text data.

図4は、構造化データ及び非構造化データの比較例を示す説明図である。図4では、同一の文書について、構造化されているデータと、構造化されていないデータとを概念的に図示している。 FIG. 4 is an explanatory diagram showing a comparative example of structured data and unstructured data. FIG. 4 conceptually illustrates structured data and unstructured data for the same document.

構造化データに変換する処理を行わずに文書ファイルからテキストデータの抽出を行った場合、文書レイアウトの違い等に起因して、誤字、脱字等の誤認識が発生する恐れがある。例えば図4左下に示すように、不適切な位置に不適切なテキスト(図4では文書タイトルの「業績の概要」)が挿入される場合、あるいは不適切な箇所で改行、スペース等が挿入される場合などが生じ得る。 If text data is extracted from a document file without conversion to structured data, misrecognition such as typographical errors or omissions may occur due to differences in document layout. For example, as shown in the lower left of Fig. 4, if inappropriate text (in Fig. 4, the document title "Summary of Achievements") is inserted in an inappropriate position, or if line breaks, spaces, etc. are inserted in inappropriate places. may occur.

そこで本実施の形態では、図4右下に示すように、非構造化データである文書ファイルを構造化データに変換する。サーバ1は、構造化した文書ファイルから正しいテキストのまとまり(構造)を特定して、後述の誤り検出を行う。 Therefore, in this embodiment, as shown in the lower right of FIG. 4, the document file, which is unstructured data, is converted into structured data. The server 1 identifies a correct grouping (structure) of text from the structured document file and performs error detection, which will be described later.

図5は、構造化処理に関する説明図である。図5では、文書ファイルを構造化データに変換する様子を概念的に図示している。
例えばサーバ1は、文章構造を特定するためのルールを規定する構造化テーブル141を参照して、文書ファイルを、文書画像を構成する所定の基本要素毎に構造化した構造化データに変換する。文書の要素とは、例えば文書のタイトル、本文、写真、図表、キャプション等であるが、文書画像を所定単位で分割した要素であればよく、その内容(分割単位)は特に限定されない。構造化テーブル141は、文書画像を構成する各要素について、各要素を識別する上で基準とするルールと、各要素に対して付与すべきメタデータとを格納してある。
FIG. 5 is an explanatory diagram of the structuring process. FIG. 5 conceptually illustrates how a document file is converted into structured data.
For example, the server 1 refers to the structured table 141 that defines rules for specifying sentence structures, and converts the document file into structured data structured for each predetermined basic element that constitutes the document image. The elements of the document are, for example, the title, text, photograph, chart, caption, etc. of the document, but they may be elements obtained by dividing the document image into predetermined units, and the content (division unit) is not particularly limited. The structured table 141 stores a rule that is used as a reference for identifying each element and metadata to be given to each element for each element that constitutes a document image.

例えば構造化テーブル141は、タイトル、本文、写真、図表、キャプション等の各要素について、各要素を識別する上で基準とする文字サイズ、フォント、文書内での座標位置、座標範囲等の情報(ルール)を格納してある。サーバ1は、構造化テーブル141を参照して、文書ファイルから各要素を識別する。 For example, the structured table 141 contains information ( rules) are stored. The server 1 refers to the structured table 141 to identify each element from the document file.

サーバ1は、識別した各要素に対してメタデータを付与する。メタデータは、各要素を定義付けるタグ情報であり、各要素にタグ付けされるタグ名、あるいはタグ内の情報として格納される属性値などである。例えば図4右下に図示したように、文書のタイトルに該当する要素であれば「title」、サブタイトルに該当する要素であれば「section」がメタデータ(タグ名)として付与される。 The server 1 gives metadata to each identified element. Metadata is tag information that defines each element, such as a tag name tagged to each element or an attribute value stored as information in the tag. For example, as shown in the lower right of FIG. 4, "title" is given as metadata (tag name) to an element corresponding to the title of a document, and "section" is given to an element corresponding to a subtitle.

上述の如く、サーバ1は、各要素を識別する際のルールを規定する構造化テーブル141を参照して、文書ファイルを構成する各要素を識別し、メタデータを付与する。そしてサーバ1は、図5右上に図示するように、非構造化データである文書ファイルを構造化した構造化データを生成する。これにより、図4右下に図示したように、文書ファイルのテキストデータについて、正しい文字順序、改行位置等を認識することができる。 As described above, the server 1 refers to the structured table 141 that defines rules for identifying each element, identifies each element that constitutes the document file, and assigns metadata to each element. Then, the server 1 generates structured data by structuring the document file, which is unstructured data, as shown in the upper right of FIG. As a result, as shown in the lower right of FIG. 4, the correct character sequence, line feed position, etc. can be recognized for the text data of the document file.

サーバ1は、上記で生成した構造化データに基づいてテキストデータを抽出し、抽出したテキストデータに誤りがあるか否か、誤り検出を行う。本実施の形態でサーバ1は、文章群(文書コーパス)から生成した正順序モデル142、逆順序モデル143、及び誤り補正モデル144の3種類のモデル(識別器)を用いて誤り検出を行う。 The server 1 extracts text data based on the structured data generated above, and performs error detection to determine whether or not there is an error in the extracted text data. In this embodiment, the server 1 performs error detection using three types of models (classifiers), a forward order model 142, a reverse order model 143, and an error correction model 144, which are generated from a group of sentences (document corpus).

なお、これらのモデルは、タグに関係なくテキストデータ全体を使って生成することもあれば、タグごとにモデルを生成することも考える。例えば、上記の「title」のテキストデータを対象としたモデルや、「section」のテキストデータを対象としたモデルを生成するといった場合である。 It should be noted that these models may be generated using the entire text data regardless of tags, or a model may be generated for each tag. For example, there is a case of generating a model for the above "title" text data or a model for "section" text data.

図6は、正順序モデル142及び逆順序モデル143に関する説明図である。図6では、正順序モデル142(第1の識別器)及び逆順序モデル143(第2の識別器)を用いた誤り検出処理を概念的に図示している。図6に基づき、正順序モデル142及び逆順序モデル143について説明する。 FIG. 6 is an explanatory diagram of the forward order model 142 and the reverse order model 143. As shown in FIG. FIG. 6 conceptually illustrates error detection processing using a forward order model 142 (first discriminator) and a reverse order model 143 (second discriminator). The forward order model 142 and the reverse order model 143 will be described with reference to FIG.

正順序モデル142及び逆順序モデル143はそれぞれ、文書コーパスに出現する文字列の並び順(出現順序)を学習した学習済みモデル(識別器)であって、例えば深層学習により生成されるニューラルネットワークである。具体的には、正順序モデル142及び逆順序モデル143は、RNN(Recurrent Neural Network)の一種であるLSTM(Long Short-Term Memory)により作成される。 The forward-order model 142 and the reverse-order model 143 are respectively trained models (classifiers) that have learned the sequence (appearance order) of character strings that appear in the document corpus, and are, for example, neural networks generated by deep learning. be. Specifically, the forward order model 142 and the reverse order model 143 are created by LSTM (Long Short-Term Memory), which is a type of RNN (Recurrent Neural Network).

なお、LSTMは正順序モデル142及び逆順序モデル143の一例であって、正順序モデル142及び逆順序モデル143は、その他の深層学習など、他のアルゴリズムに係る学習済みモデルであってもよい。また、N-gram、分かち書きなど、他の文字の切り分けに係る学習済みモデルであってもよい。 Note that the LSTM is an example of the forward order model 142 and the reverse order model 143, and the forward order model 142 and the reverse order model 143 may be trained models related to other algorithms such as deep learning. Also, it may be a learned model related to segmentation of other characters such as N-grams and spaces.

正順序モデル142及び逆順序モデル143は、文章内で出現する各文字列のデータの入力を受け付けるための入力層と、各文字列に続いて出現する文字列の推定結果を出力する出力層と、入力層及び出力層の間の演算処理を行う中間層(隠れ層)とを有する。入力層は、文章における出現順序に従って、文章内に出現する各文字列のデータの入力をそれぞれ受け付ける複数のニューロンを有する。中間層は、入力層の各ニューロンに対応して、入力層と出力層との間の演算を行うための複数のニューロンを有する。中間層のニューロンはLSTMブロックと呼ばれ、中間層における過去時点の演算結果を用いて次の時点での入力値に関する演算を行うことで、直近時点までの時系列的なデータから次の時点の値を演算する。出力層は、中間層から出力された演算値に基づき、入力層の対応するニューロンに入力された文字列に続く文字列の推定結果を表す出力値を出力する。 The forward order model 142 and the reverse order model 143 are composed of an input layer for receiving input of data for each character string appearing in a sentence, and an output layer for outputting estimation results of character strings that appear following each character string. , and an intermediate layer (hidden layer) that performs arithmetic processing between the input layer and the output layer. The input layer has a plurality of neurons that receive input of data of each character string appearing in the sentence according to the order of appearance in the sentence. The intermediate layer has a plurality of neurons for performing operations between the input layer and the output layer corresponding to each neuron in the input layer. The neurons in the middle layer are called LSTM blocks, and by performing calculations on the input values at the next time point using the calculation results at the past time point in the middle layer, the time-series data up to the latest time point is converted to the Calculate values. The output layer outputs an output value representing the estimation result of the character string following the character string input to the corresponding neuron of the input layer, based on the operation value output from the intermediate layer.

正順序モデル142を生成する場合、サーバ1は文書コーパスの文章を所定単位の文字列毎に分割し、分割した各文字列を、文章内での並び順(正順序)に従って入力層に順次入力する。文章の分割単位は、例えば一文字ずつの文字単位であるが、本実施の形態はこれに限定されるものではなく、例えば単語単位で分割してもよい。サーバ1は、文章の先頭から続く一又は複数の文字列を順次入力し、当該一又は複数の文字列に続く次の文字列を推定した推定結果を出力層から取得する。例えば出力層は、図6に示すように、推定された次の文字列と、当該文字列の生起確率とを推定結果として出力する。 When generating the forward order model 142, the server 1 divides the sentences of the document corpus into character strings of a predetermined unit, and sequentially inputs each divided character string into the input layer according to the order (normal order) in the sentence. do. A sentence is divided in units of characters, for example, one character at a time, but the present embodiment is not limited to this, and may be divided in units of words, for example. The server 1 sequentially inputs one or more character strings continuing from the beginning of a sentence, and acquires an estimation result of estimating the next character string following the one or more character strings from the output layer. For example, the output layer outputs the estimated next character string and the occurrence probability of the character string as the estimation result, as shown in FIG.

サーバ1は、推定された文字列を、実際に文章に出現する正解の文字列と比較し、両者が近似するように、各ニューロン間の重み、活性化関数の係数等の各種パラメータの最適化を行う。サーバ1は、文書コーパスの各文章について上記の処理を行い、正順序モデル142を生成する。 The server 1 compares the estimated character string with the correct character string that actually appears in the sentence, and optimizes various parameters such as the weight between each neuron and the coefficient of the activation function so that both are approximate. I do. The server 1 performs the above processing on each sentence in the document corpus to generate the normal order model 142 .

逆順序モデル143を生成する場合、サーバ1は、文書コーパスの文章を分割した各文字列の並び順を、先頭及び末尾を入れ換えた逆順序に変換する。サーバ1は、変換後の並び順で各文字列を入力層に順次入力し、元の文章において末尾から続く一又は複数の文字列に基づき、当該一又は複数の文字列の直前に出現する文字列を推定した推定結果を出力層から取得する。サーバ1は、推定された文字列を正解の文字列と比較し、両者が近似するように各種パラメータを最適化して逆順序モデル143を生成する。 When generating the reverse order model 143, the server 1 converts the order of each character string obtained by dividing the text of the document corpus into a reverse order by transposing the beginning and end of each character string. The server 1 sequentially inputs each character string into the input layer in the order after conversion, and based on one or more character strings continuing from the end of the original sentence, the character that appears immediately before the one or more character strings Get the result of estimating the columns from the output layer. The server 1 compares the estimated character string with the correct character string, optimizes various parameters so that both are approximate, and generates the reverse order model 143 .

このように、サーバ1は、文章内の文字列の並び順を正順序で学習した正順序モデル142と、逆順序で学習した逆順序モデル143とを生成し、両者を用いて誤り検出を行う。 In this way, the server 1 generates a forward order model 142 that learns the sequence of character strings in a sentence in forward order and a reverse order model 143 that learns in reverse order, and performs error detection using both. .

サーバ1は、構造化した文書ファイルからテキストデータ(文章)を抽出し、テキストデータを所定単位の文字列毎(例えば一文字ずつ)に分割する。サーバ1は、分割した各文字列をテキストデータにおける並び順(正順序)に従って正順序モデル142に順次入力し、各位置に出現する文字列の推定結果(生起確率)を出力として取得する。サーバ1は、推定した文字列と、文書画像から認識した文字列(文字)とを比較し、例えば生起確率が閾値以下である文字列は誤りであるものとして検出する。 The server 1 extracts text data (sentences) from a structured document file, and divides the text data into predetermined units of character strings (for example, character by character). The server 1 sequentially inputs each divided character string to the normal order model 142 according to the order of arrangement (normal order) in the text data, and acquires the estimation result (occurrence probability) of the character string appearing at each position as an output. The server 1 compares the estimated character string with character strings (characters) recognized from the document image, and detects, for example, a character string whose occurrence probability is equal to or less than a threshold as an error.

サーバ1は、テキストデータを分割した文字列の順序を逆順序に変換し、変換後の順序(逆順序)に従って逆順序モデル143に順次入力する。サーバ1は、逆順序モデル143からテキスト内の各位置に出現する文字列を推定し、文字画像から認識した文字列と比較して、誤りを判定する。 The server 1 reverses the order of the character strings obtained by dividing the text data, and sequentially inputs them to the reverse order model 143 according to the order after conversion (reverse order). The server 1 estimates a character string appearing at each position in the text from the reverse order model 143, compares it with the character string recognized from the character image, and determines an error.

図7は、誤り補正モデル144に関する説明図である。図7では、誤りを含まない正解の文章と、誤りを含む文章とをペアで学習することで、誤りの出現パターンを学習済みの誤り補正モデル144を用いた誤り検出処理を概念的に図示している。 FIG. 7 is an explanatory diagram of the error correction model 144. As shown in FIG. FIG. 7 conceptually illustrates the error detection process using the error correction model 144 which has already learned the appearance pattern of errors by learning pairs of correct sentences containing no errors and sentences containing errors. ing.

誤り補正モデル144は、正順序モデル142、逆順序モデル143と同様に深層学習により生成された学習済みモデルであり、例えばSequence-to-Sequenceにより生成される。サーバ1は、誤りを含まない正解文章と、正解文章に対応する文章であって、誤りを含む文章とを用いて学習を行い、誤り補正モデル144を生成する。 The error correction model 144 is a trained model generated by deep learning, like the forward order model 142 and the reverse order model 143, and is generated by, for example, sequence-to-sequence. The server 1 performs learning using correct sentences containing no errors and sentences corresponding to the correct sentences that contain errors, and generates an error correction model 144 .

例えばサーバ1は、誤り補正モデル144を生成するための学習用データとして、テキストデータを含む文書ファイルを用いて学習を行う。
正解文章には、学習用の文書ファイルに付されているテキストデータを用いる。誤りを含む文章には、学習用の文書ファイルを画像化し、その画像に対してOCRなどの文字認識を適用した結果得られる元のテキストデータとは異なる誤りを含むテキストデータを用いる。
For example, the server 1 performs learning using a document file containing text data as learning data for generating the error correction model 144 .
Text data attached to the document file for learning is used as the correct sentence. For sentences containing errors, text data containing errors, which is different from the original text data obtained as a result of imaging a document file for learning and applying character recognition such as OCR to the image, is used.

誤りを含むテキストデータを得る方法として、まず、サーバ1は、学習用の文書ファイルを画像データへと変換する。そしてサーバ1は、生成した画像データに対する文字認識を行って画像データからテキストデータに再変換し、文書ファイルを生成する。すなわち、サーバ1は、図3及び図4で説明した処理と同様の手順で、画像データから文書ファイルを生成する。 As a method of obtaining text data containing errors, first, the server 1 converts a learning document file into image data. The server 1 performs character recognition on the generated image data, converts the image data into text data again, and generates a document file. That is, the server 1 generates a document file from the image data in the same procedure as the processing described with reference to FIGS. 3 and 4. FIG.

元の文書ファイルにおけるテキストデータ(正解テキストデータ)と、生成した文書ファイルに存在するテキストデータ(誤りテキストデータ)と、の対応関係から対応付けを行うことで学習用データセットを得ることができる。なお、対応付けはテキストデータの位置関係や元データに存在するタグの参照、構造化等により行うことができる。 A training data set can be obtained by matching the text data (correct text data) in the original document file with the text data (erroneous text data) in the generated document file. Note that the association can be made by referring to the positional relationship of the text data, tags existing in the original data, structuring, or the like.

次に、サーバ1は、学習用データセットにおけるテキストデータを所定単位の文字列(例えば一文字)毎に分割し、分割した各文字列を並び順に従って誤り補正モデル144に順次入力する。誤り補正モデル144は、入力された学習用データセットの誤りテキストデータに対しての出力が正解テキストデータに近似するように各種パラメータを最適化することで学習を行う。 Next, the server 1 divides the text data in the learning data set into predetermined units of character strings (for example, one character), and sequentially inputs each divided character string to the error correction model 144 according to the arrangement order. The error correction model 144 performs learning by optimizing various parameters so that the output of the erroneous text data of the input learning data set approximates the correct text data.

このように、サーバ1は、OCR等で文字画像を変換したテキストデータと、学習用の文書ファイルに付されているテキストデータとを用いて、テキストデータへの変換時に発生する誤りを検出、補正するモデルを生成する。誤り検出時においてサーバ1は、図5で説明した処理によって構造化した文書ファイルからテキストデータを抽出し、誤り補正モデル144に入力して、テキストデータの誤りの検出及び補正を行う。 In this way, the server 1 uses text data obtained by converting character images by OCR or the like and text data attached to a document file for learning to detect and correct errors that occur during conversion to text data. Generate a model that At the time of error detection, the server 1 extracts text data from the document file structured by the processing described in FIG. 5, inputs it to the error correction model 144, and detects and corrects errors in the text data.

上述の如く、サーバ1は、正順序モデル142、逆順序モデル143、及び誤り補正モデル144の3種類のモデルを用いて、各々のモデルでテキストデータの誤りを検出する。例えばサーバ1は、3種類のモデルのうち、過半数(2種類以上)のモデルで同一の文字(文字列)の誤りと判定した場合、当該文字が誤りであるものとして検出する。あるいはサーバ1は、いずれかのモデルで誤りと判定した場合、判定された箇所を誤りとして検出してもよい。あるいはサーバ1は、3種類のモデルそれぞれから出力される出力値(生起確率等の確率値)に基づいて総合的な誤り判定を行い、誤りである文字を検出するようにしてもよい。 As described above, the server 1 uses three types of models, the forward order model 142, the reverse order model 143, and the error correction model 144, to detect text data errors in each model. For example, when the server 1 determines that the same character (character string) is erroneous in the majority (two or more) models among the three types of models, the character is detected as being erroneous. Alternatively, if the server 1 determines an error in any of the models, the determined part may be detected as an error. Alternatively, the server 1 may perform comprehensive error determination based on output values (probability values such as occurrence probability) output from each of the three types of models to detect erroneous characters.

なお、本実施の形態では正順序モデル142、逆順序モデル143、及び誤り補正モデル144の3つのモデルを用いて誤り検出を行ったが、サーバ1は、上記3つのモデルの全てを搭載している必要はなく、1つまたは2つのモデルを用いて誤り検出を行ってもよい。また、上記3つのモデル以外の他のモデルを搭載し、4つ以上のモデルで誤り検出を行ってもよい。 In the present embodiment, three models, the forward order model 142, the reverse order model 143, and the error correction model 144, are used for error detection. error detection may be performed using one or two models. Further, models other than the above three models may be installed, and error detection may be performed with four or more models.

誤りを検出した場合、サーバ1は、正順序モデル142、逆順序モデル143、及び/又は誤り補正モデル144を用いて、誤りである文字を正しい文字に補正する。例えばサーバ1は、誤り補正モデル144で誤りを検出した場合、誤りの文字を、誤り補正モデル144で補正された文字に変換する。あるいは、サーバ1は、誤り補正モデル144において誤りとして検出されなかったものの、正順序モデル142及び/又は逆順序モデル143において誤りとして検出された場合、正順序モデル142及び/又は逆順序モデル143から出力される推定結果に基づき、誤りとして検出された文字を、生起確率が最も高い文字に変換する。あるいはサーバ1は、3つのモデル全ての出力値に基づいて正解の文字を推定し、テキストデータを補正してもよい。 If an error is detected, the server 1 uses the forward order model 142, the reverse order model 143, and/or the error correction model 144 to correct the erroneous characters to correct characters. For example, when the error correction model 144 detects an error, the server 1 converts the erroneous character into a character corrected by the error correction model 144 . Alternatively, if the error correction model 144 is not detected as an error, but is detected as an error in the forward order model 142 and/or the reverse order model 143, the server 1 may Based on the output estimation result, the character detected as an error is converted into the character with the highest occurrence probability. Alternatively, the server 1 may estimate the correct character based on the output values of all three models and correct the text data.

サーバ1は、文書ファイルのテキストデータを補正後のテキストデータに変換し、文書ファイルを端末2に出力する。なお、サーバ1は構造化データ(XMLファイル等)の形式で文書ファイルを出力してもよく、非構造化データ(PDFファイル等の画像データ)に戻して出力してもよい。これにより、サーバ1は、文字認識時の誤認識も含めて、文書内の誤りを補正した文書ファイルを提供することができる。 The server 1 converts the text data of the document file into corrected text data and outputs the document file to the terminal 2 . Note that the server 1 may output the document file in the form of structured data (such as an XML file), or may output the unstructured data (image data such as a PDF file). As a result, the server 1 can provide a document file in which errors in the document are corrected, including erroneous recognition during character recognition.

図8は、正順序モデル142及び逆順序モデル143の生成処理の手順を示すフローチャートである。図8に基づき、正順序モデル142及び逆順序モデル143を生成する機械学習の処理内容について説明する。
サーバ1の制御部11は、正順序モデル142及び逆順序モデル143を生成するために用いる文章群(文書コーパス)を取得する(ステップS11)。制御部11は、取得した文章を所定単位の文字列毎に分割する(ステップS12)。
FIG. 8 is a flow chart showing the procedure of generating the forward order model 142 and the reverse order model 143 . Based on FIG. 8, the contents of machine learning processing for generating the forward order model 142 and the reverse order model 143 will be described.
The control unit 11 of the server 1 acquires a group of sentences (document corpus) used to generate the forward order model 142 and the reverse order model 143 (step S11). The control unit 11 divides the acquired text into character strings of predetermined units (step S12).

制御部11は、分割した文字列の並び順を、文章の順(正順序)で学習する機械学習を行い、正順序モデル142を生成する(ステップS13)。具体的には、制御部11は、分割した文字列を元の文章の並び順に従って順次入力し、先頭から順に出現する一又は複数の文字列に基づき、当該一又は複数の文字列に続く次に出現する文字列を推定した推定結果(生起確率等)を出力として取得する。制御部11は、推定結果を正解の文字列と比較し、両者が近似するように、正順序モデル142の演算に用いる重み等の各種パラメータを最適化して正順序モデル142を生成する。 The control unit 11 performs machine learning to learn the arrangement order of the divided character strings in the sentence order (forward order), and generates the forward order model 142 (step S13). Specifically, the control unit 11 sequentially inputs the divided character strings according to the arrangement order of the original sentence, and based on one or more character strings that appear in order from the beginning, the next character string following the one or more character strings. Get the estimation result (occurrence probability, etc.) of estimating the character string that appears in . The control unit 11 compares the estimated result with the correct character string, optimizes various parameters such as weights used in the calculation of the forward order model 142, and generates the forward order model 142 so that the two approximate each other.

制御部11は、ステップS12で分割した文字列の並び順を、文章の先頭及び末尾を入れ換えた逆順序に変換する(ステップS14)。制御部11は、逆順序に変換した文字列の並び順を学習する機械学習を行い、逆順序モデル143を生成する(ステップS15)。すなわち、制御部11は、各文字列を逆順序で順次入力し、元の文章において末尾から順に出現する一又は複数の文字列に基づき、当該一又は複数の文字列の直前に出現する文字列を推定した推定結果を出力として取得する。制御部11は、推定結果を正解の文字列と比較して各種パラメータの最適化を行い、逆順序モデル143を生成する。制御部11は、一連の処理を終了する。 The control unit 11 converts the order of the character strings divided in step S12 into a reverse order in which the beginning and end of the text are interchanged (step S14). The control unit 11 performs machine learning to learn the order of the character strings converted to the reverse order, and generates the reverse order model 143 (step S15). That is, the control unit 11 sequentially inputs each character string in reverse order, and based on one or more character strings that appear in order from the end of the original sentence, the character string that appears immediately before the one or more character strings is obtained as an output. The control unit 11 compares the estimation result with the correct character string, optimizes various parameters, and generates the reverse order model 143 . The control unit 11 ends the series of processes.

図9は、誤り補正モデル144の生成処理の手順を示すフローチャートである。図9に基づき、誤り補正モデル144を生成する機械学習の処理内容について説明する。
サーバ1の制御部11は、誤り補正モデル144を生成するための学習用データであって、文字画像を含む文書画像に対し、各文字画像に対応するテキストデータが付与された文書ファイル群を取得する(ステップS31)。制御部11は、取得した文書ファイルからテキストデータを除去し、文書画像に変換する(ステップS32)。
FIG. 9 is a flow chart showing the procedure for generating the error correction model 144 . Based on FIG. 9, the contents of the machine learning processing for generating the error correction model 144 will be described.
The control unit 11 of the server 1 acquires a document file group in which text data corresponding to each character image is added to the document image including the character image, which is learning data for generating the error correction model 144. (step S31). The control unit 11 removes the text data from the acquired document file and converts it into a document image (step S32).

制御部11は、OCR等の手段で文書画像内の各文字画像をテキストデータに変換し、文書画像における当該テキストデータの座標を特定する(ステップS33)。制御部11は、変換したテキストデータを、特定した座標に挿入(付与)した文書ファイルを生成する(ステップS34)。 The control unit 11 converts each character image in the document image into text data by means such as OCR, and specifies the coordinates of the text data in the document image (step S33). The control unit 11 generates a document file in which the converted text data is inserted (given) at the specified coordinates (step S34).

制御部11は、構造化テーブル141を参照して、ステップS33で生成した文書ファイルと、ステップS31で取得した学習用の文書ファイルとをそれぞれ構造化データに変換する(ステップS35)。構造化処理を行うことにより、各文書ファイルに含まれる正解テキストデータ及び誤りテキストデータの各文の対応関係を取得することができる。また、構造化したタグごとに学習を行うことも可能である。 The control unit 11 refers to the structured table 141 and converts the document file generated in step S33 and the learning document file obtained in step S31 into structured data (step S35). By performing the structuring process, it is possible to obtain the correspondence relationship between each sentence of correct text data and erroneous text data included in each document file. It is also possible to perform learning for each structured tag.

制御部11は、構造化した各文書ファイルのテキストデータを用いて、誤り補正モデル144を生成する(ステップS36)。具体的には、制御部11は、ステップS34で生成した文書ファイルを構造化して得たテキストデータ(文章)を誤り補正モデル144に入力し、誤りである文字を補正したテキストデータを出力として取得する。制御部11は、出力されたテキストデータと、ステップS31で取得した学習用の文書ファイルのテキストデータとを比較して、両者が近似するように各種パラメータを最適化して誤り補正モデル144を生成する。制御部11は一連の処理を終了する。 The control unit 11 generates the error correction model 144 using the structured text data of each document file (step S36). Specifically, the control unit 11 inputs the text data (sentence) obtained by structuring the document file generated in step S34 to the error correction model 144, and acquires the text data in which the erroneous characters are corrected as an output. do. The control unit 11 compares the output text data with the text data of the document file for learning acquired in step S31, optimizes various parameters so that the two approximate each other, and generates the error correction model 144. . The control unit 11 ends the series of processes.

図10は、誤り検出処理の手順を示すフローチャートである。図10に基づき、文書画像に含まれる文字画像の文字認識を行い、文字の誤りを検出する処理の処理内容について説明する。
サーバ1の制御部11は、処理対象とする文書画像(画像データ)を取得する(ステップS51)。制御部11は、OCR等の手段で文書画像内の各文字画像をテキストデータに変換し、文書画像における当該テキストデータの座標を特定する(ステップS52)。制御部11は、変換したテキストデータを、特定した座標に挿入(付与)した文書ファイルを生成する(ステップS53)。制御部11は、構造化テーブル141を参照して、生成した文書ファイル内の各要素を識別し、各要素にメタデータを付与した構造化データに変換する(ステップS54)。
FIG. 10 is a flow chart showing the procedure of error detection processing. Based on FIG. 10, the contents of the process of performing character recognition of character images included in a document image and detecting character errors will be described.
The control unit 11 of the server 1 acquires a document image (image data) to be processed (step S51). The control unit 11 converts each character image in the document image into text data by means such as OCR, and specifies the coordinates of the text data in the document image (step S52). The control unit 11 generates a document file in which the converted text data is inserted (given) at the specified coordinates (step S53). The control unit 11 refers to the structured table 141, identifies each element in the generated document file, and converts each element into structured data in which metadata is added (step S54).

制御部11は、構造化した文書ファイルからテキストデータを抽出し、抽出したテキストデータから誤りである文字を検出する(ステップS55)。具体的には、制御部11は、正順序モデル142、逆順序モデル143、及び誤り補正モデル144にそれぞれテキストデータ(文章)を入力し、複数のモデル(識別器)を用いて誤りを検出する。誤りが検出された場合、制御部11は、正順序モデル142、逆順序モデル143、又は誤り補正モデル144を用いて、誤りの文字を補正する(ステップS56)。制御部11は、一連の処理を終了する。 The control unit 11 extracts text data from the structured document file, and detects erroneous characters from the extracted text data (step S55). Specifically, the control unit 11 inputs text data (sentences) to each of the forward order model 142, the reverse order model 143, and the error correction model 144, and detects errors using a plurality of models (classifiers). . If an error is detected, the control unit 11 corrects the erroneous character using the forward order model 142, the reverse order model 143, or the error correction model 144 (step S56). The control unit 11 ends the series of processes.

なお、上記では文字認識手段としてOCRを用いたが、サーバ1は文字画像に対応する文字を認識可能であればよく、例えばICR(Intelligent Character Recognition)等の手段を用いてもよい。また、文字認識手段は光学的手段に限定されず、画像データから文字を認識可能であればよい。 Although OCR is used as the character recognition means in the above description, the server 1 may use means such as ICR (Intelligent Character Recognition) as long as it can recognize characters corresponding to character images. Further, the character recognition means is not limited to optical means, and any means capable of recognizing characters from image data may be used.

また、上記では文書ファイル(画像データ)をXMLファイル等の構造化データに変換するものとして説明したが、サーバ1は画像データの構造を特定してテキストデータ(文字)を抽出可能であればよく、構造化データへの変換は必須ではない。 In the above description, the document file (image data) is converted into structured data such as an XML file. , conversion to structured data is not required.

以上より、本実施の形態1によれば、画像データから認識した文字の誤りを検出又は補正することができる。 As described above, according to the first embodiment, it is possible to detect or correct errors in characters recognized from image data.

また、本実施の形態1によれば、OCR等の手段で文字画像をテキストデータに変換することで、好適に処理することができる。 Further, according to the first embodiment, by converting a character image into text data by means of OCR or the like, it is possible to process it favorably.

また、本実施の形態1によれば、文章群(文書コーパス)を学習済みの学習済みモデル(識別器)を用いることで、高精度に誤りを検出又は補正することができる。 Further, according to Embodiment 1, errors can be detected or corrected with high accuracy by using a trained model (classifier) that has been trained on a group of sentences (document corpus).

また、本実施の形態1によれば、複数の学習済みモデルを組み合わせることで、より高精度に誤りを検出又は補正することができる。 Further, according to the first embodiment, by combining a plurality of trained models, errors can be detected or corrected with higher accuracy.

また、本実施の形態1によれば、文章内に出現する文字の並び順を学習した学習済みモデルを用いることで、前後のテキストから誤り箇所を好適に検出又は補正することができる。 Further, according to the first embodiment, by using a trained model that has learned the order of characters that appear in a sentence, it is possible to suitably detect or correct an error part from the preceding and succeeding text.

また、本実施の形態1によれば、正順序モデル142及び逆順序モデル143を用いて誤り検出を行うことで、より高精度に誤りを検出又は補正することができる。 Further, according to the first embodiment, by performing error detection using the forward order model 142 and the reverse order model 143, errors can be detected or corrected with higher accuracy.

また、本実施の形態1によれば、正解の文章と、誤りを含む文章とを学習済みの学習済みモデルを用いることで、文書画像から認識した文字の誤りを好適に検出又は補正することができる。 Further, according to the first embodiment, by using a trained model that has already learned correct sentences and sentences containing errors, it is possible to suitably detect or correct errors in characters recognized from a document image. can.

また、本実施の形態1によれば、テキストデータが付与された文書画像(文書ファイル)と、テキストデータを除去した文書画像とに基づいて生成された誤り補正モデル144を用いることで、文字の誤りをより好適に検出又は補正することができる。 Further, according to the first embodiment, by using the error correction model 144 generated based on the document image (document file) to which the text data is added and the document image from which the text data is removed, Errors can be detected or corrected better.

また、本実施の形態1によれば、構造化テーブル141を参照して画像データを構造化データに変換することで、文章構造を好適に特定することができる。 Further, according to the first embodiment, by referring to the structured table 141 and converting the image data into structured data, the text structure can be preferably specified.

(実施の形態2)
本実施の形態では、構造化テーブル141に代えて、機械学習によって文章構造を学習した構造化モデル145を用いて文書画像の構造化を行う形態について述べる。なお、実施の形態1と重複する内容については同一の符号を付して説明を省略する。
図11は、実施の形態2に係るサーバ1の構成例を示すブロック図である。本実施の形態に係るサーバ1の補助記憶部14は、構造化テーブル141に代えて、構造化モデル145(構造識別器)を記憶している。構造化モデル145は、機械学習によって構築された学習済みモデルであり、教師用の文書画像内の各要素を識別するための構造識別器である。
(Embodiment 2)
In this embodiment, instead of using the structuring table 141, a structuring model 145 obtained by learning a sentence structure through machine learning is used to structure a document image. In addition, the same code|symbol is attached|subjected about the content which overlaps with Embodiment 1, and description is abbreviate|omitted.
FIG. 11 is a block diagram showing a configuration example of the server 1 according to the second embodiment. The auxiliary storage unit 14 of the server 1 according to this embodiment stores a structured model 145 (structure identifier) instead of the structured table 141 . The structured model 145 is a learned model constructed by machine learning, and is a structure identifier for identifying each element in the document image for teacher.

図12は、構造化モデル145に関する説明図である。非構造化データである教師用の文書ファイル(文書画像)から構造化モデル145を生成する様子を概念的に図示している。図12に基づき、本実施の形態の概要を説明する。
上述の如く、本実施の形態においてサーバ1は、予めルールが設定された構造化テーブル141に代えて、機械学習を行うことで構築した構造化モデル145を用いて文書の構造化を行う。例えばサーバ1は、CNNに係るニューラルネットワーク、具体的にはセマンティックセグメンテーションに係るニューラルネットワークを構造化モデル145として生成し、文書の構造化処理に用いる。
FIG. 12 is an explanatory diagram of the structured model 145. As shown in FIG. It conceptually illustrates how a structured model 145 is generated from a teacher document file (document image), which is unstructured data. Based on FIG. 12, the outline of this embodiment will be described.
As described above, in the present embodiment, the server 1 structures documents using the structured model 145 constructed by machine learning instead of the structured table 141 in which rules are set in advance. For example, the server 1 generates a neural network related to CNN, specifically a neural network related to semantic segmentation, as the structured model 145, and uses it for document structuring processing.

例えばサーバ1は、文書画像に対し、当該文書を構成するタイトル、本文等の各要素について、メタデータの正解値が関連付けられた教師用の文書ファイルを用いて学習を行う。例えば図12に示すように、教師用の文書ファイルでは、各要素に相当する領域(矩形枠で図示)に対し、メタデータの正解値に相当するタグ名が関連付けられている。サーバ1は、当該教師データを用いて構造化モデル145を生成する。 For example, the server 1 learns each element, such as a title and a text, of a document image using a document file for teachers associated with correct values of metadata. For example, as shown in FIG. 12, in a document file for teachers, a tag name corresponding to a correct value of metadata is associated with an area (illustrated by a rectangular frame) corresponding to each element. The server 1 generates the structured model 145 using the teacher data.

サーバ1は、教師用の文書画像を構造化モデル145に入力し、当該文書画像に含まれる各要素を識別した識別結果を出力として取得する。例えばサーバ1は、各要素に相当する画像領域の座標値と、当該領域に含まれる要素に付与すべきメタデータとを出力として取得する。サーバ1は、出力された画像領域の座標値及びメタデータを正解値と比較し、両者が近似するように、構造化モデル145において演算に用いる重み等のパラメータを最適化する。これによりサーバ1は、構造化モデル145を生成する。 The server 1 inputs the document image for teacher to the structured model 145 and acquires the identification result of identifying each element included in the document image as an output. For example, the server 1 acquires the coordinate values of the image area corresponding to each element and the metadata to be given to the elements included in the area as outputs. The server 1 compares the output coordinate values and metadata of the image region with the correct values, and optimizes parameters such as weights used for calculation in the structured model 145 so that the two approximate each other. The server 1 thereby generates the structured model 145 .

端末2から文書画像を取得した場合、サーバ1は、上記で生成した構造化モデル145を用いて構造化を行う。具体的には、サーバ1は、取得した文書画像を構造化モデル145に入力し、各要素を識別した識別結果を取得する。サーバ1は、識別結果に従って文書内の各要素を抽出し、メタデータを付与する。これにより、サーバ1は文書画像を構造化した構造化データを生成する。その後、サーバ1は実施の形態1と同様に誤り検出を行い、誤りである文字を補正する。 When a document image is acquired from the terminal 2, the server 1 structures it using the structured model 145 generated above. Specifically, the server 1 inputs the acquired document image to the structured model 145 and acquires the identification result of identifying each element. The server 1 extracts each element in the document according to the identification result and adds metadata. As a result, the server 1 generates structured data in which the document image is structured. After that, the server 1 performs error detection in the same manner as in the first embodiment, and corrects the erroneous characters.

図13は、構造化モデル145の生成処理の手順を示すフローチャートである。図13に基づき、機械学習によって構造化モデル145を生成する処理の内容について説明する。
サーバ1の制御部11は、構造化モデル145を生成するための教師データであって、非構造化データである教師用の文書画像に対し、当該文書を構成する各要素のメタデータの正解値が関連付けられた教師データを取得する(ステップS201)。制御部11は、取得した教師データを用いて構造化モデル145を生成する(ステップS202)。具体的には、制御部11は、教師用の文書画像を構造化モデル145に入力し、各要素に相当する画像領域、及び当該領域に含まれる要素に付与すべきメタデータを識別した識別結果を出力として取得する。制御部11は、取得した識別結果を正解値と比較し、両者が近似するように重み等の各種パラメータを最適化して構造化モデル145を生成する。制御部11は、一連の処理を終了する。
FIG. 13 is a flow chart showing the procedure for generating the structured model 145 . Based on FIG. 13, the details of the processing for generating the structured model 145 by machine learning will be described.
The control unit 11 of the server 1 generates a structured model 145 for generating a structured model 145. For a teacher document image which is unstructured data, the correct value of the metadata of each element constituting the document is obtained. acquires teacher data associated with (step S201). The control unit 11 generates the structured model 145 using the acquired teacher data (step S202). Specifically, the control unit 11 inputs a document image for teachers into the structured model 145, and identifies an image area corresponding to each element and metadata to be added to the elements included in the area. as output. The control unit 11 compares the obtained identification result with the correct value, optimizes various parameters such as weights so that the two approximate each other, and generates a structured model 145 . The control unit 11 ends the series of processes.

以上より、本実施の形態2によれば、機械学習によって構築した構造化モデル145を用いて文書画像の構造化を行うこともできる。 As described above, according to the second embodiment, the structured model 145 constructed by machine learning can be used to structure the document image.

(実施の形態3)
図14は、上述した形態のサーバ1の動作を示す機能ブロック図である。制御部11がプログラムPを実行することにより、サーバ1は以下のように動作する。
取得部1401は、文字画像を含む画像データを取得する。認識部1402は、前記文字画像に対応する文字及び座標を認識する。特定部1403は、前記画像データを構成する各要素を識別する際のルールを規定する構造化テーブルを参照、又は前記画像データを構成する各要素を識別する構造識別器を用いて、前記文字を含む前記画像データの各要素の構造を特定する。文字処理部1404は、特定した構造に基づき、前記文字の誤りを検出、又は誤りである前記文字を補正する。
(Embodiment 3)
FIG. 14 is a functional block diagram showing the operation of the server 1 of the form described above. When the control unit 11 executes the program P, the server 1 operates as follows.
Acquisition unit 1401 acquires image data including a character image. A recognition unit 1402 recognizes characters and coordinates corresponding to the character image. The identification unit 1403 refers to a structured table that defines rules for identifying each element that constitutes the image data, or uses a structure classifier that identifies each element that constitutes the image data to identify the character. Identify the structure of each element of the image data that it contains. The character processing unit 1404 detects an error in the character or corrects the erroneous character based on the specified structure.

本実施の形態3は以上の如きであり、その他は実施の形態1及び2と同様であるので、対応する部分には同一の符号を付してその詳細な説明を省略する。 The third embodiment is as described above, and other aspects are the same as those of the first and second embodiments, so corresponding parts are given the same reference numerals and detailed description thereof will be omitted.

今回開示された実施の形態はすべての点で例示であって、制限的なものではないと考えられるべきである。本発明の範囲は、上記した意味ではなく、特許請求の範囲によって示され、特許請求の範囲と均等の意味及び範囲内でのすべての変更が含まれることが意図される。 The embodiments disclosed this time are illustrative in all respects and should not be considered restrictive. The scope of the present invention is indicated by the scope of the claims rather than the meaning described above, and is intended to include all modifications within the scope and meaning equivalent to the scope of the claims.

1 サーバ(情報処理装置)
11 制御部
12 主記憶部
13 通信部
14 補助記憶部
P プログラム
141 構造化テーブル
142 正順序モデル
143 逆順序モデル
144 誤り補正モデル
145 構造化モデル
2 端末
1 server (information processing device)
11 Control Unit 12 Main Storage Unit 13 Communication Unit 14 Auxiliary Storage Unit P Program 141 Structured Table 142 Forward Order Model 143 Reverse Order Model 144 Error Correction Model 145 Structured Model 2 Terminal

Claims (8)

文字画像を含む画像データを取得する取得部と、
前記文字画像に対応する文字及び座標を認識する認識部と、
前記画像データを構成する各要素を識別する際のルールを規定する構造化テーブルを参照、又は前記画像データを構成する各要素を識別する構造識別器を用いて、前記文字を含む前記画像データの各要素の構造を特定する特定部と、
特定した構造に基づき、前記文字の誤りを検出、又は誤りである前記文字を補正する文字処理部と
を備え
前記文字処理部は、文章群に含まれる文章のうちで正解の文章と、該正解の文章に対応する文章であって誤りの文字を含む文章とを学習済みの識別器を用いて、前記文字の誤りを検出又は補正する
ことを特徴とする情報処理装置。
an acquisition unit that acquires image data including a character image;
a recognition unit that recognizes characters and coordinates corresponding to the character image;
Referencing a structured table that defines rules for identifying each element that constitutes the image data, or using a structure identifier that identifies each element that constitutes the image data, identifying the image data including the character. a specifying part that specifies the structure of each element;
a character processing unit that detects an error in the character or corrects the erroneous character based on the identified structure ,
The character processing unit uses a classifier that has already learned a correct sentence among sentences included in the sentence group and a sentence corresponding to the correct sentence and including an erroneous character to determine the character detect or correct errors in
An information processing device characterized by:
前記認識部は、前記文字画像をテキストデータに変換する
ことを特徴とする請求項1に記載の情報処理装置。
The information processing apparatus according to claim 1, wherein the recognition unit converts the character image into text data.
前記文字処理部は、一又は複数の前記識別器を用いて前記文字の誤りを検出又は補正する
ことを特徴とする請求項1又は2に記載の情報処理装置。
3. The information processing apparatus according to claim 1 , wherein the character processing unit detects or corrects an error in the character using one or more classifiers.
前記文字処理部は、前記文章群に含まれる文章に出現する文字の並び順を学習済みの前記識別器を用いて、前記文字の誤りを検出又は補正する
ことを特徴とする請求項1~3のいずれか1項に記載の情報処理装置。
Claims 1 to 3, wherein the character processing unit detects or corrects an error in the characters using the classifier that has learned the sequence of characters appearing in sentences included in the sentence group. The information processing device according to any one of .
前記文字処理部は、前記文章群に含まれる文章に出現する文字の並び順を、該文章の順に学習済みの第1の前記識別器と、前記文章の先頭から末尾までを逆順序に並び替えた前記文章の順に学習済みの第2の前記識別器とを用いて前記文字の誤りを検出又は補正する
ことを特徴とする請求項に記載の情報処理装置。
The character processing unit rearranges the order of characters appearing in the sentences included in the sentence group in reverse order from the beginning to the end of the sentences with the first classifier that has been trained in the order of the sentences. 5. The information processing apparatus according to claim 4, wherein an error in the character is detected or corrected using the second classifier that has been learned in the order of the sentence.
前記正解の文章は、文字画像を含む学習用の画像データにおいて、前記文字画像に対応付けられたテキストデータであり、
前記誤りの文字を含む文章は、前記認識部が前記学習用の画像データに含まれる前記文字画像を変換したテキストデータである
ことを特徴とする請求項1~5のいずれか1項に記載の情報処理装置。
The correct sentence is text data associated with the character image in learning image data including the character image,
The sentence including the erroneous character is text data obtained by converting the character image included in the learning image data by the recognition unit . Information processing equipment.
文字画像を含む画像データを取得し、
前記文字画像に対応する文字及び座標を認識し、
前記画像データを構成する各要素を識別する際のルールを規定する構造化テーブルを参照、又は前記画像データを構成する各要素を識別する構造識別器を用いて、前記文字を含む前記画像データの各要素の構造を特定し、
特定した構造に基づき、前記文字の誤りを検出、又は誤りである前記文字を補正する処理であって、
文章群に含まれる文章のうちで正解の文章と、該正解の文章に対応する文章であって誤りの文字を含む文章とを学習済みの識別器を用いて、前記文字の誤りを検出又は補正する
処理をコンピュータ実行ることを特徴とする情報処理方法。
Acquire image data including character images,
recognizing characters and coordinates corresponding to the character image;
Referencing a structured table that defines rules for identifying each element that constitutes the image data, or using a structure identifier that identifies each element that constitutes the image data, identifying the image data including the character. Identify the structure of each element,
A process for detecting an error in the character or correcting the erroneous character based on the identified structure,
Detecting or correcting an error in a character by using a classifier that has already learned a correct sentence among sentences included in the sentence group and a sentence corresponding to the correct sentence and containing an erroneous character. do
An information processing method characterized in that a computer executes processing.
文字画像を含む画像データを取得し、
前記文字画像に対応する文字及び座標を認識し、
前記画像データを構成する各要素を識別する際のルールを規定する構造化テーブルを参照、又は前記画像データを構成する各要素を識別する構造識別器を用いて、前記文字を含む前記画像データの各要素の構造を特定し、
特定した構造に基づき、前記文字の誤りを検出、又は誤りである前記文字を補正する処理であって、
文章群に含まれる文章のうちで正解の文章と、該正解の文章に対応する文章であって誤りの文字を含む文章とを学習済みの識別器を用いて、前記文字の誤りを検出又は補正する
処理をコンピュータに実行させることを特徴とするプログラム。
Acquire image data including character images,
recognizing characters and coordinates corresponding to the character image;
Referencing a structured table that defines rules for identifying each element that constitutes the image data, or using a structure identifier that identifies each element that constitutes the image data, identifying the image data including the character. Identify the structure of each element,
A process for detecting an error in the character or correcting the erroneous character based on the identified structure,
Detecting or correcting an error in a character by using a classifier that has already learned a correct sentence among sentences included in the sentence group and a sentence corresponding to the correct sentence and containing an erroneous character. do
A program characterized by causing a computer to execute processing.
JP2019067501A 2019-03-29 2019-03-29 Information processing device, information processing method and program Active JP7322468B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019067501A JP7322468B2 (en) 2019-03-29 2019-03-29 Information processing device, information processing method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019067501A JP7322468B2 (en) 2019-03-29 2019-03-29 Information processing device, information processing method and program

Publications (2)

Publication Number Publication Date
JP2020166658A JP2020166658A (en) 2020-10-08
JP7322468B2 true JP7322468B2 (en) 2023-08-08

Family

ID=72716358

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019067501A Active JP7322468B2 (en) 2019-03-29 2019-03-29 Information processing device, information processing method and program

Country Status (1)

Country Link
JP (1) JP7322468B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7393509B2 (en) 2021-11-29 2023-12-06 ネイバー コーポレーション Deep learning-based method and system for extracting structured information from atypical documents

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008052439A (en) 2006-08-23 2008-03-06 Fuji Xerox Co Ltd Image processing system and image processing program
JP2013127815A (en) 2006-11-29 2013-06-27 Google Inc Digital image archiving and retrieval using mobile device system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008052439A (en) 2006-08-23 2008-03-06 Fuji Xerox Co Ltd Image processing system and image processing program
JP2013127815A (en) 2006-11-29 2013-06-27 Google Inc Digital image archiving and retrieval using mobile device system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Rohit Saluja et al,Error Detection and Corrections in Indic OCR Using LSTMs,2017 14th IAPR International Conference on Document Analysis and Recognition (ICDAR),米国,2017年11月15日,p17-22,https://ieeexplore.ieee.org/document/8269944
荒木 哲郎 他3名,マルコフ連鎖モデルを用いた日本語文の置換型,挿入型及び脱落型誤りの検出・訂正法の改善,電子情報通信学会論文誌D-II,2002年01月01日,Vol. J86-D-II No.1,p66~78

Also Published As

Publication number Publication date
JP2020166658A (en) 2020-10-08

Similar Documents

Publication Publication Date Title
JP5647919B2 (en) Character recognition device, character recognition method, character recognition system, and character recognition program
CN109858488B (en) Handwritten sample recognition method and system based on sample enhancement
US11954139B2 (en) Deep document processing with self-supervised learning
CN111160343A (en) Off-line mathematical formula symbol identification method based on Self-Attention
CN111488732B (en) Method, system and related equipment for detecting deformed keywords
US11295175B1 (en) Automatic document separation
CN113159013A (en) Paragraph identification method and device based on machine learning, computer equipment and medium
JP2019212115A (en) Inspection device, inspection method, program, and learning device
JP5942361B2 (en) Image processing apparatus and image processing program
JP7322468B2 (en) Information processing device, information processing method and program
CN112464927B (en) Information extraction method, device and system
WO2016181470A1 (en) Recognition device, recognition method and program
US11494431B2 (en) Generating accurate and natural captions for figures
US11379534B2 (en) Document feature repository management
Al Ghamdi A novel approach to printed Arabic optical character recognition
JP2008225695A (en) Character recognition error correction device and program
Kumar et al. Survey paper of script identification of Telugu language using OCR
Chowdhury et al. Implementation of an optical character reader (ocr) for bengali language
JP2023043910A (en) Character string extraction device, character string extraction method and character string extraction program
Le et al. An Attention-Based Encoder–Decoder for Recognizing Japanese Historical Documents
Idziak et al. Scalable handwritten text recognition system for lexicographic sources of under-resourced languages and alphabets
US20230377358A1 (en) Method and apparatus for dechipering obfuscated text for cyber security
JP7283112B2 (en) Information processing device, information processing method and program
US11972208B2 (en) Information processing device and information processing method
US20230343123A1 (en) Using model uncertainty for contextual decision making in optical character recognition

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220128

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230125

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230131

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230308

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20230627

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230710

R150 Certificate of patent or registration of utility model

Ref document number: 7322468

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150