JPH0337765A - Word dictionary retrieving device - Google Patents

Word dictionary retrieving device

Info

Publication number
JPH0337765A
JPH0337765A JP1173442A JP17344289A JPH0337765A JP H0337765 A JPH0337765 A JP H0337765A JP 1173442 A JP1173442 A JP 1173442A JP 17344289 A JP17344289 A JP 17344289A JP H0337765 A JPH0337765 A JP H0337765A
Authority
JP
Japan
Prior art keywords
character
word dictionary
word
clock
input
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
JP1173442A
Other languages
Japanese (ja)
Other versions
JPH0670789B2 (en
Inventor
Shunichi Fukushima
俊一 福島
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP1173442A priority Critical patent/JPH0670789B2/en
Publication of JPH0337765A publication Critical patent/JPH0337765A/en
Publication of JPH0670789B2 publication Critical patent/JPH0670789B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To execute the collation with a word dictionary at high speed by deciding that a word existing in a work dictionary memory appears in an inputted charater-string, when a coincidence signal is detected from all of a first character - an (n)-th character comparators by being synchronized with a deciding clock. CONSTITUTION:Whenever an input clock 50 is inputted from an input device 5, first of all, a shift click 70 is outputted once, and then, a deciding clock 72 and a counter clock 71 are outputted N times. A (j)-th character comparing circuit 3 outputs a coincidence signal, when the (j)-th character (j is an integer of 1<=j<=n) by the data of an (n) character portion read out of a word dictionary memory 1 to one address shown by an address counter 4 coincides with the (j)-th character of one of (m) shift registers 2 or a residual symbol. A deciding circuit 6synchronizes with the deciding clock 72, and decides that a word existing in the word dictionary memory 1 appears in an inputted character-string, when the coincidence signal is detected from all of (n) comparators. In such a manner, the collation with a word dictionary can be executed at the high speed.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、入力文字列と単語辞書とを照合して、入力文
字列において、単語辞書内に存在する単語が出現した部
分を検索する単語辞書検索装置に関するものである。特
に、入力文字列の各文字が複数の候補をもつような場合
にも適用できる単語辞書検索装置に関するものである。
Detailed Description of the Invention (Industrial Field of Application) The present invention is a method for searching for a part of an input character string in which a word existing in the word dictionary appears by comparing an input character string with a word dictionary. The present invention relates to a dictionary search device. In particular, the present invention relates to a word dictionary search device that can be applied even when each character in an input character string has multiple candidates.

入力文字列の各文字に複数の候補がなく一意な場合の単
語辞書検索装置は、かな漢字変換装置においてキーボー
ドから入力されたかな文字列に対する単語辞書検索を行
なう部分、機械翻訳装置・文音声変換装置・文章校正装
置などにおいてワードプロセッサなどで作成された漢字
かな混じり文字列に対する単語辞1゛検索を行なう部分
などに用いられている。
When each character in the input character string is unique without multiple candidates, the word dictionary search device is the part of the kana-kanji conversion device that performs a word dictionary search for the kana character string input from the keyboard, a machine translation device, and a sentence-to-speech conversion device.・It is used in grammar proofing devices and the like to perform a single-word search for character strings containing kanji and kana created using word processors.

入力文字列の各文字に複数の候補がある場合の単語辞書
検索装置は、音声認識装置や文字認識装置などにおいて
、認識結果の複数の候補文字から最も確からしい文字を
選択するための単語辞書検索部などに用いられている。
When there are multiple candidates for each character in an input character string, a word dictionary search device is used in speech recognition devices, character recognition devices, etc. to select the most likely character from multiple candidate characters in the recognition results. It is used in departments etc.

(従来の技術) 従来、かな漢字変換装置・文音声変換装置などにおいて
用いられている単語辞書検索方式は、基本的に、文献:
「計算機によるカナ漢字変換」(州浜・庄原、NI−I
K技術研究、第25巻第5号、23頁〜60頁、197
3年)に示されている方式を引き継いでいる。すなわち
、入力された文字列から部分文字列を切り出して、その
部分文字列に表記(かな漢字変換では「かな表記]ずな
わら「読みがな])の一致する単語を単語辞は内から検
索するという処理を行なう(これを、以下では、第1の
従来技術と呼ぶことにする。) 例えば、「文章を解析する」という漢字かな混じり文字
列に対する単語辞書検索を行なう場合は、1文字目・2
文字目など各文字位置から始まる単語を検索するために
、「文章を解析する] 「章を解析する」 「を解析す
る」 [解析する] 「析する」 「する」 「る」と
いった部分文字列を別々に切り出す。そして、各部分文
字列について、さらに、末尾を削った部分文字列も生成
して、その各々を単語辞書から検索する。すなわち、1
文字目から始まる単語を検索する際には、「文章を解析
する4 1文章を解析すj 「文章を解析」 「文章を
解] 「文章をJ  r3JJ  riJといった部分
文字列に関して、検索を次々に繰り返し、2文字目から
始まる単語を検索する際には、1章を解析するJ「章を
解析すJr章を解析] 1章を解」 1章をJ「皇Jと
いった部分文字列に関して、検索を次々に繰り返すわけ
である。その結果、下線を引いた部分文字列などについ
て、表記の一致する単語が見つかることになる。
(Prior art) The word dictionary search methods conventionally used in kana-kanji conversion devices, sentence-to-speech conversion devices, etc. are basically based on the documents:
“Kana-Kanji Conversion by Computer” (Shuhama/Shobara, NI-I
K Technology Research, Vol. 25, No. 5, pp. 23-60, 197
This method is inherited from the method shown in 3rd year). In other words, a substring is cut out from the input string, and the word dictionary searches for a word that matches the notation (in kana-kanji conversion, ``kana notation'', zunawara ``yomigana'') in the substring. (Hereinafter, this will be referred to as the first prior art.) For example, when performing a word dictionary search for a character string containing kanji and kana, such as "analyzing a sentence," the first character 2
In order to search for words starting from each character position, such as the first character, you can use substrings such as "analyze text", "analyze chapter", "analyze" [analyze], "analyze", "suru", "ru", etc. Cut out separately. Then, for each partial character string, a partial character string with the end deleted is also generated, and each of them is searched from the word dictionary. That is, 1
When searching for a word starting with the letter ``Analyze a sentence 4 1 Analyze a sentence j ``Analyze a sentence'' ``Answer a sentence'' ``Sentence J r3JJ riJ'' Repeatedly, when searching for a word starting with the second letter, parse chapter 1J ``Analyze chapter Jr Analyze chapter 1 Solve chapter 1'' Search for substrings such as ``J'' in chapter 1 are repeated one after another.As a result, words that match the notation of the underlined substrings, etc. are found.

