JPH0668147A - Check table retrieval system - Google Patents

Check table retrieval system

Info

Publication number
JPH0668147A
JPH0668147A JP4104698A JP10469892A JPH0668147A JP H0668147 A JPH0668147 A JP H0668147A JP 4104698 A JP4104698 A JP 4104698A JP 10469892 A JP10469892 A JP 10469892A JP H0668147 A JPH0668147 A JP H0668147A
Authority
JP
Japan
Prior art keywords
inspection
inspection table
character string
table group
character
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.)
Withdrawn
Application number
JP4104698A
Other languages
Japanese (ja)
Inventor
Chieko Iwasaki
千恵子 岩▲崎▼
Yoshiki Toe
良己 東江
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.)
KOBE NIPPON DENKI SOFTWARE KK
NEC Corp
NEC Software Kobe Ltd
Original Assignee
KOBE NIPPON DENKI SOFTWARE KK
NEC Corp
NEC Software Kobe 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 KOBE NIPPON DENKI SOFTWARE KK, NEC Corp, NEC Software Kobe Ltd filed Critical KOBE NIPPON DENKI SOFTWARE KK
Priority to JP4104698A priority Critical patent/JPH0668147A/en
Publication of JPH0668147A publication Critical patent/JPH0668147A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To retrieval an object check table from a check table group in a shorter time. CONSTITUTION:A character number discrimination means 11 discriminates number of characters of a character string to be checked. A table group selection means 12 acquires a head location of each check table group classified through combinations of initials and number of characters from a 2-dimension array table (called an entry table) 14 where initials are taken as columns and character numbers are taken as rows. A table retrieval means 13 retrieves a check table whose name is a checked character string from the check table group selected by the table group selection means 12.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、言語処理系のキーワー
ド解析など、文字列を検査するプログラムにおける検査
テーブルの検索方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an inspection table search method in a program for inspecting a character string, such as keyword analysis in a language processing system.

【0002】[0002]

【従来の技術】従来、言語処理系におけるキーワード解
析のような、文字列を検査するプログラムにおいて、検
査テーブル群は、図5(A)に示すように個々のテーブ
ルを連続した位置に配置するか、または図5(B)に示
すように個々のテーブルを順次チェーンでつないだ状態
で保持している。一つのテーブルを、どの位置に配置す
るか、あるいはどのチェーンにつなぐかは、特に決まっ
ていない。ある文字列を検査しようとする場合、その文
字列に対応する検査テーブルの検索は、検査テーブル群
の最初のテーブルから順次、文字列をテーブル名と比較
していくという処理で行っている。
2. Description of the Related Art Conventionally, in a program for inspecting a character string, such as a keyword analysis in a language processing system, does the inspection table group arrange individual tables at consecutive positions as shown in FIG. Alternatively, as shown in FIG. 5B, the individual tables are held in a state of being sequentially chained. It is not particularly decided which position one table should be placed in, or which chain should be connected to. When a character string is to be inspected, the search of the inspection table corresponding to the character string is performed by the process of sequentially comparing the character string with the table name from the first table in the inspection table group.

【0003】[0003]

【発明が解決しようとする課題】上述した従来のテーブ
ル検索では、仮にプログラム中で頻繁に検査するいくつ
かの文字列に対応する検査テーブルが、検査テーブル群
の並びあるいはチェーンの最後部付近に位置付けられて
いた場合、それらの文字列を処理する度に、テーブルの
並びあるいはチェーンを各々の検査テーブルに対し一回
の文字列比較を行いながら後部までたどるという処理を
行うことになる。その結果、全体として検索にかかる時
間が大きくなってしまう場合があるという問題がある。
In the conventional table retrieval described above, the inspection tables corresponding to some character strings frequently inspected in the program are positioned in the row of the inspection tables or near the end of the chain. If so, each time the character strings are processed, the arrangement or chain of the table is traced to the rear part while performing the character string comparison once for each inspection table. As a result, there is a problem that the time required for the search may increase as a whole.

【0004】[0004]

【課題を解決するための手段】本発明のテーブル検索方
式は、検査する文字列の文字数を判定する文字数判定手
段と、イニシャルと文字数の組み合わせで分類されてい
る個々の検査テーブル群の存在する位置を管理するため
のテーブルと、文字列に対応した検査テーブルが存在す
る検査テーブル群を選択するテーブル群選択手段と、選
択した検査テーブル群より目的の検査テーブルを検索す
るテーブル検索手段とを備えることを特徴とする。
According to the table retrieval method of the present invention, a character number determination means for determining the number of characters of a character string to be inspected and a position where each inspection table group classified by a combination of initials and the number of characters exists. And a table group selection means for selecting an inspection table group in which an inspection table corresponding to a character string exists, and a table search means for searching a target inspection table from the selected inspection table group. Is characterized by.

