JPH0721805B2 - Dictionary data search method - Google Patents

Dictionary data search method

Info

Publication number
JPH0721805B2
JPH0721805B2 JP61039215A JP3921586A JPH0721805B2 JP H0721805 B2 JPH0721805 B2 JP H0721805B2 JP 61039215 A JP61039215 A JP 61039215A JP 3921586 A JP3921586 A JP 3921586A JP H0721805 B2 JPH0721805 B2 JP H0721805B2
Authority
JP
Japan
Prior art keywords
index file
dictionary data
block
sub
file
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.)
Expired - Lifetime
Application number
JP61039215A
Other languages
Japanese (ja)
Other versions
JPS62197822A (en
Inventor
保 伊藤
敏裕 松永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP61039215A priority Critical patent/JPH0721805B2/en
Publication of JPS62197822A publication Critical patent/JPS62197822A/en
Publication of JPH0721805B2 publication Critical patent/JPH0721805B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、カナ漢字変換辞書、言語翻訳辞書、など、見
出し語に対応するデータ(文字列)を検索する方式に係
り、特に、大容量辞書データを検索するのに好適な辞書
データ検索方式に関する。
The present invention relates to a method for searching data (character string) corresponding to a headword, such as a Kana-Kanji conversion dictionary and a language translation dictionary, and particularly to a large capacity. The present invention relates to a dictionary data search method suitable for searching dictionary data.

〔従来の技術〕[Conventional technology]

従来辞書データファイルを検索する方法として、例えば
特開昭55-83962号、特開昭56-38661号に記載されている
方法がある。これらの方法は、見出し語の1文字目もし
くは2文字目までを第1次検索対象として検索し、得ら
れたアドレス情報より3文字目以降が格納されている辞
書本体を第2次検索する方法である。
As a conventional method for searching a dictionary data file, for example, there are methods described in JP-A-55-83962 and JP-A-56-38661. In these methods, the first or second character of the entry word is searched as the primary search target, and the dictionary body storing the third and subsequent characters is secondarily searched from the obtained address information. Is.

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

上記従来技術は、大容量辞書データファイルを接続した
場合の辞書データ検索方法について配慮がされておら
ず、見出し語の2文字までが一致しても、3文字目以降
が異なる大量の辞書データを検索するため、検索時間の
増大を招くという問題があった。
The above-mentioned conventional technique does not consider the dictionary data search method when a large-capacity dictionary data file is connected, and even if two or more characters of the entry words match, a large amount of dictionary data different from the third character onward is generated. Since the search is performed, there is a problem that the search time is increased.

本発明の目的は、大容量辞書データファイルを高速に検
索でき、かつ少ないバッファメモリで実現できる辞書デ
ータ検索方式を提供することにある。
An object of the present invention is to provide a dictionary data search method capable of searching a large-capacity dictionary data file at high speed and realizing with a small buffer memory.

〔問題点を解決するための手段〕[Means for solving problems]

上記目的を達するため、本発明は、大容量辞書データフ
ァイルが格納されているドライブの物理的最少単位(1
セクタ)を基準として、辞書データファイルの各セクタ
の先頭の見出し語のみを集めたサブインデックスファイ
ルを作成し、さらにサブインデックスの各セクタの先頭
見出し語のみを集めた1セクタのマスタインデックスを
作成して、大容量辞書データファイルを検索する。
To achieve the above object, the present invention provides a physical minimum unit (1) of a drive in which a large-capacity dictionary data file is stored.
(Sector) as a reference, create a sub index file that collects only the head entry words of each sector of the dictionary data file, and create a 1-sector master index that collects only the head entry words of each sector of the sub index. Search the large capacity dictionary data file.

その際、必要とするバッファメモリの大きさは、1セク
タであるマスタインデックスを読み込む場合、1セク
タ、そのマスタインデックスにより、サブインデックス
の該当セクタ(1セクタ)を読み込む場合、1セクタ、
さらにそのサブインデックスにより、大容量辞書データ
ファイルの該当する見出し語の格納されているセクタを
読み込む場合、1セクタとなり、1セクタの大きさのバ
ッファメモリを用意するだけで、大容量辞書データファ
イルを検索することができる。
At that time, the size of the required buffer memory is 1 sector when reading the master index which is 1 sector, and 1 sector when reading the corresponding sector (1 sector) of the sub index by the master index.
Further, when reading the sector in which the corresponding entry word of the large-capacity dictionary data file is stored by the sub-index, it becomes 1 sector, and the buffer memory of the size of 1 sector is prepared, and the large-capacity dictionary data file is created. You can search.

〔作用〕[Action]

本発明の動作について、以下説明する。 The operation of the present invention will be described below.

マスタインデックスファイルを読み出し、検索すべき文
字列が、マスタインデックスファイルの見出し語列のn
番目と一致もしくは、n番目と(n+1)番目の間にあ
ることを検索(第1次)する。次にサブインデックスフ
ァイルのn番目のセクタを読み出す。検索すべき文字列
が、読み出したサブインデックス(1セクタ)の見出し
語列のm番目と一致もしくは、m番値と(m+1)番目
の間にあることを検索(第2次)する。次に、サブイン
デックスの各セクタごとに設定されている辞書データフ
ァイルに対するオフセット値kを用いて、辞書データフ
ァイルの(k+m)番目のセクタを読み出す。読み出し
た辞書データファイルの見出し語と検索すべき文字列と
を比較し、一致する見出し語を検索(第3次)する。
The master index file is read and the character string to be searched is n of the index word string of the master index file.
It is searched (first order) whether it is the same as the nth or is between the nth and the (n + 1) th. Next, the nth sector of the sub index file is read. It is searched (secondary) that the character string to be searched matches with the m-th index word string of the read sub index (1 sector) or is between the m-th value and the (m + 1) th value. Next, using the offset value k for the dictionary data file set for each sector of the sub-index, the (k + m) th sector of the dictionary data file is read. The headword of the read dictionary data file is compared with the character string to be searched, and the matching headword is searched (third).

これらの動作により、どのような検索すべき文字列で
も、常にマスタインデックスファイル、サブインデック
スファイル、辞書データファイルを各1回計3回アクセ
スするだけで目的とする見出し語を検索することがで
き、高速に大容量辞書データファイルを検索することが
できる。また、その際に必要とするバッファメモリの大
きさは、マスタインデックスファイル(1セクタ)、サ
ブインデックスファイル(該当すべき1セクタ)、辞書
データファイル(該当すべき1セクタ)を読み出すのに
各1セクタ分必要とし、その都度バッファメモリの内容
を書き換えて共通に使用することにより、1セクタ分の
みのバッファメモリサイズで充分である。
With these operations, any character string to be searched can be searched for the target entry word by only accessing the master index file, the sub index file, and the dictionary data file three times each time. A large-capacity dictionary data file can be searched at high speed. The size of the buffer memory required at that time is 1 for reading the master index file (1 sector), the sub index file (1 sector that should be applicable), and the dictionary data file (1 sector that should be applicable). A buffer memory size of only one sector is sufficient by requiring sectors and rewriting the contents of the buffer memory each time and using them in common.

〔実施例〕〔Example〕

以下、本発明の一実施例を第1図、第2図、第3図によ
り説明する。第2図及び第3図は本発明の主要部分であ
る辞書データの構造を示しており、第1図は辞書検索を
行う装置10のブロック図である。装置10は検索するコー
ドを入力し検索した結果を出力する入出力装置19と、辞
書1及びその他のデータを記憶する外部記憶装置(第1
の記憶装置)14と、CPU(中央処理装置)11からの指令
に従って外部記憶装置14を制御する制御回路12と、CPU1
1から直接読み書きされる内部メモリ(第2の記憶装
置)13と、入出力装置19及び制御回路12を内部メモリ15
のプログラム領域15に格納されたプログラムに従って制
御し辞書検索を遂行するCPU11から構成される。又、内
部メモリ13はプログラム領域15、作業領域16、マスタイ
ンデックスファイル領域17、バッファ領域18に分割され
ている。以下に装置10の動作の概略を説明する。入出力
装置19から入力された語はCPU11にとりこまれ、CPU11は
該語をもとに辞書1を検索する。検索の結果はCPU11に
より入出力装置19へ出力され、一連の動作を終了する。
本発明の主要部分である辞書検索について更に説明を加
える。辞書1は第3図に示すように、マスタインデック
スファイル100、サブインデックスファイル200、辞書本
体(辞書データファイル)300から構成されている。第
1図を用いて辞書1の構成を説明する。辞書本体300
は、アイウエオ順に並べられた見出し語と該見出し語に
対応する辞書内容から構成されている。すなわち、見出
し語311の“ア”に対応する辞書内容311a“亜”、311b
“阿”、311c“合”等を1レコードとして、続く見出し
語312“アア”のコレード、と以下同様にレコードが続
き、辞書本体300を構成する。又、辞書本体300は、ある
一定の長さごとにブロックとして切り分け、各々第1ブ
ロック310、第2ブロック320…とする。サブインデック
スファイル200は辞書本体300の各ブロックの先頭の見出
し語を集めて形成されている。すなわち、辞書本体300
の第1ブロック310の最初の見出し語311“ア”がサブイ
ンデックスファイル200の最初の見出し語211“ア”とな
り、辞書本体300の第2ブロック320の最初の見出し語32
1“アカツキ”がサブインデックスファイル200の次の見
出し語212“アカツキ”となる。以下同様にして辞書本
体300の各ブロックの最初の見出し語を順次集めること
で、サブインデックスファイル200が作られる。このと
き、サブインデックスファイル200の見出し語は、辞書
本体300の見出し語と同様、アイウエオ順に並んでい
る。サブインデックスファイル200も辞書本体300と同
様、ある一定の長さのブロックに切り分けられ、第1の
ブロック210、第2のブロック220…としている。マスタ
インデックスファイル100は、サブインデックスファイ
ル200の各ブロックの最初の見出し語を集めて作られ
る。すなわち、サブインデックスファイル200の第1の
ブロック210の最初の見出し語211“ア”がマスタインデ
ックスファイル100の最初の見出し語101“ア”となり、
サブインデックスファイル200の第2のブロックの最初
の見出し語221“キョクゲイ”がマスタインデックスフ
ァイル100の次の見出し語102“キョクゲイ”となる。以
下この作業をくり返すことによってマスタインデックス
ファイル100が形成される。マスタインデックスファイ
ル100の見出し語もアイウエオ順に並んでいる。以上の
方法で構成された辞書1のマスタインデックスファイル
100、サブインデックスファイル200の見出し語は以下の
特徴を持つ。マスタインデックスファイル100の2つの
隣接する見出し語InとIn+1に対してアイウエオ順の順
位が、In≦x<In+1にある語xは、サブインデックス
ファイル200の第nブロック中の隣接する2つの見出し
語Jnk≦x<Jnk+1、若しくはJnk≦x<In+1の関係を
持ち、更に辞書本体300の第S番目のブロック中に該当
する見出し語が存在する。ここでサブインデックスファ
イル200中の各ブロック内の見出し語数をamとすれば、 である。従ってマスタインデックスファイル100の各見
出し語をカウントしながら順次比較し、x<Ipとなった
ところでやめ、サブインデックスファイル200の第p-1
ロックを内部メモリ13中のバッファ領域18にロード、更
に各見出し語をカウントしながら順次比較し、x<Jqと
なったところでやめ、先の を求め、辞書本体300の第Sブロックをバッファ領域18
にロード、見出し語と順次比較して目的の辞書内容を得
る。マスタインデックスファイル100は検索処理に毎回
使用されるので内部メモリ13中にマスタインデックスフ
ァイル領域17を設けてあらかじめ外部記憶装置14からロ
ードしておく。一例として語“アガナ”の検索手順を示
す。まず、マスタインデックスファイル100の見出し語1
01の“ア”と比較、より後順であるから続く見出し語10
2“キョクゲイ”と比較、より前順であるからマスタイ
ンデックスファイル100の検索を終える。この間にカウ
ントした見出し語は2こであるので2−1=1を求めサ
ブインデックスファイル200の第1ブロック210をバッフ
ァ領域18にロードする。サブインデックスファイル200
の第1の見出し語211“ア”より“アガナ”は後順のた
め、続く見出し語212“アカツキ”と比較、より後順で
あるから続く見出し語213“アジ”と比較、前順にあた
るのでサブインデックスファイル200の検索を終了す
る。この間にカウントした見出し語は3こであり、又第
1ブロック210以前には見出し語が であることから、 を求め、辞書本体300の第2ブロック320をバッファ領域
18にロードする。辞書本体300の第2ブロックの第1の
見出し語321“アカツキ”は語“アガナ”と異なるた
め、次の見出し語322“アガナ”と比較、一致したので
内容322a“購、贖”を得る。
An embodiment of the present invention will be described below with reference to FIGS. 1, 2, and 3. 2 and 3 show the structure of dictionary data, which is the main part of the present invention, and FIG. 1 is a block diagram of the device 10 for performing dictionary search. The device 10 includes an input / output device 19 for inputting a search code and outputting a search result, and an external storage device (first storage device) for storing the dictionary 1 and other data.
Storage device 14), a control circuit 12 for controlling the external storage device 14 according to a command from a CPU (central processing unit) 11, and a CPU 1
The internal memory (second storage device) 13 directly read / written from 1, the input / output device 19 and the control circuit 12 are connected to the internal memory 15
The CPU 11 controls a program stored in the program area 15 and executes a dictionary search. The internal memory 13 is divided into a program area 15, a work area 16, a master index file area 17, and a buffer area 18. The outline of the operation of the apparatus 10 will be described below. The word input from the input / output device 19 is taken into the CPU 11, and the CPU 11 searches the dictionary 1 based on the word. The result of the search is output by the CPU 11 to the input / output device 19, and the series of operations is completed.
The dictionary search, which is the main part of the present invention, will be further described. As shown in FIG. 3, the dictionary 1 is composed of a master index file 100, a sub index file 200, and a dictionary body (dictionary data file) 300. The configuration of the dictionary 1 will be described with reference to FIG. Dictionary body 300
Is composed of headwords arranged in the order of aiueo and dictionary contents corresponding to the headwords. That is, the dictionary contents 311a “a”, 311b corresponding to the headword 311 “a”
With “A”, 311c “Go” and the like as one record, a record of the subsequent heading 312 “Aa” and so on is followed in the same manner to form the dictionary body 300. Further, the dictionary main body 300 is divided into blocks each having a certain fixed length to form a first block 310, a second block 320 ... The sub-index file 200 is formed by collecting the headwords at the head of each block of the dictionary body 300. That is, the dictionary body 300
The first headword 311 “A” of the first block 310 of the sub-index file 200 becomes the first headword 211 “A” of the sub-index file 200, and the first headword 32 of the second block 320 of the dictionary body 300.
1 "Akatsuki" becomes the next entry word 212 "Akatsuki" of the sub index file 200. In the same manner, the sub-index file 200 is created by sequentially collecting the first entry words of each block of the dictionary body 300. At this time, the entry words of the sub-index file 200 are arranged in the order of aioi, like the entry words of the dictionary body 300. Similarly to the dictionary body 300, the sub index file 200 is also divided into blocks of a certain length, which are a first block 210, a second block 220 .... The master index file 100 is created by collecting the first entry words of each block of the sub index file 200. That is, the first entry word 211 “A” of the first block 210 of the sub index file 200 becomes the first entry word 101 “A” of the master index file 100,
The first entry word 221 “Kyokugay” of the second block of the sub index file 200 becomes the next entry word 102 “Kyokugay” of the master index file 100. The master index file 100 is formed by repeating this operation. The index words of the master index file 100 are also arranged in the order of aiueo. Master index file of dictionary 1 constructed by the above method
The headwords of 100 and the sub index file 200 have the following characteristics. The word x, which is in the order of Iueo in the order of In ≦ x <In + 1 with respect to two adjacent headwords In and In + 1 of the master index file 100, is defined as two adjacent words in the nth block of the subindex file 200. There is a relation of headword Jnk ≦ x <Jnk + 1 or Jnk ≦ x <In + 1 , and the corresponding headword exists in the Sth block of the dictionary body 300. Here, if the number of index words in each block in the sub index file 200 is a m , Is. Therefore, each headword of the master index file 100 is sequentially compared while being counted, and when x <Ip is stopped, the p- 1th block of the sub index file 200 is loaded into the buffer area 18 in the internal memory 13, and each Compare headwords sequentially while counting, and stop when x <Jq, Is calculated, and the S block of the dictionary main body 300 is stored in the buffer area 18
, And sequentially compare it with the headword to obtain the target dictionary contents. Since the master index file 100 is used for each search process, the master index file area 17 is provided in the internal memory 13 and loaded from the external storage device 14 in advance. As an example, the search procedure for the word "Agana" is shown. First, the master index file 100 headword 1
Compared with “a” in 01, it is in a later order, so headwords continue 10
2 Compared with “Kyokugay”, the search is completed in the master index file 100 because it is in the earlier order. Since there are two headwords counted during this time, 2-1 = 1 is obtained and the first block 210 of the sub index file 200 is loaded into the buffer area 18. Sub index file 200
The first headword 211 "A" to "Agana" is in a later order, so it is compared with the following headword 212 "Akatsuki", and it is in a later order than the following headword 213 "Aji". The search for the sub-index file 200 ends. The number of headwords counted during this period is three, and before the first block 210, the headwords are Since, The second block 320 of the dictionary main body 300 and the buffer area
Load to 18. Since the first headword 321 "Akatsuki" in the second block of the dictionary body 300 is different from the word "Agana", it is compared with the next headword 322 "Agana", and since they match, the content 322a "Buy, redemption" is obtained.

