JPH0271388A - After-processing system for recognition of character - Google Patents

After-processing system for recognition of character

Info

Publication number
JPH0271388A
JPH0271388A JP63222307A JP22230788A JPH0271388A JP H0271388 A JPH0271388 A JP H0271388A JP 63222307 A JP63222307 A JP 63222307A JP 22230788 A JP22230788 A JP 22230788A JP H0271388 A JPH0271388 A JP H0271388A
Authority
JP
Japan
Prior art keywords
character
word
words
candidate
automaton
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.)
Granted
Application number
JP63222307A
Other languages
Japanese (ja)
Other versions
JP2886868B2 (en
Inventor
Yasuaki Nakano
中野 康明
Hiromichi Fujisawa
藤沢 浩道
Hisamitsu Kawaguchi
川口 久光
Toshihiro Hananoi
花野井 歳弘
Akizo Kadota
門田 彰三
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP63222307A priority Critical patent/JP2886868B2/en
Publication of JPH0271388A publication Critical patent/JPH0271388A/en
Application granted granted Critical
Publication of JP2886868B2 publication Critical patent/JP2886868B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Character Discrimination (AREA)

Abstract

PURPOSE:To perform the collation of words at a high speed by producing a finite automaton from the candidate character strings outputed from a character recognizer to accept the combination of those character strings and outputting such words contained in a word dictionary that are successively inputed and accepted by the automaton. CONSTITUTION:A scanner 104 scans the pictures of documents 110 and converts them into the binary digital pictures to store these pictures in a video memory 105. A character recognizing part 106 segments a character pattern out of the document pictures of the memory 105 and recognizes the character pattern. When the recognition of characters is through, a transition table of a finite automaton is produced from the candidate character strings and stored in a memory of a word collation part 107. Then the part 107 is started and each word contained in a word dictionary is inputed to the automaton via the transition table. At the same time, the distance to each word is outputed to the memory 105. The condidate words are displayed at a terminal 102 and selected or corrected by an operator.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は文字認識の後処理方式に係り、特にカナ文字で
書かれた住所や氏名などの情報を自動的に漢字文字列に
変換する目的に好適な文字認識の後処理方式に関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a post-processing method for character recognition, and in particular, the purpose is to automatically convert information such as addresses and names written in kana characters into kanji character strings. The present invention relates to a post-processing method for character recognition suitable for.

〔従来の技術〕[Conventional technology]

通常の文字認識装置(以下、OCRと略する)では、認
識性能は100%完全ではなく、誤読や不読が避けられ
ない。ここでいう不読の中には、認識結果として候補文
字が全く得られないものと、複数個の候補文字が得られ
てそのいずれかを決定できないものとが含まれる。以下
、前者の不読を拒絶性の不読または単に拒絶、後者の不
読を競合性の不読または単に競合と呼んで区別すること
がある。
In ordinary character recognition devices (hereinafter abbreviated as OCR), recognition performance is not 100% perfect, and misreading or misreading is inevitable. The unreadable characters here include those in which no candidate character is obtained as a recognition result, and those in which a plurality of candidate characters are obtained and one of them cannot be determined. Hereinafter, the former type of unreading may be referred to as rejectionive unreading or simply rejection, and the latter type of unreading may be referred to as competitive unreading or simply competition.

このようなOCRの認識性能の不完全性を補うため、た
とえば住所や氏名など単語としてまとまって書かれた文
字列の読み取り結果について jl。
In order to compensate for such imperfections in the recognition performance of OCR, for example, the results of reading character strings written as words, such as addresses and names.

語照合を行って認識性能を高める手法が提案されている
。単語照合とは、住所や氏名として存在し得る単語の集
合を予め単語辞書として用意しておき、認識結果として
得られた候補文字列を単語辞書に含まれる単語と順次比
較し、単語として成立し得ないような候補文字を除去あ
るいは修正するものである。ここで候補文字列とは、各
入力文字パターンに対する個補文字集合を並べたものを
いう。このような手法は、例えば特公昭60−5586
6「文字認識装置」に述べられている。また、単語と認
識候補文字列との比較に際してOCRでの認識結果の情
報を利用するため、候補文字に対して順位ごとに重みを
付けて単語間の距離を計算する手法が、特開昭58−4
8181 r文字認識後処理方式Jや特公昭6]−20
038r文字認識装置」に述べられている。さらに、住
所のように複数の単語からなる文字列に対して、単語辞
書との比較を行う方法も特公昭62−62388 r住
所読取装置」に述べられている。
A method has been proposed to improve recognition performance by performing word matching. Word matching is a word dictionary in which a set of words that can exist as addresses and names is prepared in advance, and the candidate character strings obtained as recognition results are sequentially compared with the words included in the word dictionary. It removes or modifies candidate characters that cannot be obtained. Here, the candidate character string refers to a set of complementary characters for each input character pattern. Such a method is used, for example, in Japanese Patent Publication No. 60-5586.
6 "Character Recognition Device". In addition, in order to use information on recognition results from OCR when comparing words and recognition candidate character strings, a method of calculating distances between words by assigning weights to candidate characters for each rank was proposed in Japanese Patent Laid-Open No. 58. -4
8181 rCharacter recognition post-processing method J and Tokuko Sho 6]-20
038r Character Recognition Device". Furthermore, a method for comparing a character string consisting of a plurality of words, such as an address, with a word dictionary is also described in Japanese Patent Publication No. 62-62388 r Address Reading Apparatus.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上記の従来技術では、単語辞書に含まれる各411語と
候補文字列との比較に際して、各文字(+7!I!!ご
とに出現する全ての候補文字について、単語の中で同一
文字位置にある文字との距離を計算するため、計算時間
がかかるという問題点があった。そのため、単語照合の
効果を高めるには候補文字数を増加することが有利であ
ることが知られているにもかかわらず、計算時間の制限
から候補文字数を少数個に抑える必要があり、単語照合
の効果を充分発揮できなかった。さらに、複数の単語が
連続して記入された場合には、単語間の切目が検出でき
ないため、単語照合が困難になる問題点があった・ 本発明の第一の目的は5高速な単語照合手段を提供する
ことにある。また、本発明の第二の目的は複数の単語が
連続して書かれた場合にも単語照合を可能とする手段を
提供することにある。
In the above conventional technology, when comparing each of the 411 words included in the word dictionary with the candidate character string, all candidate characters that appear every +7!I!! are found to be in the same character position in the word. There was a problem in that it took a long time to calculate the distance to the characters.Therefore, although it is known that increasing the number of candidate characters is advantageous in increasing the effectiveness of word matching, However, due to calculation time limitations, it was necessary to keep the number of candidate characters to a small number, and the effectiveness of word matching could not be fully demonstrated.Furthermore, when multiple words were written in succession, breaks between words could not be detected. The first object of the present invention is to provide a high-speed word matching means.The second object of the present invention is to provide a high-speed word matching means. The purpose is to provide a means that enables word matching even when words are written consecutively.

〔課題を解決するための手段〕[Means to solve the problem]

上記の第一の目的は、OCRから出力される候補文字列
から、この候補文字列の組合せを受理するような有限オ
ートマトンを生成し、この有限オートマトンに単語辞書
に含まれる単語を順次入力し、受理されるような単語を
出力することによって達成される。
The first purpose mentioned above is to generate a finite automaton that accepts combinations of candidate character strings from candidate character strings output from OCR, sequentially input words included in a word dictionary into this finite automaton, This is accomplished by outputting such words that are accepted.

上記の第二の目的は、OCR出力の候補文字列から生成
される有限オートマトンを複数の候補点で切断して部分
オートマトンを生成し、その部分オートマトンに単語辞
書に含まれる単語を入力し、受理される単語が存在する
ような切断点を検出し、かつ各切断点間の部分オートマ
トンで受理された各単語の属する単語辞書の間の−に下
関係に矛盾がないように制御することによって達成され
る。
The second purpose above is to generate a partial automaton by cutting the finite automaton generated from the candidate character string of OCR output at multiple candidate points, input words included in the word dictionary into the partial automaton, and accept it. This is achieved by detecting cut points such that there are words that are accepted, and by controlling the partial automaton between each cut point so that there is no contradiction in the −-lower relationship between the word dictionaries to which each accepted word belongs. be done.

〔作用〕[Effect]

まず、従来方式による嚇語照合の原理を説明する。カナ
文字で書かれた地名の場合を例に取り、入力文字が[カ
ラスヤマ(烏山)」であったとき、各文字に対する認識
結果として、 入力     力  ラ  ス  ヤ  マ第1位  
 サ  テ  ヌ  カ  マ第2位    力  ウ
  ス  キ  ア第3位  り プ イ ヱ タ 第4位   ヤ  り  ト     フのように候補
文字が得られたとする。
First, the principle of the conventional method of matching threatening words will be explained. Taking the case of a place name written in kana characters as an example, when the input character is ``Karasuyama'', the recognition result for each character is that the input power is 1st place.
Suppose that candidate characters such as SATENUKAMA 2nd place 力USUKIA 3rd place RIPUI ETA 4th place YARI TOFU are obtained.

ここで、アングラインを付けた文字は正解文字を示す。Here, the characters with an angline indicate the correct characters.

この候補文字列と、単語辞書の中に存在する各単語との
距離は5文字ごとの距離の総和として定義され、文字ご
との距離は、例えば単語の中に含まわる文字が第り位候
補であるとき(n−1)であると定義される。候補の中
にない文字の場合は距離として適当な値、例えば16を
取る。したがって、単語[カラスヤマ(烏山)」に対す
る距離は最初の文字「力」は第2位なので距離1となり
、以下同様にして単語全体では D=1+2+1+2+O=6 となる。同様に単語「サクラヤマ(桜山)」に対しては D=O+3+16+2+0=21 となる。以下同様に全ての単語との距離を求め。
The distance between this candidate character string and each word in the word dictionary is defined as the sum of the distances for every 5 characters, and the distance for each character is, for example, the highest candidate character in a word. At some point, it is defined as (n-1). In the case of a character that is not among the candidates, an appropriate value, for example 16, is taken as the distance. Therefore, the distance to the word "Karasuyama" is 1 because the first character "power" is in the second position, and in the same way, the distance for the entire word is D=1+2+1+2+O=6. Similarly, for the word "Sakurayama", D=O+3+16+2+0=21. Find the distance to all words in the same way.

距離が最小になる単語を候補単語として設定する。The word with the minimum distance is set as a candidate word.

この例では「カラスヤマ(烏山)」に対する距離が最小
になるので、これを候補単語として設定する。なお、単
語辞書内の単語との距離計算は、長さが等しい単語(こ
の例では5文字の単語)についてのみ行われるのが普通
である。
In this example, the distance to "Karasuyama" is the minimum, so this is set as a candidate word. Note that distance calculations between words in the word dictionary are normally performed only for words of equal length (in this example, five-letter words).

上記の例では、各文字パターンに対する認識結果は全て
競合性の不読となっていて候補中に正解が含まれている
ものとしたが、認識結果が正続の場合はいうまでもなく
、誤読あるいは拒絶性の不読の場合にも適用できること
は明かであろう。誤読の場合には、単語辞書に存在する
別の単語に偶然誤まる場合を除けば、はとんどの場合最
小距離が大きくなり、このことを利用して誤読を検出で
きる。一方、拒絶性の不読が]個含まれている場合には
、どの単語にたいしても距離が16となるため、単語の
最小距離は少なくとも16以上になる。このとき、単語
最小距離を受理する閾値を16以上に取ることにより、
拒絶性不読以外の文字が正しく認識されていれば、正し
い単語を探索することができる。
In the above example, the recognition results for each character pattern are all competitive and unreadable, and it is assumed that the correct answer is included in the candidates. It is clear that it can also be applied to cases of refusal to read. In the case of misreading, the minimum distance is large in most cases, except when the word is accidentally mistaken for another word in the word dictionary, and this can be used to detect misreading. On the other hand, if ] rejectable illegibility is included, the distance to any word is 16, so the minimum distance between words is at least 16 or more. At this time, by setting the threshold for accepting the minimum word distance to 16 or more,
If the characters other than the characters that are rejected and illegible are correctly recognized, it is possible to search for the correct word.

この従来方式では、]文字ごとに必要な単位演算量は文
字コートの比較とその結果による距離の累算である。1
単語当たりの情報に対する処理量は単語長と平均候補数
の積が演算回数であり、−トの例では19回の演算が必
要になる。長さが5文字の単語数を例えば3000語と
すれば、全体の演算回数は、19x3000=57.0
0(IJとなる。
In this conventional method, the unit calculation amount required for each character is the comparison of character coats and the accumulation of distances based on the results. 1
As for the processing amount for information per word, the number of operations is the product of the word length and the average number of candidates, and in the example of -t, 19 operations are required. For example, if the number of words with a length of 5 characters is 3000, the total number of operations is 19 x 3000 = 57.0
0 (becomes IJ.

これに対し、本発明による単語照合の原理を第1図を用
いて説明する。本発明では、候補文字列から、第1図の
ような有限オートマトンを生成する。このオートマトン
に単語辞書に含まれる各単語を文字列として表したもの
を順次入力し、その文字列が受理されるかどうが、また
その場合のコストはいくらになるかを求める。
In contrast, the principle of word matching according to the present invention will be explained using FIG. In the present invention, a finite automaton as shown in FIG. 1 is generated from candidate character strings. The automaton sequentially inputs character strings representing each word included in the word dictionary, and determines whether the character string is accepted and how much it will cost in that case.

第1図のオートマトンで丸印は状態を示し、その中に書
かれた文字は状態番号を示し、状態と状態の間が単語の
各文字位置に対応する6状fi間の線は遷移を示し、あ
る状態で線上の左側に書かれた文字がオートマトンに入
力された場合に、その遷移経路をたどって次の状態に遷
移することな示す。ただし、otherは二つの状態間
の遷移に対応する文字として明示されたちの以外の全て
の文字、言い替えれば、その文字位置で候補文字として
現れなかった文字を表す。線」―の右側に書かれた数字
は、その遷移に要するコストであり、この場合は、文字
間の距離に相当する値となっている。
In the automaton shown in Figure 1, the circles indicate states, the letters written inside indicate the state numbers, and the lines between the six-shaped fi, where the lines between states correspond to each character position in the word, indicate transitions. , indicates that if a character written on the left side of the line is input to the automaton in a certain state, it will not follow that transition path and transition to the next state. However, "other" indicates all characters other than those specified as characters corresponding to a transition between two states, in other words, a character that does not appear as a candidate character at that character position. The number written on the right side of the line "-" is the cost required for that transition, and in this case, it is a value equivalent to the distance between characters.

第1図から、単語「カラスヤマ」がこの有限オートマト
ンに入力されたとき、太線で示された経路を辿り、全体
の遷移に要するコストすなわち単語の距離は D=l+2+1+2+0二6 となることは容易に確かめられる。同様に、単語「サク
ラヤマ」は距#21となる。すなわち、この有限オート
マトンは従来方式と同じ結果を与える。本方式の利点は
その高速性にあり、入力された文字1個についてどの遷
移を辿るべきかは1回の単位演算で決定できるから、単
語全体で5回の単位演算で済む。ここで、単位演算とは
文字コードの比較と遷移先状態の決定及びコストの累算
であり、後述するように極めて東線な回路で実現される
。また、ソフトウェアによって本方式を実現する場合も
単純な処理で構成されるため、高速に処理できる。
From Figure 1, when the word "Karasuyama" is input to this finite automaton, it follows the path shown by the thick line, and the cost required for the entire transition, that is, the distance between the words, is easily D = l + 2 + 1 + 2 + 026. It can be confirmed. Similarly, the word "Sakurayama" has distance #21. That is, this finite automaton gives the same result as the conventional method. The advantage of this method is its high speed; since it is possible to determine which transition to follow for each input character in one unit operation, only five unit operations are required for the entire word. Here, the unit operation is the comparison of character codes, the determination of the transition destination state, and the accumulation of costs, and is realized by a very simple circuit as described later. Furthermore, when this method is implemented using software, the processing is simple and can be performed at high speed.

本方式における長さが5文字の単語全体を処理するのに
必要な演算回数は、5x3000=15.000回とな
り、従来方式に比べて高速化されることが判る。上記の
例では、説明を単純化するため候補文字数は比較的少な
いとして説明している。しかし、実際のOCRではカナ
文字の場合には候補数はもっと多いのが普通であり、演
算回数の差はさらに増加する。
The number of operations required to process an entire word with a length of 5 characters in this method is 5×3000=15,000, which shows that the processing speed is faster than in the conventional method. In the above example, in order to simplify the explanation, the number of candidate characters is assumed to be relatively small. However, in actual OCR, the number of candidates is usually larger for kana characters, and the difference in the number of operations increases further.

次に、複数の単語が連続して沓かれた場合における本発
明による単語照合の原理を説明する。カナ文字で書かれ
た人名の場合を例に取り、OCRへの入力文字が「ナカ
ノヤスアキ(中野康明)Jであったとき、認識結果とし
て、各文字に対し次のように候補文字が得られたとする
Next, the principle of word matching according to the present invention when a plurality of words are read in succession will be explained. Taking the case of a person's name written in kana characters as an example, if the characters input to OCR are "Nakano Yasuaki (Yasuaki Nakano) J", the following candidate characters are obtained for each character as a recognition result. Suppose that

入力     す  力  ノ  ヤ  ス  ア  
キ第1位   す  ヤ  ソ  カ  ス  タ  
ホ第2位    メ  サ  ン  キ  ヌ  ア 
 キ第3位   ア  カー  フ  ℃  イ  マ
  ネ第4位   ヤ  り  ノ     フ  フ
前例と同様に、アングラインに付けた文字は正解文字を
示す。
input power
#1 Su Ya So Ka Su Ta
2nd place Me San Ki Nua
Ki 3rd Place A Kafu ℃ I Mane 4th Place Ya Ri No Fu As in the previous example, the letter attached to the Angline indicates the correct letter.

この場合、対象が姓名であることが判っているとして説
明を行うが、単に複数単語であることしか判っておらず
、単語の種類や単語数が不明である場合にも、以下に説
明する本発明の原理は若干の修正を加えるのみで成立す
る。
In this case, the explanation is given assuming that the target is a first and last name, but even if you only know that it is multiple words and the type of word or number of words is unknown, you can use the following explanation. The principle of the invention can be established with only a few modifications.

本例の姓名の場合は単語数が2であるので、上記の候補
文字を部分して、それぞれについて単語照合を行う必要
がある。本発明においては、単一単語の場合と同様に、
候補文字列から第2図のような有限オートマトンを生成
する。遷移を示す矢印で太線で書かれた部分は正解文字
列が辿る経路を示すことは第1図と同様である。
In the case of the first and last name in this example, the number of words is two, so it is necessary to divide the above candidate characters into parts and perform word matching for each part. In the present invention, as in the case of a single word,
A finite automaton as shown in Figure 2 is generated from the candidate character strings. As in FIG. 1, the arrows indicating transitions drawn in thick lines indicate the routes followed by the correct character strings.

この有限オートマトンを、二つの部分オートマトンに切
断する。そのとき、■から■までの6個の状態がいずれ
も切断候補点になるが、それぞれの切断状態において以
下の処理を行い、後述するように最も高い評価点が得ら
れる切断候補点を正しい切断点として採用する。
This finite automaton is cut into two partial automata. At that time, all six states from ■ to ■ become cutting candidate points, but the following processing is performed in each cutting state, and as described later, the cutting candidate point that yields the highest evaluation score is selected for the correct cutting point. Adopted as a point.

(]4) どの切断点でも事情は同じであるから、状態■で切断し
た場合を例にとって説明する。状態■で切断した有限オ
ートマトンの前部及び後部をそれぞれF(5;I)、L
(5i1ンと書く。ここで、括弧の中の第一番目の数字
(5)は状態■で切断したことを意味する。また、括弧
の中の第二番目の数字(])は第1回目の切断を意味す
る。この例では単語数が2であるから、1回しか切断が
行われないが、一般には単語数をMとすれば、i=1か
ら(M −1)まで切断が行われる。切断iで行う単語
照合を第1階層の照合と呼ぶ。
(]4) Since the situation is the same regardless of the cutting point, we will explain the case of cutting in state ■ as an example. The front and rear parts of the finite automaton cut in state ■ are F(5;I) and L, respectively.
(Written as 5i1n.Here, the first number in parentheses (5) means that it was cut in state ■. Also, the second number in parentheses (]) means that it was cut in the first In this example, the number of words is 2, so cutting is performed only once, but in general, if the number of words is M, cutting is performed from i = 1 to (M - 1). The word matching performed at cut i is called the first layer matching.