この第1の従来技術では、複数の部分文字列に対して単
語辞書の検索を繰り返すわけであるが、単語辞書の構成
を工夫しておくことによって、1つの部分文字列に対す
る検索の所要時間の短縮を図っている。例えば、単語辞
書内の単語をあらかじめソートしておいて二分検索を行
なったり、1文字目・2文字目など文字ごとに分割して
共通な部分をまとめて本構造として1文字ずつの照合を
行なうなどである。このような諦11の構造と検索方式
の工夫については、文献: ”The Art of 
ComputerPrograrnming 3: S
orting and Searching”中、E。
In this first conventional technique, the search in the word dictionary is repeated for multiple substrings, but by devising the structure of the word dictionary, the time required to search for one substring can be reduced. We are trying to shorten the time. For example, you can sort the words in a word dictionary in advance and perform a binary search, or you can divide the words into characters such as the first and second characters, group the common parts together, and perform character-by-character matching as a main structure. etc. Regarding the structure of the Art of Art 11 and the invention of the search method, please refer to the literature: “The Art of
Computer Programming 3:S
orting and Searching”, E.

Knuth、 Addison−Wesley、 19
73)に多く示されている。
Knuth, Addison-Wesley, 19
73).

ただし、この第1の従来技術は、コンピュータ上の逐次
型プログラムとしての実現を想定しており、所要時間短
縮の工夫は逐次処理の枠内で工夫である。したがって、
入力文字列のある部分文字列と単語辞身内のある単語の
表記の文字列とを比較する処理などは、1文字ずつ逐次
行なわれる。例えば「文章をJという部分文字列と単語
辞書内の「文章Jという単語の比較は、「文]と「文」
とを照合し、一致したところで「章Jと「章」とを照合
し、次に、「を」に対して不一致となり失敗するという
ように、1文字ずつ照合処理の繰り返しである。
However, this first conventional technique is intended to be realized as a sequential program on a computer, and the measures to shorten the required time are within the framework of sequential processing. therefore,
The process of comparing a certain partial string of an input string with a character string of a certain word in a word dictionary is performed one by one character by character. For example, a comparison between the substring "sentence J" and the word "sentence J" in the word dictionary is "sentence" and "sentence".
When a match is found, ``chapter J'' and ``chapter'' are compared, and then ``wo'' is mismatched and fails, and the matching process is repeated one character at a time.

また、第1の従来技術では、入力文字列の各文字にm個
ずつ候補があるような場合は、あらかじめ、長さLの部
分文字列に対して、候補を組み合せたm”通りの文字列
を生成する必要がある。そして、それらの各々について
、さらに、上記のように末尾を削った部分文字列を生成
して、単語辞書内を検索することになる。
In addition, in the first conventional technique, when there are m candidates for each character in an input character string, m" combinations of candidates are prepared in advance for a partial character string of length L. Then, for each of them, a substring with the end truncated as described above is generated and searched in the word dictionary.

一方、ある長さLの文字列と入力文字列との比較の際に
、1文字ずつの照合を繰り返すのではなく、対応する文
字位置のL組の照合を同時に行なうことが考えられてい
る。その際、入力文字列をシフトレジスタに格納してお
けば、照合の位置をずらすことが、入力文字列から再度
部分文字列を切り出すのではなく、シフトレジスタ内の
全文字を一度に1文字ずらすことで実現できるようにも
なる。この第2の従来技術は、特開昭63−26142
1号公報r文字列処理装置」および特開昭63−261
422号公報r文字列照合装置]に述べられている。な
お、この第2の従来技術では、入力文字列に複数の候補
は存在せず、検索される文字列も1通りに限られる(単
語辞書のように多数ではない)。
On the other hand, when comparing a character string of a certain length L with an input character string, it has been considered to simultaneously compare L sets of corresponding character positions instead of repeating the comparison character by character. At that time, if the input string is stored in a shift register, shifting the collation position will shift all characters in the shift register one character at a time, rather than cutting out a substring from the input string again. This will also make it possible. This second prior art is disclosed in Japanese Unexamined Patent Publication No. 63-26142.
Publication No. 1 r Character string processing device” and Japanese Patent Application Laid-Open No. 63-261
No. 422, character string matching device]. Note that in this second conventional technique, there are no plural candidates for the input character string, and the number of character strings to be searched is limited to one (not many as in a word dictionary).

特開昭62−67636号公報F照合方式]および文献
二F音声日本語入カシステムにおける高速な言語処理の
ための辞書照合アルゴリズム」(浜口・鈴木、電子情報
通信学会論文誌、第J70−D巻第8号、1589頁〜
1596頁1987年)には、第3の従来技術が示され
ている。
Japanese Unexamined Patent Publication No. 62-67636 F-matching method] and Reference 2-F Dictionary matching algorithm for high-speed language processing in spoken Japanese input systems" (Hamaguchi and Suzuki, Transactions of the Institute of Electronics, Information and Communication Engineers, No. J70-D Volume No. 8, page 1589~
1596, 1987) shows a third prior art.

