JP7322468B2 - Information processing device, information processing method and program - Google Patents
Information processing device, information processing method and program Download PDFInfo
- 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
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
しかしながら、特許文献1に係る発明は元々の原稿の誤りを検出するのみで、画像データから文字を認識する際の誤認識も含めて誤りを検出するに至っていない。
However, the invention according to
一つの側面では、画像データから認識した文字の誤りを検出又は補正することができる情報処理装置等を提供することを目的とする。 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)
図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
なお、本実施の形態では処理対象とする画像データが「文書」に係る画像であるものとするが、本システムでは文字画像を含む画像データから文字を認識し、認識した文字の誤りを検出又は補正可能であればよく、処理対象とする画像データは文書画像に限定されない。例えばイラスト、写真等を処理対象としてもよい。また、画像データに含まれる文字画像は印刷文字に限定されず、例えば手書きで記入された文字などであってもよい。 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
端末2は、サーバ1に接続されたクライアント端末であり、例えばパーソナルコンピュータ等である。例えばサーバ1は、ネットワークNを介して端末2から文書画像を取得し、取得した文書画像を対象として後述の処理を行う。
The
なお、本実施の形態ではクラウド上のサーバ1が処理を行うものとして説明するが、ローカル装置(例えば端末2)で一連の処理を行ってもよい。
In this embodiment, the
図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
The
補助記憶部14は、ハードディスク、大容量メモリ等の不揮発性記憶領域であり、制御部11が処理を実行するために必要なプログラムP、その他のデータを記憶している。また、補助記憶部14は、構造化テーブル141、正順序モデル142、逆順序モデル143、及び誤り補正モデル144を記憶している。構造化テーブル141は、非構造化データである文書画像から構造化データに変換するためのルールを規定するテーブルである。正順序モデル142は、文章内に出現する文字列の並び順を、文章通りの正順序で学習済みの学習済みモデルである。逆順序モデル143は、文章内に出現する文字列の出現順序を、文章の並び順とは逆順序で学習済みの学習済みモデルである。誤り補正モデル144は、正しく表記された文章と、誤りを含む文章とのペアを学習することで誤りの出現パターンを学習済みの学習済みモデルである。
The
なお、補助記憶部14はサーバ1に接続された外部記憶装置であってもよい。また、サーバ1は複数のコンピュータからなるマルチコンピュータであっても良く、ソフトウェアによって仮想的に構築された仮想マシンであってもよい。
Incidentally, the
また、本実施の形態においてサーバ1は上記の構成に限られず、例えば操作入力を受け付ける入力部、画像を表示する表示部等を含んでもよい。また、サーバ1は、CD(Compact Disk)-ROM、DVD(Digital Versatile Disc)-ROM等の可搬型記憶媒体1aを読み取る読取部を備え、可搬型記憶媒体1aからプログラムPを読み取って実行するようにしても良い。あるいはサーバ1は、半導体メモリ1bからプログラムPを読み込んでも良い。
Moreover, in the present embodiment, the
図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
なお、本明細書で「テキストデータ」とは、文字画像に対応する文字を表すデータであって、コンピュータが文字を解釈して表示するために必要なデータを意味する。テキストデータは、例えばプレーンテキスト(文字コード情報)であってもよく、プレーンテキストに加えてフォント、文字サイズ等の情報を含むデータであってもよい。 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
サーバ1は、生成した文書ファイルを、XMLファイル等の構造化データに変換する処理を行い、文章構造を特定する。サーバ1は、特定した文章構造に基づいてテキストデータを抽出し、当該テキストデータの誤りを検出する。
The
図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
図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
例えば構造化テーブル141は、タイトル、本文、写真、図表、キャプション等の各要素について、各要素を識別する上で基準とする文字サイズ、フォント、文書内での座標位置、座標範囲等の情報(ルール)を格納してある。サーバ1は、構造化テーブル141を参照して、文書ファイルから各要素を識別する。
For example, the structured table 141 contains information ( rules) are stored. The
サーバ1は、識別した各要素に対してメタデータを付与する。メタデータは、各要素を定義付けるタグ情報であり、各要素にタグ付けされるタグ名、あるいはタグ内の情報として格納される属性値などである。例えば図4右下に図示したように、文書のタイトルに該当する要素であれば「title」、サブタイトルに該当する要素であれば「section」がメタデータ(タグ名)として付与される。
The
上述の如く、サーバ1は、各要素を識別する際のルールを規定する構造化テーブル141を参照して、文書ファイルを構成する各要素を識別し、メタデータを付与する。そしてサーバ1は、図5右上に図示するように、非構造化データである文書ファイルを構造化した構造化データを生成する。これにより、図4右下に図示したように、文書ファイルのテキストデータについて、正しい文字順序、改行位置等を認識することができる。
As described above, the
サーバ1は、上記で生成した構造化データに基づいてテキストデータを抽出し、抽出したテキストデータに誤りがあるか否か、誤り検出を行う。本実施の形態でサーバ1は、文章群(文書コーパス)から生成した正順序モデル142、逆順序モデル143、及び誤り補正モデル144の3種類のモデル(識別器)を用いて誤り検出を行う。
The
なお、これらのモデルは、タグに関係なくテキストデータ全体を使って生成することもあれば、タグごとにモデルを生成することも考える。例えば、上記の「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
正順序モデル142及び逆順序モデル143はそれぞれ、文書コーパスに出現する文字列の並び順(出現順序)を学習した学習済みモデル(識別器)であって、例えば深層学習により生成されるニューラルネットワークである。具体的には、正順序モデル142及び逆順序モデル143は、RNN(Recurrent Neural Network)の一種であるLSTM(Long Short-Term Memory)により作成される。
The forward-
なお、LSTMは正順序モデル142及び逆順序モデル143の一例であって、正順序モデル142及び逆順序モデル143は、その他の深層学習など、他のアルゴリズムに係る学習済みモデルであってもよい。また、N-gram、分かち書きなど、他の文字の切り分けに係る学習済みモデルであってもよい。
Note that the LSTM is an example of the
正順序モデル142及び逆順序モデル143は、文章内で出現する各文字列のデータの入力を受け付けるための入力層と、各文字列に続いて出現する文字列の推定結果を出力する出力層と、入力層及び出力層の間の演算処理を行う中間層(隠れ層)とを有する。入力層は、文章における出現順序に従って、文章内に出現する各文字列のデータの入力をそれぞれ受け付ける複数のニューロンを有する。中間層は、入力層の各ニューロンに対応して、入力層と出力層との間の演算を行うための複数のニューロンを有する。中間層のニューロンはLSTMブロックと呼ばれ、中間層における過去時点の演算結果を用いて次の時点での入力値に関する演算を行うことで、直近時点までの時系列的なデータから次の時点の値を演算する。出力層は、中間層から出力された演算値に基づき、入力層の対応するニューロンに入力された文字列に続く文字列の推定結果を表す出力値を出力する。
The
正順序モデル142を生成する場合、サーバ1は文書コーパスの文章を所定単位の文字列毎に分割し、分割した各文字列を、文章内での並び順(正順序)に従って入力層に順次入力する。文章の分割単位は、例えば一文字ずつの文字単位であるが、本実施の形態はこれに限定されるものではなく、例えば単語単位で分割してもよい。サーバ1は、文章の先頭から続く一又は複数の文字列を順次入力し、当該一又は複数の文字列に続く次の文字列を推定した推定結果を出力層から取得する。例えば出力層は、図6に示すように、推定された次の文字列と、当該文字列の生起確率とを推定結果として出力する。
When generating the
サーバ1は、推定された文字列を、実際に文章に出現する正解の文字列と比較し、両者が近似するように、各ニューロン間の重み、活性化関数の係数等の各種パラメータの最適化を行う。サーバ1は、文書コーパスの各文章について上記の処理を行い、正順序モデル142を生成する。
The
逆順序モデル143を生成する場合、サーバ1は、文書コーパスの文章を分割した各文字列の並び順を、先頭及び末尾を入れ換えた逆順序に変換する。サーバ1は、変換後の並び順で各文字列を入力層に順次入力し、元の文章において末尾から続く一又は複数の文字列に基づき、当該一又は複数の文字列の直前に出現する文字列を推定した推定結果を出力層から取得する。サーバ1は、推定された文字列を正解の文字列と比較し、両者が近似するように各種パラメータを最適化して逆順序モデル143を生成する。
When generating the
このように、サーバ1は、文章内の文字列の並び順を正順序で学習した正順序モデル142と、逆順序で学習した逆順序モデル143とを生成し、両者を用いて誤り検出を行う。
In this way, the
サーバ1は、構造化した文書ファイルからテキストデータ(文章)を抽出し、テキストデータを所定単位の文字列毎(例えば一文字ずつ)に分割する。サーバ1は、分割した各文字列をテキストデータにおける並び順(正順序)に従って正順序モデル142に順次入力し、各位置に出現する文字列の推定結果(生起確率)を出力として取得する。サーバ1は、推定した文字列と、文書画像から認識した文字列(文字)とを比較し、例えば生起確率が閾値以下である文字列は誤りであるものとして検出する。
The
サーバ1は、テキストデータを分割した文字列の順序を逆順序に変換し、変換後の順序(逆順序)に従って逆順序モデル143に順次入力する。サーバ1は、逆順序モデル143からテキスト内の各位置に出現する文字列を推定し、文字画像から認識した文字列と比較して、誤りを判定する。
The
図7は、誤り補正モデル144に関する説明図である。図7では、誤りを含まない正解の文章と、誤りを含む文章とをペアで学習することで、誤りの出現パターンを学習済みの誤り補正モデル144を用いた誤り検出処理を概念的に図示している。
FIG. 7 is an explanatory diagram of the
誤り補正モデル144は、正順序モデル142、逆順序モデル143と同様に深層学習により生成された学習済みモデルであり、例えばSequence-to-Sequenceにより生成される。サーバ1は、誤りを含まない正解文章と、正解文章に対応する文章であって、誤りを含む文章とを用いて学習を行い、誤り補正モデル144を生成する。
The
例えばサーバ1は、誤り補正モデル144を生成するための学習用データとして、テキストデータを含む文書ファイルを用いて学習を行う。
正解文章には、学習用の文書ファイルに付されているテキストデータを用いる。誤りを含む文章には、学習用の文書ファイルを画像化し、その画像に対してOCRなどの文字認識を適用した結果得られる元のテキストデータとは異なる誤りを含むテキストデータを用いる。
For example, the
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
元の文書ファイルにおけるテキストデータ(正解テキストデータ)と、生成した文書ファイルに存在するテキストデータ(誤りテキストデータ)と、の対応関係から対応付けを行うことで学習用データセットを得ることができる。なお、対応付けはテキストデータの位置関係や元データに存在するタグの参照、構造化等により行うことができる。 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
このように、サーバ1は、OCR等で文字画像を変換したテキストデータと、学習用の文書ファイルに付されているテキストデータとを用いて、テキストデータへの変換時に発生する誤りを検出、補正するモデルを生成する。誤り検出時においてサーバ1は、図5で説明した処理によって構造化した文書ファイルからテキストデータを抽出し、誤り補正モデル144に入力して、テキストデータの誤りの検出及び補正を行う。
In this way, the
上述の如く、サーバ1は、正順序モデル142、逆順序モデル143、及び誤り補正モデル144の3種類のモデルを用いて、各々のモデルでテキストデータの誤りを検出する。例えばサーバ1は、3種類のモデルのうち、過半数(2種類以上)のモデルで同一の文字(文字列)の誤りと判定した場合、当該文字が誤りであるものとして検出する。あるいはサーバ1は、いずれかのモデルで誤りと判定した場合、判定された箇所を誤りとして検出してもよい。あるいはサーバ1は、3種類のモデルそれぞれから出力される出力値(生起確率等の確率値)に基づいて総合的な誤り判定を行い、誤りである文字を検出するようにしてもよい。
As described above, the
なお、本実施の形態では正順序モデル142、逆順序モデル143、及び誤り補正モデル144の3つのモデルを用いて誤り検出を行ったが、サーバ1は、上記3つのモデルの全てを搭載している必要はなく、1つまたは2つのモデルを用いて誤り検出を行ってもよい。また、上記3つのモデル以外の他のモデルを搭載し、4つ以上のモデルで誤り検出を行ってもよい。
In the present embodiment, three models, the
誤りを検出した場合、サーバ1は、正順序モデル142、逆順序モデル143、及び/又は誤り補正モデル144を用いて、誤りである文字を正しい文字に補正する。例えばサーバ1は、誤り補正モデル144で誤りを検出した場合、誤りの文字を、誤り補正モデル144で補正された文字に変換する。あるいは、サーバ1は、誤り補正モデル144において誤りとして検出されなかったものの、正順序モデル142及び/又は逆順序モデル143において誤りとして検出された場合、正順序モデル142及び/又は逆順序モデル143から出力される推定結果に基づき、誤りとして検出された文字を、生起確率が最も高い文字に変換する。あるいはサーバ1は、3つのモデル全ての出力値に基づいて正解の文字を推定し、テキストデータを補正してもよい。
If an error is detected, the
サーバ1は、文書ファイルのテキストデータを補正後のテキストデータに変換し、文書ファイルを端末2に出力する。なお、サーバ1は構造化データ(XMLファイル等)の形式で文書ファイルを出力してもよく、非構造化データ(PDFファイル等の画像データ)に戻して出力してもよい。これにより、サーバ1は、文字認識時の誤認識も含めて、文書内の誤りを補正した文書ファイルを提供することができる。
The
図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
The
制御部11は、分割した文字列の並び順を、文章の順(正順序)で学習する機械学習を行い、正順序モデル142を生成する(ステップS13)。具体的には、制御部11は、分割した文字列を元の文章の並び順に従って順次入力し、先頭から順に出現する一又は複数の文字列に基づき、当該一又は複数の文字列に続く次に出現する文字列を推定した推定結果(生起確率等)を出力として取得する。制御部11は、推定結果を正解の文字列と比較し、両者が近似するように、正順序モデル142の演算に用いる重み等の各種パラメータを最適化して正順序モデル142を生成する。
The
制御部11は、ステップS12で分割した文字列の並び順を、文章の先頭及び末尾を入れ換えた逆順序に変換する(ステップS14)。制御部11は、逆順序に変換した文字列の並び順を学習する機械学習を行い、逆順序モデル143を生成する(ステップS15)。すなわち、制御部11は、各文字列を逆順序で順次入力し、元の文章において末尾から順に出現する一又は複数の文字列に基づき、当該一又は複数の文字列の直前に出現する文字列を推定した推定結果を出力として取得する。制御部11は、推定結果を正解の文字列と比較して各種パラメータの最適化を行い、逆順序モデル143を生成する。制御部11は、一連の処理を終了する。
The
図9は、誤り補正モデル144の生成処理の手順を示すフローチャートである。図9に基づき、誤り補正モデル144を生成する機械学習の処理内容について説明する。
サーバ1の制御部11は、誤り補正モデル144を生成するための学習用データであって、文字画像を含む文書画像に対し、各文字画像に対応するテキストデータが付与された文書ファイル群を取得する(ステップS31)。制御部11は、取得した文書ファイルからテキストデータを除去し、文書画像に変換する(ステップS32)。
FIG. 9 is a flow chart showing the procedure for generating the
The
制御部11は、OCR等の手段で文書画像内の各文字画像をテキストデータに変換し、文書画像における当該テキストデータの座標を特定する(ステップS33)。制御部11は、変換したテキストデータを、特定した座標に挿入(付与)した文書ファイルを生成する(ステップS34)。
The
制御部11は、構造化テーブル141を参照して、ステップS33で生成した文書ファイルと、ステップS31で取得した学習用の文書ファイルとをそれぞれ構造化データに変換する(ステップS35)。構造化処理を行うことにより、各文書ファイルに含まれる正解テキストデータ及び誤りテキストデータの各文の対応関係を取得することができる。また、構造化したタグごとに学習を行うことも可能である。
The
制御部11は、構造化した各文書ファイルのテキストデータを用いて、誤り補正モデル144を生成する(ステップS36)。具体的には、制御部11は、ステップS34で生成した文書ファイルを構造化して得たテキストデータ(文章)を誤り補正モデル144に入力し、誤りである文字を補正したテキストデータを出力として取得する。制御部11は、出力されたテキストデータと、ステップS31で取得した学習用の文書ファイルのテキストデータとを比較して、両者が近似するように各種パラメータを最適化して誤り補正モデル144を生成する。制御部11は一連の処理を終了する。
The
図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
制御部11は、構造化した文書ファイルからテキストデータを抽出し、抽出したテキストデータから誤りである文字を検出する(ステップS55)。具体的には、制御部11は、正順序モデル142、逆順序モデル143、及び誤り補正モデル144にそれぞれテキストデータ(文章)を入力し、複数のモデル(識別器)を用いて誤りを検出する。誤りが検出された場合、制御部11は、正順序モデル142、逆順序モデル143、又は誤り補正モデル144を用いて、誤りの文字を補正する(ステップS56)。制御部11は、一連の処理を終了する。
The
なお、上記では文字認識手段としてOCRを用いたが、サーバ1は文字画像に対応する文字を認識可能であればよく、例えばICR(Intelligent Character Recognition)等の手段を用いてもよい。また、文字認識手段は光学的手段に限定されず、画像データから文字を認識可能であればよい。
Although OCR is used as the character recognition means in the above description, the
また、上記では文書ファイル(画像データ)を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
また、本実施の形態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
また、本実施の形態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
また、本実施の形態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
FIG. 11 is a block diagram showing a configuration example of the
図12は、構造化モデル145に関する説明図である。非構造化データである教師用の文書ファイル(文書画像)から構造化モデル145を生成する様子を概念的に図示している。図12に基づき、本実施の形態の概要を説明する。
上述の如く、本実施の形態においてサーバ1は、予めルールが設定された構造化テーブル141に代えて、機械学習を行うことで構築した構造化モデル145を用いて文書の構造化を行う。例えばサーバ1は、CNNに係るニューラルネットワーク、具体的にはセマンティックセグメンテーションに係るニューラルネットワークを構造化モデル145として生成し、文書の構造化処理に用いる。
FIG. 12 is an explanatory diagram of the
As described above, in the present embodiment, the
例えばサーバ1は、文書画像に対し、当該文書を構成するタイトル、本文等の各要素について、メタデータの正解値が関連付けられた教師用の文書ファイルを用いて学習を行う。例えば図12に示すように、教師用の文書ファイルでは、各要素に相当する領域(矩形枠で図示)に対し、メタデータの正解値に相当するタグ名が関連付けられている。サーバ1は、当該教師データを用いて構造化モデル145を生成する。
For example, the
サーバ1は、教師用の文書画像を構造化モデル145に入力し、当該文書画像に含まれる各要素を識別した識別結果を出力として取得する。例えばサーバ1は、各要素に相当する画像領域の座標値と、当該領域に含まれる要素に付与すべきメタデータとを出力として取得する。サーバ1は、出力された画像領域の座標値及びメタデータを正解値と比較し、両者が近似するように、構造化モデル145において演算に用いる重み等のパラメータを最適化する。これによりサーバ1は、構造化モデル145を生成する。
The
端末2から文書画像を取得した場合、サーバ1は、上記で生成した構造化モデル145を用いて構造化を行う。具体的には、サーバ1は、取得した文書画像を構造化モデル145に入力し、各要素を識別した識別結果を取得する。サーバ1は、識別結果に従って文書内の各要素を抽出し、メタデータを付与する。これにより、サーバ1は文書画像を構造化した構造化データを生成する。その後、サーバ1は実施の形態1と同様に誤り検出を行い、誤りである文字を補正する。
When a document image is acquired from the
図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
The
以上より、本実施の形態2によれば、機械学習によって構築した構造化モデル145を用いて文書画像の構造化を行うこともできる。
As described above, according to the second embodiment, the
(実施の形態3)
図14は、上述した形態のサーバ1の動作を示す機能ブロック図である。制御部11がプログラムPを実行することにより、サーバ1は以下のように動作する。
取得部1401は、文字画像を含む画像データを取得する。認識部1402は、前記文字画像に対応する文字及び座標を認識する。特定部1403は、前記画像データを構成する各要素を識別する際のルールを規定する構造化テーブルを参照、又は前記画像データを構成する各要素を識別する構造識別器を用いて、前記文字を含む前記画像データの各要素の構造を特定する。文字処理部1404は、特定した構造に基づき、前記文字の誤りを検出、又は誤りである前記文字を補正する。
(Embodiment 3)
FIG. 14 is a functional block diagram showing the operation of the
本実施の形態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
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 .
ことを特徴とする請求項4に記載の情報処理装置。 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.
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)
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)
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 |
-
2019
- 2019-03-29 JP JP2019067501A patent/JP7322468B2/en active Active
Patent Citations (2)
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)
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 |