本実施例によれば、辞書1の使用する部分だけを内部メ
モリ13にロードするため、内部メモリの効率向上に効果
がある。又本実施例によれば固定長のブロックのサイズ
を小さく設定することで、必要とされるバッファ領域18
を小さくすることができるので、小メモリ化の効果があ
る。更に本実施例では検索のために辞書1の一部を外部
記憶装置14からロードする回数が常に2回であるため、
検索処理時間の安定化、高速化に効果がある。加えて本
実施例では、辞書1が大容量であっても検索に使用する
内部メモリ13を小さくすることが可能であり、かつ2回
の外部記憶装置14からのロードで済むため小型の電子計
算機でも充分高速な検索が可能であるため、大容量辞書
検索装置の価格低減に効果がある。
According to the present embodiment, only the portion used by the dictionary 1 is loaded into the internal memory 13, which is effective in improving the efficiency of the internal memory. Further, according to the present embodiment, by setting the size of the fixed length block to be small, the required buffer area 18
Can be made smaller, which has the effect of reducing the memory. Furthermore, in the present embodiment, the number of times a part of the dictionary 1 is loaded from the external storage device 14 for searching is always twice,
It is effective in stabilizing the search processing time and speeding up. In addition, in this embodiment, even if the dictionary 1 has a large capacity, the internal memory 13 used for the search can be made small, and the load from the external storage device 14 can be performed twice, so that a small electronic computer can be used. However, since the search can be performed at a sufficiently high speed, it is effective in reducing the price of the large-capacity dictionary search device.