第1階層では、後部の有限オートマトンのL(5;1)
に名の単語辞書に含まれる単M(この場合は単語長2の
もの)を順次入力し、各単語に対する距離を計算し、距
離の小さい順に並べる。この場合1例えば タキ(1)、アキ(2)、マホ(2)。
In the first layer, L (5; 1) of the rear finite automaton
The words M (with a word length of 2 in this case) included in the word dictionary for names are input in sequence, the distance to each word is calculated, and the words are arranged in descending order of distance. In this case, 1, for example, Taki (1), Aki (2), Maho (2).

マキ(3)、フキ(4)、フネ(5)、・・・の順にな
ったとする。但し、上で括弧の中は各Ht次に、前部の
有限オートマトンのF(5;1)に姓の単語辞書に含ま
れる単語(この場合は単語長5のもの)を順次入力し、
各単語に対する距離を計算する。この場合の距離を小さ
い順に並べるが、例えば ナカムカイ(20)、ナカゝヤス(20)、アサナカゝ
(35)、アカオキ゛’(37)、ナカノソノ(37)
、・・・ なる結果が得られたとする。この前半部と後半部の距離
を合計し、 ナカムカイタキ(21)、ナカゝヤスタキ(21)、ナ
カムカイアキ(22)、ナカゝヤスアキ(22)、ナカ
ムカイマホ(22)、ナカゝヤスマホ(22)。
Suppose that the order is Maki (3), Butterbur (4), Fune (5), and so on. However, in the parentheses above, each Ht, then input the words included in the word dictionary of the last name (in this case, the word length 5) into F(5;1) of the finite automaton in the front,
Calculate the distance for each word. In this case, the distances are arranged in ascending order, for example, Nakamukai (20), Nakayasu (20), Asanakai (35), Akaoki' (37), and Nakanosono (37).
,... Suppose that the following results are obtained. Adding up the distance between the first half and the second half, we get Nakamu Kaitaki (21), Naka Yasutaki (21), Naka Yasuaki (22), Naka Yasuaki (22), Naka Yasuaki (22), Naka Yasumaho (22).

ナカムカイマキ(21)、ナカ゛′ヤスマキ(21)、
のように並べ、距離の小さい順に数個を切断点■におけ
る候補(複合!li語の候補)として、テーブルに傍録
する。
Nakamukaimaki (21), Naka'yasumaki (21),
Arrange them as follows, and record several of them in the table in descending order of distance as candidates (compound !li word candidates) at cutting point ■.

(]6) 次に、切断点を前に動かして切断点■におけるオートマ
トンL(4;]、)及びF(4;1)とを用いて複合単
語の候補とその距離を求める。以下同様に、切断点を順
次前に動かして行き、複合単語の候補とその距離を求め
る。最後に。各切断点での候補を統合して距離の小さい
順に並べ替えることにより、姓名の複合単語に対して ナカノヤスアキ(9)、アサノヤスアキ(10)、ナカ
ムカイタキ(21)、ナカゞヤスタキ(2J)、ナカノ
カス9キ(22)、  ・・・ のような候補系列を得る。この結果、ocRへの入力文
字「ナカノヤスアキ」に対して、第一候補 ナカノ+ヤ
スアキ (中野、中埜)+(泰明、康昭、康明)第二候補 アサ
ノ+ヤスアキ (浅野、朝野)+(泰明、康昭、康明)という候補を得
る。なお、単語辞書の中に、各単語に対応して、上記の
括弧の中に示したような漢字表記を記憶しておけば、単
語照合を行なうと同時に仮名から漢字への変換も同時に
行なうことが(]7) できる。
(]6) Next, move the cutting point forward and use the automatons L(4;], ) and F(4;1) at the cutting point ■ to find compound word candidates and their distances. Similarly, the cutting points are sequentially moved forward to find compound word candidates and their distances. lastly. By integrating the candidates at each cutting point and sorting them in descending order of distance, for compound words with first and last names, we can find Nakano Yasuaki (9), Asano Yasuaki (10), Nakamukaitaki (21), Nakayasuaki (2J), Candidate sequences such as Nakano Kas9ki (22), . . . are obtained. As a result, for the input character "Nakano Yasuaki" to ocR, the first candidate Nakano + Yasuaki (Nakano, Nakano) + (Yasuaki, Yasuaki, Yasuaki), and the second candidate Asano + Yasuaki (Asano, Asano) + (Yasuaki, Yasuaki, Yasuaki) was selected as the candidate. Note that if you store the kanji notation shown in parentheses above for each word in the word dictionary, you can perform word matching and convert kana to kanji at the same time. (]7) It is possible.