第3の従来技術では、入力文字列に複数の文字候補があ
ることを想定している。まず、文字の種類をM(例えば
、JISの文字コード表では、ひらがなについてM=8
3)とすると、1文字目・2文字目など各文字位置に、
Mビットのメモリを1個ずつ用意し、複数の候i’d)
文字に対応する各ビットを1にしておく。
The third conventional technique assumes that an input character string has a plurality of character candidates. First, set the type of character to M (for example, in the JIS character code table, M = 8 for hiragana).
3), at each character position such as the 1st character and 2nd character,
Prepare one M-bit memory each, and store multiple options (i'd)
Set each bit corresponding to a character to 1.

そして、照合時は、単語辞書内の各単語について、単語
の表記の1文字目・2文字目など文字位置ごとに、対応
するMビットメモリから、対応する文字のビット内容(
1またはO)を同時に読み出す。すべてのMビットメモ
リからlが読みだされたら、入力文字列中に単語辞書内
にある単語が出現したことになる。
At the time of matching, for each word in the word dictionary, the bit contents of the corresponding character (
1 or O) at the same time. When l is read out from all M-bit memories, a word in the word dictionary has appeared in the input character string.

(発明が解決しようとする課題) 第1の従来技術には、まず第1に、前述のように、多数
の部分文字列に対する単語辞書検索を繰り返さねばなら
ないという欠点がある。この欠点は、入力文字列の各文
字に複数の候補がある場合に、特に顕著になる。長さK
の入力文字列の各文字にm個ずつ候補がある場合、最長
の部分文字列の長さをLとすると(通常、単語辞書内の
最長の単語の長さをLとする)、最大(mXLXK)個
の部分文字列に対する検索を繰り返す必要が生ずる。通
常、あらかじめ条件を定めて、不要な部分文字列の検索
を避けるようにするので、(mXLXK)個というのは
最悪の場合であるが、それでも検索の回数はがなり多く
なる。
(Problems to be Solved by the Invention) The first prior art has the drawback that, as described above, word dictionary searches for a large number of partial character strings must be repeated. This drawback is particularly noticeable when there are multiple candidates for each character in the input string. length K
If there are m candidates for each character in the input string, then let L be the length of the longest substring (usually L is the length of the longest word in a word dictionary), then the maximum (mXLXK ) substrings must be searched repeatedly. Normally, conditions are set in advance to avoid searching for unnecessary substrings, so (mXLXK) is the worst case, but the number of searches will still be large.

第1の従来技術の第2の欠点は、ある部分文字列と単語
辞書内のある単語の表記の文字列との比較を、1文字ず
つ順に行なうため、比較に時間がががるということであ
る。
The second drawback of the first prior art is that the comparison between a certain partial string and the string of representations of a certain word in the word dictionary is performed character by character, which takes time. be.

第2の従来技術では、第1の従来技術の第2の欠点に対
処している。しかし、第2の従来技術は、入力文字列に
複数の候補がある場合に適用できない。
The second prior art addresses the second drawback of the first prior art. However, the second conventional technique cannot be applied when there are multiple candidates in the input character string.

また、検索される文字列も1通りに限られ、単語辞書の
ように多数の文字列と比較を行なうことを考えると、単
語辞1:内の各単語の表記の長さの異なりが問題となっ
て適用できない。
In addition, the number of character strings to be searched is limited to one, and considering that comparisons are made with many character strings like in a word dictionary, the difference in the length of each word in word dictionary 1: becomes a problem. Therefore, it cannot be applied.

第3の従来技術は、第1の従来技術の2つの欠点に対処
している。しかし、入力文字列中 めに、文字のa類だけのビット数をもったメモリを、文
字列長だけ用意する必要があるため、文字の種類が多数
の場合はメモリ・す゛イズがかなり大きくなってしまう
問題がある。かな漢字変換や音声認識の場合は、入力文
字列がひらがな(あるいは音素文字)で100種類程度
に限定されるので、あまり問題にならないが、漢字かな
混じり文字列を対象とした文音声変換や機絨翻訳など場
合は、漢字を含み文字の種類が3000〜4000種類
にもおよぶため、メモリが大きくなって問題になる。
The third prior art addresses two drawbacks of the first prior art. However, since it is necessary to prepare a memory with the number of bits for the character type A in the input character string for the length of the character string, the memory size becomes quite large when there are many types of characters. There is a problem with this. In the case of kana-kanji conversion and speech recognition, the input character string is limited to about 100 types of hiragana (or phonetic characters), so this is not much of a problem, but it is not a problem for text-to-speech conversion or machine recognition for character strings containing kanji and kana. In the case of translation, etc., there are 3,000 to 4,000 types of characters, including kanji, so the memory becomes large, which becomes a problem.

また、第3の従来技術では、入力された文字列の先頭か
ら始まる単語の検索しか行なわないため、2文字目から
始まる単語や、3文字目から始まる単語などを検索する
場合には、入力文字列のメモリへの登録を、やり直す必
要が生じるという問題もある。
In addition, in the third conventional technology, only the words starting from the beginning of the input character string are searched, so when searching for words starting from the second character, words starting from the third character, etc., the input characters There is also the problem that it is necessary to re-register columns in memory.

本発明の目的は、上記のような従来技術の欠点を除去し
、入力文字列の各文字に複数の候補があっても、高速に
単語辞書との照合が可能な単語辞書検索装置を提供する
ことである− (課題を解決するための手段) 本発明は、各文字に対して第1から第m候補(mはm≧
1なる整数)までのm種類の候補が存在する文字列の入
力装置と、n文字分(nはn=1なる整数)のデータ巾
をもつ各アドレスに単語の表記を1個ずつ格納してn文
字に満たない部分にはあらかじめ定めた残余記号を晶め
た単語辞書メモリと、前記入力装置によっ°(1文字に
対するm種類の候補が入力されるたびにシフトクロック
1回と前記単語辞書メモリ内の全単語数に応じた回数の
判定クロックとカウンタクロックとを発生するコントロ
ーラと、前記シフトクロックに同期したリセットと前記
カウンタクロックに同期したカウントアツプとを行なう
前記単語辞書メモリのアドレスカウンタと、前記入力装
置によって入力された文字列の第1・第2・・・・・・
・第m候補に対応し前記シフトクロックに同期した1文
字ずつの順送りを行なう各々n文字分の第1・第2・・
・・・・・第m候浦シフトレジスタと、前記単語辞書メ
モリから読み出されるn文字分のデータの1文字目・2
文字目・・・・・・・n文字目に対応し該当位置の文字
が前記第1・第2161.・・・第01候補シフトレジ
スタのいずれかの同位置の文字または前記残余記号に一
致したとき一致信号を出力する1文字目・2文字目・・
・・・・・n文字目比較回路と、前記判定クロックに同
期して前記1文字目・2文字目・・・・・・・n文字目
比較回路のすべてから一致信号が検出された場合に前記
入力装置によって入力された文字列中に前記単語辞書メ
モリ内に存在する単語が出現したと判定する判定回路と
を備えたことを特徴とする単語辞書検索装置である。
An object of the present invention is to provide a word dictionary search device that eliminates the above-mentioned drawbacks of the prior art and can perform high-speed matching with a word dictionary even if each character in an input character string has multiple candidates. (Means for Solving the Problem) The present invention provides the first to mth candidates (m is m≧
An input device for character strings with m types of candidates up to an integer equal to 1), and a word representation stored in each address with a data width of n characters (n is an integer equal to 1). A word dictionary memory in which predetermined residual symbols are stored in the portion less than n characters, and a word dictionary memory that stores predetermined residual symbols and the input device (one shift clock and the word dictionary each time m types of candidates for one character are input) a controller that generates a judgment clock and a counter clock a number of times according to the total number of words in the memory; and an address counter of the word dictionary memory that performs a reset in synchronization with the shift clock and a count-up in synchronization with the counter clock; , the first and second character strings input by the input device.
・First and second characters corresponding to the mth candidate and sequentially moving characters one by one in synchronization with the shift clock.
...The first and second characters of the n-character data read from the m-th Koura shift register and the word dictionary memory
Character . . . The character at the corresponding position corresponding to the nth character is the 1st and 2161st character. ...The first and second characters that output a match signal when they match any character at the same position in the 01st candidate shift register or the remaining symbol.
...When a match signal is detected from all of the n-th character comparison circuit and the first character, second character, ... n-th character comparison circuit in synchronization with the judgment clock. A word dictionary search device comprising: a determination circuit that determines that a word existing in the word dictionary memory appears in a character string input by the input device.

(実施例) 図面を用いて、本発明の構成・作用を説明する。(Example) The structure and operation of the present invention will be explained using the drawings.

第1図は本発明の単語辞書検索装置の第1の実施例の構
成を示すブロック図である。以下、まず、各構成要素を
説明する。
FIG. 1 is a block diagram showing the configuration of a first embodiment of the word dictionary search device of the present invention. Below, each component will be explained first.

入力装置5は、各文字に刻して第1候補から第m候補(
mはm≧1なる整数)までのm種類の候補が存在する文
字列を入力する装置であり16例えば、音声認識装置や
文字認識装置などである。入力装置5は、各文字に対す
るm個の候補を、同時に出力し、その出力のタイミング
を入力クロック50によってコントローラ7へ伝える。
The input device 5 inscribes each character with the first to mth candidates (
It is a device for inputting a character string in which there are m types of candidates (m is an integer where m≧1), and is, for example, a voice recognition device or a character recognition device. The input device 5 simultaneously outputs m candidates for each character, and transmits the timing of the output to the controller 7 using an input clock 50.

単語辞書メモリlは、n文字分(nはn=1なる整数)
のデータ巾をもつ各アドレスに、単語の表記を1個ずつ
格納して、n文字に満たない部分には、あらかじめ定め
た残余記号を詰めたものである。第2図は、単語辞書メ
モリ1の内容の例を示す図である(第2図ではn=4と
している)。第2図において、△が残余記号を表わして
いる。第2図の単語辞書メモリ1のアドレスをaとする
と、「日本△△Jというn(= 4)文字が同時に読み
出される。単語辞書メモリ1は、ICメモリなどを用い
て実現できる。通常、漢字コードは16ビツトで表現さ
れるので、第2図の単語辞書メモリ1のデータ巾は、1
6X4=64ビツトである。現在のICメモリでは、同
時に読み出せるデータ巾が8ビット程度であるから、そ
のようなICメモリを8個並列に並べて実現できる。
The word dictionary memory l is for n characters (n is an integer where n=1)
One notation of a word is stored in each address having a data width of , and predetermined residual symbols are filled in the portion less than n characters. FIG. 2 is a diagram showing an example of the contents of the word dictionary memory 1 (n=4 in FIG. 2). In FIG. 2, △ represents the residual symbol. If the address of the word dictionary memory 1 in FIG. Since the code is expressed in 16 bits, the data width of the word dictionary memory 1 in Fig. 2 is 16 bits.
6×4=64 bits. With current IC memories, the data width that can be read simultaneously is about 8 bits, so eight such IC memories can be arranged in parallel.

コントローラ7は、入力装置5によって1文字に対する
m4a類の候補が入ノノされるたびに、シフトクロック
1回と、単語辞書メモリ1内の全単語数に応じた回数の
判定クロックとカウンタクロックとを発生する。第3図
はコントローラ7の入出力信号のタイムチャートの例で
ある。第3図のタイムチャートでは、入力装置5から入
力クロック50が入力されるたびに、まず、シフトクロ
ック70を1回出力(入力クロック50をそのままシフ
トクロック70として出力)し、続いて、判定クロック
72とカウンタクロック71とを、交互にN回出力して
いる。ただし、カランタフ【コック71は(N−1)回
でもよい。ここで、Nは単語辞書メモリl内の全単語数
である。このようなタイムチャート通りに動作するコン
トローラ7は、当業者において容易に実現可能である。
The controller 7 generates one shift clock, and a number of determination clocks and counter clocks corresponding to the total number of words in the word dictionary memory 1, each time an m4a type candidate for one character is entered by the input device 5. Occur. FIG. 3 is an example of a time chart of input/output signals of the controller 7. In the time chart of FIG. 3, each time the input clock 50 is input from the input device 5, the shift clock 70 is first output once (the input clock 50 is output as it is as the shift clock 70), and then the judgment clock is outputted once. 72 and counter clock 71 are alternately output N times. However, the number of times the carantuff [cock 71] may be (N-1). Here, N is the total number of words in the word dictionary memory l. A person skilled in the art can easily realize a controller 7 that operates according to such a time chart.

アドレスカウンタ4は、シフトクロック70に同期した
リセットと、カウンタクロック71に同期したカウント
アツプとを行なうカウンタで、カウンタ値を単語辞書メ
モリ1のアドレス値として出力する。従来のカウンタI
Cで実現できる。
The address counter 4 is a counter that performs reset in synchronization with the shift clock 70 and count-up in synchronization with the counter clock 71, and outputs the counter value as an address value of the word dictionary memory 1. Conventional counter I
This can be achieved with C.

第0候補シフトレジスタ2は、入力装置5によって入力
された文字列の第i候補(iは1≦i≦mなる整数)を
、シフトクロック70に同期して1文字ずつ順送りしな
がら、n文字分格納するシフトレジスタである。このシ
フトレジスタ2は、入力文字列の各文字に対するm個の
候補の各々に刊して設けられており、第1候補シフトレ
ジスタ、第2候補シフトレジスタ、・・・・・、irn
候tmシフトレジスタのm個がある。
The 0th candidate shift register 2 sequentially shifts the i-th candidate (i is an integer satisfying 1≦i≦m) of the character string inputted by the input device 5 one character at a time in synchronization with the shift clock 70, and transfers n characters. This is a shift register that stores minutes. This shift register 2 is provided for each of the m candidates for each character of the input character string, and includes a first candidate shift register, a second candidate shift register, .
There are m number of shift registers.

第4図は各シフトレジスタ2の+1す或例を示した図で
ある。1文字をdビットで表現している場合、第1候補
シフトレジスタ2は、第4図のように、シフトクロック
70に同期した(d X n)個のDフリップ70ツブ
で実現できる(d個並列に並べたものを、n個直列に接
続する)。並列に接続したd個が1文字に対応し、その
出力はまとめて比較回路3へ送られる。
FIG. 4 is a diagram showing an example of +1 of each shift register 2. When one character is represented by d bits, the first candidate shift register 2 can be realized by (d x n) D flips 70 blocks synchronized with the shift clock 70, as shown in FIG. (N pieces arranged in parallel are connected in series.) d pieces connected in parallel correspond to one character, and their outputs are collectively sent to the comparator circuit 3.

j文字目比較回路3は、アドレスカウンタ4の示す1つ
のアドレスに対して単語辞書メモリ1から読み出される
n文字分のデータのj番目qは1≦j≦nなる整数)の
文字が、m個のシフトレジスタ2のいずれかのj番目の
文字、または、残余記号に一致したときに、一致信号を
出力する回路である。この比較回路3は、単語辞書メモ
リ1のデータ中n文字の各々に対して設けられており、
1文字目比較回路、2文字目比較回路、・・・・・、n
文字目比較回路のn個がある。
The j-th character comparison circuit 3 compares m characters of the n-character data read from the word dictionary memory 1 with respect to one address indicated by the address counter 4, where the j-th q is an integer satisfying 1≦j≦n. This circuit outputs a match signal when a match is made with the j-th character of any of the shift registers 2 or with the remaining symbol. This comparison circuit 3 is provided for each of the n characters in the data of the word dictionary memory 1,
1st character comparison circuit, 2nd character comparison circuit,..., n
There are n character comparison circuits.

第5図は、j文字目比較回路3の(11q戒例を示した
図である。1文字をdビットで表現して、シフトレジス
タ2がm個設けられている場合、j文字目比較回路3は
、第5図のように、(m+1)個のdビット比較器と、
1個のORゲートで構成できる。m個のdビット比較器
は、単語辞書メモリ1から読み出されているn文字デー
タのうちj文字目と、各シフトレジスタ2のj文字目と
を比較し、残りの1個のdビット比較器は、単語辞書メ
モリ1から読み出されているn文字データのうちのj文
字目が残余記号であるか否かを調べる。最終的なORデ
ートの出力では、この(m+1)個の比較器のいずれか
で、一致が検出されたときに、一致信号30が出力され
る。
FIG. 5 is a diagram showing the (11q example) of the j-th character comparison circuit 3. When one character is expressed by d bits and m shift registers 2 are provided, the j-th character comparison circuit 3 has (m+1) d-bit comparators as shown in FIG.
It can be configured with one OR gate. The m d-bit comparators compare the j-th character of the n-character data read from the word dictionary memory 1 with the j-th character of each shift register 2, and perform the remaining one d-bit comparison. The device checks whether the j-th character of the n-character data read from the word dictionary memory 1 is a residual symbol. At the output of the final OR date, when a match is detected in any of the (m+1) comparators, a match signal 30 is output.

判定回路6は、判定クロック72に同期して、n個の比
較回路のすべてから一致信号が検出された場合に、入力
装置5によって入力された文字列中に単語辞書メモリ1
内に存在する単語が出現したと判定する回路である。第
6図は、判定回路6の構成例を示す図である。判定回路
6は、第6図のように、1個のANDゲートと1個のD
フリップフロップで実現できる。
In synchronization with the determination clock 72, the determination circuit 6 determines whether a word dictionary memory 1 is included in the character string input by the input device 5 when a matching signal is detected from all n comparison circuits.
This is a circuit that determines that a word that exists within has appeared. FIG. 6 is a diagram showing an example of the configuration of the determination circuit 6. As shown in FIG. 6, the determination circuit 6 includes one AND gate and one D gate.
This can be done with flip-flops.

次にこの実施例の動作を例を用いて説明する。Next, the operation of this embodiment will be explained using an example.

第7図(a)〜(h)は、n=4、m=3で入力文字列
の長さが4のときの、第1候補シフトレジスタ・第2候
補シフトレジスタ・第3候補シフトレジスタの内容の変
化の例を示した図である。第7図の3×4のマトリック
スは、1行が各シフトレジスタ2の内容に対応しており
、行方向が文字位置(1〜4)、列方向が候補レベル(
1〜3)を表わしている。これらのシフトレジスタ2に
入力されている文字列は、1文字目の候補は第1候補か
ら順に「日」 「白」 「目J、2文字目の候補は順に
「木] 「本」 「太J、3文字目は順に「電」[雷]
「霧」、4文字目はj頃に「気」「島」「戒]である。
Figures 7(a) to (h) show the first candidate shift register, second candidate shift register, and third candidate shift register when n=4, m=3, and the length of the input string is 4. FIG. 6 is a diagram showing an example of a change in content. In the 3×4 matrix shown in FIG. 7, one row corresponds to the contents of each shift register 2, the row direction corresponds to the character position (1 to 4), and the column direction corresponds to the candidate level (
1 to 3). The character strings input to these shift registers 2 are as follows: The first character candidates are ``Sun'', ``White'', ``J'', and the second character candidates are ``Thu'', ``Book'', ``Thick'', and so on. J, the third letter is "electric" [lightning]
The fourth character of ``Kiri'' is ``Ki'', ``Shima'', and ``Kai'' around j.

斜線部分は文字が格納されていないことを表わす。The shaded area indicates that no characters are stored.

第悦において、(a)−+(b)→(c)−+(d)−
+(e)−+(f)−+(g)−+(h)という変化は
、シフトクロック70が1回発生されるたびに起こる変
化を示している。そして、(a)〜(g)の各々の状態
で、カウンタクロック71と判定クロック72がN回発
生される。アドレスカウンタ4は、シフトクロック70
によってリセットされ、カウンタクロック71によって
N回カウントアツプされるため、各状態で、単語辞書メ
モリ1からは、先頭の単語から末尾の単語まで順に、全
単語(N個)の表記が読み出され、n個(この例では4
個)の比較回路3におい゛(、それらと第7図のシフト
レジスタの内容との照合が行なわれることになる。
In the first ecstasy, (a) − + (b) → (c) − + (d) −
The change +(e)-+(f)-+(g)-+(h) shows the change that occurs each time the shift clock 70 is generated. Then, in each of the states (a) to (g), the counter clock 71 and the determination clock 72 are generated N times. The address counter 4 has a shift clock 70
, and is counted up N times by the counter clock 71. Therefore, in each state, all the word (N) notations are read out from the word dictionary memory 1 in order from the first word to the last word. n (4 in this example)
The comparator circuit 3 (2) compares them with the contents of the shift register shown in FIG.

その結果、各状態で、単記辞書メモリ1内の例えば次の
ような単語に対して、判定回路6が出現を検出する。
As a result, in each state, the determination circuit 6 detects the occurrence of, for example, the following words in the single entry dictionary memory 1.

(a)該当なし くb)該当なし くC)該当なし くd)「日] 「日本」 「日本電気」 「日入」 「
白」「白木」 「目」 (e)1本jF本]「犬1 (0「電」 「電気」 「霧] 「桜島」 「雷」(g
)「気]「島J このうち、状態(d)における第7図のシフトレジスタ
内容と、単語辞書:尚の単語「日本J(=「日本△△J
)とを照合する際の、各比較回路3の動作を説明する。
(a) Not applicable b) Not applicable C) Not applicable d) “Japan” “Japan” “NEC” “Nippon” “
``White''``Shiraki''``Eye'' (e) 1 jF book] ``Dog 1 (0 ``Electricity''``Electricity''``Fog''``Sakurajima''``Thunder'' (g
) "Ki]" Island J Of these, the contents of the shift register in Figure 7 in state (d) and the word dictionary: Nao's word "Japan J (= "Japan △△J
) The operation of each comparator circuit 3 when comparing the .