【0005】[0005]

【実施例】次に、本発明について図面を参照して説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be described with reference to the drawings.

【0006】本発明の実施例は、言語処理系のキーワー
ド解析において、キーワードを読み込む度に行なう、そ
のキーワードの検査すために必要な検査テーブルを、本
発明の処理方式にて、検査テーブル群より検索するもの
である。
In the embodiment of the present invention, in the keyword analysis of the language processing system, the inspection table necessary for inspecting the keyword is read from the inspection table group by the processing method of the present invention every time the keyword is read. It is something to search for.

【0007】図1は、本発明の構成要素を示した図であ
る。文字数判定手段11は、検査する文字列の文字数を
判定する。テーブル群選択手段12は、イニシャルと文
字数の組み合わせで分類されている個々の検査テーブル
群の存在する先頭位置(メモリ上のアドレス)を、イニ
シャルを列、文字数を行とした2次元配列のテーブル
(以降、エントリテーブルと称する)より取得する。テ
ーブル検索手段13は、テーブル群選択手段12にて選
択した検査テーブル群の中から、検査する文字列と一致
するテーブル名(テーブルを構成する項目の一つ)をも
つ検査テーブルを検索する。また、テーブル検索手段1
3は、文字数判定手段11およびテーブル群選択手段1
2の各構成要素の制御も行う。
FIG. 1 is a diagram showing components of the present invention. The character number determination means 11 determines the number of characters of the character string to be inspected. The table group selection means 12 is a two-dimensional array table in which initial positions (addresses on the memory) where individual inspection table groups classified by a combination of initials and the number of characters are present are columns of initials and rows of number of characters ( Hereinafter, it is acquired from the entry table). The table search means 13 searches the inspection table group selected by the table group selection means 12 for an inspection table having a table name (one of the items forming the table) that matches the character string to be inspected. Also, the table search means 1
3 is a character number determination means 11 and a table group selection means 1
It also controls the respective constituent elements of 2.

【0008】図2は、本発明により使用されるエントリ
テーブルと検査テーブル群の関連および構造を示したも
のである。検査テーブル群22または検査テーブル群2
3は、テーブル名のイニシャルとその文字数が同じであ
る検査テーブルすべてを、連続した位置に順に並べ、そ
れらテーブルの個数を先頭に付加した構造を持つ検査テ
ーブル群の一つである。各々の検査テーブル群は、エン
トリテーブル21の各要素からチェーンづけされてい
る。この関連図の例では、イニシャルがIで文字数が3
であるエントリテーブル21の要素は、検査テーブル群
22の先頭位置を、イニシャルがIで文字数が4である
エントリテーブル21の要素は、検査テーブル群23の
先頭位置を、それぞれチェーンづけしていることを表し
ている。なお、エントリテーブル21の中で“NUL
L”と記してあるのは、その要素からチェーンづけされ
る検査テーブル群がないことを意味している。
FIG. 2 shows the relation and structure of the entry table and the inspection table group used according to the present invention. Inspection table group 22 or inspection table group 2
Reference numeral 3 is one of the inspection table groups having a structure in which all the inspection tables having the same initial number of characters as the table name are arranged in consecutive positions in order and the number of these tables is added to the head. Each inspection table group is chained from each element of the entry table 21. In the example of this relational diagram, the initial is I and the number of characters is 3
The elements of the entry table 21 are chained to the start position of the inspection table group 22, and the elements of the entry table 21 whose initial is I and the number of characters is 4 are chained to the start position of the inspection table group 23. Is represented. In the entry table 21, "NUL
"L" means that there is no inspection table group chained from the element.

【0009】図3,図4は、本発明の一実施例である、
キーワードの検査テーブルを検索する処理の動作内容を
示したフローチャートである。図3はテーブル検索手段
に、図4(A)は文字数判定手段に、図4(B)はテー
ブル群選択手段にそれぞれ対応する。
FIGS. 3 and 4 show an embodiment of the present invention.
7 is a flowchart showing the operation contents of a process for searching a keyword inspection table. 3 corresponds to the table search means, FIG. 4A corresponds to the character number determination means, and FIG. 4B corresponds to the table group selection means.