以上の複合単語に関する説明では、複合単語として姓名
を取ったので、必ず姓、名の順に単語が並び、単語間の
順序関係の検査は省略しても良かった。しかし、例えば
住所の場合、都道府県、市郡区、町村といった階層があ
り、各階層の間に従属関係が存在する。従って、この従
属関係を調べることにより、単語の候補をさらに限定で
きる。
In the above explanation regarding compound words, first and last names were used as compound words, so the words were always arranged in the order of last name and first name, and the examination of the order relationship between words could be omitted. However, for example, in the case of an address, there are hierarchies such as prefecture, city, town, village, town, and village, and there are subordination relationships between each hierarchy. Therefore, by examining this dependency relationship, word candidates can be further limited.

いま、住所を後側から切断して単語照合して行く場合を
考える。単語照合の結果として町村名の候補が求められ
た時、その前方の単語は市郡区の辞書を用いて見出され
る。このとき、予めテーブルに登録しておいた町村名と
市郡区との従属関係を調べ、従属関係のない組合せに対
しては大きな距離を加算する。同様に市郡区とその前方
の都道府県についても、従属関係のない組合せに対して
は大きな距離を加算する。このようにすれば、誤った組
合せを排除できる。
Now, let's consider a case where an address is cut from the back and words are compared. When word matching results in a candidate town/village name, the previous word is found using the city/town/ward dictionary. At this time, the dependent relationship between town and village names and cities/towns registered in advance in the table is checked, and a large distance is added to combinations that have no dependent relationship. Similarly, a large distance is added to combinations of cities, towns, and prefectures that do not have a dependent relationship. In this way, incorrect combinations can be eliminated.

複合単語の処理として、上記の説明では後側から切断す
るとしたが、前側から切断して行っても(]8) 同様にできることは言うまでもない。
In the above explanation, compound words are processed by cutting from the rear side, but it goes without saying that the same effect can be achieved by cutting from the front side (]8).

次に、本発明においてOCRの認識性能を補うための付
加処理について原理を説明する。すなわち、単語照合に
おいては、OCRの誤認識や筆記者の誤記入によって正
しい文字が候補文字の中に含まれない場合には、辞書と
の照合を行っても正しい単語との距離が大きくなってし
まい、認識能力の改善が図れない場合がある。この問題
点に対処するため、本発明では、OCRの認識結果に対
し傅き換え規則を適用して候補追加を行ってから、単語
照合を行うものである。
Next, the principle of additional processing for supplementing the recognition performance of OCR in the present invention will be explained. In other words, in word matching, if the correct character is not included in the candidate characters due to OCR misrecognition or scribe error, the distance from the correct word will become large even after matching with a dictionary. Therefore, it may be impossible to improve cognitive ability. In order to deal with this problem, in the present invention, candidates are added by applying a switching rule to the OCR recognition result, and then word matching is performed.

この書き換え規則は、第一種及び第二種の規則に分類さ
れる。第一種の規則とは、ある文字パターンに対する候
補文字集合に対し、候補文字を追加する規則である。ま
た第二種の規則とは、ある文字パターンの後に仮想的な
文字パターンを生成し、この二つの文字パターンに対し
、それぞれ候補文字を追加すべきことを示す規則である
These rewriting rules are classified into type 1 and type 2 rules. The first type of rule is a rule for adding candidate characters to a candidate character set for a certain character pattern. The second type of rule is a rule that indicates that a virtual character pattern is generated after a certain character pattern, and candidate characters are to be added to each of these two character patterns.

次に書き換え規則の例を示す。この禅き換え規則は、基
本的にはある文字パターンに対する候補文字に対し候補
追加を行うものであるが、場合によっては前後の文字パ
ターンに対する候補文字も参照して、すなわち前後関係
も考慮して候補を追加することがある。
An example of a rewrite rule is shown below. This Zen-kikae rule basically adds candidates to the candidate characters for a certain character pattern, but in some cases it also refers to candidate characters for the previous and following character patterns, that is, it also takes into account the context. Candidates may be added.

以下の規則で、「(k)は第に文字位置における候補文
字の集合を示し、Cは集合の中にある要素が含まれるこ
とを示す記号であり、:=は集合の変化を示す記号であ
る。また、&はAND条件を表す。また、記号φについ
ては後で説明する。
In the following rules, ``(k) indicates a set of candidate characters at the first character position, C is a symbol indicating that an element is included in the set, and := is a symbol indicating a change in the set. Also, & represents an AND condition. Also, the symbol φ will be explained later.

第一種の書き換え規則の例: (1) if  スE F(k) then  V (k) :=  r”(k) + (
ヌ1(2) if  1(大文字)Er(k)then
  r(k) :=T”(k) +(−t(小文字))
(3) if  ユCT”(k)  &  ’ (半濁
点)E r (k+1)then   T”(k)  
:二 r(k)+  (コ)(4) if  ノEr(
k)  &  しIE T’ (k+])then  
r(k)  :=1−(k)  + (ルφ)(5) 
if  アEr(k)  & ア以外のア行の文字E r (k−1)then  r
(k−1) :” T”(k−1) ” ((長音))
第二種の書き換え規則の例: (6) コf  ルE r (k) then  r’(k) :”  I”(k) ” (
))かつ k+1以後の文字番号を1だけ増し、かつ 
r(k+1) := + (し)(7) if  ア行
の文字E r (K)、但しEは候補文字数かつ r(
K)に属する候補(ア行の文字以外)には記号φを付け かつ 候補文字数Kを1だけ増加し かつ r(K):=(−(長音)) これらの書き換え規則のうち、(1)〜(3)は文字認
識の誤りに対処するためのものであり、認識装置の誤読
し易さについての知識を用いて最適な規則を設定すれば
良い。
Example of the first type of rewriting rule: (1) if SEF(k) then V(k) := r”(k) + (
nu1(2) if 1(capital letter)Er(k)then
r(k) :=T”(k) +(-t (lower case))
(3) if yu CT” (k) &' (handakuten) E r (k+1) then T” (k)
:2 r(k)+ (ko)(4) if ノEr(
k) & しIE T' (k+])then
r(k) :=1-(k) + (leφ)(5)
if Er (k) & Characters in line A other than A r (k-1) then r
(k-1): “T” (k-1) ” ((long sound))
Example of the second type of rewriting rule: (6) E r (k) then r'(k) :"I"(k)" (
)) and increase the character number after k+1 by 1, and
r(k+1) := + (shi)(7) if character E in line A r (K), where E is the number of candidate characters and r(
Add the symbol φ to candidates belonging to K) (other than the characters in line A), increase the number of candidate characters K by 1, and r(K):=(-(long sound)) Among these rewriting rules, (1) - (3) are for dealing with errors in character recognition, and optimal rules can be set using knowledge about the ease of misreading of the recognition device.

また、(4)、(6)は文字切出しの誤りに対処するも
のである。
Furthermore, (4) and (6) are for dealing with errors in character segmentation.

(4)は1文字を誤って2文字に分離した場合に対処す
る例に対応する。この場合には追加した候補文字の後に
記号φが付けられており、記号φは追加した候補文字に
対応する遷移が次の状態を飛ばして一つ先の状態へ遷移
すべきことを示す。
(4) corresponds to an example of dealing with a case where one character is mistakenly separated into two characters. In this case, the symbol φ is attached after the added candidate character, and the symbol φ indicates that the transition corresponding to the added candidate character should skip the next state and transition to the next state.

(6)は2文字を誤って1文字に統合した場合に対処す
る例に対応する。この場合には、対象文字の後に仮想文
字パターンが追加される。そして、規則適用対象の候補
以外の候補文字と追加した仮想候補文字とが連接しない
ように、記号φを用いている。
(6) corresponds to an example of dealing with a case where two characters are erroneously combined into one character. In this case, a virtual character pattern is added after the target character. The symbol φ is used so that candidate characters other than the candidate to which the rule is applied are not connected to the added virtual candidate character.

また、(5)、(7)は表記の揺れに対処するためのも
のである。
Furthermore, (5) and (7) are for dealing with variations in notation.

(5)の例では「アパート」を「アバアト」と書いた場
合に、標準的な表記すなわち長音が生成されるようにし
ている。
In the example (5), when "apartment" is written as "abaato", the standard notation, that is, a long sound, is generated.

(7)の例は「コンピューター」などの単語で語尾の長
音が脱落して「コンピュータ」と書かれた場合に長音を
補うものであり、この場合にも語尾に仮想文字パターン
が追加される。記号φを用いる意味は(6)と同様であ
る。
In example (7), when the long sound at the end of a word such as "computer" is dropped and the word "computer" is written, the long sound is supplemented, and in this case as well, a virtual character pattern is added to the end of the word. The meaning of using the symbol φ is the same as in (6).

以上の説明から理解されるように、書き換え規の状況に
応じて任意の規則を作成することができ、正しい候補文
字を追加できるので、単語照合の効果が高まる。従来に
も、候補文字を追加する考え方はあったが、候補追加に
よって候補文字数が増加するため、照合速度の低下を来
す問題点があった。本発明では、先に述べたように高速
に単語照合が可能なので、候補文字数が多少増加しても
速度の低下はほとんどなく、単語照合の効果を充分発揮
できる利点がある。
As can be understood from the above description, any rule can be created depending on the situation of the rewriting rule, and correct candidate characters can be added, which increases the effectiveness of word matching. Conventionally, there has been the idea of adding candidate characters, but adding candidates increases the number of candidate characters, which poses the problem of slowing down the matching speed. In the present invention, as mentioned above, word matching is possible at high speed, so even if the number of candidate characters increases somewhat, there is almost no decrease in speed, and the advantage is that the effect of word matching can be fully demonstrated.

以上の説明では、OCRが片仮名を認識する場合を例に
とり、文字コードが1文字1バイトで表わされる場合に
ついて説明した。片仮名以外にも英字であっても同様に
成立することはいうまでもない。漢字の場合にも以下に
述べるようにして適用できる。
In the above description, the case where the OCR recognizes katakana is taken as an example, and the case where the character code is represented by one byte per character has been explained. Needless to say, the same holds true for alphabetic characters as well as katakana. It can also be applied to kanji as described below.

漢字1文字は、普通2バイトで表わされる。この2バイ
トをまとめて一つの文字コードと見なして有限オートマ
トンを作成しても良いが、次のようにこの2バイトを2
文字と見なして有限オートマトンを作成することもでき
る。
One Kanji character is usually represented by two bytes. You can create a finite automaton by considering these 2 bytes as one character code, but you can create a finite automaton by combining these 2 bytes into 2 characters as follows.
It is also possible to create a finite automaton by considering it as a character.

OCRへの入力文字を「中野康明」とし、認識結果とし
て、各文字に対し次のように候補文字が得られたとする
Assume that the characters input to the OCR are "Yasuaki Nakano" and the following candidate characters are obtained for each character as a recognition result.