第2の実施例を第4図を用いて説明する。第1の実施例
においては辞書検索毎に使用するマスタインデックスフ
ァイル100を内部メモリ13の中にマスタインデックスフ
ァイル領域17を設けて常駐させている。本実施例におい
ては第4図に示すようにマスタインデックスファイル10
0は特定の領域を持たず、バッファ領域18に検索毎にロ
ードして使用する。
A second embodiment will be described with reference to FIG. In the first embodiment, the master index file 100 used for each dictionary search is made resident by providing the master index file area 17 in the internal memory 13. In this embodiment, as shown in FIG. 4, the master index file 10
0 does not have a specific area and is used by being loaded into the buffer area 18 for each search.

本実施例によれば、マスタインデックスファイル領域17
を占有しない分、メモリの小サイズ化の効果がある。
According to this embodiment, the master index file area 17
Since it does not occupy, there is an effect of reducing the size of the memory.

第3の実施例を以下に説明する。サブインデックスファ
イル200及び辞書本体300は各々ある特定の長さのブロッ
クに分けられている。本実施例においてはこのブロック
の長さを外部記憶装置14並びに制御回路12が取り扱い得
る最小のデータ長又は最小のデータ長の調整倍としてい
る。
The third embodiment will be described below. The sub index file 200 and the dictionary body 300 are each divided into blocks of a certain length. In the present embodiment, the length of this block is the minimum data length that can be handled by the external storage device 14 and the control circuit 12 or an adjustment multiple of the minimum data length.

本実施例によれば、サブインデックスファイル200及び
辞書本体300のあるブロックを内部メモリ13上にロード
する場合、外部記憶装置14における物理的アドレスを容
易に求められるため、検索時間短縮の効果がある。ま
た、本実施例によれば外部記憶装置14から内部メモリ13
上へロードされるデータに無駄な部分がないため省メモ
リ化の効果があり、ブロックとロードされたデータの先
頭・末尾が一致するので、ブロックの先頭を探す、先頭
をつめるために転送する、といった処理が不要となり、
検索処理時間短縮の効果がある。
According to the present embodiment, when a block having the sub index file 200 and the dictionary body 300 is loaded on the internal memory 13, the physical address in the external storage device 14 can be easily obtained, which has the effect of reducing the search time. . Further, according to the present embodiment, the external storage device 14 to the internal memory 13
Since there is no useless part in the data loaded up, there is an effect of saving memory, and the beginning and end of the block and the loaded data match, so search for the beginning of the block, transfer to fill the beginning, Is unnecessary,
This has the effect of reducing the search processing time.

第4の実施例を第5図を用いて説明する。辞書本体300
が非常に大きくブロックの数が多大なものである場合、
サブインデックスファイル200もまた大きくなり多数の
ブロックを有することとなる。従ってマスタインデック
スファイル100に含まれる見出し語の数が大きくなり、
サイズがサブインデックスファイル200のブロックサイ
ズで複数のブロックに相当する場合がある。このとき、
サブインデックスファイル200の各ブロックの先頭の見
出し語を集めたものをサブインデックスファイルA(第
2のサブインデックスファイル)400とし、更にサブイ
ンデックスファイルA400をブロック分割して各ブロック
の先頭の見出し語を集めてマスタインデックスファイル
100を形成する。もし、サブインデックスファイルA400
のブロック数が多く、従って各ブロックの先頭の見出し
語を集めたものが大きい場合は、サブインデックスファ
イルB(第3のサブインデックスファイル)として、サ
ブインデックスファイルBをブロック分割し各々のブロ
ックの先頭の見出し語を集めてマスタインデックスファ
イル100を形成する。以上の動作をくり返し複数のサブ
インデックスファイルn(第nのサブインデックスファ
イル)を設けることによって、マスタインデックスファ
イル100のサイズを制限する。サブインデックスファイ
ルnが複数ある場合の検索方法を第5図に示した、サブ
インデックスファイルnが2段である場合について説明
する。まずマスタインデックスファイル100を検索、第
1の実施例に示した手順でサブインデックスファイルA4
00から特定のブロックを導く。サブインデックスファイ
ル200に対するサブインデックスファイルA400の関係は
サブインデックスファイルA400に対するマスタインデッ
クスファイル100の関係と同じであることから、サブイ
ンデックスファイルA400の特定のブロックをマスタイン
デックスファイル100と同じ方法で検索し、同じように
サブインデックスファイル200から特定のブロックを導
く。サブインデックスファイル200の特定のブロックを
検索して辞書本体300の特定ブロックを導き、辞書本体3
00の特定ブロックから検索目的であるレコードを得る方
法については第1の実施例に述べた通りである。更にサ
ブインデックスファイルの数が増した場合も同じ処理の
くり返しから検索動作を実現できる。
A fourth embodiment will be described with reference to FIG. Dictionary body 300
Is very large and has a large number of blocks,
The sub-index file 200 will also be large and have many blocks. Therefore, the number of entry words included in the master index file 100 increases,
The size may correspond to multiple blocks in the block size of the sub index file 200. At this time,
A collection of the headwords at the beginning of each block of the subindex file 200 is referred to as a subindex file A (second subindex file) 400, and the subindex file A400 is further divided into blocks to obtain the headwords at the beginning of each block. Collect and master index files
Forming 100. If sub index file A400
If the number of blocks in the sub-index file B is large and therefore the collection of headwords at the beginning of each block is large, the sub-index file B is divided into blocks as the sub-index file B (third sub-index file), and the head of each block is divided. To form a master index file 100. The size of the master index file 100 is limited by repeating the above operation and providing a plurality of sub index files n (nth sub index file). A search method in the case where there are a plurality of sub-index files n will be described with reference to FIG. 5, in which the sub-index file n has two stages. First, the master index file 100 is searched, and the sub index file A4 is searched by the procedure shown in the first embodiment.
Lead a specific block from 00. Since the relationship of the sub index file A400 to the sub index file 200 is the same as the relationship of the master index file 100 to the sub index file A400, a specific block of the sub index file A400 is searched in the same way as the master index file 100, Similarly, a specific block is derived from the sub index file 200. Search the specific block of the sub index file 200 to guide the specific block of the dictionary main body 300, and the dictionary main body 3
The method of obtaining the record to be searched from the specific block of 00 is as described in the first embodiment. Further, even when the number of sub index files increases, the search operation can be realized by repeating the same processing.