【0010】ここで、図2および図3,図4を参照し
て、本発明の一実施例を説明する。“IO”、“INI
T”、“INDX”の3つの文字列をキーワードとして
読み込む場合について順に考える。
An embodiment of the present invention will now be described with reference to FIGS. 2, 3 and 4. "IO", "INI
Consider sequentially the case of reading three character strings of "T" and "INDX" as keywords.

【0011】文字列“IO”の場合は、まず、ステップ
30で、文字数判定手段11が呼ばれる。ステップ40
にて、文字列の文字数2を取得し、テーブル検索手段1
3に戻る。つづいて、ステップ31で、テーブル群選択
手段12が呼ばれる。ステップ50にて、エントリテー
ブル21から、イニシャルがIで文字数が2である検査
テーブル群の先頭位置をアドレスを取得し、テーブル検
索手段13に戻る。取得したアドレスはNULLである
ため、ステップ32にて、検査テーブル群は存在しない
と判断し、検査テーブルの検索が終了する。
In the case of the character string "IO", first, at step 30, the character number determination means 11 is called. Step 40
, The number of characters in the character string is acquired, and the table search means 1
Return to 3. Subsequently, in step 31, the table group selection means 12 is called. In step 50, the address is acquired from the entry table 21 for the start position of the inspection table group having the initial I and the number of characters of 2, and the procedure returns to the table search means 13. Since the acquired address is NULL, it is determined in step 32 that the inspection table group does not exist, and the search of the inspection table ends.

【0012】文字列“INIT”の場合は、ステップ3
0にて、文字数判定手段11が呼ばれ、ステップ40に
て、文字列の文字数4を取得する。ステップ31にて、
テーブル群選択手段12が呼ばれ、エントリテーブル2
1から、イニシャルがIで文字数が4である検査テーブ
ル群の先頭位置をアドレスを<?>取得する。取得した
アドレスはNULLではないので、ステップ32では、
ステップ33へ進み、検査テーブル群を構成する検査テ
ーブルの数3を取得しておく。ステップ34にて、最初
の検査テーブルの先頭にポインタを位置づける。ステッ
プ35において、文字列“INIT”とテーブル名を比
較するが、今回の例では検査テーブル群23の1番目の
検査テーブルのテーブル名は“ITEX”であり、文字
列“INIT”とは一致せず、ステップ36へ進む。ス
テップ33で取得したテーブルの数は3であったので、
ステップ36では、次の検査テーブルが存在すると判断
し、ステップ37に進む。ステップ37で、2番目の検
査テーブルの先頭へポインタを進め、ステップ35に戻
る。ステップ35にて、今度は、2番目の検査テーブル
のテーブル名と文字列を比較する。2番目の検査テーブ
ルのテーブル名は“ITEX”であり、文字列と一致す
るので、検査テーブルの検索が終了する。
If the character string is "INIT", step 3
At 0, the character number determination means 11 is called, and at step 40, the character number 4 of the character string is acquired. In step 31,
The table group selection means 12 is called, and the entry table 2
From 1, the address of the leading position of the inspection table group having the initial I and the number of characters of 4 is <? > Get. Since the acquired address is not NULL, in step 32,
The process proceeds to step 33, and the number 3 of inspection tables forming the inspection table group is acquired. At step 34, the pointer is positioned at the beginning of the first inspection table. In step 35, the character string “INIT” is compared with the table name. In this example, the table name of the first inspection table of the inspection table group 23 is “ITEX”, and the character string “INIT” does not match. No, the process proceeds to step 36. Since the number of tables acquired in step 33 was 3,
In step 36, it is determined that the next inspection table exists, and the process proceeds to step 37. In step 37, the pointer is advanced to the head of the second inspection table, and the process returns to step 35. In step 35, this time, the table name of the second inspection table and the character string are compared. The table name of the second inspection table is "ITEX", which matches the character string, so the search of the inspection table ends.

【0013】文字列“INDX”の場合は、ステップ3
0からステップ34の検査テーブル群を選択するまでの
処理は、文字列“INIT”の場合と同じであるが、ス
テップ35からステップ37の検査テーブル数分の繰り
返し処理においては、1番目の検査テーブルから3番目
の検査テーブルまでのすべてに対し、文字列はテーブル
名とは一致しないので、ステップ36にて、検査テーブ
ルは存在しないと判断し、検査テーブルの検索が終了す
る。
In the case of the character string "INDX", step 3
The process from 0 to the selection of the inspection table group in step 34 is the same as the case of the character string "INIT", but in the iterative process for the number of inspection tables in steps 35 to 37, the first inspection table is used. Since the character string does not match the table name for all the items from to the third inspection table, it is determined in step 36 that the inspection table does not exist, and the inspection table search is completed.