入力   中  野  康  明 第1位   中   野−庚  墾− 第3位  内  勧    朝 3866 2011   361] 前例と同様に、アングラインを付けた文字は正解文字を
示す。括弧内は各文字に対するJISコード(区点番号
)である。第3図はその場合の有限オートマトンの説明
図であり、漢字]文字に対して2個の状態遷移が対応し
、前の遷移がJISコードの区番号に、後の遷移が点番
猜に対応する(区番号及び点番号はそれぞれ1バイトで
表現できる)。第1図と異なるのは、遷移に要するコス
トは後の遷移に対してのみかかる点である。第3図では
、otherに対応する遷移は破線で表現され、oth
erの表記は省略している。
Input Yasushi Nakano 1st place Nakano - Ko Ken - 3rd place Nai Kan Asa 3866 2011 361] As in the previous example, the characters with an angline indicate the correct characters. The JIS code (kuten number) for each character is in parentheses. Figure 3 is an explanatory diagram of the finite automaton in that case, where two state transitions correspond to the Kanji character, the previous transition corresponds to the ward number of the JIS code, and the latter transition corresponds to the dot number 猜. (The ward number and point number can each be expressed in one byte.) The difference from FIG. 1 is that the cost required for transition is incurred only for subsequent transitions. In Figure 3, the transition corresponding to other is represented by a dashed line,
The notation er is omitted.

また、第3図から明らかなように、ある文字パターンに
対する候補文字として区番号が一致するものが複数個あ
れば、それらについての状態遷移では区番号にたいする
遷移を共通に用いることにより、状態数を減らすことも
できる。
Furthermore, as is clear from Figure 3, if there are multiple candidate characters with matching ward numbers for a certain character pattern, the number of states can be reduced by commonly using transitions for the ward numbers in the state transitions for them. It can also be reduced.

以上の説明により、本発明により文字認識の後処理が高
速に実現されることが理解されよう。
From the above description, it will be understood that the present invention realizes character recognition post-processing at high speed.

〔実施例〕〔Example〕

以下、本発明による一実施例を第4図により説明する。 An embodiment according to the present invention will be described below with reference to FIG.

第4図は、本発明による文字認識の後処理方式を実現す
るシステムの装置構成を示す図である。
FIG. 4 is a diagram showing the device configuration of a system that implements the character recognition post-processing method according to the present invention.

同システムは、システムを制御するCPU (中央制御
装置)100、主メモリ101、端末102、システム
ファイル103、文書画像の走査を行うためのスキャナ
104、ビデオメモリ105、文字認識部106、単語
照合部107、ワークファイル108、バス109を基
本部として持つ。
The system includes a CPU (central control unit) 100 that controls the system, a main memory 101, a terminal 102, a system file 103, a scanner 104 for scanning document images, a video memory 105, a character recognition unit 106, and a word matching unit. 107, a work file 108, and a bus 109 as basic parts.

各部の動作の流れを以下に詳細に説明する。The flow of operation of each part will be explained in detail below.

CP U i OOは、主メモリ101の中のプログラ
ムを実行することにより、以下に述べるシステム全体の
動作を制御する。システム各部の動作に応して、必要な
プログラムをシステムファイル103から主メモリ10
1にロードあるいは退避したり、各プログラムに実行権
を付与したりすることは、オペレーティングスジステム
プログラムにより行われるが、その動作は周知の通りで
あるから省略する。以下の説明で、システム各部が自律
的に動作するように述べるが、実際にはCPU100の
プログラム制御に従って動作することを簡略化して述べ
たものである。また、システム各部の間のデータ授受は
バス109を介して行われるが、説明を簡略化するため
、システム各部間で直接データ転送が行われるように述
べる。
The CPU i OO controls the operation of the entire system described below by executing programs in the main memory 101. Depending on the operation of each part of the system, necessary programs are transferred from the system file 103 to the main memory 10.
1, and granting execution rights to each program are performed by the operating system program, but their operations are well known and will therefore be omitted here. In the following description, each part of the system will be described as operating autonomously, but this is a simplified description of the system actually operating under program control of the CPU 100. Further, although data is exchanged between each part of the system via the bus 109, in order to simplify the explanation, the description will be made so that data is directly transferred between each part of the system.

端末102は、プログラムが要求する時点で。Terminal 102 at the time the program requests it.

操作者とのデータ授受を行うために用いられる。Used to exchange data with the operator.

以下の説明では端末102の記述を省略し、CPU10
0が直接操作者とデータ授受を行うように述べる場合も
ある。
In the following explanation, the description of the terminal 102 is omitted, and the CPU 10
In some cases, it is stated that 0 directly exchanges data with the operator.

操作者が読取対象文書110をスキャナ104・にセッ
トすると、スキャナ104は文書110の上の画像を走
査し、二値ディジタルl1lii像に変換して、ビデオ
メモリ105に格納する。ビデオメモリ105は文書画
像以外にも後述する各種のデータの格納に用いられ、そ
れぞれが相互に干渉しないよう別々の領域に格納される
が、以下では特に断わらずにビデオメモリ105と記述
している。
When an operator places a document 110 to be read into the scanner 104, the scanner 104 scans the image on the document 110, converts it into a binary digital image, and stores it in the video memory 105. The video memory 105 is used to store various types of data, which will be described later, in addition to document images, and each is stored in separate areas so as not to interfere with each other; however, hereinafter, the video memory 105 will be referred to as the video memory 105 unless otherwise specified. .

文字認識部106は、予め与えられた書式情報に従って
、ビデオメモリ105の中の文書画像から、文字の記入
された領域を探索し、その中の文字パターンを切出し、
認識する。文字の切出し、認識処理については公知であ
るので省略する。認識結果は、各文字パターンに対する
候補文字の系列として表され、ビデオメモリ1.05に
格納される。
The character recognition unit 106 searches the document image in the video memory 105 for areas where characters are written, cuts out character patterns therein, and
recognize. Character extraction and recognition processing are well known and will therefore be omitted. The recognition results are represented as a sequence of candidate characters for each character pattern and are stored in the video memory 1.05.

文字認識が終Yすると、CPU100は後述するような
処理を行って、候補文字列から有限オートマトンの遷移
表を生成する。その詳細な処理内容については後述する
。生成さ九た遷移表の実体は単語照合部107に付属す
るメモリの中に格納されたテーブルである。
When character recognition is completed, the CPU 100 performs processing as described later to generate a transition table of a finite automaton from the candidate character string. The details of the processing will be described later. The entity of the generated transition table is a table stored in the memory attached to the word matching unit 107.

次に、単語照合部107が起動され、上記の候補文字列
から生成された遷移表を用いて、単語辞書に含まれる各
単語に有限オートマトンに入力し。
Next, the word matching unit 107 is activated, and inputs each word included in the word dictionary into the finite automaton using the transition table generated from the above candidate character strings.

各単語に対する距離を求める処理を行う。この詳細な処
理内容は後述する。ここで、単語辞芹はシステムファイ
ル1.03からビデオメモリ105の中にあらかじめ読
み込んでおくものとする。
Performs processing to find the distance to each word. The detailed contents of this processing will be described later. Here, it is assumed that the word dictionary is previously read into the video memory 105 from the system file 1.03.

単語照合部の出力は、各単語に対する距離を並べたリス
トであり、ビデオメモリ1.05に出力される。このリ
ス1−に対して、CP U I OOは公知の手法によ
り距離の小さい順に並べ替えを行い、距離の小さい候補
単語数個を求める。CPTJ]01はこの候補昨語を端
末102の上に表示し、操作者の選択あるいは修正を行
わせる。ここで、選択とは表示されている候補単語の中
から正しい単語を選ぶものであり、修正とは表示された
単語の中に正しい!11語が存在しない場合に、操作者
が正しい単語を入力するものである。この時、認識対象
となった部分の画像を候補単語と同時に端末102の表
示することは選択あるいは修正を行う上で有効である。
The output of the word matching section is a list of distances for each word, and is output to the video memory 1.05. The CPU IOO uses a known method to rearrange the list 1- in descending order of distance, and finds several candidate words with short distances. CPTJ]01 displays this candidate last word on the terminal 102 and allows the operator to select or modify it. Here, selection means choosing the correct word from among the displayed candidate words, and correction means selecting the correct word from among the displayed words! The operator inputs the correct word when 11 words do not exist. At this time, displaying the image of the part to be recognized on the terminal 102 at the same time as the candidate word is effective for selection or correction.

操作者の選択あるいは修正を経た単語データはワークフ
ァイル1.08に出力される。用途によっては、操作者
の選択・修正を行すずに、単語照合での第1位単語をそ
のまま出力してもよい。
The word data selected or modified by the operator is output to the work file 1.08. Depending on the application, the first word in word matching may be output as is, without selection or modification by the operator.

次に、文字認識結果の候補文字列から有限オートマトン
で用いられる遷移表を生成する処理の説明を行うが、処
理の説明に先立ってビデオメモリ内におけるデータの表
現方法について説明する。
Next, a process for generating a transition table used in a finite automaton from candidate character strings as a result of character recognition will be explained. Prior to explaining the process, a method of representing data in the video memory will be explained.

第5図は、文字V!識部1.06の出力である候補文字
列のビデオメモリ105内での表現方法の一例を示す。
Figure 5 shows the letter V! An example of how candidate character strings output from the recognition unit 1.06 are expressed in the video memory 105 is shown.

第5図で、501はポインタテーブルであり、各文字パ
ターンに対する候補文字数N(1)、N(2)、N(3
)19.、と、候補文字列を格納したテーブル502へ
のポインタP(1)、P(2)、P(3)、 、、。
In FIG. 5, 501 is a pointer table in which the number of candidate characters for each character pattern is N(1), N(2), N(3
)19. , and pointers P(1), P(2), P(3), , , to the table 502 storing candidate character strings.

を有する。502は候補文字テーブルであり、各文字パ
ターンごとの候補文字を並べたもので、先頭からの相対
アドレスP(1)以降に、第1字での候補(この例では
す、力、り、ヤ)が、同じ<P(2)以降に第2字での
候補文字が並ぶ。
has. Reference numeral 502 is a candidate character table, in which candidate characters for each character pattern are arranged, and after the relative address P(1) from the beginning, the candidates for the first character (in this example, Su, Power, Ri, Ya) are listed. ), but the candidate character for the second character is lined up after the same <P (2).

第6図は、候補文字列から生成される有限オートマトン
で用いられる遷移表の表現方法の一例を示すにの遷移表
は、単語照合部1.07に付属する内部メモリの中に作
ら九る。
FIG. 6 shows an example of a method for representing a transition table used in a finite automaton generated from candidate character strings. The transition table is created in the internal memory attached to the word matching section 1.07.

第6図で、601は有限オートマトンの各状態5(0)
、5(1)、5(2)、5(3)196.に対応する情
報を含むテーブルである。但し、5(0)は第1−図の
初期状態Sを、5(1)11.は第1図の状態■1.。
In Figure 6, 601 represents each state 5(0) of the finite automaton.
, 5(1), 5(2), 5(3) 196. This is a table containing information corresponding to . However, 5(0) is the initial state S in FIG. 1, and 5(1)11. is the state in Figure 1 ■1. .

に対応する。以下このテーブル60ノを状態遷移表ある
いは略して遷移表と呼ぶ。また、第6図で、602は各
遷移に対するコス1−を記憶したテーブルであり、以下
このテーブル602を遷移コスh表と呼ぶ。
corresponds to Hereinafter, this table 60 will be referred to as a state transition table or a transition table for short. Further, in FIG. 6, 602 is a table storing the cost 1- for each transition, and hereinafter this table 602 will be referred to as a transition cost h table.

各状態に対して、601,602における先頭アドレス
ポインタJ(0)、 、J(1)、J(2)191.が
定まる。この例では、第j状態に対して J(i) =J(0) + (i−1)x256x2で
定める。すなわち、601,602は各状態ととに25
6個のエントリを有するテーブルである。
For each state, start address pointers J(0), , J(1), J(2) at 601, 602, 191. is determined. In this example, J(i) = J(0) + (i-1)x256x2 is determined for the j-th state. That is, 601 and 602 are 25 for each state.
This is a table with 6 entries.

256個のエントリは文字コードに対応しており、この
例ではEBCDIKコードにより文字を表わす。従って
、例えば、文字r力」はEBCDIKコードで182で
あるから、(先頭から数えて)183番目のエントリに
対応している。
The 256 entries correspond to character codes, and in this example, characters are represented by EBCDIK codes. Therefore, for example, the character "r" is 182 in the EBCDIK code, so it corresponds to the 183rd entry (counting from the beginning).

