JPH01205267A - Word dictionary retrieving device - Google Patents

Word dictionary retrieving device

Info

Publication number
JPH01205267A
JPH01205267A JP63030576A JP3057688A JPH01205267A JP H01205267 A JPH01205267 A JP H01205267A JP 63030576 A JP63030576 A JP 63030576A JP 3057688 A JP3057688 A JP 3057688A JP H01205267 A JPH01205267 A JP H01205267A
Authority
JP
Japan
Prior art keywords
character string
word dictionary
search
character
string search
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.)
Pending
Application number
JP63030576A
Other languages
Japanese (ja)
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 JP63030576A priority Critical patent/JPH01205267A/en
Publication of JPH01205267A publication Critical patent/JPH01205267A/en
Pending legal-status Critical Current

Links

Landscapes

  • Machine Translation (AREA)
  • Document Processing Apparatus (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To compose the title device of a small number of character string retrieving means by allowing a word dictionary to have the area of a fixed length to the notation of each word, adopting a form to pack a wild card character in a part to be left after the notation is housed in the area of the fixed length, and registering not the word dictionary but a sentence to the character string retrieving means. CONSTITUTION:A word dictionary 1 has the area of the fixed length to the notation of each word, and the form to pack the wile card character in the part to be left after the notation is housed in the area of the fixed length is adopted. Namely, instead of developing a unit character string to partial character strings different in lengths, the wild card character is added to the notation of the word in the word dictionary 1. By utilizing a function to check the wild card character of a character string retrieving means 4, plural words different in lengths are detected from the unit character string. Thus, the title device can be composed of a small number of the character string retrieving means 4.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、ワードプロセッサ等の文章処理装置に用いら
れ、単語辞書から文章の部分文字列に一致する全ての単
語を検索する単語辞書検索装置に関する。
DETAILED DESCRIPTION OF THE INVENTION (Industrial Application Field) The present invention relates to a word dictionary search device that is used in a text processing device such as a word processor and searches a word dictionary for all words that match a partial character string of a sentence. .

(従来の技術) 近年、ワードプロセッサをはじめとする文章処理装置の
普及は著しい。このような文章処理装置において、最も
高頻度に行われる処理のひとつは、文字列検索処理であ
る。例えば、文章の所望の位置を捜すためにある文字列
を検索したり、文章中のある文字列を全て別の文字列に
置き換えたリする場合などに、文字列検索処理が行われ
る(これを第1種の文字列検索処理とする)。さらには
、文章の検査(文章中の誤りや不適切な部分の検出)、
キーワードの自動抽出9文章の音声への変換、他国語へ
の自動翻訳といったより高度な文章処理を行うための第
1ステツプとして、単語辞書と文章とを照合し、単語辞
書から文章の部分文字列に一致する全ての単語を検索す
る場合にも、文字列検索処理が行われる(これを第2種
の文字列検索処理とする)。単語辞書と文章の照合は、
単語辞書に登録されている複数の単語の表記の文字列と
、文章の文字列との照合であり、やはり文字列検索処理
である。第1種の文字列検索処理と第2種の文字列検索
処理とは、文章から被検索文字列を捜し出す点では変わ
りがないが、第1種の文字列検索処理の被検索文字列は
、通常1個、多くとも数個程度であり、第2種の文字列
検索処理の被検索文字列は、通常、牧刃側から数十方何
(=単語辞書に収められている単語数)という膨大な数
である点が、大きな相違点である。
(Prior Art) In recent years, text processing devices such as word processors have become rapidly popular. In such text processing devices, one of the most frequently performed processes is character string search processing. For example, string search processing is performed when searching for a certain string in order to find a desired position in a sentence, or when replacing all strings in a sentence with other strings. This is the first type of string search process). In addition, text inspection (detection of errors and inappropriate parts in text),
Automatic Extraction of Keywords9 The first step in performing more advanced text processing such as converting sentences into audio and automatically translating them into other languages is to compare the text with a word dictionary and extract partial strings of the text from the word dictionary. Character string search processing is also performed when searching for all words that match (this is referred to as the second type of character string search processing). Comparing sentences with a word dictionary is
This is a character string search process in which the character strings of multiple words registered in the word dictionary are compared with the character strings of the text. The first type of character string search process and the second type of character string search process are the same in that they search for a searched character string from a text, but the searched character string in the first type of character string search process is Usually, it is one, or at most several, and the string to be searched in the second type of string search process is usually several tens of words (= number of words stored in the word dictionary) from the Makiba side. The big difference is that they are huge in number.

そこで、従来、文字列検索処理専用に、登録モードと検
索モードとを有し、登録モードにおいては、入力きれる
複数の文字列を内部に記憶し、検索モードにおいては、
入力きれる文字列(ワイルドカード文字を含むことを許
す)から、登録モードで記憶された複数の文字列と一致
する全ての部分文字列を検出する文字列検索手段が実現
きれている。このような文字列検索手段は、次の文献(
1)に示されているようにLSI化されている。なお、
ワイルドカード文字とは、任意の文字と一致するように
予め定められた特殊文字である。
Therefore, conventionally, there is a registration mode and a search mode exclusively for character string search processing, and in the registration mode, multiple character strings that can be input are stored internally, and in the search mode,
A character string search means has been realized that detects all partial character strings that match a plurality of character strings stored in registration mode from a character string that can be inputted (including wildcard characters). Such a string search method is described in the following document (
As shown in 1), it is implemented as an LSI. In addition,
A wildcard character is a special character predetermined to match any character.