【0014】[0014]

【発明の効果】以上説明したように、本発明によれば、
すべての検査テーブルに対して、文字列を比較していた
従来のテーブル検索に比べ、より短時間で検索を終了さ
せることが可能となる。特に、検査テーブルの存在しな
い文字列の場合は、無駄な検索をせずに済むため、著し
く効果を発揮する。
As described above, according to the present invention,
It is possible to complete the search in a shorter time than the conventional table search in which the character strings are compared for all the inspection tables. In particular, in the case of a character string for which an inspection table does not exist, useless search can be avoided, so that the effect is remarkably exhibited.

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

【図1】本発明の構成要素を示す構成図である。FIG. 1 is a configuration diagram showing components of the present invention.

【図2】エントリテーブルと検査テーブル群の関連およ
び構造を示す図である。
FIG. 2 is a diagram showing the relationship and structure between an entry table and an inspection table group.

【図3】本発明の一実施例を示すフローチャートであ
る。
FIG. 3 is a flowchart showing an embodiment of the present invention.

【図4】本発明の一実施例を示すフローチャートであ
る。
FIG. 4 is a flowchart showing an embodiment of the present invention.

【図5】従来の処理方式によるテーブルの一般的な構造
図である。
FIG. 5 is a general structural diagram of a table according to a conventional processing method.

【符号の説明】[Explanation of symbols]

11 テーブル群選択手段 12 テーブル検索手段 13 文字数判定手段 14 エントリーテーブル 11 table group selection means 12 table search means 13 character number determination means 14 entry table

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 検査する文字列の文字数を判定する文字
数判定手段と、イニシャルと文字数の組み合わせで分類
されている個々の検査テーブル群の存在する位置を管理
するためのテーブルと、文字列に対応した検査テーブル
が存在する検査テーブル群を選択するテーブル群選択手
段と、選択した検査テーブル群より目的の検査テーブル
を検索するテーブル検索手段とを備えることを特徴とす
る検査テーブル検索方式。
1. A character number judging means for judging the number of characters of a character string to be inspected, a table for managing the position of each inspection table group classified by a combination of initials and the number of characters, and a character string. An inspection table search method comprising: a table group selection unit that selects an inspection table group in which the selected inspection table exists; and a table search unit that searches a target inspection table from the selected inspection table group.
JP4104698A 1992-04-23 1992-04-23 Check table retrieval system Withdrawn JPH0668147A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4104698A JPH0668147A (en) 1992-04-23 1992-04-23 Check table retrieval system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4104698A JPH0668147A (en) 1992-04-23 1992-04-23 Check table retrieval system

Publications (1)

Publication Number Publication Date
JPH0668147A true JPH0668147A (en) 1994-03-11

Family

ID=14387705

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4104698A Withdrawn JPH0668147A (en) 1992-04-23 1992-04-23 Check table retrieval system

Country Status (1)

Country Link
JP (1) JPH0668147A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998034183A1 (en) * 1997-02-03 1998-08-06 Hitachi, Ltd. Character string searching method and character string data base

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998034183A1 (en) * 1997-02-03 1998-08-06 Hitachi, Ltd. Character string searching method and character string data base

Similar Documents

Publication Publication Date Title
KR940003700B1 (en) Method and apparatus for search
US7680821B2 (en) Method and system for index sampled tablescan
JPH08255176A (en) Method and system for comparison of table of database
JPH0652225A (en) Method and system for retrieving file
JP2000357115A (en) Device and method for file retrieval
JPH02130673A (en) Data retrieving system
JP2693914B2 (en) Search system
JPH0668147A (en) Check table retrieval system
JP2519245B2 (en) Information retrieval device
US11216463B2 (en) Relational database system join query table scan bypass
JP2773657B2 (en) String search device
JPH02148174A (en) Data retrieving device
JP2839515B2 (en) Character reading system
JPH02234271A (en) Character string retrieving method
JPS63238622A (en) Relation retrieval system
Owolabi et al. A hardware string comparator
JPS63149727A (en) Retrieving device for name table
JPH0452967A (en) And operation processing system for set file
JPH02136969A (en) Retrieving system for character string
JPS60211541A (en) Data retireval circuit
JPH10301758A (en) Sort processor
JPH07271644A (en) Main index and subindex access device for index-sequentially organized file
JPH0546666A (en) Information retrieving device
JPH04241672A (en) Character string retrieving system
JPS613266A (en) Kanji conversion system for katakana described name

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19990706