状態遷移表601は、有限オートマトンの各状態5(i
) (実際にはアドレスJ(i)で示される)において
、C(i)が到来したときの動作を記述するものであり
1次状態5(i) (実際にはアドレスJ(i))に遷
移することを示す。遷移コスト表602には、その遷移
に対して発生するコストw(、j)が記憶されており、
601と602で先頭からの相対アドレスが等しいもの
同士が対応する。第6図の例で言えば、初期状態5(0
) (実際にはアドレスJ(0))で文字r力」が到来
すれば、遷移表601でアドレス(J (0)+ 18
2)の内容を引いて、次アドレスJ(1)&、また遷移
コスト表の同じアドレスからコスト1を得る。同様に、
文字「キ」が到来すれば次アドレスJ(1)とコスト1
6を得る。なお、この場合のコストは第1図の例に対応
するものである。このようにして、入力文字列が与えら
れれば、遷移表601を参照することにより、有限オー
トマトンを順次辿ることができ、遷移コスト表602か
らその遷移に要するコストも順次得られることがわかる
The state transition table 601 shows each state 5 (i
) (actually denoted by address J(i)), it describes the operation when C(i) arrives. Indicates a transition. The transition cost table 602 stores the cost w(, j) that occurs for the transition,
Items 601 and 602 that have the same relative address from the beginning correspond to each other. In the example of Figure 6, the initial state 5 (0
) (Actually, at address J(0)), if the character "r" arrives, the transition table 601 shows address (J(0)+18).
By subtracting the contents of 2), we obtain the cost 1 from the next address J(1) & and the same address in the transition cost table. Similarly,
When the character "ki" arrives, the next address J (1) and cost 1
Get 6. Note that the cost in this case corresponds to the example shown in FIG. In this way, it can be seen that if an input character string is given, the finite automaton can be sequentially traced by referring to the transition table 601, and the cost required for the transition can be sequentially obtained from the transition cost table 602.

第6図の例では、EBCDIKコード256個全てにつ
いてエントリを設けるとしたが、例えば入力文字列が片
仮名に限定されることが判っている場合には、EBCD
IKコートは129(ア)から191(’:半濁点)ま
での範囲に入るから、エントリとして入力コードC(i
)の代りに(C(i)−129)を用いれば、63個の
エントリで済む。
In the example shown in Figure 6, entries are provided for all 256 EBCDIK codes, but if it is known that the input character string is limited to katakana, for example, the EBCD
Since the IK code falls within the range from 129 (a) to 191 (': handakuten), input code C (i
) instead of (C(i)-129), only 63 entries are required.

第6図の例では、一つの状態において全ての入力文字に
対する次状態は同一であるから、第6図のようなデータ
表現形式は冗長に見えるが、後述するように、ある状態
から入力文字により異なった状態に遷移するような有限
オートマトンへの発展が考えられるので、拡張性に富ん
だ第6図のデータ表現形式を採用している。
In the example shown in Figure 6, the next state for all input characters in one state is the same, so the data representation format shown in Figure 6 seems redundant, but as will be explained later, Since it is possible to develop a finite automaton that transitions to different states, we have adopted the highly extensible data representation format shown in Figure 6.

第7図は、この候補文字列から有限オートマトンの遷移
表と遷移コスト表を生成するための流れ図をPAD形式
で示したものである。第7図の説明に先立って記号の説
明を行う。
FIG. 7 shows a flowchart in PAD format for generating a transition table and a transition cost table of a finite automaton from this candidate character string. Prior to explaining FIG. 7, symbols will be explained.

N   :OCRで認識した文字数 (オートマトンの状態数=N+1) K(k)  :第に文字パターンに対する候補数C(k
、j) :第に文字パターンを認識したときの第j候補
の文字コード J(i)  :遷移表の第i状態の先頭アドレスT(m
)  :遷移表の第mエントリの内容(次状態の先頭ア
ドレス) P(m)  :遷移コスト表の第mエントリの内容(遷
移に要するコスト) この記号の説明から判るように、この例では1文字コー
ドが1バイトで表わされる場合に対するものであるが、
漢字のように1文字が2バイトで表現されるような場合
への拡張は容易であろう。
N: Number of characters recognized by OCR (number of automaton states = N+1) K(k): Number of candidates for the th character pattern C(k
, j): Character code of the j-th candidate when the character pattern is recognized J(i): Start address T(m) of the i-th state of the transition table
): Contents of the m-th entry in the transition table (start address of the next state) P(m): Contents of the m-th entry in the transition cost table (cost required for transition) As can be seen from the explanation of this symbol, in this example, 1 This is for the case where the character code is expressed in 1 byte,
It would be easy to extend this to cases where one character is expressed in two bytes, such as Kanji.

第7図の流れ図において、701〜704は初期化処理
であり、遷移表及び遷移コスト表に初期値髪埋め込むも
のである。701は(状態数−]−)回すなわちN回だ
け以下の処理を繰り返すループ制御であり、jは状態番
号を表わす。702で、次状態の先頭アドレスAを計算
する。703は、状態〕に属する256個のエン1−り
についてのループ制御であり、nは文字コードを表わす
。704で、二つの表における第j状態の第n文字コー
ドに対するエントリmを計算し、遷移表の第mエン1−
リT(+o)に次状態の先頭アドレスAを、遷移コスト
表の第mエン1−リP(m)にコストの初期値16を埋
め込む。
In the flowchart of FIG. 7, 701 to 704 are initialization processes in which initial values are embedded in the transition table and the transition cost table. 701 is a loop control in which the following processing is repeated (number of states -] -) times, that is, N times, and j represents a state number. At 702, the start address A of the next state is calculated. 703 is a loop control for 256 engines belonging to the state], and n represents a character code. At 704, the entry m for the nth character code of the jth state in the two tables is calculated, and the entry m for the nth character code of the jth state in the transition table is calculated.
The start address A of the next state is embedded in the transition cost table T(+o), and the initial cost value 16 is embedded in the m-th entry 1-RIP(m) of the transition cost table.

第7図の705〜707はOCR出力結果を用いて遷移
表を作成する処理である。705は文字数すなわちN回
だけ以下の処理を繰り返すループ制御であり、kは文字
パターン番号を表わす。
705 to 707 in FIG. 7 are processes for creating a transition table using the OCR output results. 705 is a loop control that repeats the following process for the number of characters, that is, N times, and k represents a character pattern number.

706は第に文字パターンに対する候補文字数すなわち
K(k)回だけ以下の処理を繰り返すループ制御であり
1.jは候補文字の順位を表わす。707では、文字コ
ードC(k、j)に対する遷移コスト表でのエン1−リ
mを計算し、遷移コスト表の第mエントリP(m)にコ
ストとして(i−1)を埋め込む。エントリmは第(k
−1)状態の先頭アドレスに対する相対アドレスC(k
、j)として求まる。
706 is a loop control that repeats the following process for the number of candidate characters for the character pattern, that is, K(k) times; 1. j represents the rank of candidate characters. In step 707, the en-1-li m in the transition cost table for the character code C(k,j) is calculated, and (i-1) is embedded as the cost in the m-th entry P(m) of the transition cost table. Entry m is the (kth
−1) Relative address C(k
, j).

以上の説明により、OCRから出力された候補文字列か
ら、有限オートマトンに対応する遷移表と遷移コスト表
を生成できることが理解されよう。
From the above explanation, it will be understood that a transition table and a transition cost table corresponding to a finite automaton can be generated from candidate character strings output from OCR.

次に、単語照合部107すなわち有限オートマトンによ
る文字列受理の処理を実現するハードウェアの詳細な説
明を行う。
Next, a detailed explanation will be given of the word matching unit 107, that is, the hardware that realizes the process of accepting character strings by the finite automaton.

第8図は、単語照合部107の構成を示す構成図である
。第8図において入力端子800には単語辞書から与え
られる文字列が入力される。この文字列の各文字コード
はレジスタ801でラッチされ、そのラッチされた文字
コードはメモリ802及び809の入力となる。メモリ
802は第6図の状態遷移表601を記憶しているもの
で、以後メモリ802を状態遷移表あるいは単に遷移表
と記述することがある。メモリ809は第6図の遷移コ
スト表602を記憶しているもので、以後メモリ809
を遷移コスト表と記述することがある。
FIG. 8 is a configuration diagram showing the configuration of the word matching section 107. In FIG. 8, a character string given from a word dictionary is input to an input terminal 800. Each character code of this character string is latched by a register 801, and the latched character code becomes an input to memories 802 and 809. The memory 802 stores the state transition table 601 shown in FIG. 6, and hereinafter the memory 802 may be referred to as a state transition table or simply a transition table. The memory 809 stores the transition cost table 602 shown in FIG.
is sometimes described as a transition cost table.

遷移表802には、もう一つの入力として遷移表802
自身の出力がレジスタ803及びセレクタ804を経て
供給されている。遷移表802の出力は、有限オートマ
トンにおける次状態を表わす値(先頭アドレス)であり
、遷移表802に対する二つの入力、すなわち次状態の
先頭アドレスと文字コードとから、遷移表のアドレスが
決定され、そのアドレスの内容が読み出されて出力とな
る。
The transition table 802 has the transition table 802 as another input.
Its own output is supplied via a register 803 and a selector 804. The output of the transition table 802 is a value (start address) representing the next state in the finite automaton, and the address of the transition table is determined from the two inputs to the transition table 802, that is, the start address of the next state and the character code. The contents of that address are read and output.

セレクタ804の入力にはもう1個のレジスタ817の
出力がつながれているが、レジスタ817は入力端子8
16から与えられる出発アドレスを記憶するものである
。通常は、入力端子816には初期状態のアドレスが与
えられるが、入力端子816に与える出発アドレスは任
意の状態のものでよく、後述する複合単語の処理に際し
て効果を発揮する。
The output of another register 817 is connected to the input of the selector 804, and the register 817 is connected to the input terminal 8.
It stores the starting address given from 16. Normally, an address in an initial state is given to the input terminal 816, but the starting address given to the input terminal 816 may be in any state, and is effective in processing compound words, which will be described later.

単語照合部107の動作開始時に、セレクタ804で8
17側を選択して初期状態のアドレスを遷移表802の
初期値とする。その後、セレクり804で803側を選
択する。以後は、入力端子800から到来する文字コー
ドに同期して、遷移表を辿る動作が繰り返される。入力
される文字列が尽きたとき、遷移表802は最終状態に
到達しており、この状態はデコーダ805で解読されて
出力端子806から結果識別番号として出力される。デ
コーダ805の出力は、最終状態以外ではOであるが、
O以外の出力はレジスタ807に対しラッチ制御信号と
して働き、最終状態はレジスタ807でラッチされる。
When the word matching unit 107 starts operating, the selector 804 selects 8.
17 side is selected and the address in the initial state is set as the initial value of the transition table 802. After that, the 803 side is selected using the select button 804. Thereafter, the operation of tracing the transition table is repeated in synchronization with the character code coming from the input terminal 800. When the input character strings are exhausted, the transition table 802 has reached the final state, and this state is decoded by the decoder 805 and outputted from the output terminal 806 as a result identification number. The output of the decoder 805 is O except in the final state, but
Outputs other than O serve as latch control signals for register 807, and the final state is latched by register 807.

この値は、出力端子808から結果確定信号として最終
到達状態として出力される。本実施例では、意味のある
到達状態は最終状態の1個のみとしているので、デコー
ダ805は必ずしも必要ではないが、有限オートマトン
の途中まで到達したことを検出したい場合に対処するた
め、デコーダ805とレジスタ807を設けて有限オー
トマトンの中でどこまで到達しているかを識別する。デ
コーダ805で解読すべき到達目標状態の値は、外部か
ら与えられレジスタに保持される(図示せず)。
This value is outputted from the output terminal 808 as a final attained state as a result confirmation signal. In this embodiment, the only meaningful reached state is the final state, so the decoder 805 is not necessarily required. A register 807 is provided to identify how far in the finite automaton it has reached. The value of the target state to be decoded by the decoder 805 is given from the outside and held in a register (not shown).