r文字列検索LSIJ (山田・平田・水弁・高橋、 電子情報通信学会技術研究報告CA S 87−25.
1987年5月29日)       ・・・文献(1
)上記のような文字列検索手段は、第1種の文字列検索
処理には容易に適用できる。すなわち、まず、登録モー
ドで被検索文字列を文字列検索手段に登録し、次に、検
索モードで文章を文字列検索手段に入力すれば、文章か
ら所望の文字列を検索することができる。
r String Search LSIJ (Yamada, Hirata, Mizuben, Takahashi, Institute of Electronics, Information and Communication Engineers Technical Research Report CA S 87-25.
May 29, 1987) ...References (1)
) The above-described character string search means can be easily applied to the first type of character string search processing. That is, by first registering the character string to be searched in the character string search means in the registration mode and then inputting the text into the character string search means in the search mode, it is possible to search for a desired character string from the text.

(発明が解決しようとする課題) しかし、上記の文字列検索手段を、第2種の文字列検索
処理に適用するには問題がある。前記したように被検索
文字列の数が、通常、数刃側から数十方何という膨大な
数であるためである。したがって、第1種の文字列検索
処理と同様の形態で第2種の文字列検索処理を実現しよ
うとすると(登録モードで単語辞書の各単語を登録して
、検索モードで文章を入力する方法をとると)、文字列
検索手段が非常に多くの文字列を登録可能であるか、あ
るいは、文字列検索手段が多数用意きれることが必要に
なる。例えば、前記の文献(1)でLSIとして実現さ
れている文字列検索手段は、登録可能な文字列の数が6
4個であり、6万4千語の単語辞書を登録するのに、1
千個必要である。
(Problems to be Solved by the Invention) However, there are problems in applying the above character string search means to the second type of character string search processing. This is because, as described above, the number of character strings to be searched is usually a huge number, ranging from several tens of blades to several tens. Therefore, if you try to realize the second type of character string search process in the same form as the first type of character string search process (a method in which each word in a word dictionary is registered in registration mode and a sentence is input in search mode), ), it is necessary that the string search means be able to register a very large number of strings, or that a large number of string search means be prepared. For example, the character string search means implemented as an LSI in the above-mentioned document (1) has a capacity of 6 character strings that can be registered.
4, and it takes 1 to register a word dictionary of 64,000 words.
A thousand pieces are needed.

そこで、文字列検索手段に、単語辞書ではなく、文章を
登録する方法が考えられる。すなわち、まず、登録モー
ドで文章を文字列検索手段に登録し、検索モードで単語
辞書を入力するという方法である。文章の基本的な単位
である文の長さは、一般に、数十文字であるから、この
方法の方か、単語辞書を登録する方式に比べて、文字列
検索手段の個数が少なくて済む。しかし、文章に対して
、先頭文字位置と文字列長を変えて形成した可能な全て
のパターンを、文字列検索手段に登録する必要がある。
Therefore, a method may be considered in which sentences are registered in the character string search means instead of a word dictionary. That is, first, a sentence is registered in the character string search means in registration mode, and a word dictionary is input in search mode. Since the length of a sentence, which is the basic unit of a sentence, is generally several tens of characters, this method requires fewer character string search means than the method of registering a word dictionary. However, it is necessary to register in the character string search means all possible patterns formed by changing the starting character position and character string length for a sentence.

例えば、「日本語を学習するヨという8文字の文に対し
ては、次のようなバリエーション(36通り)を登録す
る必要がある。8文字程度の文で36通りであるから、
数十文字の文に対しては数百通りから数千通りともなり
、やはり、文字列検索手段が多数必要になってくる。
For example, for the 8-character sentence ``Yo to learn Japanese,'' you need to register the following variations (36 variations).There are 36 variations for a sentence of about 8 characters, so
For a sentence of several tens of characters, there are hundreds to thousands of ways to search, and a large number of character string search methods are required.

日本語を学習する 日本語を学習す 日本語を学習 日本語を学 日本語を 日本語 日本 日 単語を学習する 単語を学習す 単語を学習 単語を学 語を学習する 語を学習す また、ここで述べたような文字列検索手段を用いずに第
2種の文字列検索処理を実現する方法もあるが、第2種
の文字列検索処理についても文字列検索手段を用いた方
が、第1種の文字列検索処理と第2種の文字列検索処理
とで、1つの文字列検索手段を共用できる点で、文章処
理装置としては望ましい(文章処理装置として、効率の
良い構成がとれる)。
Learn JapaneseLearn JapaneseLearn JapaneseLearn JapaneseLearn JapaneseJapaneseJapaneseLearn VocabularyLearn VocabularyLearn VocabularyLearn VocabularyAlso here Although there is a method to implement the second type of string search processing without using the string search means described in , it is better to use the string search means for the second type of string search processing as well. This is desirable as a text processing device in that the first type of string search processing and the second type of string search processing can share one string search means (an efficient configuration can be achieved as a text processing device). .