1文字目比較回路は、「日本△△Jの「日」と第1候補
シフトレジスタの1文字目の1日1との一致により一致
信号30を発生ずる。2文字目比較回路は、「日本△△
1の「本]と第2候補シフトレジスタの2文字目のr本
]との一致により一致信号30を発生ずる。3文字目比
較回路と4文字目比較回路はともに、「日本△△Jの「
△J(残余記号)を検出して一致信号30を発生ずる。
The first character comparison circuit generates a match signal 30 based on the match between "Japanese ΔΔJ"``日'' and the first character 1st day 1 of the first candidate shift register. The second character comparison circuit is “Japan △△
A match signal 30 is generated by the match between "book" of No. 1 and r books of the second character of the second candidate shift register.The third character comparison circuit and the fourth character comparison circuit both generate "Japan △△J's "
A match signal 30 is generated by detecting ΔJ (residual symbol).

その結果、判定回路6は、すべての比較回路3の一致信
号30を受けて、単語の出現を検出することになる。
As a result, the determination circuit 6 receives the match signals 30 from all the comparison circuits 3 and detects the appearance of a word.

なお、入力文字列長がKの場合、シフトレジスタ2内で
の順送りは、少なくとも(K+n−1)回行なわれる必
要がある。したがって、入力装置5は、長さKの入力文
字列を入力した後、さらに、(n−1)回のダミーの文
字列入力を行なう必要がある。あるいは、コントローラ
7が、入力文字列の末尾を検出して、さらに、シフトク
ロック70の1@とカウンタクロック71と判定クロッ
ク72をN回ずつというサイクルを、(n−1)回繰り
返すようにしてもよい。
Note that when the input character string length is K, sequential forwarding within the shift register 2 needs to be performed at least (K+n-1) times. Therefore, after inputting the input character string of length K, the input device 5 needs to further input a dummy character string (n-1) times. Alternatively, the controller 7 detects the end of the input character string and further repeats the cycle of 1@ of the shift clock 70, the counter clock 71, and the determination clock 72 N times each (n-1) times. Good too.