本実施例によれば、サブインデックスファイルの段数を
増やすことで非常に多くの見出し語を持つ辞書の検索を
小容量のメモリで実現できるため省メモリ化の効果があ
る。又、本実施例によれば、サブインデックスファイル
の段数を増やした場合でも同じ検索処理のくり返しで検
索動作を実現できるため、検索処理の単純化の効果があ
る。更に本実施例によれば、サブインデックスファイル
の段数が増加した場合、外部記憶装置14からデータをロ
ードする回数は増加するものの、毎回検索する見出し語
の量がバッファ領域18の大きさに限定されたものである
ため処理時間全体を短くすることができるので、検索時
間短縮の効果がある。
According to the present embodiment, by increasing the number of stages of the sub-index file, it is possible to search a dictionary having a very large number of headwords with a small-capacity memory, which has the effect of saving memory. Further, according to the present embodiment, since the search operation can be realized by repeating the same search processing even when the number of stages of the sub index file is increased, there is an effect of simplifying the search processing. Further, according to the present embodiment, when the number of sub-index files increases, the number of headwords to be searched each time is limited to the size of the buffer area 18, although the number of times data is loaded from the external storage device 14 increases. Since it is possible to shorten the entire processing time, the search time can be shortened.

第5の実施例を以下に説明する。サブインデックスファ
イル200の各ブロックの先頭に見出し語に先立ち当該ブ
ロックより前に位置するブロックの中に含まれている見
出し語の総数をオフセットとして記録しておく。第1の
実施例に示したようにサブインデックス100のある特定
のブロックを検索し続く辞書本体300の特定ブロックを
決定するためには、サブインデックスファイル200中の
当該ブロックより前に位置する全てのブロックに含まれ
る見出し語の総数と検索の結果カウントした見出し語の
数の和より1引いた値を求める必要がある。本実施例で
はブロックの先頭にあるオフセットの値に見出し語を順
次検索しつつカウントした値を加えることから続く辞書
本体300内のブロックを特定する。
The fifth embodiment will be described below. At the beginning of each block of the sub-index file 200, the total number of entry words included in the block located before the entry word is recorded as an offset prior to the entry word. As shown in the first embodiment, in order to search for a specific block of the sub index 100 and to determine a specific block of the dictionary body 300 that follows, all of the sub index files 200 that are located before the block are searched. It is necessary to obtain a value obtained by subtracting 1 from the sum of the total number of index words included in the block and the number of index words counted as a result of the search. In the present embodiment, the block in the dictionary main body 300 that follows is specified by adding the counted value while sequentially searching for the entry word to the offset value at the beginning of the block.

本実施例によれば、検索の際に容易にブロック番号を得
られるので検索時間短縮の効果がある。また本実施例に
よれば、辞書1を変更して見出し語数が変わっても検索
処理手順は同じでよいため、辞書1の拡張性をよくする
効果がある。
According to this embodiment, since the block number can be easily obtained at the time of searching, the search time can be shortened. Further, according to the present embodiment, even if the dictionary 1 is changed and the number of headwords is changed, the same search processing procedure may be used, so that the expandability of the dictionary 1 is improved.