本発明の目的は、以上に述べたような文字列検索手段を
用いた単語辞書検索装置であって、かつ、従来よりも少
ない個数の文字列検索手段で構成できる単語辞書検索装
置を提供することである。
An object of the present invention is to provide a word dictionary search device using the above-mentioned character string search means, and which can be configured with a smaller number of character string search means than conventional ones. It is.

(課題を解決するための手段) 前述の課題を解決し上記目的を達成するために本発明が
提供する手段は、単語辞書から文章の部分文字列に一致
する全ての単語を検索する単語辞書検索装置であって、
前記単語辞書は各単語の表記に対して固定長の領域を持
ち該固定長の領域に表記を収めて余った部分にワイルド
カード文字を詰めた形態をとり、前記文章の全文字位置
から前記固定長の領域と同一長の単位文字列を抽出する
単位文字列抽出手段と、登録モードと検索モードとを有
し該登録モードにおいては入力される複数の文字列を内
部に記憶し該検索モードにおいては入力されるワイルド
カード文字を含む文字列から前記登録モードで記憶され
た複数の文字列と一致する全ての部分文字列を検出する
文字列検索手段と、前記文字列検索手段に対して登録モ
ードを設定し前記単位文字列抽出手段によって抽出啓れ
た複数の単位文字列を前記文字列検索手段に入力する単
位文字列登録手段と、前記文字列検索手段に対して検索
モードを設定し前記単語辞書を前記文字列検索手段に入
力する単語辞書入力手段とを備えることを特徴とする。
(Means for Solving the Problems) In order to solve the above-mentioned problems and achieve the above objects, the present invention provides a means for searching a word dictionary for all words that match a partial character string of a sentence from a word dictionary. A device,
The word dictionary has a fixed-length area for the notation of each word, stores the notation in the fixed-length area, and fills the remaining part with wildcard characters. unit character string extracting means for extracting unit character strings of the same length as the length region; a registration mode and a search mode; in the registration mode, a plurality of input character strings are stored internally; includes a character string search means for detecting all substrings that match the plurality of character strings stored in the registration mode from an input character string including a wildcard character; and a registration mode for the character string search means. unit character string registration means for setting a plurality of unit character strings extracted by the unit character string extraction means into the character string search means; and a word dictionary input means for inputting a dictionary into the character string search means.

(作用) 本発明の詳細な説明する。(effect) The present invention will be described in detail.