また、最初の(n−1)回の順送りの間(第7図では(
a)から(C)まで)は、入力文字列がシフトレジスタ
2の先頭まで到達していないので、単語辞書メモリ1と
の照合を行なっても意味がない。そこで、その間は、コ
ントローラ7は、カウンタクロック71や判定クロック
72を発生せず、シフトクロック70のみを連続して発
生するようにしてもよい。
Also, during the first (n-1) sequential feeds (in Fig. 7,
In cases a) to (C)), since the input character string has not reached the beginning of the shift register 2, there is no point in comparing it with the word dictionary memory 1. Therefore, during that time, the controller 7 may continuously generate only the shift clock 70 without generating the counter clock 71 or the determination clock 72.

以上では、入力文字列の各文字にm個の候補が存在する
一般的な場合の実施例を示したが、かな漢字変換におけ
る単語辞書検索や、ワードプロセッサで作成した文章の
解析を行なう際の単語辞書検索などでは、入力文字列の
各文字は1通りである(m=1)。第8図は、そのよう
な場合を対象とした第2の実施例を示すブロック図であ
る。この場合は、シフトレジスタ2が1個でよい。構成
要素・動作は第1図の実施例についてm=1とすればよ
いので、説明を省略する。
Above, we have shown an example of a general case where there are m candidates for each character in the input character string. In a search or the like, each character in an input character string can be used in one way (m=1). FIG. 8 is a block diagram showing a second embodiment aimed at such a case. In this case, only one shift register 2 is required. Since the constituent elements and operations may be set to m=1 in the embodiment shown in FIG. 1, their explanations will be omitted.