一方、セレクタ804の出力は遷移コスト表809の入
力にもつながれている。遷移コスト表に対する二つの入
力、すなわち各状態の先頭アドレスと文字コードから、
遷移に要するコストが決定され、加算器810に与えら
れる。加算器の出力はレジスタ811でラッチされ、そ
のラッチ出力は再び加算器810に入るので、レジスタ
811には遷移に要するコストの累積値が格納される。
On the other hand, the output of the selector 804 is also connected to the input of the transition cost table 809. From the two inputs to the transition cost table, namely the start address and character code of each state,
The cost of the transition is determined and provided to adder 810. The output of the adder is latched by a register 811, and the latch output is again input to the adder 810, so that the register 811 stores the accumulated value of the cost required for transition.

この累積値は出力端子812に出力される。This cumulative value is output to output terminal 812.

この累積値は、また比較器815にも与えられ、入力端
子813からレジスタ814にセットされた最悪値と比
較される。比較器815の出力は出力端子818から外
部に取り出されている。外部回路でこの信号を監視する
ことにより、累積コストが異常に大きい単語に対する処
理を途中で打ち切ることもできる。
This accumulated value is also provided to a comparator 815 and compared with the worst value set in the register 814 from the input terminal 813. The output of comparator 815 is taken out from output terminal 818. By monitoring this signal with an external circuit, it is possible to abort processing for a word with an abnormally large cumulative cost.

次に本発明による文字認識の後処理方式の第二の実施例
について述べる。この実施例は複合語を処理するのに適
する。本実施例を実現するシステムは、第一の実施例と
同じく、第4図の装置構成L(0) ■ F(m;j) L(m;j) S、 (+o;j) S、(m;j) により実現され、CP U 100の処理プログラムに
より複合語処理を行う。
Next, a second embodiment of the character recognition post-processing method according to the present invention will be described. This embodiment is suitable for processing compound words. As in the first embodiment, the system for realizing this embodiment has the device configuration L(0) ■ F(m;j) L(m;j) S, (+o;j) S, ( m;j), and compound word processing is performed by the processing program of the CPU 100.

第9図に、−4二記処理プログラムの流れ図をPAD形
式で示す。第9図の説明に先立って記号の説明を行う。
FIG. 9 shows a flowchart of the -42 processing program in PAD format. Prior to explaining FIG. 9, symbols will be explained.

:OCRで認識した文字数 (オートマトンの状態数=N+ 1) :認識結果の候補文字集合から 作られる初期オートマトン :有限オートマトン切断の総回数 (単語数=I+1) :切断した沖1数を表す変数 :切断点に対応する状態を表す変数 :第1回目に状態mで切断した 有限オートマトンの前半部 :第j回目に状態mで切断した 有限オートマトンの後半部 :第j切断における切断点mでの 最小累積距離 :第j切断における切断点mでの 成心累積距離 V、(m;i)   :第i切断における切断点mでの
最小距離候補単語集合 V2(m;i)   :第1切断における切断点mでの
吹出距離候補単語集合 第9図において901は初期値設定であり、以後の処理
で用いる変数や各種テーブルの初期化を行う。902は
以下の処理を1回だけ繰り返すループ制御であり、■は
切断総回数すなわち(単語数−1)である。iは第1回
[1の切断を表す。
: Number of characters recognized by OCR (number of automaton states = N + 1) : Initial automaton created from the candidate character set of recognition results: Total number of finite automaton cuts (number of words = I + 1) : Variable representing the number of cut Oki 1s: Variable representing the state corresponding to the cutting point: First half of the finite automaton cut in state m the first time: Second half of the finite automaton cut in state m the jth time: Minimum at the cutting point m in the jth cut Cumulative distance: Centered cumulative distance V, (m; i) at cutting point m in j-th cut: Minimum distance candidate word set V2 (m; i) at cutting point m in i-th cut: Cutting in first cut Blowout distance candidate word set at point m In FIG. 9, 901 is initial value setting, which initializes variables and various tables used in subsequent processing. 902 is a loop control that repeats the following process only once, and ■ is the total number of cuts, that is, (number of words - 1). i represents the first [1 cut.

903は第1回目の切断における切断箇所に関する制御
ループであり、mは切断箇所に対応する状態を表す。こ
の切断は後から行うものとし、mは最大値から最小値ま
で1づつ減少して行く。mの変化範囲の最大値(一番後
の切断箇所)は、後方に切断可能箇所として少なくとも
(i−1)個の状態を残した値、すなわち(N−i+1
)であり、また最小値(一番前の切断箇所)は、前方に
切断可能箇所として少なくとも(I −i )個の状態
を残した値、すなわち(I−i+2)である。
Reference numeral 903 is a control loop regarding the cutting location in the first cutting, and m represents the state corresponding to the cutting location. This cutting will be performed later, and m will decrease by 1 from the maximum value to the minimum value. The maximum value of the change range of m (the last cut point) is the value that leaves at least (i-1) states as cuttable points behind, that is, (N-i+1
), and the minimum value (the first cut point) is a value that leaves at least (I −i ) states as cuttable points in front, that is, (I−i+2).

904は単語長についての制御ループであり、Pは貼語
長を表す、pの変化範囲の最小値は1である。また、切
断箇所で始まる長さpの単語の後方に(i−1)語の単
語が入り得る必要があるから、(m+p−1)に(i−
1)を加えた値はN以下でなければならず、従ってpの
変化範囲の最大値は(N+2−m−1)である。
904 is a control loop regarding the word length, P represents the word length, and the minimum value of the change range of p is 1. Also, since it is necessary that (i-1) words can be inserted after the word of length p that starts at the cutting point, (m+p-1) has (i-
1) must be less than or equal to N, so the maximum value of the variation range of p is (N+2-m-1).

905は、切断箇所mで有限オートマトンを切断して前
半部F(m;i)と後半部L (m ; i )を設定
する部分である。この切断は、実際に部分オートマトン
を作成するのではなく9仮想的に切断するものである。
905 is a part that cuts the finite automaton at the cutting point m and sets the first half F(m;i) and the second half L(m;i). This cutting does not actually create a partial automaton, but virtually cuts the partial automaton.

すなわち、前半部F(m;i)は初期オートマトン直O
)の最終状態をmとしたものである。
That is, the first half F(m;i) is the initial automaton direct O
) is defined as m.

また、後半部L(m;i)はL(0)で出発状態をm、
最終状態を(m+p)としたものである。後述するよう
にL(m;i)は単語を表す文字列の受理を行うもので
、L(+m、i)の出発状態から文字列を入力し、最終
状態に到達したことを検出する必要がある。そのために
は、第8図の入力端子816から出発アドレスとしてm
を与えてレジスタ817に記憶させ、(4I) またデコーダ805に最終状態の値として(m+P)を
予め設定すればよく、そのとき第8図のように構成され
た有限オートマトンL(0)は、部分オートマトンL(
m;i)として働く。
Also, the latter half L(m;i) is L(0) and the starting state is m,
The final state is (m+p). As described later, L(m;i) accepts a string representing a word, and it is necessary to input the string from the starting state of L(+m,i) and detect that it has reached the final state. be. To do this, m is used as the starting address from the input terminal 816 in FIG.
and store it in the register 817, (4I) and (m+P) as the final state value in the decoder 805. At that time, the finite automaton L(0) configured as shown in FIG. Partial automaton L (
Work as m;i).

第9図で906は上記の出発状態及び最終状態の値を設
定するものである。
In FIG. 9, 906 is for setting the values of the above-mentioned starting state and final state.

907は単語長Pの単語について、908の処理を繰り
返すループ制御である。908はその単語をオートマト
ンL(n+;i)に入力して距離を求める部分である。
907 is a loop control that repeats the process of 908 for words of word length P. 908 is a part that inputs the word to the automaton L(n+;i) and calculates the distance.

909では、各単語に対して得られた距離を昇順にソー
トする。
At 909, the distances obtained for each word are sorted in ascending order.

910では、距離の小さな単語を数個(この実施例では
2個)を求める。最小距離をり3.その距離を与える単
語をwlと書く。吹出距離(二番目に小さな距離)をD
2、その距離を与える単語をW2と書く。
In 910, several words (in this embodiment, two words) with small distances are found. Minimum distance 3. Write the word that gives that distance as wl. The blowing distance (second smallest distance) is D
2. Write the word that gives the distance as W2.

911は、複合単語に対する累積距離を求める処理であ
る。次の式によって、最小及び吹出の累積距離を求める
911 is a process for calculating the cumulative distance to a compound word. Determine the minimum and cumulative distance of the blowout using the following formula.

51(n+;i)= min (St(m+p;1−1
)+01゜Sl(m;1)) Sz(+i;i)=  1Ilin  (St(m+p
;1−1)+02゜S2(+i+p;i−])+D、)
51(n+;i)=min(St(m+p;1-1
)+01°Sl(m;1)) Sz(+i;i)=1Ilin(St(m+p
;1-1)+02°S2(+i+p;i-])+D,)
.

S2(+++;x)) − 上の第1式の第1項は、切断点mにおける最小累積距離
が、第(i −1)回での最小累積距離と今回の最小距
離(910で求めた最小距離)との和であることを意味
する。第(i−1)回での最小累積距離は、単語長がp
であることを考慮して、切断点(m+p)での値を取る
。第1式の第2項は、切断点mにおける最小累積距離の
それまでの値である。従って、第1式は、第1項で求め
た値が従来の最小累積距離以下になった時、最小累積距
離を第1項で置き換えることを示す。なお、最小累積距
離S□(m;0)の初期値は901で充分大きな値に設
定しておくものとする。また、上の第2式は吹出累積距
離を求めるものであり、吹出累積距離は第(i−1)回
での最小累積距離と今回の吹出距離との和であるか、第
(i−1)回での吹出累積距離次に本発明による文字認
識の後処理方式の第二の実施例について述べる。
S2 (+++; minimum distance). The minimum cumulative distance at the (i-1)th time is that the word length is p
Considering that, the value at the cut point (m+p) is taken. The second term in the first equation is the value of the minimum cumulative distance at the cutting point m up to that point. Therefore, the first equation indicates that when the value determined by the first term becomes less than or equal to the conventional minimum cumulative distance, the minimum cumulative distance is replaced by the first term. Note that the initial value of the minimum cumulative distance S□(m;0) is set to 901, which is a sufficiently large value. The second equation above is for calculating the cumulative distance of the blowout, and the cumulative distance of the blowout is either the sum of the minimum cumulative distance at the (i-1)th time and the current blowout distance, or the cumulative distance of the blowout at the (i-1)th time. ) Cumulative distance of balloons in times Next, a second embodiment of the post-processing method for character recognition according to the present invention will be described.

本実施例を実現するシステムは、第一の実施例と同じく
、第4図の装置構成を用いてCP U 100の処理プ
ログラムにより実現される。本実施例の処理は第一の実
施例とほぼ同様であるが、文字認識部106で得られた
各文字パターンに対する候補文字に対し、候補追加処理
を行ってから、有限オートマトンの生成、単語照合を行
う点が異なる。
The system for realizing this embodiment is realized by the processing program of the CPU 100 using the device configuration shown in FIG. 4, as in the first embodiment. The processing of this embodiment is almost the same as that of the first embodiment, but after candidate addition processing is performed on candidate characters for each character pattern obtained by the character recognition unit 106, finite automaton generation and word matching are performed. They differ in that they perform

従って、候補追加についてのみ説明を行う。Therefore, only candidate addition will be explained.

以下の説明に先立って記号の説明を行う。Prior to the following explanation, symbols will be explained.

N    :OCRで認識した文字数 k   :文字パターンの番号 K(k)  :第に文字パターンに対する候補数C(k
、j) : 第に文字パターンの認識結果における第、
う候補の文字コード M   =修正後の仮想的な文字パターン数:修正後の
仮想的な文字パターン番号 G(s)   :修正後の第S文字パターンに対する候
補数 D(s、c)  :仮想的第S文字パターンに対する修
正後の第cfeA補の文字コード E  :書き替え規則の数 :書き替え規則の番号 R(e)  :第e書き替え規則 第10図に、上記の候補処理を行うプログラムの流れ図
をPAD形式で示す。第10図において1001は初期
値設定であり、図では特に仮想的な文字パターン番号S
の初期値を0にすることを示しているが、それ以外にも
以後の処理で用いる変数や各種テーブルの初期化を行う
N: Number of characters recognized by OCR k: Character pattern number K(k): Number of candidates for the character pattern C(k)
, j): The first character pattern recognition result,
Candidate character code M = Number of virtual character patterns after correction: Virtual character pattern number after correction G (s): Number of candidates for the S-th character pattern after correction D (s, c): Virtual Character code E of supplementary cfeA after correction to S-th character pattern: Number of rewriting rules: Number of rewriting rules R(e): Rewriting rule e-th Figure 10 shows the program that performs the above candidate processing. The flowchart is shown in PAD format. In Fig. 10, 1001 is the initial value setting, and in the figure, especially the virtual character pattern number S.
In addition to this, variables and various tables used in subsequent processing are also initialized.