本発明における単位文字列抽出手段は、長さがn文字の
文章から、n通りの単位文字列を抽出する。このときの
単位文字列の長さUは、単語辞書中の表記を収める領域
の長さと同一とする(i語辞書中の最大長の表記よりも
長い文章の部分文字列と照合を行っても無駄である)。
The unit character string extraction means in the present invention extracts n types of unit character strings from a sentence with a length of n characters. The length U of the unit character string at this time is the same as the length of the area that stores the notation in the word dictionary (even when matching with a partial string of a sentence that is longer than the maximum length notation in the i-word dictionary, It's a waste).

発明が解決しようとする課題の項で示したような文章を
文字列検索手段に登録する従来の方法では、長さがnの
文章から抽出した先頭位置の異なるn通りの単位文字列
を、さらに、長さの異なる部分文字列に展開するわけで
あるから、部分文字列の総数(文字列検索手段に登録す
る文字列の数)は、次のようになる。
In the conventional method of registering a sentence such as the one shown in the section of the problem to be solved by the invention in a character string search means, n unit character strings with different starting positions extracted from a sentence of length n are further searched. , is expanded into substrings of different lengths, so the total number of substrings (the number of strings registered in the string search means) is as follows.

n≦Uのとき □n(n+1) n>uのとき (n−u)u+−u(u+1)=−u(
2n−u+1) 例えば、u=8とすると上記の式の値は、n=8のとき
36、n=16のとき100、n=32のとき228で
ある。本発明で文字列検索手段に登録する単位文字列の
数は、n=8のとき8、n=16とき1G、n=32の
とき32であるから、従来の方法に比べて、はるかに少
なくて済む(したがって、文字列検索手段の数も少なく
て済む)。
When n≦U □n(n+1) When n>u (nu-u)u+-u(u+1)=-u(
2n-u+1) For example, when u=8, the value of the above equation is 36 when n=8, 100 when n=16, and 228 when n=32. In the present invention, the number of unit strings registered in the string search means is 8 when n=8, 1G when n=16, and 32 when n=32, which is much smaller than in the conventional method. (Therefore, the number of string search methods is also reduced).

そして、本発明では、単位文字列を長さの異なる部分文
字列に展開する代わりに、単語辞書中の単語の表記にワ
イルドカード文字を付加し、文字列検索手段のワイルド
カード文字を照合する機能を利用することによって、単
位文字列から長きの異なる複数の単語を検出するように
している。第2図は従来の単語辞書の内容の例であり、
第3図は本発明における単語辞書の内容の例である1例
えは、「日本語を学習する」という文章の先頭から「日
本語ヨ「日本ヨ「日」という単語群を抽出する場合、従
来の方法ならば、次のような8通りの部分文字列と、第
2図のような単語辞書10とを照合することになる。
In addition, in the present invention, instead of expanding unit strings into substrings of different lengths, wildcard characters are added to the notation of words in the word dictionary, and the function of matching the wildcard characters of the string search means is provided. By using , multiple words of different lengths are detected from a unit string. Figure 2 shows an example of the contents of a conventional word dictionary.
Figure 3 shows an example of the contents of the word dictionary according to the present invention. For example, when extracting the word group ``Japanese YO'', ``Japanese YO'', ``日'' from the beginning of the sentence ``Learn Japanese'', the conventional In this method, the following eight partial character strings are compared with the word dictionary 10 as shown in FIG.

日本語を学習する 日本語を学習す 日本語を学習 日本語を学 日本語を 日本語 日本 日 しかし、本発明では、単語辞書中にワイルドカード文字
が埋め込まれているので、「日本語を学習する。という
1通りの単位文字列と、第3図のような単語辞書1とを
照合すればよいことになる。
Learn JapaneseLearn JapaneseLearn JapaneseLearn JapaneseLearn JapaneseLearn JapaneseJapaneseJapaneseHowever, in the present invention, wildcard characters are embedded in the word dictionary. All that is required is to match one unit character string ``.'' with the word dictionary 1 as shown in FIG.

(実施例) 図面を参照して、本発明の詳細な説明する。(Example) The present invention will be described in detail with reference to the drawings.

第1図は本発明の単語辞書検索装置の一実施例の構成を
示すブロック図である。
FIG. 1 is a block diagram showing the configuration of an embodiment of the word dictionary search device of the present invention.

第1図において、単語辞書1は、単語を登録した辞書で
ある。磁気ディスク装置、磁気テープ装置、ICメモリ
、光デイスク装置などで実現することかできる。ただし
、本発明における単語辞書1は、各単語の表記に対して
、固定長(以下、この長さをUで表す)の領域を持ち、
この固定長の領域に表記を収めて余った部分に、ワイル
ドカード文字を詰めた形態をとる。第3図は、単語辞書
1の内容の例である。第3図の単語辞書1では、ワイル
ドカード文字を「$、で表している。
In FIG. 1, a word dictionary 1 is a dictionary in which words are registered. It can be realized by a magnetic disk device, a magnetic tape device, an IC memory, an optical disk device, etc. However, the word dictionary 1 according to the present invention has an area of fixed length (hereinafter, this length is expressed as U) for each word notation,
After the notation is stored in this fixed-length area, the remaining part is filled with wildcard characters. FIG. 3 shows an example of the contents of the word dictionary 1. In the word dictionary 1 shown in FIG. 3, the wildcard character is represented by "$".

また、第3図の単語辞書1では、u=8としである(以
下、動作例を示す場合には、uw8の場合で説明する)
In addition, in the word dictionary 1 in FIG. 3, u=8 (hereinafter, when showing an example of operation, the case of uw8 will be explained)
.

文章入力手段2は、文章を入力する手段である。その場
で作成されながら文章が入力される形態をとっても良い
し、予め他の装置で作成された文章をまとめて読み込む
形態をとっても良い。文章入力手段2は、キーボード、
文字認識装置、音声認識装置、かな漢字変換装置、磁気
ディスク読み取り装置、磁気テープ読み取り装置などで
実現することができる。文章入力手段2より入力された
文章は、単位文字列抽出手段3へ送られる。
The text input means 2 is a means for inputting text. It may take a form in which sentences are input while being created on the spot, or it may take a form in which sentences created in advance on another device are read all at once. The text input means 2 is a keyboard,
It can be realized by a character recognition device, a voice recognition device, a kana-kanji conversion device, a magnetic disk reader, a magnetic tape reader, etc. The text inputted from the text input means 2 is sent to the unit character string extraction means 3.

単位文字列抽出手段3は、文章入力手段2より入力され
た文章の全文字位置から、固定長Uの単位文字列を抽出
する手段である。例えば、′第1図は本発明の単語辞書
検索装置の一実施例の構成を示すブロック図である。、
という文章からは、次のような単位文字列(u=8の場
合)を抽出する。単位文字列抽出手段3は、抽出した単
位文字列を単位文字列登録手段5へ送る。
The unit character string extraction means 3 is a means for extracting a unit character string of fixed length U from all character positions of the sentence inputted by the sentence input means 2. For example, FIG. 1 is a block diagram showing the configuration of an embodiment of a word dictionary search device of the present invention. ,
From the sentence, the following unit character string (when u=8) is extracted. The unit character string extraction means 3 sends the extracted unit character strings to the unit character string registration means 5.

第1図は本発明の 1図は本発明の単 図は本発明の単語 は本発明の単語界 本発明の単語辞書 すブロック図であ ブロック図である ロック図である。Figure 1 shows the present invention. Figure 1 shows the unit of the present invention. The figure is the word of the invention is the word world of the present invention Word dictionary of the present invention This is a block diagram. is a block diagram It is a lock diagram.

ツク図である。This is a diagram.

り図である。This is a diagram.

図である。It is a diagram.

である。It is.

ある。be.

る。Ru.

文字列検索手段4は、登録モードと検索モードとを有し
、登録モードにおいては、入力される複数の文字列を内
部に記憶し、検索モードにおいては、入力される文字列
(ワイルドカード文字を含むことを許す)から、登録モ
ードで記憶された複数の文字列と一致する全ての部分文
字列を検出する手段である6文字列検索手段4は、公知
の手段であり、例えば、前記の文献(1)のようにして
実現できる。文献(1)のようにして文字列検索手段4
を実現した場合、登録モードと検索モードの切り替えは
、外部からの信号を受は取ることによって行われる。登
録モードにおいては、まず、登録アドレス(文字・列検
索手段4の内部に記憶する位置)が外部から設定され、
続いて、登録する文字列とが外部から入力されたならば
、文字列検索手段4は、文字列を1つ内部に記憶する。
The character string search means 4 has a registration mode and a search mode. In the registration mode, it internally stores a plurality of input character strings, and in the search mode, it stores input character strings (including wildcard characters). The six character string search means 4, which is a means for detecting all partial character strings that match a plurality of character strings stored in registration mode, is a known means, for example, as described in the above-mentioned document. This can be achieved as in (1). String search means 4 as in document (1)
When this is realized, switching between registration mode and search mode is performed by receiving and receiving signals from the outside. In the registration mode, first, the registration address (the position stored inside the character/string search means 4) is set from the outside,
Subsequently, when a character string to be registered is input from the outside, the character string search means 4 internally stores one character string.

これが繰り返されると、複数の文字列が文字列検索手段
4の内部に記憶されることになる。検索モードにおいて
は、登録モードで記憶された文字列と一致する文字列が
入力されるごとに、文字列検索手段4は、一致した文字
列の登録アドレスを出力する。また、その際、入力され
る文字列における一致位置(一致アドレスは、登録アド
レスが出力されたときに、文字列検索手段4に文字列が
どこまで入力されたかをカウントしておくことによって
得られ、登録アドレスが出力されるのと同時に、文字列
検索手段4から出力される。
If this is repeated, a plurality of character strings will be stored inside the character string search means 4. In the search mode, each time a character string that matches a character string stored in the registration mode is input, the character string search means 4 outputs the registered address of the matched character string. In addition, at that time, the matching position in the input character string (the matching address is obtained by counting how far the character string has been input into the character string search means 4 when the registered address is output, At the same time as the registered address is output, the character string search means 4 outputs it.

単位文字列登録手段5は、文字列検索手段4に対して登
録モードを設定し、単位文字列抽出手段3から送られて
きた複数の単位文字列を、文字列検索手段4へ入力する
手段である。第4図は、文献(1)のようにして文字列
検索手段4を実現した場合の、単位文字列登録手段5の
処理手順を示すフローチャートである。単位文字列登録
手段5は、まず、文字列検索手段4へ登録モードを設定
する信号を送る(その信号により文字列検索手段4は登
録モードになる)。そして、単位文字列登録手段5は、
単位文字列抽出手段3かも単位文字列を1つずつ受は取
り、受は取った単位文字列を文字列検索手段4へ登録す
ることを繰り返す。単位文字列の文字列検索手段4への
登録は、登録アドレスを設定した後、登録する単位文字
列を文字列検索手段4へ入力するという処理である。単
位文字列抽出手段3から送られてくる単位文字列がなく
なったならば、単位文字列登録手段5は文字列検索手段
4へ登録モードを解除する信号を送り、処理を終了する
(ただし、登録モードを解除する信号は、単語辞書入力
手段6の発する検索モード設定信号で代用して省略する
形もとれる)。
The unit character string registration means 5 is a means for setting a registration mode for the character string search means 4 and inputting a plurality of unit character strings sent from the unit character string extraction means 3 to the character string search means 4. be. FIG. 4 is a flowchart showing the processing procedure of the unit character string registration means 5 when the character string search means 4 is implemented as in document (1). The unit character string registration means 5 first sends a signal to the character string search means 4 to set the registration mode (the signal causes the character string search means 4 to enter the registration mode). Then, the unit character string registration means 5
The unit character string extraction means 3 also receives unit character strings one by one, and repeats the process of registering the retrieved unit character strings in the character string search means 4. The registration of a unit character string in the character string search means 4 is a process of setting a registration address and then inputting the unit character string to be registered into the character string search means 4. When there are no more unit character strings sent from the unit character string extraction means 3, the unit character string registration means 5 sends a signal to the character string search means 4 to cancel the registration mode, and ends the process. The signal for canceling the mode may be omitted and replaced by the search mode setting signal issued by the word dictionary input means 6).

単語辞書入力手段6は、文字列検索手段4に対して検索
モードを設定し、単語辞書1を文字列検索手段4へ入力
する手段である。処理手順は、単位文字列登録手段5と
ほぼ同様で、まず、文字列検索手段4に検索モードを設
定する信号を送り、次に、単語辞書1を文字列検索手段
4へ入力し、その入力が完了したら、文字列検索手段4
へ検索モードを解除する信号を送る。なお、単語辞書入
力手段6は、単位文字列登録手段5による単位文字列の
文字列検索手段4への登録処理が完了してから、起動さ
れる必要がある。
The word dictionary input means 6 is means for setting a search mode for the character string search means 4 and inputting the word dictionary 1 to the character string search means 4. The processing procedure is almost the same as that of the unit character string registration means 5. First, a signal is sent to the character string search means 4 to set the search mode, and then the word dictionary 1 is input to the character string search means 4, and the input Once completed, string search method 4
sends a signal to cancel search mode. Note that the word dictionary input means 6 needs to be activated after the unit character string registration means 5 completes the registration process of the unit character strings to the character string search means 4.

検索結果記憶手段7は、文字列検索手段4による検索結
果を記憶する手段である。磁気ディスク装置、磁気テー
プ装置、ICメモリなどで実現することができる。検索
結果とは、文章中のどの部分に、どのような単語が出現
したか(単語辞書中の単語と文章がどこで一致したか)
という情報である。文章中のどの部分かという情報は、
文字列検索手段4において一致が発生したときに、文字
列検索手段4から出力きれる(一致した単位文字列の)
登録アドレスと対応する。どのような単語かという情報
は、文字列検索手段4において一致が発生したときに、
文字列検索手段4かも出力きれる、単語辞書1の一致ア
ドレスと対応する。そこで、検索結果記憶手段7は、一
致が発生したときの、単位文字列の登録アドレスと単語
辞書1の一致アドレスの組を記憶する。この2つのアド
レスは、一致が発生したときに文字列検索手段4から出
力いれる情報であるから、それをそのまま記憶すればよ
い。
The search result storage means 7 is a means for storing the search results by the character string search means 4. It can be realized by a magnetic disk device, a magnetic tape device, an IC memory, etc. The search result is where and what kind of word appears in the sentence (where the word in the word dictionary matches the sentence)
This is the information. Information about which part of the text is
When a match occurs in the character string search means 4, the character string search means 4 can output (of the matched unit character string)
Corresponds to the registered address. Information on what kind of word it is is obtained when a match occurs in the character string search means 4.
This corresponds to the matching address in the word dictionary 1, which can also be output by the character string search means 4. Therefore, the search result storage means 7 stores a set of the registered address of the unit character string and the matching address of the word dictionary 1 when a match occurs. These two addresses are information that is output from the character string search means 4 when a match occurs, so they can be stored as they are.

制御手段8は、文章入力手段2.単位文字列抽出手段3
9文字列検索手段4.単位文字列登録手段5.単語辞書
入力手段6の動作を制御し、第5図のような処理を行わ
せる手段である。コンピュータのCPUなどが用いられ
る。制御手段8は、まず、文章入力手段2を起動して文
章を入力する。次に、制御手段8は、単位文字列抽出手
段3を起動して、文章から単位文字列を抽出する。続い
て、制御手段8は、単位文字列登録手段5を起動し、単
位文字列を文字列検索手段4に登録する(この際、文字
列検索手段4は登録モードに設定きれ、単位文字列登録
手段5より入力される単位文字列を、内部に記憶する)
。続いて、制御手段8は、単語辞書入力手段6を起動し
、単語辞書1を文字列検索手段4へ入力する(この際、
文字列検索手段4は検索モードに設定され、内部に記憶
された単位文字列に対して単語辞書1を検索した結果を
、検索結果記憶手段7へ出力する)。
The control means 8 includes the text input means 2. Unit character string extraction means 3
9 Character string search means 4. Unit character string registration means 5. This is a means for controlling the operation of the word dictionary input means 6 and causing the processing as shown in FIG. 5 to be performed. A computer CPU or the like is used. The control means 8 first activates the text input means 2 and inputs a text. Next, the control means 8 activates the unit character string extraction means 3 to extract a unit character string from the sentence. Subsequently, the control means 8 activates the unit character string registration means 5 and registers the unit character string in the character string search means 4 (at this time, the character string search means 4 is fully set to the registration mode, and the unit character string registration means 5 is activated. The unit character string input from means 5 is stored internally)
. Subsequently, the control means 8 activates the word dictionary input means 6 and inputs the word dictionary 1 into the character string search means 4 (at this time,
The character string search means 4 is set to a search mode and outputs the result of searching the word dictionary 1 for the internally stored unit character strings to the search result storage means 7).

なお、1個の文字列検索手段4では文字列が登録しきれ
ない場合には、登録できる数ずつ登録・検索を繰り返す
方法か、または、複数個の文字列検索手段4を用いる方
法をとればよい。複数個の文字列検索手段4を用いる場
合には、登録モードでは、制御手段8が文字列検索手段
4に登録された文字列の数を監視し、1つの文字列検索
手段4の登録可簀数に達したならば、単位文字列登録手
段5へ登録する文字列検索手段4を切り替える指令を送
るようにする。検索モードでは、単語辞書入力手段6は
、複数の文字列検索手段4へ並列に単語辞書1を入力し
、文字列検索手段4から出力きれる検索結果は、全て検
索結果記憶手段7へ書き込むようにする。
Note that if one character string search means 4 cannot register all the character strings, you can repeat the registration and search for each number that can be registered, or use multiple character string search means 4. good. When using a plurality of character string search means 4, in the registration mode, the control means 8 monitors the number of character strings registered in the character string search means 4, and determines the number of character strings that can be registered in one character string search means 4. When the number is reached, a command is sent to the unit character string registration means 5 to switch the character string search means 4 to be registered. In the search mode, the word dictionary input means 6 inputs the word dictionary 1 to a plurality of character string search means 4 in parallel, and writes all search results that can be outputted from the character string search means 4 to the search result storage means 7. do.

従来技術の項で示した第1種の文字列検索処理の実施形
態では、検索モードにおいて、文章を文字列検索手段に
入力する。この際、文章の任意の文字位置から照合が行
われる形がとられる。しかし、本発明のように、検索モ
ードにおいて、単語辞書を文字列検索手段に入力する場
合には、単語辞書の文字列の任意の位置から照合を行う
必要はない。各単語の表記の先頭位置から照合を開始す
ればよい。そのような照合開始位置の制限を行うために
は、次のような2つの方法がある。通常、単語辞書内の
表記は単語ごとにデリミタで区切られている。そこで、
第一の方法は、文字列検索手段の照合がデリミタの直後
から行われるように制御することである(これは、一般
に、アンカーマツチと呼ばれる照合方法である)。文献
(1)に示されている文字列検索手段では、そのような
アンカーマツチを実現できるようになっている。第二の
方法は、アンカーマツチを用いずに、登録する単位文字
列の先頭にデリミタを登録しておくものである。これに
よって、文字列検索手段がアンカーマツチ機爺を持たな
くとも、単語辞書内のデリミタ位置から照合が行える。
In the embodiment of the first type of character string search processing described in the prior art section, a sentence is input into a character string search means in a search mode. At this time, matching is performed from any character position in the text. However, when inputting a word dictionary to the character string search means in the search mode as in the present invention, it is not necessary to perform matching from any position of the character string in the word dictionary. It is sufficient to start matching from the first position of the notation of each word. There are the following two methods for restricting the matching start position in this way. Normally, each word in a word dictionary is separated by a delimiter. Therefore,
The first method is to control the string search means to perform matching immediately after the delimiter (this is a matching method generally called anchor match). The character string search means shown in Document (1) is capable of realizing such an anchor match. The second method is to register a delimiter at the beginning of the unit character string to be registered without using an anchor match. As a result, even if the character string search means does not have an anchor match machine, matching can be performed from the delimiter position in the word dictionary.

また、第1種の文字列検索処理を、これまでに述べてい
る文字列検索手段で行っているような文章作成装置に、
本発明の単語辞書検索装置を組み込むならば、文字列検
索手段を、第1種の文字列検索処理と第2種の文字列検
索処理とで共用することができる。
In addition, the first type of character string search processing can be applied to a text creation device such as the one that uses the character string search means described above.
If the word dictionary search device of the present invention is incorporated, the character string search means can be shared by the first type of character string search process and the second type of character string search process.

(発明の効果) 以上に説明したように、本発明によれば、文字列検索手
段を用いた単語辞書検索装置であって、かつ、従来より
も少ない個数の文字列検索手段で構成できる単語辞書検
索装置が得られる。
(Effects of the Invention) As explained above, according to the present invention, there is provided a word dictionary search device using a character string search means, and a word dictionary that can be configured with a smaller number of character string search means than conventional ones. A search device is obtained.

そして、文字列検索手段を用いた単語辞書検索装置であ
るので、第1種の文字列検索処理を、文字列検索手段で
行う文章作成装置と組み合わせることによって、文字列
検索手段を、第1種の文字列検索処理と第2種の文字列
検索処理とで共用する、効率の良い構成の文章作成装置
が実現できる。そして、単語辞書検索装置を組み込むこ
とによって、文章作成装置は、文章について単なる文字
列の情報だけでなく、単語の情報を利用することができ
るようになり、文章の検査や文章の音声変換をはじめと
する、より高度な文章処理を行えるようになる。
Since this is a word dictionary search device using a character string search means, by combining the first type character string search process with a sentence creation device that uses the character string search means, the first type It is possible to realize a text creation device with an efficient configuration, which is shared by the character string search process of the first type and the second type of character string search process. By incorporating a word dictionary search device, the text creation device can use not only character string information but also word information for text inspection, speech conversion, etc. This allows for more advanced text processing.

なお、本発明の単語辞書検索装置では、単語辞書に登録
されている単語は、必ずしも表記の文字コード順に並べ
られている必要はない。従来、単語辞書については、そ
のなかに登録きれている単語の並びを管理することが、
単語の追加・削除作業に大きな負荷を加えていた。本発
明で用いている単語辞書は、そのような追加・削除作業
の負荷をなくすことができる。
In addition, in the word dictionary search device of the present invention, the words registered in the word dictionary do not necessarily have to be arranged in the order of their written character codes. Conventionally, for word dictionaries, managing the sequence of words registered in the dictionary was
Adding and deleting words was a huge burden. The word dictionary used in the present invention can eliminate the burden of such addition/deletion work.

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

第1図は本発明の一実施例の構成を示すブロック図、第
2図は従来の単語辞書の内容の例を示す図、第3図は本
発明の単語辞書1の内容の例を示す図、第4図は第1図
実施例における単位文字列登録手段5の処理手順を示す
フローチャート、第5図は第1図実施例の処理手順を示
すフローチャートである。 1・・・単語辞書、2・・・文章入力手段、3・・・単
位文字列抽出手段、4・・・文字列検索手段、5・・・
単位文字列登録手段、6・・・単語辞書入力手段、7・
・・検索結果記憶手段、8・・・制御手段。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention, FIG. 2 is a diagram showing an example of the contents of a conventional word dictionary, and FIG. 3 is a diagram showing an example of the contents of the word dictionary 1 of the present invention. , FIG. 4 is a flowchart showing the processing procedure of the unit character string registration means 5 in the embodiment of FIG. 1, and FIG. 5 is a flowchart showing the processing procedure of the embodiment of FIG. 1. DESCRIPTION OF SYMBOLS 1... Word dictionary, 2... Sentence input means, 3... Unit character string extraction means, 4... Character string search means, 5...
unit character string registration means, 6... word dictionary input means, 7.
...Search result storage means, 8...Control means.

Claims (1)

【特許請求の範囲】[Claims] 単語辞書から文章の部分文字列に一致する全ての単語を
検索する単語辞書検索装置において、前記単語辞書は各
単語の表記に対して固定長の領域を持ち該固定長の領域
に表記を収めて余った部分にワイルドカード文字を詰め
た形態をとり、前記文章の全文字位置から前記固定長の
領域と同一長の単位文字列を抽出する単位文字列抽出手
段と、登録モードと検索モードとを有し該登録モードに
おいては入力される複数の文字列を内部に記憶し該検索
モードにおいては入力されるワイルドカード文字を含む
文字列から前記登録モードで記憶された複数の文字列と
一致する全ての部分文字列を検出する文字列検索手段と
、前記文字列検索手段に対して登録モードを設定し前記
単位文字列抽出手段によって抽出された複数の単位文字
列を前記文字列検索手段に入力する単位文字列登録手段
と、前記文字列検索手段に対して検索モードを設定し前
記単語辞書を前記文字列検索手段に入力する単語辞書入
力手段とを備えることを特徴とする単語辞書検索装置。
In a word dictionary search device that searches a word dictionary for all words that match a substring of a sentence, the word dictionary has a fixed-length area for each word notation, and the notation is stored in the fixed-length area. A unit character string extracting means takes the form of filling the remaining part with wildcard characters and extracts a unit character string having the same length as the fixed length area from all character positions of the sentence, and a registration mode and a search mode. In the registration mode, a plurality of input character strings are stored internally, and in the search mode, all input character strings containing wildcard characters that match the plurality of character strings stored in the registration mode are searched. a character string search means for detecting a partial character string of the character string, and a registration mode is set for the character string search means, and a plurality of unit character strings extracted by the unit character string extraction means are input into the character string search means. A word dictionary search device comprising a unit character string registration means and a word dictionary input means for setting a search mode for the character string search means and inputting the word dictionary to the character string search means.
JP63030576A 1988-02-10 1988-02-10 Word dictionary retrieving device Pending JPH01205267A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63030576A JPH01205267A (en) 1988-02-10 1988-02-10 Word dictionary retrieving device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63030576A JPH01205267A (en) 1988-02-10 1988-02-10 Word dictionary retrieving device

Publications (1)

Publication Number Publication Date
JPH01205267A true JPH01205267A (en) 1989-08-17

Family

ID=12307675

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63030576A Pending JPH01205267A (en) 1988-02-10 1988-02-10 Word dictionary retrieving device

Country Status (1)

Country Link
JP (1) JPH01205267A (en)

Similar Documents

Publication Publication Date Title
US5560037A (en) Compact hyphenation point data
JPS6359660A (en) Information processor
JPH01205267A (en) Word dictionary retrieving device
US20050086048A1 (en) Apparatus and method for morphological analysis
JP3396734B2 (en) Corpus error detection / correction processing apparatus, corpus error detection / correction processing method, and program recording medium therefor
JP2792147B2 (en) Character processing method and device
JP3459049B2 (en) Character string search method and device
JP3166629B2 (en) Dictionary creation device and word segmentation device
JPH0231274A (en) Word dictionary retrieving device
JPH01205226A (en) Word dictionary retrieving device
JPH01205266A (en) Word dictionary retrieving device
JP3115459B2 (en) Method of constructing and retrieving character recognition dictionary
JP4303027B2 (en) Apparatus and method for converting lexical data to data
JPS6057421A (en) Documentation device
JP2000311170A (en) Text information extracting method
JP2526670B2 (en) Word dictionary search device
JPH0268663A (en) Character string retrieving device
JPH10105578A (en) Similar word retrieving method utilizing point
JPH0670788B2 (en) Nest dictionary search device
JPH0231273A (en) Word dictionary retrieving device
JP3375978B2 (en) Document processing device
JPH01258069A (en) Morpheme analyzing system for japanese character string
JPS62256075A (en) Dictionary retrieving system
JPS6059487A (en) Recognizer of handwritten character
JPH03110676A (en) Word dictionary retrieval device