第6の実施例を以下に説明する。本実施例では、マスタ
インデックスファイル100の第1の見出し語101の前にサ
ブインデックスファイル200の先頭の外部記憶装置14上
の論理的または物理的アドレスデータをおき、又、サブ
インデックスファイル200の各ブロックの先頭に各ブロ
ックの先頭の見出し語が示す辞書本体300のブロックの
先頭の外部記憶装置14上の論理的または物理的アドレス
データをおく。辞書検索において、該アドレスデータに
(各ブロックもしくはマスタインデックスファイル100
中の検索においてカウントした見出し語数(n−1)×
ブロック長lの演算結果を加算することによって実際に
外部記憶装置14からロードするサブインデックスファイ
ル200中の特定ブロックもしくは辞書本体300中の特定ブ
ロックの論理的または物理的アドレスを得られる。
The sixth embodiment will be described below. In this embodiment, the first index word 101 of the master index file 100 is preceded by the logical or physical address data on the external storage device 14 at the head of the sub index file 200, and each sub index file 200 At the head of the block, the logical or physical address data on the external storage device 14 at the head of the block of the dictionary body 300 indicated by the headword of the head of each block is placed. In the dictionary search, the address data (each block or master index file 100
Number of headwords counted in the middle search (n-1) x
By adding the operation result of the block length l, the logical or physical address of the specific block in the sub index file 200 or the specific block in the dictionary body 300 actually loaded from the external storage device 14 can be obtained.

本実施例によれば、外部記憶装置14上の論理的又は物理
的アドレスを容易に求められるので、検索時間短縮の効
果がある。また本実施例によれば検索処理手順を変える
ことなく見出し語数を変えることができるので、辞書の
拡張性向上の効果がある。更に、本実施例によれば、検
索処理手順を変えることなくサブインデックスファイル
200、辞書本体300の外部記憶装置14上の配置を変更する
ことができるので、外部記憶装置14のメモリ効率向上の
効果がある。
According to the present embodiment, since the logical or physical address on the external storage device 14 can be easily obtained, the search time can be shortened. Further, according to the present embodiment, the number of headwords can be changed without changing the search processing procedure, which has the effect of improving the expandability of the dictionary. Furthermore, according to this embodiment, the sub index file can be stored without changing the search processing procedure.
Since the arrangement of the 200 and the dictionary body 300 on the external storage device 14 can be changed, the memory efficiency of the external storage device 14 can be improved.

第7の実施例を以下に説明する。マスタインデックスフ
ァイル100及びサブインデックスファイル200の各ブロッ
クの先頭にはそれぞれ第5、第6の実施例で説明したオ
フセットデータがおかれている。更に本実施例では辞書
本体300の各ブロックの先頭にオフセットデータとして
使用されないデータをターミネータ(識別コード)とし
ておいている。第4の実施例において説明したように、
マスタインデックスファイル100からサブインデックス
ファイル200のあるブロックを導く方法、また、サブイ
ンデックスファイル200のあるブロックを検索して辞書
本体300のあるブロックを導く方法、更にサブインデッ
クスファイルが多数ある場合に上位のサブインデックス
ファイルから下位のサブインデックスファイルを導く方
法は全て同一である。従って、ロードしたブロックの先
頭がターミネータになるまで、順次下位のインデックス
ファイルを導く動作を繰り返し、ターミネータを検出し
た時点で辞書本体300の検索方式に切り換える。
The seventh embodiment will be described below. The offset data described in the fifth and sixth embodiments is placed at the beginning of each block of the master index file 100 and the sub index file 200. Further, in this embodiment, data not used as offset data is set as a terminator (identification code) at the beginning of each block of the dictionary body 300. As described in the fourth embodiment,
A method for deriving a block in the sub index file 200 from the master index file 100, a method for deriving a block in the dictionary body 300 by searching for a block in the sub index file 200, and a method in which there are many sub index files The method of deriving a sub-index file of a lower level from a sub-index file is the same. Therefore, the operation of sequentially leading the lower index files is repeated until the beginning of the loaded block becomes the terminator, and when the terminator is detected, the search method of the dictionary body 300 is switched.

本実施例によれば、検索処理手順を変えることなくサブ
インデックスファイルの段数を変更できるので、辞書1
の拡張性を高め、検索処理を汎用化する効果がある。
According to the present embodiment, the number of stages of the sub index file can be changed without changing the search processing procedure.
This has the effect of increasing the expandability of and generalizing the search processing.

第8の実施例を第6図を用いて説明する。辞書本体300
は見出し語及び内容から成るレコードを単位として構成
されている。この見出し語311と内容311aの間に見出し
語の末尾を示す区切り記号314、次の見出し語までの距
離を示す長さデータ(相対アドレス値)315、長さデー
タ315の終わりを示す区切り記号316を配置し、また内容
311aと内容311bの区切りを示す区切り記号317、レコー
ド全体の区切りを示す区切り記号318を配置している。
辞書本体300の検索において、語と見出し語が一致した
場合はその内容を長さデータ315の区切り記号316に後続
するデータから得、語と見出し語が一致しない場合は長
さデータ315をもとに次のレコードの先頭位置を求め
て、次の見出し語と語を比較、以下順次繰り返すことで
一致する見出し語を検索する。
The eighth embodiment will be described with reference to FIG. Dictionary body 300
Is composed of a record consisting of headwords and contents as a unit. A delimiter 314 indicating the end of the entry word between the entry word 311 and the content 311a, length data (relative address value) 315 indicating the distance to the next entry word, and a delimiter 316 indicating the end of the length data 315. Place and also content
A delimiter 317 indicating the delimiter between 311a and the content 311b and a delimiter 318 indicating the delimiter of the entire record are arranged.
In the search of the dictionary body 300, if the word and the headword match, the content is obtained from the data following the delimiter 316 of the length data 315, and if the word and the headword do not match, the length data 315 is used. Then, the head position of the next record is obtained, the next headword is compared with the word, and the matching headword is retrieved by sequentially repeating the following.

本実施例によれば各レコードの長さ、レコード内の見出
し語長及び内容の長さを可変長にすることができるの
で、辞書本体300のメモリ効率向上の効果がある。また
本実施例によれば、見出し語が一致しなかった場合に次
の見出し語が容易に求められるので、検索速度向上の効
果がある。
According to the present embodiment, the length of each record, the length of the entry word in the record, and the length of the contents can be made variable, so that the memory efficiency of the dictionary main body 300 is improved. Further, according to the present embodiment, when the headwords do not match, the next headword can be easily obtained, which has the effect of improving the search speed.

第9の実施例を第7図を用いて説明する。サブインデッ
クスファイル200に含まれている見出し語と見出し語の
間に見出し語には用いられないコードであるターミネー
タ(識別コード)215を設ける。サブインデックスファ
イル200の検索で語より後順の見出し語を得るために順
次見出し語と比較する際に次の見出し語を探す場合、タ
ーミネータ215を探すことによって次の見出し語を見つ
ける。マスタインデックスファイル100及び複数のサブ
インデックスファイルについても同様にして見出し語を
ターミネータで区切り、次々に見出し語を得ることがで
きる。
The ninth embodiment will be described with reference to FIG. A terminator (identification code) 215, which is a code that is not used as an entry word, is provided between the entry words included in the sub index file 200. When searching the sub-index file 200 for the next headword when sequentially comparing headwords to obtain headwords that are later than the word, the terminator 215 is searched to find the next headword. Similarly, with respect to the master index file 100 and the plurality of sub index files, the entry words can be separated by the terminator and the entry words can be obtained one after another.

本実施例によれば、見出し語の長さを可変長にすること
ができるため、マスタインデックスファイル100及びサ
ブインデックスファイルのメモリ効率向上の効果があ
る。
According to the present embodiment, since the length of the headword can be made variable, there is an effect of improving the memory efficiency of the master index file 100 and the sub index file.

第10の実施例を以下に説明する。マスタインデックスフ
ァイル100及びサブインデックスファイル200、辞書本体
300の見出し語がカタカナであった場合、カタカナに対
応する8ビット=1バイトのコードは通常10100110
(=)〜11011110(=)であり、常に最上位ビットが
“1"となっている。また、該見出し語が英数字であった
場合各々の文字に対応するコードはASCIIコードであれ
ば00100000(=)〜01111111(=)である。従って、第
8、第9の実施例のように見出し語の区切りに特別な記
号を置くかわりに、見出し語の最後の文字のビットを操
作して見出し語の区切りとすることができる。例えば見
出し語がカタナカで構成されている場合、各文字の最上
位ビットは常に“1"であるから見出し語の最後の文字の
最上位ビットを“ ”にすることで文字列の区切りとする。見出し語を語と
比較する場合には見出し語の最後の文字の最上位ビット
を“1"にしてもとのカタカナコードに戻す。同様にして
ASCIIコード、シフトJISコード、区点コードも語の識別
に関与しない固定の値をとるビットを反転させることに
より文字列の区切りを示すことで辞書本体300中のレコ
ードとレコード、レコード中の内容と内容の区切りをつ
けることができる。
The tenth embodiment will be described below. Master index file 100, sub index file 200, dictionary body
If 300 headwords are katakana, the 8-bit = 1-byte code corresponding to katakana is usually 10100110
(=) To 11011110 (=), and the most significant bit is always "1". When the entry word is an alphanumeric character, the code corresponding to each character is 00100000 (=) to 01111111 (=) if it is an ASCII code. Therefore, instead of placing a special symbol at the delimiter of the entry word as in the eighth and ninth embodiments, the bit of the last character of the entry word can be manipulated to make the delimiter of the entry word. For example, if the entry word is composed of Katanaka, the most significant bit of each character is always "1", so the most significant bit of the last character of the entry word is " When you compare an entry word with a word, set the most significant bit of the last character of the entry word to "1" to restore the original Katakana code.
ASCII code, Shift JIS code, kuten code also take a fixed value that does not participate in word identification By inverting the bit to indicate the delimiter of the character string, the record in the dictionary body 300 and the record, the contents in the record The content can be separated.

本実施例によれば区切り記号を追加することなく文字列
そのものに区切りマークを追加し可変長データを扱うこ
とができるので、メモリ効率向上の効果がある。
According to the present embodiment, it is possible to add a delimiter mark to the character string itself and handle variable length data without adding a delimiter, which has the effect of improving memory efficiency.

第11の実施例を以下に説明する。辞書本体300の見出し
語に対応する内容に、外部記憶装置14上の特定のアドレ
スを示す、アドレスデータを格納する。該アドレスデー
タの指し示す場所には画像情報及び音声情報等見出し語
によって順序を与えられたデータ、大容量のデータが格
納されている。検索処理によって得た辞書内容であるア
ドレスデータをもとに該データをロードする。
The eleventh embodiment will be described below. Address data indicating a specific address on the external storage device 14 is stored in the content corresponding to the entry word of the dictionary body 300. At the location indicated by the address data, data ordered by entry words such as image information and audio information, and a large amount of data are stored. The data is loaded based on the address data which is the contents of the dictionary obtained by the search processing.

本実施例によれば、大容量のデータを辞書本体300の外
におくことにより辞書本体300を小さくし、またブロッ
クに含まれる見出し語数が多くなので、検索時間短縮の
効果がある。
According to this embodiment, the dictionary body 300 is made small by placing a large amount of data outside the dictionary body 300, and the number of headwords contained in the block is large, so that the search time is shortened.

第12の実施例を第8図を用いて説明する。辞書本体300
の第1のブロック310の最後の見出し語319が“アカス”
であり、第2のブロック320の最初の見出し語321が“ア
カツキ”であるような場合、第2のブロック320に対応
するサブインデックス200の見出し語212′を“アカツ”
(識別可能語頭部)とする。辞書本体300の第1ブロッ
ク310に含まれる全ての見出し語は最後の見出し語319の
“アカス”より前順にあり、“アカツ”は“アカス”よ
り後順か第2のブロック220の先頭の見出し語221“アカ
ツキ”より前順であることから検索手順は既に述べた方
法と同一でよい。すなわち、第nブロック最終の見出し
語I(n,m)と続く第(n+)ブロックの先頭の見出し
語I(n+,)に対しI(n,m)<Ix<I(n+,)な
る語Ixを上位のサブインデックスファイル又はマスタイ
ンデックスファイル100の見出し語として用いることが
できる。
A twelfth embodiment will be described with reference to FIG. Dictionary body 300
The last headword 319 in the first block 310 of “Akas”
If the first entry word 321 of the second block 320 is “Akatsuki”, the entry word 212 ′ of the sub-index 200 corresponding to the second block 320 is “Akatsuki”.
(Identifiable word head). All the headwords included in the first block 310 of the dictionary body 300 are in front of the last headword 319, "Acass", and "Akatsu" is in a rearward order of "Acass" or the first heading of the second block 220. The search procedure may be the same as that already described because it is in the order preceding the word 221 “Akatsuki”. That is, the word I (n, m) <Ix <I (n +,) with respect to the last word I (n, m) of the nth block and the head word I (n +,) of the following (n +) th block. Ix can be used as a headword for the upper sub-index file or master index file 100.

本実施例によれば、見出し語として用いることのできる
語のうち語長の最も短いものを用いることによりサブイ
ンデックスファイルならびにマスタインデックスファイ
ル100のサイズを小さくできるので、省メモリ化の効果
がある。また、本実施例によれば、検索の際に比較する
語長の短い見出し語を使うことができるので、検索時間
短縮の効果がある。
According to the present embodiment, the size of the sub index file and the master index file 100 can be reduced by using the word having the shortest word length among the words that can be used as the entry word, which is effective in saving memory. Further, according to the present embodiment, it is possible to use a headword having a short word length to be compared at the time of searching, so that there is an effect of reducing the search time.

第13の実施例を第9図によって説明する。辞書本体300
の各ブロックの先頭の見出し語は、サブインデックスフ
ァイル200の見出し語となった後辞書本体300から削除さ
れている。検索処理において、サブインデックスファイ
ル200の検索中に検索する語と一致する見出し語があっ
た場合、その見出し語に対応する辞書本体300のブロッ
クの最初に記された辞書内容を求めることで検索目標の
内容を得る。同様にしてサブインデックスファイル20
0、もしくは第2のインデックスファイルの各ブロック
の先頭の見出し語を省略することができる。
A thirteenth embodiment will be described with reference to FIG. Dictionary body 300
The headword at the beginning of each block has been deleted from the dictionary body 300 after becoming the headword of the sub-index file 200. In the search process, if there is a headword that matches the word to be searched during the search of the sub-index file 200, the search target is obtained by obtaining the dictionary content written at the beginning of the block of the dictionary body 300 corresponding to the headword. Get the contents of. Similarly, sub index file 20
0, or the headword at the beginning of each block of the second index file can be omitted.

本実施例によれば、重なる見出し語を省略することがで
きるので、省メモリ化の効果がある。また、本実施例に
よれば、ブロック先頭の見出し語は上位のサブインデッ
クスファイルもしくはマスタインデックスファイルから
直接参照されるので検索処理が短くなり、平均検索時間
を短縮する効果がある。
According to the present embodiment, overlapping headwords can be omitted, which has the effect of saving memory. Further, according to the present embodiment, since the headword at the head of the block is directly referenced from the upper sub-index file or master index file, the search process is shortened and the average search time is shortened.

第14の実施例を第10図を用いて説明する。辞書1は外部
記憶装置14上に第10図に示すように配置されている。す
なわち、マスタインデックスファイル100は辞書1全体
の中央に位置し、サブインデックスファイル200はブロ
ックごとに分割され、各ブロック中の見出し語が示す辞
書本体300の該当ブロックが近くに集まるように辞書本
体300を分割して配置する。従ってマスタインデックス
ファイル100からサブインデックスファイル200の各ブロ
ックとの外部記憶装置14上のアドレスの隔たりの総和が
最小となり、又、サブインデックスファイル200の各ブ
ロックに対して、各々のブロックに含まれる見出し語が
示す辞書本体300の該当ブロックとのアドレスの隔たり
の総和が最小となる構成になる。
A fourteenth embodiment will be described with reference to FIG. The dictionary 1 is arranged on the external storage device 14 as shown in FIG. That is, the master index file 100 is located at the center of the entire dictionary 1, the sub-index file 200 is divided into blocks, and the dictionary main body 300 is arranged so that the corresponding blocks of the dictionary main body 300 indicated by the entry word in each block are gathered nearby. Are divided and placed. Therefore, the total sum of the distances of the addresses on the external storage device 14 from the master index file 100 to the respective blocks of the sub index file 200 becomes the minimum, and for each block of the sub index file 200, the heading included in each block The sum of the address gaps between the corresponding block of the dictionary body 300 indicated by the word is minimized.

本実施例によれば、辞書検索処理において外部記憶装置
14から順次ロードするデータが外部記憶装置14上の近い
場所に常にあるため、外部記憶装置14のアクセス時間を
短縮できるので、検索時間を短縮する効果がある。
According to this embodiment, the external storage device is used in the dictionary search process.
Since the data to be sequentially loaded from 14 is always in a close place on the external storage device 14, the access time of the external storage device 14 can be shortened, which has the effect of shortening the search time.

第15の実施例を以下説明する。マスタインデックスファ
イル100の検索によりサブインデックスファイル200の特
定のブロックを導いた時点で、次に導かれる辞書本体30
0の特定ブロックが辞書本体300のおよそどのあたりに位
置するかを予想することができる。すなわち、サブイン
デックスファイル200の第1のブロックに含まれる見出
し語が示す辞書本体300のブロックが第1〜第nブロッ
ク、サブインデックスファイル200の第2のブロックに
含まれる見出し語が示す辞書本体のブロックが第n+1
第m(m>n+1)とすると、マスタインデックスファイ
ル100の検索の結果、サブインデックスファイル200の第
2のブロックが導かれた場合、次に導く辞書本体300の
ブロックは第n+1〜第mのブロックのうちの何れかであ
る。従って、サブインデックスファイル200の特定ブロ
ックを外部記憶装置14からロードした後すぐに外部記憶
装置14に辞書本体300の をアクセスする制御を行う。外部記憶装置14が をアクセスしている間にCPU11はさきにロードしたサブ
インデックスファイル200の特定ブロックの検索を行
う。
The fifteenth embodiment will be described below. When the search of the master index file 100 leads to a specific block of the sub-index file 200, the next dictionary body 30
It is possible to predict where in the dictionary body 300 the specific block of 0 is located. That is, the block of the dictionary body 300 indicated by the entry word included in the first block of the sub index file 200 is the first to nth blocks, and the block of the dictionary body indicated by the entry word included in the second block of the sub index file 200 is Block is n + 1th
Assuming that the second block of the sub-index file 200 is derived as a result of searching the master index file 100, the block of the dictionary body 300 to be derived next is the nth +1 to It is one of the m-th blocks. Therefore, immediately after the specific block of the sub index file 200 is loaded from the external storage device 14, the dictionary main body 300 of the dictionary main body 300 is loaded into the external storage device 14. Control access to. External storage device 14 While accessing, the CPU 11 searches for a specific block in the sub index file 200 loaded previously.

本実施例によれば、サブインデックスファイル200の検
索と外部記憶装置14のアクセス動作を並行して行うた
め、検索処理時間を短縮する効果がある。
According to this embodiment, since the search of the sub index file 200 and the access operation of the external storage device 14 are performed in parallel, the search processing time can be shortened.

〔発明の効果〕 本発明によれば、ブロックサイズとして限られたメモリ
容量で大容量の辞書を検索できるので、メモリ効率向上
の効果がある。
[Effects of the Invention] According to the present invention, a large-capacity dictionary can be searched with a limited memory capacity as a block size, so that there is an effect of improving memory efficiency.

また本発明によれば、小メモリの小型電子計算機を用い
て大容量辞書の検索ができるので、辞書検索装置の価格
低減の効果がある。
Further, according to the present invention, since a large-capacity dictionary can be searched using a small-sized electronic computer with a small memory, there is an effect of reducing the price of the dictionary search device.

更に本発明によれば、多数の見出し語を集めブロック分
割し、各々のブロックの先頭の見出し語を集めて上位の
サブインデックスファイルもしくはマスタインデックス
ファイルを形成するため、上位のサブインデックスファ
イルもしくはマスタインデックスファイルに並ぶ見出し
語は隣合った見出し語同志であっても文字の重なりが少
なくなり、検索の際に比較する文字数が少なくてよいの
で、検索時間を短縮する効果がある。例えば第1図に見
られる辞書において、語“アガナ”の検索の場合、マス
タインデックスファイルの見出し語との比較は、“ア”
と“キ”のみでよい。続くサブインデックスファイルで
は“ア”、“アカ”、“アビ”で順関係は判別可能であ
り、辞書本体において、“アカ”、“アガナ”の比較で
所与の見出しを得る。もし、辞書本体の見出し語を最初
から検索したとすれば第1ブロックの全ての見出し語の
頭2文字を検査することになる。
Further, according to the present invention, a large number of headwords are collected and divided into blocks, and the headwords at the beginning of each block are collected to form a higher sub-index file or master index file. The headwords arranged in the file have less overlapping of characters even if the headwords are adjacent to each other, and the number of characters to be compared at the time of searching can be small, which has an effect of reducing the search time. For example, in the dictionary shown in FIG. 1, when searching for the word "Agana", the comparison with the index word in the master index file is "A".
And "ki" are all you need. In the subsequent sub-index file, the order relation can be discriminated by "A", "Aka", and "Abi", and a given heading is obtained by comparing "Aka" and "Agana" in the dictionary body. If the entry word in the dictionary body is searched from the beginning, the first two letters of all the entry words in the first block are inspected.

加えて本発明によれば、順序関係もしくは大小関係の規
定されたデータであれば見出し語に用いることができ、
カタカナ見出し語(アイウエオ順)、英語見出し語(AB
C順)、数字見出し語(123順)などに利用することがで
きる。どのような検索すべき文字列でも、常にマスタイ
ンデックスファイル、サブインデックスファイル、辞書
データファイルを各1回計3回アクセスするたけで目的
とする見出し語を検索することができ、高速に大容量辞
書データファイルを検索することができる。
In addition, according to the present invention, any data having a specified order relationship or magnitude relationship can be used as a headword,
Katakana headwords (in order of Iueo), English headwords (AB
It can be used for C-order), number headwords (123-order), etc. With any character string to be searched, you can always search the master index file, sub-index file, and dictionary data file once for a total of three times to search for the target entry word, and a high-capacity dictionary at high speed. You can search data files.

また、その際に必要とするバッファメモリの大きさは、
マスタインデックスファイル(1ブロック)、サブイン
デックスファイル(該当すべき1ブロック)、辞書デー
タファイル(該当すべき1ブロック)を読み出すのみ各
1ブロック分必要とし、その都度バッファメモリの内容
を書き換えて共通に使用することにより、1ブロック分
の少ないバッファメモリの大きさで充分本発明を実現で
きる。
Also, the size of the buffer memory required at that time is
Only one block is required only for reading the master index file (1 block), the sub index file (1 block that should be applicable), and the dictionary data file (1 block that should be applicable). By using the present invention, the present invention can be sufficiently realized with a small buffer memory size for one block.

1ブロックの大きさを2048バイトとし、平均見出し語長
を5バイトとすると、1ブロックのマスタインデックス
ファイルで、410ブロックのサブインデックスファイル
を管理することができ、さらに、サブインデックスファ
イルの各ブロックがそれぞれ辞書データファイルの410
ブロック分を管理することができる。すなわち、1ブロ
ックのマスタインデックスファイルで、168100ブロック
(344メガバイト)の大容量辞書データファイルを管理
することができる。仮に2ブロック分のバッファメモリ
を用意したとすると、同様な計算により671000ブロック
(2.7ギガバイト)もの大容量辞書データファイルを管
理することができるなどの効果がある。
If the size of 1 block is 2048 bytes and the average headword length is 5 bytes, the master index file of 1 block can manage the sub index file of 410 blocks. Furthermore, each block of the sub index file 410 of each dictionary data file
Blocks can be managed. That is, a master index file of 1 block can manage a large capacity dictionary data file of 168100 blocks (344 megabytes). If two blocks of buffer memory were prepared, it would be possible to manage a large-capacity dictionary data file of 671,000 blocks (2.7 GB) by the same calculation.

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

第1図は本発明の一実施例を示すブロック図、第2図、
第3図は本発明の一実施例の辞書構造を説明するための
説明図、第4図は本発明の他の実施例を示すブロック
図、第5図、第6図、第7図、第8図、第9図、第10図
はそれぞれ本発明の別の実施例を説明する説明図であ
る。 1……辞書、10……辞書データ検索装置、11……CPU
(中央処理装置)、13……内部メモリ(第2の記憶装
置)、14……外部記憶装置(第1の記憶装置)、100…
…マスタインデックスファイル、200……サブインデッ
クスファイル、300……辞書本体(辞書データファイ
ル)。
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG.
FIG. 3 is an explanatory diagram for explaining a dictionary structure of one embodiment of the present invention, and FIG. 4 is a block diagram showing another embodiment of the present invention, FIG. 5, FIG. 6, FIG. 7, FIG. FIG. 8, FIG. 9 and FIG. 10 are explanatory views for explaining different embodiments of the present invention. 1 ... Dictionary, 10 ... Dictionary data retrieval device, 11 ... CPU
(Central processing unit), 13 ... Internal memory (second storage device), 14 ... External storage device (first storage device), 100 ...
… Master index file, 200 …… Sub index file, 300 …… Dictionary body (dictionary data file).

Claims (15)

【特許請求の範囲】[Claims] 【請求項1】辞書データを検索して見出し語に対する変
換データを得る辞書データ検索方式において、 辞書データおよび複数の見出し語からなる辞書データフ
ァイルを、それを記憶した第1の記憶手段の物理的最小
アクセス単位(セクタ)もしくはその整数倍の長さのブ
ロック単位で構成し、 該辞書データファイルの前記各ブロックの先頭見出し語
を集めたサブインデックスファイルを前記ブロック単位
で作成し、 さらに前記サブインデックスファイルの前記各ブロック
の先頭見出し語を集めたマスタインデックスファイルを
作成して、 該マスタインデックスファイルを第2の記憶手段に一時
格納し検索すべき文字列の対応するマスタインデックス
ファイル内の見出し語を検索し、 該見出し語に対する前記サブインデックスファイルの該
当ブロックを前記第2の記憶手段に一時格納し検索すべ
き文字列の対応するサブインデックスファイルの該格納
されたブロック内の見出し語を検索し、 該見出し語に対する前記辞書データファイルの該当ブロ
ックを前記第2の記憶手段に一時格納し前記辞書データ
ファイルの該格納されたブロック内データを検索するこ
とで、検索すべき文字列を得ることを特徴とする辞書デ
ータ検索方式。
1. A dictionary data retrieval method for retrieving dictionary data to obtain conversion data for a headword, wherein a dictionary data file consisting of dictionary data and a plurality of headwords is physically stored in a first storage means. A minimum access unit (sector) or a block unit having an integral multiple of the minimum access unit (sector) is formed, and a sub index file in which the head entry words of each block of the dictionary data file are collected is created in the block unit. A master index file is created in which the head index words of each block of the file are collected, the master index file is temporarily stored in the second storage means, and the index words in the master index file corresponding to the character string to be searched are searched. Search for the index word in the sub-index file for the entry word The block is temporarily stored in the second storage means, the index word in the stored block of the corresponding sub index file of the character string to be searched is searched, and the corresponding block of the dictionary data file for the index word is searched. A dictionary data search method characterized in that a character string to be searched is obtained by temporarily storing in the second storage means and searching the stored block data of the dictionary data file.
【請求項2】特許請求の範囲第1項記載の辞書データ検
索方式において、前記マスタインデックスファイルを前
記第2の記憶手段に常駐したことを特徴とする辞書デー
タ検索方式。
2. The dictionary data search method according to claim 1, wherein the master index file is resident in the second storage means.
【請求項3】特許請求の範囲第1項記載の辞書データ検
索方式において、前記サブインデックスファイルが、該
サブインデックスファイルの各ブロックの先頭見出し語
のみを集めた第2のサブインデックスファイル、さらに
同様な手法で生成した複数個のサブインデックスファイ
ルから構成されたことを特徴とする辞書データ検索方
式。
3. The dictionary data search method according to claim 1, wherein the sub-index file is a second sub-index file in which only the head entry words of each block of the sub-index file are collected. Dictionary data retrieval method characterized by being composed of multiple sub-index files generated by various methods.
【請求項4】特許請求の範囲第1項記載の辞書データ検
索方式において、前記サブインデックスファイルの各ブ
ロックの先頭に、前記各ブロックの先頭見出し語か、前
記サブインデックスファイル中の何番目の見出し語であ
るかを示すオフセット値を記録したことを特徴とする辞
書データ検索方式。
4. The dictionary data search method according to claim 1, wherein at the head of each block of the sub-index file, a head entry word of each of the blocks or a heading number of the sub-index file. A dictionary data retrieval method characterized by recording an offset value indicating whether it is a word.
【請求項5】特許請求の範囲第1項記載の辞書データ検
索方式において、前記マスタインデックスファイルおよ
び前記サブインデックスファイルの各ブロックの先頭
に、その各ブロックの先頭見出し語が格納されている前
記辞書データファイルの該当する物理アドレスもしくは
論理アドレスを示すアドレス値を記録したことを特徴と
する辞書データ検索方式。
5. The dictionary data search method according to claim 1, wherein the head entry word of each block is stored at the head of each block of the master index file and the sub index file. A dictionary data search method in which an address value indicating a corresponding physical address or logical address of a data file is recorded.
【請求項6】特許請求の範囲第1項もしくは第3項記載
の辞書データ検索方式において、前記辞書データファイ
ルの各ブロックの先頭に、インデックスファイルと区別
するための識別コードを記録したことを特徴とする辞書
データ検索方式。
6. The dictionary data search method according to claim 1 or 3, wherein an identification code for distinguishing from an index file is recorded at the beginning of each block of the dictionary data file. Dictionary data search method.
【請求項7】特許請求の範囲第1項記載の辞書データ検
索方式において、前記辞書データファイルの各見出し語
の次に、次の見出し語との相対アドレス値を記録したこ
とを特徴とする辞書データ検索方式。
7. The dictionary data search method according to claim 1, wherein each dictionary word in the dictionary data file is followed by a relative address value with respect to the next dictionary word. Data retrieval method.
【請求項8】特許請求の範囲第1項記載の辞書データ検
索方式において、前記サブインデックスファイルおよび
前記マスタインデックスファイルの各見出し語の最後に
次の見出し語と区別するための識別コードを記録したこ
とを特徴とする辞書データ検索方式。
8. A dictionary data search method according to claim 1, wherein an identification code for distinguishing from a next entry word is recorded at the end of each entry word of the sub index file and the master index file. A dictionary data search method characterized in that
【請求項9】特許請求の範囲第1項記載の辞書データ検
索方式において、前記サブインデックスファイルおよび
前記マスタインデックスファイルの各見出し語の最後の
文字コードを、次の見出し語との区別をするため、前記
各見出し語の中で常に変化しない固定ビットを反転して
記録したことを特徴とする辞書データ検索方式。
9. The dictionary data search method according to claim 1, wherein the last character code of each headword in the sub index file and the master index file is distinguished from the next headword. A dictionary data retrieval method characterized in that fixed bits that do not change in each headword are recorded by being inverted.
【請求項10】特許請求の範囲第1項記載の辞書データ
検索方式において、前記辞書データファイルの前記見出
し語に対応するデータとして、前記第1の記憶装置の物
理アドレスもしくは論理アドレスを示すアドレス値列を
記録したことを特徴とする辞書データ検索方式。
10. The dictionary data search method according to claim 1, wherein as the data corresponding to the entry word of the dictionary data file, an address value indicating a physical address or a logical address of the first storage device. A dictionary data retrieval method characterized by recording columns.
【請求項11】特許請求の範囲第1項記載の辞書データ
検索方式において、前記マスタインデックスファイルお
よび前記サブインデックスファイルの各見出し語を他の
見出し語と識別可能な語頭部のみで構成したことを特徴
とする辞書データ検索方式。
11. The dictionary data search method according to claim 1, wherein each headword of the master index file and the sub-index file is composed only of a word head that can be distinguished from other headwords. Dictionary data retrieval method characterized by.
【請求項12】特許請求の範囲第1項記載の辞書データ
検索方式において、前記辞書データファイルおよび前記
サブインデックスファイルの各ブロックの先頭見出し語
を省略したことを特徴とする辞書データ検索方式。
12. The dictionary data search method according to claim 1, wherein the head entry word of each block of the dictionary data file and the sub index file is omitted.
【請求項13】特許請求の範囲第1項記載の辞書データ
検索方式において、前記マスタインデックスファイルお
よび前記サブインデックスファイルを前記第1の記憶手
段に記憶したことを特徴とする辞書データ検索方式。
13. The dictionary data search method according to claim 1, wherein the master index file and the sub index file are stored in the first storage means.
【請求項14】特許請求の範囲第13項記載の辞書データ
検索方式において、前記マスタインデックスファイルを
前記辞書データファイルをほぼ2分するブロック位置
に、また前記サブインデックスファイルの各ブロックを
前記辞書データファイルの該当するブロックの近傍にそ
れぞれ配置したことを特徴とする辞書データ検索方式。
14. The dictionary data search method according to claim 13, wherein the master index file is located at a block position that divides the dictionary data file into approximately two parts, and each block of the sub index file is defined as the dictionary data. A dictionary data search method characterized by arranging them in the vicinity of the corresponding block of the file.
【請求項15】特許請求の範囲第1項または第13項記載
の辞書データ検索方式において、前記マスタインデック
スファイルをアクセス直後に前記サブインデックスファ
イルをほぼ2分するブロック位置に、また前記サブイン
デックスファイルをアクセス直後に前記辞書データファ
イルの該当するブロックの近傍に、あらかじめアクセス
(シーク)しておくことを特徴とする辞書データ検索方
式。
15. The dictionary data search method according to claim 1 or 13, wherein the sub index file is located at a block position that bisects the sub index file immediately after accessing the master index file, and the sub index file. A dictionary data search method characterized in that, immediately after the access, the vicinity of the corresponding block of the dictionary data file is accessed (seeked) in advance.
JP61039215A 1986-02-26 1986-02-26 Dictionary data search method Expired - Lifetime JPH0721805B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61039215A JPH0721805B2 (en) 1986-02-26 1986-02-26 Dictionary data search method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61039215A JPH0721805B2 (en) 1986-02-26 1986-02-26 Dictionary data search method

Publications (2)

Publication Number Publication Date
JPS62197822A JPS62197822A (en) 1987-09-01
JPH0721805B2 true JPH0721805B2 (en) 1995-03-08

Family

ID=12546912

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61039215A Expired - Lifetime JPH0721805B2 (en) 1986-02-26 1986-02-26 Dictionary data search method

Country Status (1)

Country Link
JP (1) JPH0721805B2 (en)

Also Published As

Publication number Publication date
JPS62197822A (en) 1987-09-01

Similar Documents

Publication Publication Date Title
US6122626A (en) Sparse index search method
KR100880531B1 (en) File creating method for searching of single data, searching method of single data file and storage medium storing rat file for searching of single data file
JP3251138B2 (en) Hash method
JPH05101102A (en) Retrieval device
JPH0721805B2 (en) Dictionary data search method
JPH0752450B2 (en) Dictionary data retrieval device
JPS59105141A (en) Managing method of electronic document
JP3578501B2 (en) Document search method and apparatus
JP2001243245A (en) Similar sentence retrieving method, its device and recording medium storing similar sentence retrieval program
JP2961888B2 (en) Document search system using term dictionary
JPH06295313A (en) Data retrieving device for retrieving file with index
JPH06195381A (en) Data retriever
JP2604787B2 (en) Two-dimensional data storage method
JPH0831096B2 (en) Word dictionary device
Markovskyi et al. Hash search organization in e-dictionaries using block ciphers
JP3439364B2 (en) Storage and retrieval methods for undefined length data
JPH0363094B2 (en)
JP3111498B2 (en) Record search method and data processing device
JPH043251A (en) Method and processor for retrieving document
JPH04250568A (en) Record retrieval device
JPS61103242A (en) High-speed retrieval system
JPS60168234A (en) Information retrieving system
JPH0991304A (en) Method, system, and storage means for information retrieval
JPS60225938A (en) Information retrieving system
JPH0145648B2 (en)