(発明の効果) 以上説明したように、本発明によれば、漢字のように種
類の多い文字から戒る文字列に対して、各文字が複数の
候補をもっていても、高速に単語辞書との照合が可能な
単語辞書検索装置が得られる。特に、入力文字列の各文
字の候補数にも、単語辞書内の単語の表記長にもかかわ
らず、入力文字列と単語辞書内の1つの単語との照合が
2クロック程度の間に行えることの効果が大きい。
(Effects of the Invention) As explained above, according to the present invention, even if each character has multiple candidates, it can be quickly compared to a word dictionary for character strings such as kanji, which have a large number of types of characters. A word dictionary search device capable of comparison is obtained. In particular, regardless of the number of candidates for each character in the input string and the length of the word in the word dictionary, matching the input string with one word in the word dictionary can be performed within about two clocks. The effect is large.

さらに、実施例に示したように、本発明の各構成要素は
、少数のロジックICを組み合わせで実現できる。した
がって、LSI技術を利用すれば、非常に小型の装置と
して実現できる点も長所である。
Furthermore, as shown in the embodiments, each component of the present invention can be realized by combining a small number of logic ICs. Therefore, an advantage of using LSI technology is that it can be realized as a very compact device.

それに加えて、第1の従来技術のように、汎用計算機上
のソフトウェアとして実現されるのではなく、専用ハー
ドウェア・特殊LSIとして実現できるため、クロック
の周波数自体を、汎用計算機に比べてかなり高く設定す
ることが可能であり、この点でも高速性が優れている。
In addition, unlike the first conventional technology, it is not implemented as software on a general-purpose computer, but can be implemented as dedicated hardware/special LSI, so the clock frequency itself is considerably higher than that of a general-purpose computer. It is possible to configure settings, and the speed is excellent in this respect as well.