1、002は1003〜1034の処理をN回だけ繰り
返すループ制御であり、Nは認識した総文字数である。
1, 002 is a loop control in which the processes 1003 to 1034 are repeated N times, and N is the total number of recognized characters.

文字パターンの番号をkで表す。The number of the character pattern is represented by k.

以下の処理の詳細な説明に先立ち、各処理の内容を概略
的に説明する。1003〜1008は、もし第に文字パ
ターンの候補で第二種の奔き替え規則が合致するものが
一つでもあれば、仮想文字パターン生成を行う必要があ
るので、それを前もって検出しておく部分である。10
19〜1026は第に文字パターンに対する候補文字の
追加処理である。1027〜1034は第に文字パター
ンの後に仮想的な文字パターンを一個追加し、追加した
仮想的な文字パターンに対する候補文字の追加を行う部
分である。なお、仮想的な文字パターンの追加に伴い文
字パターン番号がずれるので、追加後の文字パターン番
号をSによって数えている。また第S文字パターンに対
する候補数をG(s)とする。
Prior to detailed explanation of the following processing, the contents of each processing will be briefly explained. In steps 1003 to 1008, if there is even one character pattern candidate that matches the second type switching rule, it is necessary to generate a virtual character pattern, so it is detected in advance. It is a part. 10
19 to 1026 are processes for adding candidate characters to the character pattern. 1027 to 1034 are parts that add one virtual character pattern after the character pattern and add candidate characters to the added virtual character pattern. Note that since the character pattern number shifts with the addition of a virtual character pattern, the character pattern number after addition is counted by S. Further, the number of candidates for the S-th character pattern is assumed to be G(s).

1003は第に文字パターンについて行われるループ処
理の制御部であり、1004〜1008の処理をK(k
)回だけ繰り返すことを示す。ここで、K (k)は第
に文字パターンに対する候補文字数である。
1003 is a control unit for loop processing performed on the character pattern, and the processing of 1004 to 1008 is controlled by K(k
) times. Here, K (k) is the number of candidate characters for the first character pattern.

1004では、変数f1.agの初期値として1を設定
する。ここで、変数flagの意味について説明すると
、この値が1である場合は第一種の書き替え規則に対応
し、第に文字パターンに候補文字を追加することを示す
。またflagの値が2である場合は第二種の書き替え
規則に対応し、第に文字パターンの後に仮想文字パター
ンを生成し、この仮想文字パターンに対して候補文字を
追加することを示す。なお、追加された候補文字の順位
は、追加が生じた時点での最終候補の順位の次と定める
ものとし、以下の説明では省略している。
At 1004, the variable f1. Set 1 as the initial value of ag. Here, the meaning of the variable flag will be explained. When this value is 1, it corresponds to the first type of rewriting rule, and indicates that a candidate character is added to the character pattern. Further, when the value of the flag is 2, it corresponds to the second type of rewriting rule, and indicates that a virtual character pattern is generated after the first character pattern, and a candidate character is added to this virtual character pattern. Note that the rank of the added candidate character is determined to be next to the rank of the final candidate at the time of addition, and is omitted from the following explanation.

1005は1006〜1008の処理をE同だけ繰り返
すループ制御であり、Eは書き替え規則の個数を表す。
1005 is a loop control in which the processes 1006 to 1008 are repeated E times, and E represents the number of rewriting rules.

書き替え規則の番号をeで表す。The number of the rewriting rule is represented by e.

1006では第e書き替え規則R(e)を適用し。In 1006, the e-th rewriting rule R(e) is applied.

候補文字集合とこの規則とが合致するかどうかを判定す
る。1007では、R(e)が合致した場合、この規則
が第二種の規則であるか否かを判定し、第二種の規則で
ある場合には1008でf lagの値を2にする。
Determine whether the candidate character set matches this rule. In 1007, if R(e) matches, it is determined whether this rule is a second type rule, and if it is a second type rule, the value of f lag is set to 2 in 1008.

1019で仮想的な文字パターン番号Sを1だけ増すと
ともに、この文字パターンに対する候補文字数Cを初期
値0とする。1020は第に文字パターンに対する候補
文字についてのループであり、候補数K(k)だけルー
プを回る。102】では、第に文字パターンに対する候
補文字C(k、j)を複写して、D(s、c)とする。
In step 1019, the virtual character pattern number S is incremented by 1, and the number of candidate characters C for this character pattern is set to an initial value of 0. 1020 is a loop regarding candidate characters for the character pattern, and the loop is repeated by the number of candidates K(k). [102] First, the candidate character C(k, j) for the character pattern is copied to become D(s, c).

その時、候補文字数Cは1増える。1022では書き替
え規則の個数Eだけ1023〜1025を繰り返す。1
023では第e書き替え規則R(e)を適用し、候補文
字集合とR(e)とが合致するかどうかを判定する。
At that time, the number of candidate characters C increases by one. In step 1022, steps 1023 to 1025 are repeated by the number E of rewriting rules. 1
At 023, the e-th rewriting rule R(e) is applied to determine whether the candidate character set and R(e) match.

1024では、R(e)が合致したか否かを判定し、合
致した場合には1025で候補文字生成を行う。
In 1024, it is determined whether R(e) matches, and if they match, candidate characters are generated in 1025.

すなわち、候補文字数Cを1だけ増すとともに、R(e
)と候補文字c(k、J)によって定まる候補文字D(
s、c)を追加する。候補文字追加が終rした後、10
26で修正後の第S文字パターンに対する候補文字数G
(s)をCとする。
That is, while increasing the number of candidate characters C by 1, R(e
) and candidate character c(k, J), candidate character D(
Add s, c). After adding candidate characters, 10
Number of candidate characters G for the S-th character pattern after correction in 26
Let (s) be C.

1011ではflagの値が2であるか否かを判定し、
2である場合には1028〜1034の処理を実行して
仮想的な文字パターンを追加する。
In 1011, it is determined whether the value of flag is 2,
If it is 2, the processes 1028 to 1034 are executed to add a virtual character pattern.

すなわち、1028で仮想的な文字パターン番号Sを1
だけ増すとともに、この文字パターンに対する候補文字
数Cを初期値Oとする。1029は候補文字 C(k、j) (k = 1 、 K(k))に関する
ループ制御である。1030では書き替え規則の個数E
だけ1031〜1033を繰り返す、1031では第e
書き替え規則を適用し、候補文字集合とこの規則とが合
致するかどうかを判定する。1032では、第e書き替
え規則が合致した場合、この規則が第二種の規則である
か否かを判定し、第二種の規則である場合には1033
で候補文字生成を行う。すなわち、候補文字数Cを1だ
け増すとともに第e書き替え規則R(e)と候補文字C
(k、j)によって定まる候補文字D(s、c)を追加
する。候補文字追加が終了した後、1018で修正後の
第S文字パターンに対する候補文字数G(s)をCとす
る。
In other words, 1028 sets the virtual character pattern number S to 1.
The number of candidate characters C for this character pattern is set to an initial value O. 1029 is loop control regarding candidate character C(k,j) (k=1, K(k)). In 1030, the number of rewriting rules E
1031 to 1033 are repeated, and in 1031 the e-th
A rewriting rule is applied and it is determined whether the candidate character set matches this rule. In 1032, if the e-th rewriting rule matches, it is determined whether this rule is a second type rule, and if it is a second type rule, 1033
Generate candidate characters with . That is, while increasing the number of candidate characters C by 1, the e-th rewriting rule R(e) and candidate character C
Add candidate character D(s, c) determined by (k, j). After the addition of candidate characters is completed, in step 1018, the number of candidate characters G(s) for the modified S-th character pattern is set to C.

1035で修正後の仮想的な文字パターン数Mとして、
Sの最終的な値を代入する。
As the number M of virtual character patterns after correction in 1035,
Substitute the final value of S.

この第三の実施例は単一単語の場合について説明したが
、複数単語の場合にも適用できることはRうまでもない
Although this third embodiment has been described for the case of a single word, it goes without saying that it can also be applied to the case of a plurality of words.

次に、実施例の変形について述べる。上記の実施例では
、文字認識結果の文字列を単語単位にまとめて単語辞書
と照合し、距離の小さい単語を出力するようにしている
が、最小距離と吹出距離(最小距離の次に小さな距離の
値)とを求め、両者の差が十分大きいときは、最小距離
を与える単語を自動的に出力するようにし、両者の差が
小さいときのみコンソールに表示して操作者に選択させ
るようにしてもよい。また、最小距離の値がある閾値よ
り小さい時には自動的に最小距離の単語を出力し、最小
距離が閾値より大きい時は結果をコンソールに表示して
、操作者の指示を待つようにしてもよい。さらに、実施
例では単語の距離は文字の距離の和として与えられるが
、単語の距離を文字数で除して文字光たりの値に直して
から閾値と比較してもよい。
Next, modifications of the embodiment will be described. In the above example, the character strings resulting from character recognition are collated into words and compared with the word dictionary, and the words with the shortest distance are output. ), and when the difference between the two is sufficiently large, the word that gives the minimum distance is automatically output, and only when the difference between the two is small, it is displayed on the console for the operator to select. Good too. Additionally, when the minimum distance value is smaller than a certain threshold, the word with the minimum distance may be automatically output, and when the minimum distance is larger than the threshold, the result may be displayed on the console and wait for instructions from the operator. . Further, in the embodiment, the distance between words is given as the sum of the distances between characters, but the distance between words may be divided by the number of characters to convert it into a value for each character, and then compared with the threshold value.

次に、実施例では単語を表す文字列を出力するとしたが
、単語の番号すなわち辞書におけるその単語の一貫番号
を出力して、単語への変換は外部に任せるようにしても
よい。さらに、この番号から別の情報に変換することも
できる。例えば、実施例のようにしてカナ文字の単語を
決定したのち、その単語を読みとして持つ漢字の単語(
一般には複数存在する)に変換することができる。また
、実施例では単語i#書の決定法については説明を省略
したが、@票上の位置によって辞書を選択したり、帳票
上のある部分の文字認識結果によって他の部分で使用す
べき辞書を決定するなどの方法が使用できる。
Next, in the embodiment, a character string representing a word is output, but the number of the word, that is, the consistent number of the word in the dictionary, may be output, and the conversion into words may be left to an external party. Additionally, this number can be converted into other information. For example, after determining a kana character word as in the example, a kanji word that has that word as its reading (
Generally, there are more than one). In addition, although the explanation of the method for determining the word i# is omitted in the embodiment, it is possible to select a dictionary depending on the position on the @ ticket, or to select a dictionary to be used in other parts depending on the character recognition result of a certain part of the form. Methods such as determining the

また、実施例では単語照合を行う有限オートマトンは専
用回路によって実現するとしたが、その動作をソフトウ
ェアによってシミュレーションする実現法でもよい。
Further, in the embodiment, the finite automaton that performs word matching is realized by a dedicated circuit, but it may also be realized by simulating its operation by software.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、従来の単語照合法と比較して高速に単
語照合ができ、文字認識部の性能が従来と同等であるな
らば、文字認識と単語照合を総合した全体的な処理速度
が従来よりはるかに向−ヒする。また1本発明による単
語照合は処理速度が速く、従来と同等の処理時間内に多
数の候補文字を処理することができるから、文字認識部
における候補数を増加することにより、単語照合で正し
いnS−語を選ぶ可能性が高められ、実効的な文字認識
率を高めることもできる。
According to the present invention, word matching can be performed faster than conventional word matching methods, and if the performance of the character recognition unit is the same as that of the conventional method, the overall processing speed combining character recognition and word matching can be improved. Far more effective than before. In addition, word matching according to the present invention has a fast processing speed and can process a large number of candidate characters within the same processing time as the conventional method. - The possibility of selecting words is increased, and the effective character recognition rate can also be increased.