以上のような高速性から、本発明では、前述の第1の従
来技術のように単語辞書内で照合する単語数を制限せず
、単語辞書内の全単語との照合を行なっても、従来より
十分高速な単語辞書検索装置が得られると考えられるが
、その結果、単語辞書内が表記のコード順にソートされ
ている必要がないという長所も生じる。したがって、単
語の追加・削除が行なわれても、単語辞書を編成し直す
必要がなく、単語辞書のメンテナンスがきわめて容易で
ある。
Due to the above-mentioned high speed, the present invention does not limit the number of words to be matched in the word dictionary as in the first prior art described above, and even if it matches all the words in the word dictionary, it is faster than the conventional technology. It is thought that a sufficiently faster word dictionary search device can be obtained, but as a result, there is also the advantage that the word dictionary does not need to be sorted in the order of the written code. Therefore, even if words are added or deleted, there is no need to reorganize the word dictionary, and maintenance of the word dictionary is extremely easy.

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

第1図は本発明の第1の実施例の構成を示すブロック図
、第2図は単語辞書メモリ1の内容の例を示す図、第3
図はコントローラ7の人出力信号のタイムチャートの例
、第4図はシフトレジスタ2の構成例を示す図、第5図
は比較回路3の構成例を示す図、第6図は判定回路6の
構成例を示す図、第7図(a)〜(h)はシフトレジス
タ2の内容の変化の例を示す図、第8図は本発明の第2
の実施例を示すブロック図。 図において、l・・・単語辞書メモリ、2・・・シフト
レジスタ(第1候補シフトレジスタ)、3・・・比較回
路q文字目比較回路)、4・・・アドレスカウンタ、5
・・・入力装置、6・・・判定回路、7・・・コンI・
ロー、う、30・・・一致信号、50・・・入力クロッ
ク、70・・シフトクロック、71・・・カウンタクロ
ック、72・・・判定クロックである。
FIG. 1 is a block diagram showing the configuration of the first embodiment of the present invention, FIG. 2 is a diagram showing an example of the contents of the word dictionary memory 1, and FIG.
4 shows an example of the configuration of the shift register 2, FIG. 5 shows an example of the configuration of the comparator circuit 3, and FIG. 6 shows an example of the configuration of the determination circuit 6. 7(a) to 7(h) are diagrams showing examples of changes in the contents of the shift register 2, and FIG. 8 is a diagram showing an example of the structure of the shift register 2.
FIG. In the figure, l... word dictionary memory, 2... shift register (first candidate shift register), 3... comparison circuit (q-th character comparison circuit), 4... address counter, 5
... input device, 6 ... judgment circuit, 7 ... controller I.
Low, U, 30... Match signal, 50... Input clock, 70... Shift clock, 71... Counter clock, 72... Judgment clock.