(5]) さらに、複数単語を連続して記入した場合にも適用でき
るから、住所や氏名などを分ち杏きしなくても単語照合
が適用でき、使用者にとって大変便利になる。
(5) Furthermore, since it can be applied even when multiple words are written in succession, word matching can be applied without having to separate addresses, names, etc., making it very convenient for the user.

また、書き換え規則な適用すれば、文字認識部の認識性
能に癖があっても、その癖を補正して正しい候補を追加
でき、単語照合によって正しい単語を認識できるので、
単語認識率が高まる。
In addition, by applying rewriting rules, even if there is a quirk in the recognition performance of the character recognition unit, the quirk can be corrected and correct candidates can be added, and the correct word can be recognized by word matching.
Increases word recognition rate.

【図面の簡単な説明】[Brief explanation of the drawing]

第1.2.3図は本発明による単#i照合の原理髪示す
説明図、第4図は本発明の実施例の装置構成を示す図、
第5図、第6図は実施例におけるメモリ内での情報の配
置を示す説明図、第7図は実施例における有限オー1〜
71〜ンを作成するための処理の流れ図、第8図は実施
例における有限オートマトンを実行する回路の回路図、
第9図は実施例における複合w語のための照合処理の流
れ図、第10図は実施例における候補文字追加を行う処
理の流れ図である。 100・・・中央制御装置、]、 01・・・主メモリ
、102・−・端末、103・・システムファイル、1
04・・・スキャナ、105・・・ビデオメモリ、10
6・・・文字認識部、1.07・・単語照合部、108
・・・ワークファイル、109・・バス。
Fig. 1.2.3 is an explanatory diagram showing the principle of single #i matching according to the present invention, Fig. 4 is a diagram showing the device configuration of an embodiment of the present invention,
5 and 6 are explanatory diagrams showing the arrangement of information in the memory in the embodiment, and FIG. 7 is an explanatory diagram showing the arrangement of information in the memory in the embodiment.
Figure 8 is a circuit diagram of a circuit that executes a finite automaton in the embodiment;
FIG. 9 is a flowchart of the matching process for compound W words in the embodiment, and FIG. 10 is a flowchart of the process of adding candidate characters in the embodiment. 100... Central control unit, ], 01... Main memory, 102... Terminal, 103... System file, 1
04...Scanner, 105...Video memory, 10
6... Character recognition section, 1.07... Word matching section, 108
...Work file, 109...Bus.

Claims (5)

【特許請求の範囲】[Claims] 1.ディジタル画像を入力する手段と、 上記ディジタル画像の内部に存在する文字パターンを認
識して各文字パターンに対する単数または複数の候補文
字を出力する手段と、上記単数または複数の候補文字を
組合せて得られる候補文字列を受理する有限オートマト
ンを生成する手段と、複数の単語を記憶してなる単語辞
書とを有し、上記有限オートマトンに上記単語辞書に含
まれる単語を順次入力し、上記有限オートマトンに受理
される単語を上記入力文字パターン群の認識結果として
設定することを特徴とする文字認識の後処理方式。
1. A means for inputting a digital image; a means for recognizing character patterns existing within the digital image and outputting one or more candidate characters for each character pattern; and a combination of the one or more candidate characters. It has means for generating a finite automaton that accepts candidate character strings, and a word dictionary that stores a plurality of words, and the words included in the word dictionary are sequentially input to the finite automaton, and the words are accepted by the finite automaton. A post-processing method for character recognition, characterized in that a word is set as a recognition result of the input character pattern group.
2.特許請求の範囲第1項記載の文字認識の後処理方式
において、認識結果の候補文字に所定の規則に従って候
補文字を追加した後、上記有限オートマトンを生成する
ことを特徴とする文字認識の後処理方式。
2. In the character recognition post-processing method according to claim 1, the character recognition post-processing is characterized in that the finite automaton is generated after adding candidate characters to the candidate characters of the recognition result according to a predetermined rule. method.
3.M(M>1)語の単語が連続して書かれた文字パタ
ーン群を認識して得られる候補文字列を受理する有限オ
ートマトンを生成する手段と、複数の種類の単語辞書と
を有し、i=1からMまで繰返し単語照合を行うことに
よる文字認識の後処理方式であって、該単語照合は、上
記生成された有限オートマトンを複数の切断点で切断し
、切断点の後部を取り出すことにより作られる部分オー
トマトンL(i)に上記複数の単語辞書のうちの一つを
入力し、受理される単語が存在するような切断点の各々
について、切断点の前部の部分オートマトンF(i)に
ついてまた複数の切断点で切断して上記と同様の操作を
行い、以下同様の処理をi=(M−1)まで行い、さら
にi=M回目の単語照合においては切断を行わず、先顔
の文字位置から始まる部分オートマトンF(M−1)に
上記複数の単語辞書のうちの一つを入力する処理を行う
ものであって、上記のi=1からMまでの全ての単語照
合で受理される単語が存在するような切断点の系列が存
在する場合に、上記の複数の切断点の系列に属する各切
断点で受理された単語の系列を候補単語として出力し、
かつその出力順序は、M回目で受理された単語を先頭に
1回目で受理された単語までを逆順に出力することを特
徴とする文字認識の後処理方式。
3. A means for generating a finite automaton that receives a candidate character string obtained by recognizing a character pattern group in which M (M>1) words are consecutively written, and a plurality of types of word dictionaries, A post-processing method for character recognition by repeatedly performing word matching from i=1 to M, in which the word matching involves cutting the generated finite automaton at a plurality of cutting points and extracting the rear part of the cutting point. One of the plurality of word dictionaries is input to the partial automaton L(i) created by ), cut at multiple cutting points and perform the same operation as above, and then perform the same process up to i = (M-1), and then in the i = M-th word matching, do not cut and perform the same operation as above. This is a process of inputting one of the plural word dictionaries mentioned above to the partial automaton F(M-1) starting from the character position of the face, and all the words from i=1 to M mentioned above are matched. If there is a series of cut points in which there are accepted words, output the series of words accepted at each cut point belonging to the plurality of cut point series as candidate words,
A post-processing method for character recognition characterized in that the output order is such that the word accepted the Mth time is output first and the words accepted the first time are output in reverse order.
4.M(M>1)語の単語が連続して書かれた文字パタ
ーン群を認識して得られる候補文字列を受理する有限オ
ートマトンを生成する手段と、複数の種類の単語辞書と
を有し、i=1からMまで繰返し単語照合を行うことに
よる文字認識の後処理方式であって、該単語照合は、上
記生成された有限オートマトンを複数の切断点で切断し
、切断点の前部を取り出すことにより作られる部分オー
トマトンF(i)に上記複数の単語辞書のうちの一つを
入力し、受理される単語が存在するような切断点の各々
について、切断点の後部の部分オートマトンL(i)に
ついてまた複数の切断点で切断して上記と同様の操作を
行い、以下同様の処理をi=(M−1)まで行い、さら
にi=M回目の単語照合においては切断を行わず、最後
の文字位置で終わる部分オートマトンL(M−1)に上
記複数の単語辞書のうちの一つを行うものであって、上
記のi=1からMまでの全ての単語照合で受理される単
語が存在するような切断点の系列が存在する場合に、上
記の複数の切断点の系列に属する各切断点で受理された
単語の系列を候補単語として出力し、かつその出力順序
は、1回目で受理された単語を先頭にM回目で受理され
た単語までを正順に出力することを特徴とする文字認識
の後処理方式。
4. A means for generating a finite automaton that receives a candidate character string obtained by recognizing a character pattern group in which M (M>1) words are consecutively written, and a plurality of types of word dictionaries, This is a post-processing method for character recognition by repeatedly performing word matching from i=1 to M, and the word matching involves cutting the generated finite automaton at a plurality of cutting points and extracting the front part of the cutting point. One of the plurality of word dictionaries mentioned above is input to the partial automaton F(i) created by ), the same operation as above is performed by cutting at multiple cutting points, and the same process is performed until i = (M-1), and further, in the i = Mth word matching, no cutting is performed, and the final One of the above plural word dictionaries is applied to the partial automaton L(M-1) ending at the character position of If there is a series of cut points such as A post-processing method for character recognition characterized in that the words accepted at the beginning are output in the normal order up to the Mth accepted word.
5.特許請求の範囲第3項または第4項記載の文字認識
の後処理方式において、単語間の従属関係を指定する情
報を予め記憶し、上記の情報を用いて候補単語の検査を
行うことを特徴とする文字認識の後処理方式。
5. The character recognition post-processing method according to claim 3 or 4 is characterized in that information specifying dependency relationships between words is stored in advance, and candidate words are tested using the above information. A post-processing method for character recognition.
JP63222307A 1988-09-07 1988-09-07 Post-processing method for character recognition Expired - Lifetime JP2886868B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63222307A JP2886868B2 (en) 1988-09-07 1988-09-07 Post-processing method for character recognition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63222307A JP2886868B2 (en) 1988-09-07 1988-09-07 Post-processing method for character recognition

Publications (2)

Publication Number Publication Date
JPH0271388A true JPH0271388A (en) 1990-03-09
JP2886868B2 JP2886868B2 (en) 1999-04-26

Family

ID=16780308

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63222307A Expired - Lifetime JP2886868B2 (en) 1988-09-07 1988-09-07 Post-processing method for character recognition

Country Status (1)

Country Link
JP (1) JP2886868B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010218140A (en) * 2009-03-16 2010-09-30 Fujitsu Ltd Retrieval device, retrieval method, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6029884A (en) * 1983-07-18 1985-02-15 Mitsubishi Electric Corp Reading method of word
JPS61161588A (en) * 1985-01-11 1986-07-22 Hitachi Ltd Postprocessing system of character recognition
JPS6228889A (en) * 1985-07-31 1987-02-06 Canon Inc Information recognizing device
JPS63138480A (en) * 1986-11-29 1988-06-10 Toshiba Corp Character recognizing system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6029884A (en) * 1983-07-18 1985-02-15 Mitsubishi Electric Corp Reading method of word
JPS61161588A (en) * 1985-01-11 1986-07-22 Hitachi Ltd Postprocessing system of character recognition
JPS6228889A (en) * 1985-07-31 1987-02-06 Canon Inc Information recognizing device
JPS63138480A (en) * 1986-11-29 1988-06-10 Toshiba Corp Character recognizing system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010218140A (en) * 2009-03-16 2010-09-30 Fujitsu Ltd Retrieval device, retrieval method, and storage medium

Also Published As

Publication number Publication date
JP2886868B2 (en) 1999-04-26

Similar Documents

Publication Publication Date Title
JP3302988B2 (en) Character processing method and character identification method
JP2726568B2 (en) Character recognition method and device
JP2001052116A (en) Device and method for matching pattern stream, device and method for matching character string
JPH0271388A (en) After-processing system for recognition of character
JP2998054B2 (en) Character recognition method and character recognition device
JP3924899B2 (en) Text search apparatus and text search method
JP2947832B2 (en) Word matching method
JP2827066B2 (en) Post-processing method for character recognition of documents with mixed digit strings
JPS63268082A (en) Pattern recognizing device
JPH11120294A (en) Character recognition device and medium
JPH0746373B2 (en) Word recognizer
JP2918380B2 (en) Post-processing method of character recognition result
JP2000251017A (en) Word dictionary preparing device and word recognizing device
JPH09120436A (en) Word collation method
JPH0944604A (en) Character recognizing processing method
JP2923295B2 (en) Pattern identification processing method
JPH11316802A (en) Word recognition device, its address place name registering method, and recording medium
JPS646514B2 (en)
JPS6055481A (en) Pattern recognizing device
JPH0944606A (en) Character recognizing processing method
JPH09138840A (en) Character recognition device
JPH0887570A (en) Information recognizing method
JPH02195489A (en) Post processor for character recognition
JP2001266074A (en) Device for recognizing character
JPH04111186A (en) Character recognition result correction method for address character string

Legal Events

Date Code Title Description
S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080212

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090212

Year of fee payment: 10

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090212

Year of fee payment: 10