Claims (1)

【特許請求の範囲】[Claims] 各文字に対して第1から第m候補(mはm≧1なる整数
)までのm種類の候補が存在する文字列の入力装置と、
n文字分(nはn≧1なる整数)のデータ巾をもつ各ア
ドレスに単語の表記を1個ずつ格納してn文字に満たな
い部分にはあらかじめ定めた残余記号を詰めた単語辞書
メモリと、前記入力装置によって1文字に対するm種類
の候補が入力されるたびにシフトクロック1回と前記単
語辞書メモリ内の全単語数に応じた回数の判定クロック
とカウンタクロックとを発生するコントローラと、前記
シフトクロックに同期したリセットと前記カウンタクロ
ックに同期したカウントアップとを行なう前記単語辞書
メモリのアドレスカウンタと、前記入力装置によって入
力された文字列の第1・第2・・・・・・・第m候補に
対応し前記シフトクロックに同期した1文字ずつの順送
りを行なう各々n文字分の第1・第2・・・・・・・第
m候補シフトレジスタと、前記単語辞書メモリから読み
出されるn文字分のデータの1文字目・2文字目・・・
・・・・n文字目に対応し該当位置の文字が前記第1・
第2・・・・・・・第m候補シフトレジスタのいずれか
の同位置の文字または前記残余記号に一致したとき一致
信号を出力する1文字目・2文字目・・・・・・・n文
字目比較回路と、前記判定クロックに同期して前記1文
字目・2文字目・・・・・・・n文字目比較回路のすべ
てから一致信号が検出された場合に前記入力装置によっ
て入力された文字列中に前記単語辞書メモリ内に存在す
る単語が出現したと判定する判定回路とを備えたことを
特徴とする単語辞書検索装置。
A character string input device in which there are m types of candidates from the first to the mth candidate (m is an integer where m≧1) for each character;
A word dictionary memory stores one word notation at each address with a data width of n characters (n is an integer where n≧1), and fills the portion less than n characters with predetermined residual symbols. , a controller that generates one shift clock and a number of determination clocks and counter clocks corresponding to the total number of words in the word dictionary memory each time m types of candidates for one character are input by the input device; an address counter of the word dictionary memory that performs a reset in synchronization with a shift clock and a count-up in synchronization with the counter clock; The first, second, . 1st and 2nd characters of character data...
...The character at the corresponding position corresponding to the nth character is the first character.
2nd: 1st and 2nd characters that output a match signal when they match the character at the same position in any of the m-th candidate shift registers or the remaining symbol......n When a match signal is detected from all of the character comparison circuit and the first character, second character, ... nth character comparison circuit in synchronization with the determination clock, the signal is inputted by the input device. and a determination circuit that determines that a word existing in the word dictionary memory has appeared in a character string.
JP1173442A 1989-07-04 1989-07-04 Word dictionary search device Expired - Lifetime JPH0670789B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1173442A JPH0670789B2 (en) 1989-07-04 1989-07-04 Word dictionary search device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1173442A JPH0670789B2 (en) 1989-07-04 1989-07-04 Word dictionary search device

Publications (2)

Publication Number Publication Date
JPH0337765A true JPH0337765A (en) 1991-02-19
JPH0670789B2 JPH0670789B2 (en) 1994-09-07

Family

ID=15960549

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1173442A Expired - Lifetime JPH0670789B2 (en) 1989-07-04 1989-07-04 Word dictionary search device

Country Status (1)

Country Link
JP (1) JPH0670789B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6057849U (en) * 1983-09-21 1985-04-22 株式会社日立製作所 information retrieval device
JPS63261421A (en) * 1987-04-17 1988-10-28 Mitsubishi Electric Corp Character string processor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6057849U (en) * 1983-09-21 1985-04-22 株式会社日立製作所 information retrieval device
JPS63261421A (en) * 1987-04-17 1988-10-28 Mitsubishi Electric Corp Character string processor

Also Published As

Publication number Publication date
JPH0670789B2 (en) 1994-09-07

Similar Documents

Publication Publication Date Title
JPH0519184B2 (en)
CN107391667A (en) A kind of entry processing method and mobile terminal
Bagul et al. Rule based POS tagger for Marathi text
JPH0337765A (en) Word dictionary retrieving device
JPH0337764A (en) Word dictionary retrieving device
JP2526670B2 (en) Word dictionary search device
JPH04340166A (en) Retrieval device for word dictionary
Rahate et al. Text Normalization and Its Role in Speech Synthesis
JPH0337754A (en) Word dictionary retriever
Manohar et al. Spellchecker for Malayalam using finite state transition models
CN100399245C (en) Chinese spelling, tone and stroke combined input method
JP2792147B2 (en) Character processing method and device
JP2526678B2 (en) Word dictionary search device
JPH03110676A (en) Word dictionary retrieval device
JPH0869474A (en) Similar character string retrieval device
Bakar et al. An evaluation of retrieval effectiveness using spelling‐correction and string‐similarity matching methods on Malay texts
Al-Abweeny et al. Arabic stemmer system based on rules of roots
JP2744241B2 (en) Character processor
JPS62256075A (en) Dictionary retrieving system
JPH01205267A (en) Word dictionary retrieving device
JPH0131229B2 (en)
JPH0773279A (en) Character converting device
JPH0552506B2 (en)
JPH01205266A (en) Word dictionary retrieving device
JPH0916575A (en) Pronunciation dictionary device