[go: up one dir, main page]

JP3376996B2 - Full text search method - Google Patents

Full text search method

Info

Publication number
JP3376996B2
JP3376996B2 JP2000375505A JP2000375505A JP3376996B2 JP 3376996 B2 JP3376996 B2 JP 3376996B2 JP 2000375505 A JP2000375505 A JP 2000375505A JP 2000375505 A JP2000375505 A JP 2000375505A JP 3376996 B2 JP3376996 B2 JP 3376996B2
Authority
JP
Japan
Prior art keywords
search
character
text
document
component table
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
JP2000375505A
Other languages
Japanese (ja)
Other versions
JP2001202388A (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 JP2000375505A priority Critical patent/JP3376996B2/en
Publication of JP2001202388A publication Critical patent/JP2001202388A/en
Application granted granted Critical
Publication of JP3376996B2 publication Critical patent/JP3376996B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 【0001】 【発明の属する技術分野】本発明は、文書データベース
を文字列を指定して文書の全文を対象として探索するフ
ルテキストサーチ方式に係わり、特に探索用に補助的な
ファイルを用いて全文探索処理を等価的に高速化するた
めの検索方法および装置に関する。 【0002】 【従来の技術】従来の文書検索システムでは、登録する
文書の内容を表す単語(キーワードと呼ぶ)をインデク
スとする方式がとられている。しかし、この方式ではイ
ンデクサーとよばれるキーワード付けの専門家が文書を
逐一読み、内容を理解した上で適切なキーワードを振る
必要があった。この登録時の手間の掛かる作業を回避す
るために、「特開昭63−198124」のような本文
中に出現する単語を全てキーワードとしてインデクスフ
ァイルに登録する方法も提案されている。しかし、上記
の方法ではインデクスファイルの作成時に、意味を持つ
最小の単位の単語を決定するのが難しく、単語辞書ある
いは、文法規則の不備のために、文章の解析に失敗し
て、重要な単語がキーワードとして抽出されないという
問題がある。 【0003】この問題を解決するために検索時に文書を
文字コード化したテキストとして直接計算機に登録し、
検索時にはテキストデータベース内の全ての文書の内容
を読んで、与えられたキーワード(従来システムにおけ
る統制キーワードと区別するために、以後検索タームと
呼ぶ)を含む文書を探し出だすフルテキストサーチが提
案されている。このフルテキストサーチ方式は、「情報
処理学会研究報告 vol.89,no.66 情報学
基礎14−7 テキストデータベース管理システムSI
GMAとその応用(1989.7.27)」の第2節冒
頭で述べられているように、テキストファイル全体を先
頭から一文字ずつ走査することが大きな特徴である。こ
うすることにより、キーワードに対応する文書識別子等
を記述したインデクスファイルがなくとも、テキストデ
ータベースのテキスト本体を手掛かりに検索することが
可能となる。すなわち、与えられた検索タームでテキス
トデータ全体を文字列探索し、検索タームが記述されて
いる文書のみを検索結果として出力することができる。
しかしながら、このフルテキストサーチ方式は、テキス
トファイル全体を先頭から一文字ずつ走査するために処
理時間が掛かり、大規模なデータベースに適用できない
という問題があった。同文献第2節中にみられるよう
に、汎用の大型計算機を持ってしても、2MB/s程度
の検索処理速度しか実現できない。この速度でも、数メ
ガバイト程度のデータベースであれば、検索時間は実用
域内に入る。しかし、オフィス等の実用規模のデータベ
ースには数百メガバイトの容量が必要とされ、この場合
には十分な検索レスポンスが得られないことになる。 【0004】 【発明が解決しようとする課題】本発明の解決しようと
する課題は、実用規模のテキストデータベースを対象と
した場合でも、実用上許容しうる十分な検索時間で検索
結果が得られる文書の全文を検索対象とする高速なフル
テキストサーチ方法および装置を提供することにある。 【0005】 【課題を解決するための手段】上記課題を解決するため
に、以下の処理ステップから構成されるフルテキストサ
ーチ方法を用い、該方法を実施する装置を構成する。 (1)本文自体を格納するステップ (2)格納した本文を単語レベルで部分文字列へ分解
し、分解した部分文字列間で相互に文字列の包含関係を
調べ、他の部分文字列に含まれる文字列を排除した部分
文字列の集合からなる凝縮本文を作成するステップ (3)本文中で用いられている文字を重複なく集めた文
字成分表を作成するステップ (4)与えられた検索タームを文字レベルで分解し、検
索タームを構成する全ての文字を含む文書のみを抽出す
る文字成分表サーチのステップ (5)文字成分表で抽出された文書に対応する凝縮本文
を参照し、与えられた検索タームを含む文書を抽出する
凝縮本文サーチのステップ (6)与えられた検索条件式が複数の検索ターム間の本
文中での位置関係を指定している場合には、凝縮本文で
抽出された文書に対応する本文データを参照し、与えら
れた検索タームを含み、なおかつ検索ターム間に付与さ
れた位置関係等の検索条件を満たすもののみを抽出する
本文サーチのステップ。 【0006】 【発明の実施の形態】以下、本発明の第一の実施例につ
いて図1を用いて説明する。本装置は、ディスプレイ1
00、キーボード101、中央制御装置CPU102、
文字成分表105、凝縮本文104、及び本文103格
納用ファイル110、フロッピディスクドライバ10
6、主メモリ200から構成される。 【0007】主メモリ200には、本文登録プログラム
201、凝縮本文作成登録プログラム202、文字成分
表作成登録プログラム203、文字成分表サーチプログ
ラム204、凝縮本文サーチプログラム205、本文サ
ーチプログラム206、階層型プリサーチ制御プログラ
ム207が格納されるとともに、データエリア208が
確保されている。これらのプログラムはCPU102で
実行される。文書の登録の際は、キーボード101から
入力されるコマンドにより、CPU102がフロッピデ
ィスクドライバ106に挿入されるフロッピディスクか
ら文書データを読込み、本文登録プログラム201を実
行して読み込んだ文書データを本文103としてファイ
ル110へ格納する。次にCPU102は、凝縮本文作
成登録プログラム202を実行して、本文103を単語
レベルで部分文字列へ分割し、分割した部分文字列間で
相互に文字列の包含関係を調べ、他の部分文字列に含ま
れる文字列を排除した部分文字列の集合からなる凝縮本
文を作成し、これを凝縮本文104としてファイル11
0へ格納する。最後にCPU102は、文字成分表作成
登録プログラム203を実行して、本文103中で用い
られている文字を重複なく集めた文字成分表を作成し、
これを文字成分表105としてファイル110へ格納す
る。 【0008】検索の際には、キーボード101から入力
された検索条件式が、CPU102に送られる。CPU
102では、まず階層検索制御プログラム207を実行
し、その制御に基づいて文字成分表サーチプログラム2
04、凝縮本文サーチプログラム205、本文サーチプ
ログラム206を順次実行する。すなわち、文字成分表
サーチでは、入力された検索条件式中の検索タームを文
字レベルで分解し、検索タームを構成する全ての文字を
含む文書のみを抽出する。そして、文字成分表で抽出さ
れた文書に対応する凝縮本文を参照し、与えられた検索
タームを含む文書を抽出する。もし、与えられた検索条
件式中に単一の検索タームか、もしくは複数の検索ター
ム間の論理的な関係が指定されているのみで、本文中で
の位置関係までは指定されていない場合には、ここで検
索を終了し、凝縮本文サーチの結果を検索結果として出
力する。それ以外の場合、すなわち与えられた検索条件
式中に複数の検索ターム間の本文中での位置関係が指定
されている場合には、凝縮本文サーチで抽出された文書
に対応する本文データを参照し、与えられた検索ターム
を含み、なおかつ検索ターム間に付与された位置関係等
の検索条件を満たすもののみを抽出し、検索結果として
出力する。以上が本発明の第一の実施例のフルテキスト
サーチ装置の概略である。 【0009】以下、本発明の特徴である文字成分表サー
チ、凝縮本文サーチ、及び本文サーチと絞り込みを行う
階層型プリサーチ方式の、登録及び検索方法について概
略を説明する。まず「凝縮本文」と「文字成分表」の作
成は、文書の登録時に自動的に行う。この処理内容を、
図2に示す。本図で、登録すべき文書が入力されると、
まずそのまま「本文」として格納する。次に、この「本
文」から「凝縮本文」を作成する。「凝縮本文」は、
「本文」の中から文字種(漢字、ひらがな、カタカナ、
英字等)ごとに文字列を分割し、繰り返し現れる言葉の
重複を排除して作成される。本文が「あいまい検索のた
めの検索技術・・・・・」という文書1の場合には、
「検索」が重複語として切り捨てられ、「あいまい」と
「検索技術」及び「のための」が「凝縮本文」として残
ることになる。また、「本文」から「文字成分表」を作
成する。ここでは、「本文」に現われる文字を1ビット
の情報で表す。文書1の例では、「あ」と「い」がある
のでそれぞれ‘1’を、また「う」はないので‘0’を
設定する。「検」と「索」も同様にそれぞれ‘1’を設
定する。以下同様にして、文字成分表の該当文字部分
に、「本文」にその文字がある場合には‘1’を、存在
しない場合には‘0’を設定する。このようにして、文
書の登録時に「凝縮本文」と「文字成分表」を自動的に
作成し、階層型プリサーチの準備をしておく。 【0010】検索時には、図3に示すように、登録の逆
の順序でこれらの補助ファイルを参照する。まず第1
に、文字成分表サーチでは、文字成分表を参照し、検索
ターム中の全ての文字に対応する文字成分表の該当文字
部分に‘1’が設定されているものを選びだす。第2
に、凝縮本文サーチでは、文字成分表で選びだされた文
書の凝縮本文を参照し、条件式に与えられた検索ターム
を含む文書を選びだす。最後に本文サーチでは、検索タ
ームの本文での出現位置が条件式と適合するもののみを
選びだす。本図の例では、検索[4C]理解すなわち、
「“検索”と“理解”が本文中で4文字以内に近接して
現れるものを探せ」という条件式で検索した例を示して
いる。結果として文書4の“検索”と“理解”が本文中
で4文字離れている文書が抽出される。 【0011】以下、本実施例で用いる文字種分割・重複
語排除型凝縮本文及び文字コード依存型文字成分表の作
成方法と、これらを用いた階層型プリサーチの制御方法
について具体的に説明する。まず最初に本実施例で用い
る文字種分割・重複語排除型凝縮本文の作成方法につい
て説明する。図4に示すように、まず本文テキストから
文字種により文字列を分割する。この時の文字種とは、
漢字、ひらがな、カタカナ、英字、数字、記号その他で
ある。これらの単一文字種の連なりからなる文字列毎に
本文の文字列を分割する。次に、分割した文字列のそれ
ぞれについて、同一文書内にある他の部分文字列にその
部分文字列がそっくり含まれてしまう場合、その文字列
を重複文字列として凝縮本文の対象から排除する。例え
ば、“検索”という部分文字列は、同一文書内にある他
の“知的検索技術”という部分文字列に完全に含まれる
ので、この“検索”は凝縮本文には登録しない。しか
し、凝縮本文サーチでは、たとえ“検索”という文字列
は凝縮本文に登録されていなくとも、“知的検索技術”
の部分文字列としてヒットすることになる。このよう
に、部分文字列の重複登録を排除して、得られた部分文
字列には、図5に示すように文書毎に文字列の間にセパ
レータを挿入する。本図では、セパレータとして記
号‘,’を用いている。図2、図3ではこのセパレータ
は記号‘|’で表されているが、このセパレータは特に
文字として表す必要はなく、文字に割り当てられていな
い特殊なコードを使用することもできる。 【0012】次に本実施例で用いる文字コード依存型文
字成分表の作成方法について説明する。図6に示すよう
に、文字コード依存型文字成分表は、文字コードによっ
て存在を示すビット情報として、1を立てるビット位置
を決定する文字成分表である。本図ではシフトJISコ
ードを例に説明している。同図で(XXXX)Hは文字
コードを16進表示したものである。例えば“検索”と
いう文字列が文書1の本文中に存在することを示すの
に、文書1のビットリストの(8C9F)H、(8DF
5)H番目に1を設定する。ビットリスト中のこの文字
に対応するビット位置を文字成分表のエントリ番号と呼
ぶことにする。例えば‘検’のエントリ番号は(8C9
F)H、または10進表示すれば35999となる。 【0013】以上の文字成分表と凝縮本文を用いた階層
型プリサーチの制御及びサーチ動作について説明する。
まず検索条件式中の検索タームをそれぞれ一文字単位に
分解し、文字成分表サーチを行う。ここでは与えられた
検索タームを構成する文字コードに対応するビットリス
ト中のエントリ番号の位置がすべて1となるビットリス
トを持つ文書を求めることとなる。例えば、“検索”と
いう文字列が検索タームとして与えられた場合、
‘検’、‘索’に対応するビットリストの(8C9F)
H、(8DF5)H番目のビットがすべて1である文書
1,2,3,4,...を文字成分表サーチの検索結果
とする。すなわち、図7に示すように‘検’を示す(8
C9F)Hのエントリ番号のビットリスト701と、
‘索’を示す(8DF5)Hのエントリ番号のビットリ
スト702との間でビット毎にAND演算を施し、ビッ
トAND演算結果703を得る。このビットAND演算
結果703のビットリスト中で、1となっているビット
位置に対応する文書番号が文字成分表サーチの検索結果
としてのヒット文書を表すことになる。すなわち、
‘検’と‘索’を全て含む文書が抽出されることにな
る。また、“湖”のように検索タームがただ1個の文字
から構成される場合は、ここで文字成分表サーチの結果
を出力して検索を終了することができる。 【0014】次に文字成分表サーチで抽出された文書の
凝縮本文に対してサーチを行う。ここでは図5のように
文書毎に登録された凝縮本文の内容をスキャンして、与
えられた検索タームを単語として含む文書を抽出する。
つまり、‘検’と‘索’の2文字が“検索”と連続して
現れる文書のみを抽出する。すなわち、‘検’と‘索’
が含まれていても、“検出”と“探索”というように、
別の単語として現われるようなものはここで切り捨てて
しまう。このためには、文字成分表サーチで絞り込まれ
た文書毎の凝縮本文について本文テキストデータと同じ
ように、一文字ずつスキャンしながら探索する。この
時、文字成分表サーチで得られた結果の文書番号に対応
する凝縮本文しかスキャンしない。例えば、文字成分表
サーチの結果が文書番号1,2,3,4,...であれ
ば、凝縮本文サーチでは、文書番号1,2,3,
4,...の凝縮本文をスキャンする。そして、実際に
凝縮本文中に検索タームが存在する文書を凝縮本文サー
チの検索結果として出力する。 【0015】このように、「階層型プリサーチ方式」で
は、「文字成分表」と「凝縮本文」という2段階のプリ
サーチを事前に行い、それぞれ「文字レベル」と「単語
レベル」のふるいに掛け、最も時間を要する本文サーチ
の対象となる文書数をあらかじめ最小に絞り込んでおく
ことによって、探索文書容量を削減することができるた
め、等価的に非常に高速なフルテキストサーチが実現で
きることになる。すなわち、文字成分表サーチでは、文
字成分表が文字の存在を1ビットの情報で表しているた
め、サーチするデータ容量を極めて小さくすることがで
き、その結果検索時間も短時間に納めることが可能とな
る。さらに、キーワードを構成する文字毎のビットリス
トの論理積を取ることによって、キーワードに関連のな
い文書を大幅に切り捨て、以降の対象文書を格段に絞り
込むことが可能となる。また、凝縮本文サーチでは、本
文を直接スキャンするよりもデータ量が少ない分、検索
処理時間が短縮できることになる。 【0016】次に、本発明の第二の実施例を説明する。
本実施例は、複数の検索タームが指定された場合でも、
効率的に階層型プリサーチを行うことのできるフルテキ
ストサーチ方法を提供するものである。例えば、「“検
索”AND“理解”」という条件式が与えられたときに
は、まず、第1ステップとして文字成分表をサーチす
る。ここでは与えられた検索ターム毎にそのすべての文
字を含む文書を探し、その後検索ターム間で与えられた
条件を満たすような文書を出力する。「“検索”AND
“理解”」という条件式の場合には、“検索”の2文字
を含み、かつ“理解”の2文字を含む文書を探す。すな
わち、「(‘検’AND‘索’)AND(‘理’AND
‘解’)」従って、「‘検’AND‘索’AND‘理’
AND‘解’」つまり、上記の4文字を同時に含む文書
を検索する。次に、この文字成分表サーチの結果絞り込
まれた文書の凝縮本文をサーチする。ここでは、指定さ
れたキーワードが単語として現われる文書だけを抽出す
る。すなわち、“検索”と“理解”を両方同時に含む文
書を検索する。 【0017】この例の場合のように、検索ターム間の関
係が“AND”、“OR”等の論理条件だけで、その他
にキーワード間の位置関係を規定する条件が指定されて
いない場合には、ここで検索を終了し、凝縮本文サーチ
の結果を最終検索結果として出力する。もし、位置条件
が指定されている場合には、凝縮本文サーチで抽出され
た文書の本文をサーチし、指定条件に合致するものを抽
出し、これを最終検索条件として出力する。以上が本実
施例における検索動作の説明である。このように、文字
成分表サーチ、凝縮本文サーチで検索ターム間の論理積
を取ることにより、複数個の検索タームが指定された場
合でも、効率的に階層型プリサーチを行い、高速なフル
テキストサーチを実現することができる。 【0018】これより第三の実施例として、さらに一般
的に階層型プリサーチの検索制御について詳細に説明す
る。図8にこのときの階層型プリサーチの制御の手順を
PAD図にて説明する。ここでは「“計算機”と“知的
インタフェース”のどちらかを含む文書を探せ」すなわ
ち「“計算機”OR“知的インタフェース”」という検
索式を例にあげて説明する。まず、最初にステップ80
00で文字成分表サーチを行う。ここでは与えられた検
索ターム毎にそのすべての文字を含む文書を探し、その
後検索ターム間に与えられた複合条件を満たすような文
書を出力する。この例では、図9に示すように“計算
機”を構成する3個の文字のそれぞれについて文字成分
表の該当するエントリ番号間のビットAND演算を行
い、次に同様に“知的インタフェース”を構成する9個
の文字のそれぞれについて文字成分表の該当するエント
リ番号間のビットAND演算を行い、最後に先に作成し
た“計算機”に対するのときのビットAND演算結果と
そのビット列のOR演算を行う。すなわち、「(‘計’
AND‘算’AND‘機’)OR(‘知’AND‘的’
AND‘イ’AND‘ン’AND‘タ’AND‘フ’A
ND‘ェ’AND‘ー’AND‘ス’)」という検索式
を実行することになる。これにより、“計算機”を構成
する3個の文字をすべて含む文書、もしくは“知的イン
タフェース”を構成する9個の文字をすべて含む文書が
抽出される。以上の文字成分表サーチの結果件数が0件
であれば、第8図に示すようにここで0件という検索結
果を出力して検索を終了する。また、‘湖’のように検
索タームがただ1個の文字から構成される場合も、ここ
で文字成分表サーチの結果を出力して検索を終了する。 【0019】もし、検索タームが複数の文字で構成され
ていて、かつ文字成分表サーチの結果件数が0件でなけ
れば、次に凝縮本文サーチを行う。凝縮本文に登録され
ている内容は、文字種ごとに分割された文字列である。
例えば、“知的インタフェース”のように、途中で文字
種が異なれば凝縮本文では部分文字列へ分解され、「知
的,インタフェース」のように分割点にセパレータが入
る。したがって、“知的インタフェース”のように異な
る文字種から構成される検索タームの場合、このままで
は凝縮本文をサーチしても該当する文字列が存在しない
ことになる。そこで、凝縮本文サーチに入る前に検索タ
ームをチェックし、異なる文字種で構成される検索ター
ムはこれを文字種毎に分割する。このように文字種で分
割するという処理を施した検索タームを元々の検索ター
ムと区別して、分割検索タームと呼ぶ。そして凝縮本文
サーチは、例えば“計算機”,“知的”,“インタフェ
ース”のように分割検索タームで検索する。ただし、分
割検索タームに関しては、分割元を同じくするターム間
でAND条件で検索を行う。例えば、「“計算機”OR
“知的インタフェース”」という条件式の場合、凝縮本
文サーチでは「“計算機”OR(“知的”AND“イン
タフェース”)」すなわち、「“知的”と“インタフェ
ース”が同一文書内に存在するか、または“計算機”が
存在する文書を探せ」という条件式として検索を行うこ
とになる。 【0020】凝縮本文サーチの結果が0件であれば、こ
こで0件という検索結果を出力して検索を終了する。ま
た近傍条件、または文脈条件の指定の有る場合、あるい
は“知的インタフェース”のような分割される検索ター
ムがある場合、つまり検索タームと分割検索タームが異
なる場合に限り本文サーチを行う。そうでない場合、こ
こで階層型プリサーチを終了し凝縮本文の結果を検索結
果として出力する。ここで、文脈条件とは例えば、
「“計算機”[S]“知的インタフェース”」のように
示される条件式でこれは、「“計算機”と“知的インタ
フェース”が同一の文(センテンス)内にあるものを探
せ」という意味を表す。あるいは近傍条件とは、例え
ば、「“計算機” [10C] “知的インタフェー
ス”」のように記述されるもので、これは、「“計算
機”と“知的インタフェース”が10文字以内に近接し
て現れる文書を探せ」という意味を表す。すなわち、文
脈条件、近傍条件とも文書中に出現する検索タームの位
置関係を指定する検索条件のことである。 【0021】このような本文中に現れる検索タームの位
置関係を指定した検索条件が与えられた場合、もしくは
凝縮本文中ではセパレータで区切られた途中で文字種の
変わる検索タームが与えられた場合には、凝縮本文サー
チの結果に対応する本文データを参照し、与えられた条
件通りに本文中に検索タームが出現するもののみを検索
結果として出力し、検索を終了することになる。このよ
うに、検索タームが異なる文字種で構成されている場
合、或いは検索ターム間の本文中での出現位置に関する
条件指定がある場合についても、効率的に階層型プリサ
ーチを行い、高速なフルテキストサーチを実現すること
ができる。 【0022】次に、本発明の第四の実施例について説明
する。本実施例は、第一の実施例における文字成分表の
容量を削減し、コンパクトにしたものである。第一の実
施例で用いた文字コード依存型文字成分表は、処理が簡
単であるが、文字成分表の1文書あたりのビットリスト
が長いため文字成分表が大きくなるという問題がある。
また、該当する文字コードが存在しないのにエントリ番
号を割当てているためむだな部分が多いという問題があ
る。例えばシフトJISの場合、(0000)Hから
(8140)Hの間、及び(A000)Hから(E04
0)Hの間、つまり0番目から33087番目までと4
0960番目から57408番目までのエントリ番号に
は該当する文字コードがない。それにもかかわらず、文
字コードによってエントリ番号を決定するためにこの部
分も全て表のエントリとして持っている必要がある。こ
のビットリスト中のむだな部分を排除するために一旦文
字コードを変換し、ビット位置を0番目からすきまなく
使用できるように文字成分表を作成する。この文字コー
ド変換型文字成分表を用いた実施例の詳細について以下
説明する。 【0023】文字コード変換型文字成分表を作成するた
めの文字コードへの変換式の例として次式をあげる。ま
た、対応するPAD図を図10に示す。 if SJIS < (A000)H then SCODE = SJIS − (8040)H else SCODE = SJIS − (C040)H SCODE = SCODE − (SCODE/256)×64 ・・・・・・・ (4−1)式 (但し、通常文字コードの小さい値の部分は制御コード
として用いることが多いために、本式では(8140)
Hとはせずに(8040)Hとして多少の余裕を持たせ
ている。また、(SCODE/256)の演算結果の小
数点以下は切り捨て、切り捨てた結果と64との乗算を
行う。) 式中でSJISがもとのシフトJISコードを示し、S
CODEは変換後の文字コードを示す。KEISコード
や他のコード体系についてもシフトJISコードとの対
応がとれているので同様の式でSCODEへの変換が可
能である。(4−1)式は、文字コード表に表すと図1
1のような変換を意味している。すなわち、(000
0)Hから(FFFF)Hまでの間に(8140)H〜
(9FFC)H 及び (E040)H〜(FEFC)
Hと分散して配置されている文字コードを、(000
0)H からすきまなく配置するように文字コードを変
換することになる。この(4−1)式を用いてコード変
換することにより、図12に示すようにビットリストの
長さを非常に短くすることができ、文字成分表の全体の
容量を小さくすることができる。 【0024】階層型プリサーチの制御は、第一の実施例
と同じである。すなわち、図8の制御手順をそのまま使
用し、第1に検索ターム中の文字を使い文字成分表サー
チを行い、第2に検索タームを用いて凝縮本文サーチを
行う。文脈条件の指定がなければここで検索結果を出力
し、検索を終了する。文脈条件の指定があれば第3に本
文サーチを行いその結果を出力する。但し、文字成分表
サーチのときには入力された検索タームは全て(4−
1)式に基づいて文字コード変換を施して用いることに
なる。以上、文字コード変換型文字成分表を用いた第四
の実施例について説明した。本実施例によれば、文字コ
ードをコード変換し、ビット位置を0番目からすきまな
く並べた文字成分表を作成することにより、文字成分表
の文字の割り振られていないエントリを無くすことがで
き、文字成分表の容量を非常に小さくすることができ
る。 【0025】次に、本発明の第五の実施例について説明
する。本実施例は、第四の実施例における文字成分表の
容量をハッシング手法を用いてさらに削減したものであ
る。第四の実施例の文字成分表の容量をさらに小さくす
るために、本実施例ではビットリスト中の一つのエント
リ番号に複数の文字を割り当てる。すなわち、ハッシュ
関数を用いて検索ターム中の文字とビットリスト中のビ
ット位置を対応付ける方法をとる。このハッシュ関数と
して例えば次の式を用いることができる。 式中でSCODEは(4−1)式によってシフトJIS
から変換した文字コードである。modは第1引き数を
第2引き数で割った余りを出力する関数である。Nは任
意の整数値である。Nとして、例えば512を用いる
と、‘あ’はエントリ番号480、‘ま’はエントリ番
号193となる。 【0026】このようにして作成した文字成分表の例を
図13に示す。この場合は、Nを512と設定したが、
1文書を登録するのに512ビットしか必要としないこ
とが分かる。検索時には、与えられた検索タームの各文
字について登録時と同じように、(5−1)式のハッシ
ュ関数を用いてエントリ番号を求め、これに対応する文
字成分表のビット位置を参照する。例えば、“あいま
い”という文字列の場合図13のようにエントリ番号4
80,482,193の位置のビットがすべて1の文書
を文字成分表サーチの検索結果とする。こうして文字成
分表サーチで求められた文書について、次にその凝縮本
文をサーチする。 【0027】以下、凝縮本文サーチ及び本文サーチの制
御手順について、図14を用いて説明する。第一の実施
例では、文字成分表サーチの後検索タームが一文字から
なる場合には、文字成分表サーチの結果を検索結果とし
て出力して階層型プリサーチを終了していた。しかし、
この本実施例で用いた文字成分表の文字成分表サーチで
は、検索ノイズの生じる可能性があるために、凝縮本文
サーチまで階層型プリサーチを継続する必要がある。例
えば、ひらがなの‘は’(シフトJISコード(82C
D)H)は、(5−1)式でエントリ番号13である
が、漢字の‘艦’(シフトJISコード(8ACD)
H)も同じエントリ番号13となる。このことは、検索
タームとして“艦”が与えられた場合、“は”を含む文
書もすべて文字成分表サーチの結果として検索されてく
ることになる。したがってさらに、凝縮本文をスキャン
して実際に漢字の“艦”を含む文書を抽出し、これを検
索結果として出力することになる。以上、第五の実施例
について説明した。本実施例ではハッシュ関数を使っ
て、文字成分表の1エントリに複数個の文字を割り当て
ることにより、文字成分表の容量を格段に小さくできる
という効果が得られる。 【0028】次に第六の実施例について説明する。第五
の実施例のように単純にハッシングした場合、ひらがな
のように文書中に出現しやすい文字と、JIS第2水準
の漢字のようにめったに出現しない文字とが同じエント
リ番号となる可能性がでてくる。例えば、ひらがなの
‘は’と、漢字の‘艦’は同じエントリ番号13とな
り、検索タームとして“艦”が与えられた場合‘は’を
含む文書はすべて文字成分表サーチの結果としてヒット
することになる。ひらがなの‘は’は日本語の文書では
非常に使用頻度の高い文字のためほぼ全件の文書が文字
成分表サーチでヒットする。このように文字成分表サー
チでの絞り込みの率が低下すると、凝縮本文もスキャン
する文書量が増えるために全体の検索処理時間が増大す
ることになる。 【0029】このような絞り込み率の低下を防ぐために
は、ハッシュ関数を文字の使用頻度を考慮して定める必
要がある。本実施例で用いる文字成分表を文字種別ハッ
シング型文字成分表と呼ぶ。文字種別ハッシング型文字
成分表を作成するには、例えば図15に示すように、各
文字種毎に文字成分表のエントリ領域を割り当て、その
領域内で文字コードにより折り返すようなハッシュ関数
を作る。このようなハッシュ関数を実現するには、文字
コードによって文字種を判定した後、mod関数で折り
返してもよいし、文字コードとエントリ番号との対応表
により実現することもできる。このハッシュ関数の一例
を図16にPAD図で示す。本実施例では、ひらがな,
カタカナ,英字のエントリ数をそれぞれ20とし、記号
のエントリ数を10、数字のエントリ数を10、JIS
第1水準のエントリ数を370、JIS第2水準のエン
トリ数を61としている。まず、入力された検索ターム
に対して、文字コードにより文字種を判定し、それぞれ
の文字種ごとに文字成分表の割り当てられたエントリの
部分をmod関数を用いて折り返す。 【0030】すなわち、SCODEが(01DF)Hか
ら(0231)Hの範囲にあれば、ひらがな文字列であ
るので、そのSCODEを20でmodをとってこれを
エントリ番号とする。SCODEが(0240)Hから
(0296)Hの範囲にあれば、カタカナ文字列である
ので、そのSCODEを20でmodをとって、これに
カタカナのハッシング領域の先頭である20を足した値
をエントリ番号とする。SCODEが(01A0)Hか
ら(01DA)Hの範囲にあれば、英字文字列であるの
で、そのSCODEを20でmodをとって、これに英
字のハッシング領域の先頭である40を足した値をエン
トリ番号とする。SCODEが(018F)Hから(0
198)Hの範囲にあれば、数字文字列であるので、そ
のSCODEを10でmodをとって、これに数字のハ
ッシング領域の先頭である70を足した値をエントリ番
号とする。SCODEが(065F)Hから(123
2)Hの範囲にあれば、JIS第1水準の漢字文字列で
あるので、そのSCODEを370でmodをとって、
これにJIS第1水準の漢字文字列のハッシング領域の
先頭である80を足した値をエントリ番号とする。SC
ODEが(125F)Hから(1FDE)Hの範囲にあ
れば、JIS第2水準の漢字文字列であるので、そのS
CODEを61でmodをとって、これにJIS第2水
準の漢字文字列のハッシング領域の先頭である450を
足した値をエントリ番号とする。以上のSCODE以外
の場合には、記号その他の文字種による文字列とみな
し、そのSCODEを10でmodをとって、これに記
号のハッシング領域の先頭である60を足した値をエン
トリ番号とする。 【0031】この文字種別ハッシング型文字成分表を用
いた階層型プリサーチの制御手順は、第五の実施例と同
じである。すなわち、第1に検索ターム中の文字を用い
て文字成分表サーチを行い、第2に検索タームを用いて
凝縮本文サーチを行う。文脈条件等が指定されていない
場合には、ここで検索を終了するが、そうでない場合に
は、第3に本文サーチを行い結果を出力する。以上説明
したように、本実施例によれば、使用頻度を考慮して文
字種ごとに文字成分表のエントリ番号を対応させた文字
種別ハッシング型文字成分表を用いることにより、文字
成分表サーチでのノイズを少なくできるため、凝縮本文
における文書のスキャン量が減り、その分高速なフルテ
キストサーチが可能となる。 【0032】次に第七の実施例として、さらに文字成分
表サーチにおける絞り込みの率を向上させ、凝縮本文の
スキャン量を減らすことのできる頻度情報ハッシング型
文字成分表を用いた階層型プリサーチの制御方法を説明
する。頻度情報ハッシング型文字成分表を作成するに
は、データベースに登録してある文書の文字の使用頻度
を調べ、頻度情報によりハッシュ関数を決定する。頻度
の大きい文字については、同一エントリにできるだけ他
の文字が入らないようにし、頻度の少ない文字について
同一エントリに複数個の文字が入るようにハッシュ関数
を調整する。こうすることにより、平均的に安定した絞
り込み率が文字成分表サーチで得られることになる。具
体的には、図17に示すように(4−1)式で得られる
SCODEをもとに一度データベース中で該当する文字
を使用している文書数を調べ頻度順に並べ替える。次
に、頻度の大きいものから文字成分表のエントリ数分N
tだけとる。そしてNt以内の頻度数分布のうち最も上
位の頻度を持つエントリだけを残して、その他のエント
リに順次Nt以上のエントリ番号を割り付けていく。こ
のNt以上のエントリ番号の割付けには(Nt+1)番
目のエントリをNtのエントリとし、(Nt+2)番目
を(Nt−1)番目のエントリとするように、Ntより
順次頻度の大きいエントリを割り付けていく。割り付け
ていく過程では、常に最上位の頻度を持つエントリの上
には、他のエントリを割り付けないようにする。割り付
けたエントリは、図18に示すようにテーブルの形で、
記憶しておきこのテーブルを参照してハッシュ関数を構
成する。すなわち、SCODEが(095F)Hの文字
‘検’は、エントリ番号231であることが分かる。 【0033】階層型プリサーチの制御手順は、第五の実
施例と同じである。すなわち、図14の制御手順をその
まま使用し、第1に検索ターム中の文字を用いて文字成
分表サーチを行い、第2に検索タームを用いて凝縮本文
サーチを行う。文脈条件等が指定されていない場合に
は、ここで検索を終了するが、そうでない場合には、第
3に本文サーチを行い結果を出力する。このように、本
実施例によれば、データベース中で実際に用いられる文
字の頻度分布をもとに文字成分表を作成することによっ
て、文字成分表サーチで常に安定して高い絞り込み率が
得られるため、検索タームに依存せず安定して短時間の
検索処理時間を得ることができる。 【0034】以上、文字成分表の異なる実施例について
五つの実施例を説明した。これより凝縮本文の異なる実
施例についての説明をする。第一の実施例で用いた凝縮
本文は作成の処理が簡単であるが、図4でも分かるよう
に“のための”というような本来検索に使われないよう
な文字列まで凝縮本文に残ることになる。このことは凝
縮本文の圧縮率低下を招く。つまり、検索時にスキャン
する凝縮本文の量が増えるため、検索処理時間が増加し
てしまう。このような、凝縮本文の圧縮率を低下させる
主な要因は、“のための”というような付属語の連なっ
たそれ自体では意味を持たない文字列を凝縮本文に登録
してしまうところにある。 【0035】そこで、第八の実施例として、この検索に
不要な付属語の連なりを除去した凝縮本文を用いる階層
型プリサーチを説明する。この凝縮本文を文字種分割・
重複排除・付属語除去型凝縮本文と呼ぶ。この凝縮本文
の作成方法は図19に示すように、本文のテキスト文字
列から文字種分割して部分文字列に分け、それから重複
語を排除した後、付属語の除去を行う。文字種分割と重
複排除は第一の実施例と変わらない。付属語除去は、重
複排除の済んだひらがな文字列に対して行う。この付属
語除去のための解析は、図20に示すように基本単語辞
書と単語間の接続規則を基に行う。基本単語辞書には、
図21のようにひらがなのみから構成される動詞,指示
代名詞,形容詞,形容動詞,副詞,接続詞,助詞,助動
詞,またこれらの品詞の活用語尾が品詞情報とともに登
録されている。本図の例では、動詞として<ある>,<
なる>,<もつ>等がそれらの活用語尾とともに登録さ
れている。接続規則には基本単語辞書に登録された各語
が他のどの語と接続し得るかを登録する。例えば図22
に示すように、<動詞−もつ連体形>に<名詞−こと>
が接続し、さらに<名詞−こと>には<助詞−が>が接
続し得ることが登録されている。このような基本単語辞
書及び接続規則を用いてひらがなの部分文字列が付属語
から構成されているか否かを判定し、凝縮本文へその文
字列を登録するか否かを決定する。例えば、“のため
の”という部分文字列は<助詞−の><名詞−ため><
助詞−の>というように接続した文字列と解析できるた
め、付属語のみから構成された文字列と判定し排除す
る。一方、“あいまい”という文字列は、付属語と解析
ができないため排除せずにそのまま凝縮本文へ登録す
る。 【0036】このように、付属語を解析してひらがな文
字列を排除し、検索に使われることのない無用の情報を
削除することによって、凝縮本文の圧縮率を高めること
が可能となる。また解析に用いる基本単語辞書と接続規
則は、時代とともに登録語数が増えていく従来のキーワ
ード辞書とは基本的に異り、普遍的なもので一度作成し
てしまえば更新していく必要がないという利点がある。
付属語として解析できるものだけを排除するために、辞
書に存在しないひらがなから構成される新語が現れても
必ず凝縮本文に残るということになる。 【0037】次に、文字種分割・重複排除・付属語除去
型凝縮本文を用いた階層型プリサーチ方式の制御につい
て説明する。文字種分割・重複排除・付属語除去型凝縮
本文では、ひらがな文字列を付属語解析して凝縮本文に
登録しない場合がある。そのため、特定のひらがな文字
列で検索しようとした場合、凝縮本文サーチで検索もれ
となる場合がある。例えば“めまい”という文字列は、
動詞の未然形活用語尾“め”と助動詞“まい”の終止形
が接続したものと解析できる。具体例としては、“認め
まい”があげられる。ところが“めまい”は、名詞とし
て使われている場合でも、付属語除去処理の結果凝縮本
文からは削除されてしまう。したがってこのような場
合、“めまい”で凝縮本文を検索すると検索もれが生じ
る可能性がでてくる。そのため、検索タームが凝縮本文
中にもともとない言葉なのか、あるいは凝縮本文作成過
程で除去された可能性のある言葉なのかをチェックして
から検索する必要が生じる。検索タームが凝縮本文に登
録されるべき語か否かというチェックは、凝縮本文を作
成したときに用いた付属語除去のアルゴリズムをそのま
ま適用する。この例では、“めまい”という検索ターム
が与えられたときは、これが付属語の連なりと判定する
ことができる。 【0038】以上の検索制御の手順を図23で説明す
る。まず文字成分表サーチを行う。結果件数が0件であ
れば、0件を検索結果として出力して検索処理を終了す
る。第一の実施例でも述べたが、ハッシュ関数を用いな
い方式では検索タームが一文字の場合にかぎり、文字成
分表のサーチ結果を最終検索結果として出力できる。す
なわち、第一及び第四の実施例で説明した文字成分表を
用いる場合には、検索タームが一文字であるか否かを調
べ、一文字であれば文字成分表サーチの結果を検索結果
として出力し、処理を終了する。第五、第六、第七の実
施例で述べたハッシュ関数による文字成分表を用いる場
合には、この検索タームが一文字か否かというチェック
は行わず、常に次の凝縮本文サーチを行う。この後、第
一の実施例と同様に、分割検索タームを生成する。 【0039】次に、分割検索タームのそれぞれについて
付属語解析を行う。分割検索タームのうち一つでも付属
語と判定された場合、その分割検索タームは凝縮本文か
ら削除されている可能性があるので、凝縮本文サーチを
行わず、文字成分表サーチの結果に基づいて本文を直接
サーチする。一方、付属語解析の結果、分割検索ターム
が全て付属語でないと判定されたならば、第一の実施例
と同様に凝縮本文サーチを行う。近傍条件あるいは、文
脈条件の指定がない場合、あるいは分割検索タームがも
との検索タームと同じ場合には、この凝縮本文サーチの
結果を最終検索結果として出力し、検索を終了する。も
し、近傍条件ないし文脈条件が指定されている場合、あ
るいは分割検索タームと元の検索タームが異なる場合に
は、次に本文サーチを実行し、その結果を最終的な検索
結果出力とする。このように、本実施例によれば、ひら
がな文字列を解析し、不要な付属語の連なりを凝縮本文
から除去した文字種分割・重複排除・付属語除去型凝縮
本文を用いることにより、凝縮本文の圧縮率を向上さ
せ、検索処理時間を短縮することができる。 【0040】次に、第九の実施例として、ひらがな文字
列を全て排除した、文字種分割・重複排除・ひらがな文
字列除去型凝縮本文を用いる階層型プリサーチを説明す
る。第八の実施例で説明した凝縮本文は、確かに圧縮率
が上がるものの付属語解析の際に誤った解析をする可能
性がある。例えば第八の実施例でも用いた“めまい”と
いう文字列の例の外にも、付属語解析だけでは本質的に
どれが付属語か正しく判定できない場合がまれにある。
例えば、“動作してこの応用で...”という文書の中
の“してこの”という部分文字列は、“〜して、この
〜”という意味で用いられているのか、“〜し、てこの
〜”のように機械のてこを意味しているのかが判定する
のが難しい。後者の意味で用いられている場合には、
“てこ”という検索タームを指定した際に、“てこ”は
付属語と判定されないため、凝縮本文をサーチしにいく
ことになる。一方、凝縮本文作成では、“してこの”が
付属語と解析され凝縮本文から削除されているため凝縮
本文サーチで検索もれとなってしまう。この付属語解析
の不完全さを補正するために、ひらがな文字列か否かと
いう単純な判定方法で階層型プリサーチを実現するの
が、本第九の実施例である。この凝縮本文の作成方法
を、図24に示す。本方法では文字種分割の後、ひらが
なを除去して重複登録排除を行う。 【0041】この文字種分割・重複排除・ひらがな文字
列除去型凝縮本文を用いた階層型プリサーチの制御手順
について図25を用いて説明する。まず第八の実施例と
同様に文字成分表サーチを行う。この後、分割検索ター
ムを生成する。次に、分割検索タームのそれぞれについ
てひらがな文字列か否かチェックを行う。分割検索ター
ムのうち一つでもひらがな文字列がある場合、凝縮本文
サーチを行わず、文字成分表サーチの結果に基づいて本
文を直接サーチする。一方、分割検索ターム中にひらが
な文字列がない場合、第一の実施例と同様に凝縮本文サ
ーチを行い、近傍、文脈条件の指定がある場合、あるい
は分割検索タームが元の検索タームと異なる場合には、
本文サーチまで検索処理を続行する。このように、本実
施例によれば、ひらがな文字列を全て排除した凝縮本文
を用いることによって、ひらがな文字列についても検索
もれのない正確なフルテキストサーチが実現できる。 【0042】次に、本発明の第十の実施例について、説
明する。上記第九の実施例では、ひらがなの検索ターム
が与えられた場合、本文を直接参照する必要がある。し
たがって検索時間がより多く掛かることになる。そこ
で、ひらがなの検索タームが与えられた場合でも高速に
フルテキストサーチできる方法として、第十の実施例の
説明をする。本実施例では、第九の実施例で用いた凝縮
本文の外に第九の実施例では除去したひらがな文字列を
登録した凝縮本文を別に作成する。図26に示すよう
に、文字種分割、重複登録排除の後、残った部分文字列
がひらがな文字列か否かを判定し、ひらがな文字列以外
を凝縮本文Aとして登録し、ひらがな文字列を凝縮本文
Bとして登録する。こうすれば、ひらがなだけの検索タ
ームが与えられた際、凝縮本文Bを探索することができ
るようになるため、検索時間を短縮することが可能とな
る。実際の階層型プリサーチの検索制御の手順を図27
に示す。まず第八の実施例と同様に文字成分表サーチを
行う。もし、検索結果が0件なら、ここで検索を終了す
る。この後、分割検索タームを生成する。次に、分割検
索タームをひらがな文字列のタームとそれ以外の文字列
からなるタームに分類する。その後、ひらがな以外の文
字列からなる分割検索タームがある場合には、凝縮Aを
サーチする。次にひらがなの分割検索タームがある場合
には、凝縮Bをサーチする。その後は、第一の実施例と
同様に、近傍、文脈条件の指定がある場合、あるいは分
割検索タームがもとの検索タームと異なる場合には、本
文サーチまで検索処理を続行する。このように、ひらが
なのみの凝縮本文と、ひらがな以外の凝縮本文と分けて
格納することにより、どんな文字種の検索タームが入力
されても、凝縮本文を有効に活用でき、常に高速なフル
テキストサーチが実現できる。 【0043】次に、第十一の実施例について説明する。
本実施例は、凝縮本文の圧縮率を上げるために、文字種
毎に独立した凝縮本文を用いる方法に基づいたものであ
る。本実施例で用いる凝縮本文を文字種分割・重複排除
・文字種別登録型凝縮本文と呼ぶ。この文字種分割・重
複排除・文字種別登録型凝縮本文を作成するには、図2
8に示すように、文字種分割、重複登録排除を行った
後、残った部分文字列の文字種を判定してひらがな凝縮
本文H、カタカナ凝縮本文I、漢字凝縮本文J、英字凝
縮本文K、数字凝縮本文L、記号その他の文字種凝縮本
文Mに分類して登録する。こうすることにより、例えば
漢字の検索タームで検索する場合には、漢字文字種の凝
縮本文Jのみをサーチすればよいことになるため、検索
時間をさらに短縮することができる。具体的な階層型プ
リサーチの制御手順を図29を用いて説明する。まず、
第八の実施例と同様に文字成分表サーチを行う。検索結
果件数が0件なら、ここで検索を終了する。この後、分
割検索タームを生成する。次に、分割検索タームを文字
種毎に分類する。その後、ひらがなの分割検索タームが
ある場合には凝縮Hを、カタカナの分割検索タームがあ
る場合には凝縮Iを、というように分解検索タームの文
字種にしたがってサーチする凝縮本文を選択する。その
後は、第一の実施例と同様に、近傍、文脈条件の指定が
ある場合、あるいは分割検索タームがもとの検索ターム
と異なる場合には、本文サーチまで検索処理を続行す
る。このように、文字種ごとに凝縮本文ファイルを分離
し個々の凝縮本文の容量を小さくすることにより、漢字
のみ、カタカナのみ、あるいはひらがなのみ、といった
単一文字種の検索タームでのフルテキストサーチが高速
に行えるという効果が得られる。 【0044】次に第十二の実施例について、図30およ
び図31を用いて説明する。本実施例は、特願平02−
193015で提案した文書検索装置を用い、本発明を
実現したものである。本装置の主な構成は、キーボート
3001、検索式解析プログラム3002、ビットサー
チプロセッサ3007a、ストリングサーチエンジン3
006、複合条件判定用マイクロプロセッサ3045
a、検索結果格納メモリ3046、ディスプレイ302
0、半導体メモリ装置3010a、RAMディスク装置
3010b、集合型磁気ディスク3010c、及び検索
実行制御プログラム3008よりなる。半導体メモリ装
置3010aには文字成分表が、RAMディスク装置3
010bには凝縮本文、集合型磁気ディスク装置301
0cには本文がそれぞれ格納されている。但し、文字成
分表及び凝縮本文は、集合型磁気ディスク3010cに
格納されていて、本装置の運用開始時点でそれぞれ半導
体メモリ装置3010a及びRAMディスク装置301
0bへローディングされる。 【0045】階層プリサーチ制御の手順は、いままで実
施例で説明してきたものと変わらない。いままでの実施
例との相違点は、文字成分表を半導体メモリ、凝縮本文
をRAMディスク、本文を集合型磁気ディスクに格納し
たところと、文字成分表サーチ専用のマイクロプロセッ
サ、凝縮本文サーチ及び本文サーチ専用のストリングサ
ーチエンジンを用いていることである。検索処理の手順
を以下に説明する。 【0046】キーボード3001から入力した検索条件
式はサーチマシン制御用マイクロプロセッサMPU03
050上の検索式解析プログラム3002により解析さ
れる。すなわち、検索式解析プログラム3002では検
索条件式を構成するキーワード部分とそれらの包含条件
及び配置条件を記述した複号条件記述部に分離する。包
含条件は論理条件として記述され、配置条件は近傍条件
や文脈条件として記述されたものである。分離抽出後、
キーワード部分は同じくMPU03050上の同義語展
開プログラム3003に渡され、複号条件記述部は複号
条件解析プログラム3041に渡される。同義語展開プ
ログラム3003では、ここに内蔵された同義語辞書を
参照して、入力されたキーワードの同義語が求められ
る。そして、ここで同義語展開されたキーワード群は異
表記展開プログラム3004へ渡される。本図の例の場
合、“計算機”から、“電算機”、“コンピュータ”、
“COMPUTER”などが生成される。異表記展開プ
ログラム3004では、ここに入力されてきたキーワー
ド群に対して異表記展開処理が施される。本図の例の場
合、“コンピュータ”から“コンピューター”が、“C
OMPUTER”から“Computer”などが生成
される。こうして同義語及び異表記展開されたキーワー
ド群は、次にオートマトン生成用マイクロプロセッサM
PU13005a上のオートマトン生成用プログラム3
005に送られる。オートマトン生成用プログラム30
05では、異表記展開プログラム3004から送られて
きたキーワード群に対して、これらを一括照合するオー
トマトンを生成し、状態遷移テーブルと照合すべきキー
ワードの識別コード情報として、サーチエンジン300
6に設定する。サーチエンジン3006は有限オートマ
トン方式に基づく高速多重文字照合回路である。また、
異表記展開プログラム3004で異表記展開されたキー
ワード群は、該当キーワードと共に、ビットサーチ用マ
イクロプロセッサMPU33007a上のビットサーチ
プログラム3007へ渡される。 【0047】一方、近傍条件、文脈条件や、AND、O
R等の論理条件は検索式解析プログラム3002から、
複合条件解析プログラム3041、近傍条件解析プログ
ラム3042、文脈条件解析プログラム3043、論理
条件解析プログラム3044を経て複合条件判定プログ
ラム3045へと送られる。必要な検索情報がビットサ
ーチプログラム3007、ストリングサーチエンジン3
006、複合条件判定プログラム3045へ送られた
後、検索制御実行プログラム3008は、まずビットサ
ーチプログラム3007に起動を掛ける。ビットサーチ
プログラム3007は、半導体メモリ装置3010aに
格納してある文字成分表を読み出し、文字成分表サーチ
を行う。文字成分表サーチの結果は、検索結果格納メモ
リ3046へ格納する。 【0048】文字成分表サーチが終った後、検索実行制
御プログラム3008は、検索結果格納メモリ3046
を参照し、検索結果が0件であれば、0件を検索結果と
して出力し検索処理を中断する。検索結果が0件でなけ
れば、ストリングサーチエンジン3006へ起動をかけ
ると同時に検索結果格納メモリ3046に格納されてい
る文字成分表サーチの結果でヒットした文書の凝縮本文
をRAMディスク装置2910bから読み出し、ストリ
ングサーチエンジン3006へ送り、凝縮本文サーチを
実行させる。この結果件数が0件であるか否かの条件判
定は検索実行制御プログラム3008で行う。ストリン
グサーチエンジン3006では、RAMディスク装置3
010bより読み出された、凝縮本文を分割検索ターム
でサーチする。照合結果は複合条件判定プログラム30
45に順次送られる。複合条件判定プログラム3045
では、検索ターム間に付与された論理条件を判定し、条
件に適合する文書の文書番号を検索結果格納メモリ30
46へ順次格納する。 【0049】凝縮本文サーチが終了した後、検索実行制
御プログラム3008は、もう一度検索結果格納メモリ
3046を参照し、結果件数が0件であれば、0件を検
索結果として出力し、検索を終了する。0件でない場合
で、近傍、文脈条件が設定されているか、もしくは分割
検索タームが検索タームと異なっている場合にかぎり検
索結果格納メモリから、検索結果文書番号を読み取り、
これに対応する本文を集合型磁気ディスク装置3010
cから読み出し、ストリングサーチエンジン3006へ
送り、今度は本文サーチを実行させる。近傍、文脈条件
が設定されてなく、かつ分割検索タームが検索タームと
等しい場合には、検索結果格納メモリに格納されている
検索結果件数を出力し、検索を終了する。 【0050】ストリングサーチエンジン3006では、
集合型磁気ディスク装置3010cから読み出された本
文をスキャンして本文サーチを行う。結果は複合条件判
定プログラム3045に順次送られる。複合条件判定プ
ログラム3045では、検索ターム間に付与された論理
条件のほか近傍、文脈条件を判定し、条件に適合する文
書の文書番号を順次検索結果格納メモリ3046へ格納
する。本文サーチまで実行した場合は、本文サーチの終
了後、検索実行制御プログラム3008は、検索結果格
納メモリ3046を参照し検索結果件数を出力して検索
を終了する。このように、容量の大きな本文データを磁
気ディスクに、容量の小さな文字成分表や凝縮本文を、
半導体メモリやRAMディスクに格納することにより、
大規模なデータベースに対しても高速なフルテキストサ
ーチを実現することが可能となる。 【0051】次に凝縮本文を磁気ディスクに格納した第
十三の実施例について説明する。凝縮本文を磁気ディス
クに格納する場合、階層型プリサーチの制御の手順を最
適化することによって、同一の構成を用いた通常の階層
型プリサーチを実行するよりも高速に処理することがで
きる。以下、この制御の手順について説明する。磁気デ
ィスクは通常、機械的に動く磁気ヘッドを持っている。
このため、ディスク上の情報を飛び飛びに読み出す(ス
キップアクセスと呼ぶ)よりも、まとまった情報を一括
して読み出す(シーケンシャルアクセスと呼ぶ)方が速
いという特徴がある。いま、スキップアクセスの読み出
し速度をVskip MB/s、シーケンシャルアクセ
スの読み出し速度をVseq MB/sとすると、デー
タベース全件の文書数をNa件、文字成分表サーチの結
果件数をNc件とし、文書の容量が均一であるとした場
合、 Nc > (Vskip/Vseq)・Na ……(12−1)式 のとき、シーケンシャルアクセスにより凝縮本文を全件
サーチした方が、文字成分表サーチの結果に基づいてス
キップアクセスするよりも処理時間が短くなる。したが
って、図32に示すように文字成分表サーチの後、階層
プリサーチ制御プログラムにおいて結果件数を判定し、
(12−1)式を満たすヒット件数に達した場合には、
文字成分表サーチの結果を無視して、凝縮本文をデータ
ベース全件分サーチする。以上の方法を用いると、磁気
ディスクに凝縮本文を格納するために、大容量のRAM
ディスクを使用しなくともすみ、比較的高速なフルテキ
ストサーチを低価格の文書検索装置で実現できることに
なる。 【0052】次に凝縮本文を磁気ディスクに格納した第
十四の実施例について説明する。近傍、文脈条件が指定
されている場合には、文字成分表サーチ結果が非常に少
ない場合、凝縮本文サーチを行わずに、文字成分表サー
チ結果をもとに本文を直接サーチするほうが検索時間が
短くなる。今、凝縮本文のサーチ速度を Vsr MB/
s、本文のサーチ速度を VtxMB/s とし、文字成
分表の結果件数を Nc、凝縮本文の結果件数を Ns
r、凝縮本文の1件当たりのデータ容量を Qsr、本
文の1件当たりのデータ容量を Qtx とすると、 NcQsr/Vsr+NsrQtx/Vtx > NcQtx/Vtx …………(13−1)式 のとき、凝縮本文サーチをせずに、本文サーチを直接行
ったほうが検索時間が短くなる。Nsr は凝縮本文を
実際にサーチするまでわからないが、あらかじめ定数を
設定して凝縮本文サーチを行うか否か決定することにな
る。たとえば、データベース全体の文書数を Na とし
て Nsr=αNa (0<α<1) …………(13−2)式 として、(13−1)式を変形すると、 Nc < αNa(Qtx/Vtx)/(Qtx/Vtx−Qsr/Vsr) …………(13−3)式 のとき、本文サーチを直接行うことにする。αをしきい
値として検索前にあらかじめ値を設定しておき、文字成
分表サーチの後(13−3)式により凝縮本文サーチを
行うか否か決定する。この制御を行うことにより、近
傍、文脈条件の指定の下で高速なフルテキストサーチを
実現することができる。以上、第十二の実施例の廉価版
のシステム構成でフルテキストサーチを実現する第十
三、第十四の実施例について説明した。 【0053】このほかにも、凝縮本文をまったく使用せ
ず凝縮本文サーチのステップを省いて、文字成分表サー
チから直接本文サーチを実行する制御方法によっても階
層型プリサーチを実現することができる。この方法によ
れば、本文をスキャンする量が増えるため検索時間は多
少掛かるが、高価なRAMディスクを使用しなくとも済
み、また凝縮本文を格納する磁気ディスク容量が不要と
なるため、さらに低価格の文書検索装置を実現できるこ
とになる。また、文字成分表を使用せずに直接RAMデ
ィスクあるいは磁気ディスク上の凝縮本文を全件サーチ
し、近傍、文脈条件などの検索ターム間の位置関係の検
索条件指定があるときにのみ本文サーチする制御方法に
よっても階層型プリサーチを実現することができる。こ
の方法によれば、凝縮本文の探索量が増えるため検索時
間は多少掛かるが、文字成分表を格納する半導体メモリ
が不要となるため、その分低価格の文書検索装置を実現
できることになる。 【0054】あるいは、今までの実施例で用いていたビ
ットリスト形式の文字成分表を図33に示すように、文
書中に現れる文字を書き列ねた形式、すなわち1文字を
1ビットとして表すのではなく、そのまま文字コード自
体として格納した文字成分表を使用することもできる。
あるいはこの時に、第五の実施例、第六の実施例、及び
第七の実施例で説明したハッシュ関数を用いて一つの文
字エントリに複数個の文字を対応させ文字成分表の容量
を削減することもできる。このように文字コードを格納
した文字成分表を用いた文字成分表サーチは、凝縮本文
や本文サーチと同様に、一文字ずつファイルからデータ
を読み出し該当する文字が存在するか否か判定すること
で実現できる。このように、本文中で用いられている文
字のみを集めた文字成分表を用いることにより、データ
構造を簡素化でき、かつビット演算をせずに凝縮本文、
本文サーチと同じスキャン型のサーチを用いることがで
きるため、検索処理方法が簡素化できるという効果が得
られる。 【0055】さらに、文字成分表も磁気ディスクに格納
した構成でも、階層型プリサーチを実現することができ
る。この磁気ディスクに文字成分表を格納した場合に
は、文字成分表サーチにおいて検索ターム中で用いられ
ている文字のビットリストを磁気ディスクから順次読み
出しながらビット演算処理を行っていく。もしくは、上
記の文字コードをそのまま文字成分表とした場合には、
文字成分表を順次読み出しながら該当する文字を全て含
む文書を選びだす。この文字成分表を磁気ディスクに格
納する方法によれば、半導体メモリを使わずに済むため
に、さらに低価格の文書検索装置を実現することが可能
となる。 【0056】 【発明の効果】本発明によれば、文字成分表及び凝縮本
文を用いて、階層的に文字レベル及び単語レベルで入力
された検索タームに関連しない文書をふるい落すことに
より、無用の本文サーチを省くことができるため、等価
的に高速なフルテキストサーチの実現手段となり、大規
模な文書データベースでも実用的な応答速度で、フルテ
キストサーチすることが可能となる。
Description: BACKGROUND OF THE INVENTION [0001] The present invention relates to a document database.
To search for the full text of the document by specifying a character string.
Text search method, especially for searching
Equivalently speed up full-text search processing using files
The present invention relates to a search method and an apparatus for searching. [0002] In a conventional document search system, registration is performed.
Index words (referred to as keywords) that represent the contents of the document
Is adopted. However, in this method
Indexers, called indexers, write documents
Read each word, understand the content, and assign appropriate keywords
Needed. Avoid the troublesome work of registering
For example, the text such as “Japanese Patent Laid-Open No. 63-198124”
Index words that appear in all words as keywords
A method of registering in a file has also been proposed. But above
Method is significant when creating an index file
Difficult to determine the smallest unit word, there is a word dictionary
Otherwise, the parsing of the sentence failed due to incomplete grammar rules.
Important words are not extracted as keywords
There's a problem. [0003] In order to solve this problem, documents are searched at the time of retrieval.
Register it directly in the computer as character-coded text,
When searching, the contents of all documents in the text database
And read the given keyword (conventional system
In order to distinguish from control keywords, search terms
Full text search to find documents containing
Is being planned. This full-text search method uses the information
Processing Society of Japan vol. 89, no. 66 Informatics
Basic 14-7 Text Database Management System SI
GMA and its Applications (July 27, 1989) "
As mentioned in the head, the entire text file
A major feature is that scanning is performed one character at a time from the beginning. This
By doing so, the document identifier etc. corresponding to the keyword
Even if there is no index file that describes
Database text as a clue
It becomes possible. That is, the text in a given search term
Searches the entire data string for a search term
Only those documents that exist can be output as search results.
However, this full-text search method does not
To scan the entire file one character at a time from the beginning.
It takes time and cannot be applied to large databases
There was a problem. As seen in Section 2 of the same document
Even if you have a general-purpose large computer, it is about 2MB / s
Only the search processing speed can be realized. Even at this speed,
Search time is practical for a gigabyte database
Enter the area. However, databases on a practical scale such as offices
Source requires hundreds of megabytes of storage,
Will not get a sufficient search response. [0004] To solve the present invention
The challenge is to target a practical-scale text database.
Search with sufficient search time that is practically acceptable
Fast full search for the full text of the resulting document
A text search method and apparatus are provided. [0005] In order to solve the above problems,
Has a full-text server consisting of the following processing steps:
An apparatus for implementing the method is constructed using the approach method. (1) Step of storing the text itself (2) Decomposition of the stored text into partial character strings at word level
And the mutual inclusion of the character strings between
Checks and excludes strings included in other substrings
Step of creating a condensed text composed of a set of character strings (3) A sentence in which characters used in the text are collected without duplication
(4) Decomposing the given search term at the character level,
Extract only documents that contain all the characters that make up the search terms
(5) Condensed text corresponding to the document extracted from the character component table
And extract documents that contain a given search term
Condensed text search step (6) If the given search condition expression is a book between multiple search terms
If you specify the positional relationship in the sentence,
Refer to the text data corresponding to the extracted document, and
Search terms that have been added and between search terms
Only those that satisfy the search conditions such as the specified positional relationship
Steps for text search. Hereinafter, a first embodiment of the present invention will be described.
This will be described with reference to FIG. This device has a display 1
00, keyboard 101, central control unit CPU102,
Character component table 105, condensed text 104, and text 103
Delivery file 110, floppy disk driver 10
6. It is composed of the main memory 200. The main memory 200 has a text registration program
201, condensed text creation registration program 202, character component
Table creation registration program 203, character component table search program
Ram 204, condensed text search program 205, text
Program 206, hierarchical pre-search control program
While the data area 207 is stored.
Is secured. These programs are executed by the CPU 102.
Be executed. When registering a document, use the keyboard 101
The CPU 102 causes the floppy disk
Is the floppy disk inserted into the disk driver 106
Read the document data and execute the body registration program 201
Document data that has been read
File 110. Next, the CPU 102
Executing the registration program 202, the text 103
Split into substrings at the level, and between the divided substrings
Examine the containment relationship between strings and include them in other substrings
Condensed book consisting of a set of substrings excluding the string
A sentence is created, and this is used as the condensed text 104 in the file 11
Store to 0. Finally, the CPU 102 creates a character component table.
Execute the registration program 203 and use it in the text 103
Create a character composition table that collects the characters that are not duplicated,
This is stored in the file 110 as the character component table 105.
You. When searching, input from the keyboard 101
The retrieved search condition expression is sent to the CPU 102. CPU
At 102, the hierarchical search control program 207 is executed first.
And a character component table search program 2 based on the control.
04, Condensed text search program 205, Text search program
The program 206 is sequentially executed. That is, the character component table
In the search, the search terms in the entered search condition
Decompose at the character level and remove all characters that make up the search term
Extract only the containing documents. And extracted in the character component table
Given condensed text corresponding to the given document and given search
Extract documents containing terms. If the given search terms
A single search term or multiple search terms in the expression
Only the logical relationship between the programs is specified.
If the positional relationship is not specified, search here.
The search is terminated and the results of the condensed text search are output as search results.
Power. Otherwise, ie given search condition
Specify the positional relationship in the text between multiple search terms in the expression
Documents that have been extracted by the condensed text search
Refers to the text data corresponding to, given search terms
And the positional relationship between search terms, etc.
Only those that satisfy the search conditions of
Output. The above is the full text of the first embodiment of the present invention.
3 is a schematic diagram of a search device. Hereinafter, a character component table server which is a feature of the present invention will be described.
H, search for condensed text, and search and narrow text
Outline of registration and search method of hierarchical pre-search method
The abbreviation will be described. First of all, the "condensed text" and "character composition table"
This is done automatically when the document is registered. This processing content,
As shown in FIG. In this figure, when the document to be registered is entered,
First, it is stored as "text" as it is. Next, this "book
Create a "condensed text" from the sentence. "Condensed text"
Character types (Kanji, Hiragana, Katakana,
Character string) and split the string
Created without duplicates. If the text is "Fuzzy search
In the case of Document 1, "Search technology for ...
"Search" is truncated as a duplicate word and "Fuzzy"
“Search technology” and “for” remain as “condensed text”
Will be. In addition, a "character composition table" is created from "text".
To achieve. Here, 1-bit characters appearing in the "body"
Of information. In the example of Document 1, there are "A" and "I"
'1' for each, and '0' because there is no 'U'
Set. “Inspection” and “Cable” are similarly set to '1' respectively.
Set. In the same manner, the corresponding character part of the character component table
If there is the character in the "body", "1"
If not, set '0'. In this way, the statement
"Condensed text" and "character composition table" automatically when registering
Create and prepare for hierarchical presearch. At the time of retrieval, as shown in FIG.
Refer to these auxiliary files in the following order. First,
In the character component table search, the character component table is referred to and searched.
Corresponding character in the character composition table corresponding to all characters in the term
Select the one with '1' set in the part. Second
In the condensed text search, the sentence selected in the character component table
Search term given to the conditional expression by referring to the condensed text of the book
Select documents containing. Finally, in the text search, the search
Only those that appear in the body of the
Choose out. In the example of this figure, search [4C] understanding, that is,
"" Search "and" Understanding "are within 4 characters
Example of searching with the conditional expression "Search for what appears"
I have. As a result, "Search" and "Understanding" of Document 4 are in the text
Extracts documents that are four characters apart. Hereinafter, character type division / duplication used in this embodiment will be described.
Creation of word exclusion type condensed text and character code dependent type character component table
Method and hierarchical presearch control method using the same
Will be specifically described. First used in this example
On how to create condensed text
Will be explained. As shown in FIG.
Split a character string by character type. The character type at this time is
Kanji, Hiragana, Katakana, English letters, numbers, symbols, etc.
is there. For each character string consisting of a sequence of these single character types,
Split the body text string. Next, that of the split string
For each, the substring in the same document
If a substring is included in its entirety, the string
Is excluded from the target of the condensed text as a duplicate character string. example
For example, if the substring "search"
Is completely included in the substring "intelligent search technology"
Therefore, this “search” is not registered in the condensed text. Only
Then, in the condensed text search, even if the character string "search"
Is "intelligent search technology" even if it is not registered in the condensed text
Will be hit as a substring. like this
In the sub-string obtained by eliminating duplicate registration of sub-strings
As shown in FIG. 5, a character string is separated between character strings for each document.
Insert a translator. In this figure,
The numbers ',' are used. This separator is shown in FIGS.
Is represented by the symbol '|'.
It does not need to be represented as a letter and is not assigned to a letter.
You can also use special codes. Next, the character code dependent type sentence used in this embodiment
A method of creating a character component table will be described. As shown in FIG.
The character code dependent character component table is
Bit position to set 1 as bit information indicating presence
Is a character component table for determining. In this figure, the shift JIS
This is explained using the mode as an example. In the figure, (XXXX) H is a character
The code is displayed in hexadecimal. For example, "search"
Indicates that the character string exists in the body of document 1.
In the bit list of document 1, (8C9F) H, (8DF
5) Set 1 to H-th. This character in the bitlist
The bit position corresponding to is called the entry number of the character component table.
I will do it. For example, the entry number of “check” is (8C9
F) 35999 if H or decimal is displayed. Hierarchy using the above character component table and condensed text
The control and search operation of the pattern pre-search will be described.
First, the search terms in the search condition expression should be
Decompose and perform a character component table search. Given here
Bit list corresponding to the character code that constitutes the search term
List in which all entry number positions in the list are 1
You will need a document with For example, "search"
Is given as a search term,
(8C9F) of the bit list corresponding to 'Detect' and 'Search'
H, (8DF5) Document where the H-th bit is all 1s
1, 2, 3, 4,. . . The character component table search results
And That is, the “test” is indicated as shown in FIG.
C9F) A bit list 701 of H entry numbers,
Bit search of the entry number of (8DF5) H that indicates 'search'
Performs an AND operation for each bit with the
The AND operation result 703 is obtained. This bit AND operation
Bit that is 1 in the bit list of result 703
The document number corresponding to the position is the search result of the character component table search
As a hit document. That is,
Documents containing all of the search and search will be extracted.
You. Also, the search term is only one character like “lake”
If it is composed of
Is output to terminate the search. Next, of the document extracted by the character component table search,
Search for the condensed text. Here, as shown in FIG.
Scan the contents of the condensed text registered for each document
Extract documents that contain the obtained search terms as words.
In other words, the two characters “search” and “search” are consecutive with “search”
Extract only those documents that appear. In other words, 'test' and 'chord'
Even if is included, like "detection" and "search",
Anything that appears as another word is truncated here
I will. For this purpose, it is narrowed down by the character component table search.
Same as text data for condensed text for each document
Search while scanning one character at a time. this
At the time, it corresponds to the document number of the result obtained by the character component table search
Only scan the condensed text. For example, a character composition table
If the search results are document numbers 1, 2, 3, 4,. . . That
For example, in the condensed text search, document numbers 1, 2, 3,
4,. . . Scan the condensed text of. And actually
Documents whose search terms exist in the condensed text
Output as search results. As described above, in the "hierarchical pre-search method",
Is a two-stage pre-
Perform a search in advance to find the "character level" and "word
Text search that takes the longest time
Narrow down the number of documents targeted for
As a result, the search document size can be reduced.
And a very fast full-text search is equivalently realized.
Will be able to. That is, in the character component table search, the sentence
The character component table indicates the presence of a character with 1-bit information.
Therefore, the amount of data to be searched can be extremely small.
As a result, search time can be reduced in a short time.
You. In addition, a bitlist for each character that makes up the keyword
By taking the logical conjunction of
Documents are greatly truncated, and subsequent documents are markedly narrowed down.
Can be included. In the condensed text search,
Search because the amount of data is smaller than scanning the sentence directly
Processing time can be reduced. Next, a second embodiment of the present invention will be described.
In this embodiment, even when a plurality of search terms are specified,
Full-text for efficient hierarchical pre-search
It provides a strike search method. For example, ""
When the conditional expression "search" AND "understand" is given
First searches the character component table as the first step
You. Here all the sentences for each given search term
Search for documents containing characters, then given between search terms
Output a document that satisfies the conditions. "" Search "AND
In the case of the conditional expression "understand", two characters "search"
And a document that includes the two characters “understanding”. sand
In other words, "('test' AND 'search') AND ('rea' AND
“Solution”) ”
AND 'solution', that is, a document containing the above four characters simultaneously
Search for. Next, narrow down the result of this character component table search
Search the condensed text of the placed document. Here,
Extract only documents where the specified keyword appears as a word
You. That is, a sentence that includes both “search” and “understanding” at the same time
Search for books. As in this example, the relationship between search terms
If only the logical conditions such as "AND" and "OR"
Specified the condition that defines the positional relationship between keywords.
If not, end the search here, and search for condensed text
Is output as the final search result. If the location condition
If is specified, extracted by condensed text search
Search the text of the document and extract those that match the specified conditions.
And outputs this as the final search condition. That's the truth
5 is a description of a search operation in the embodiment. Thus, the character
Conjunction between search terms in component table search and condensed text search
To search for multiple search terms.
Even when the hierarchical pre-search is performed efficiently,
A text search can be realized. A third embodiment will now be described.
The search control of hierarchical pre-search is explained in detail.
You. FIG. 8 shows the procedure for controlling the hierarchical presearch at this time.
This will be described with reference to a PAD diagram. Here, “computer” and “intelligent
Find Documents Containing Either of the Interfaces "
The search for “computer” or “intelligent interface”
This will be described using a cable type as an example. First, step 80
At 00, a character component table search is performed. Here the given inspection
For each search term, search for a document that contains all its characters,
Sentence that satisfies the compound condition given between post-search terms
Output the certificate. In this example, as shown in FIG.
Character components for each of the three characters that make up the machine
Performs a bit AND operation between the corresponding entry numbers in the table.
Next, 9 items that make up the “intelligent interface” in the same way
Corresponding entry in the character composition table for each of the characters
Performs a bit AND operation between the serial numbers, and creates
AND operation result for "computer"
The bit string is ORed. That is, "('Total'
AND 'calculation' AND 'machine') OR ('knowledge'AND'like')
AND'i'AND'n'AND'ta'AND'h'A
ND'e'AND '-'AND's')"
Will be executed. This constitutes a "computer"
Or a document that contains all three characters
Document that contains all nine characters that make up the
Is extracted. No result in the character component table search
Then, as shown in FIG.
Output the result and end the search. Also, like 'lake'
If the search term consists of just one character,
To output the result of the character component table search and terminate the search. If the search term is composed of a plurality of characters,
And the number of results of the character component table search must be 0
Then, a condensed text search is performed next. Registered in the condensation text
The content is a character string divided for each character type.
For example, characters such as "intelligent interface"
If the species is different, the condensed text is decomposed into substrings,
Separators are inserted at the division points, such as
You. Therefore, different “intelligent interfaces”
For search terms composed of different character types,
Does not find a matching character string when searching for condensed text
Will be. Therefore, before entering the condensed text search,
Search terms and search terms composed of different character types
System divides this for each character type. In this way,
The search term that has been split
This is called a split search term to distinguish it from the term. And condensed text
The search is performed, for example, on “computer”, “intelligent”, “interface”.
Search terms, such as “
For split search terms, between terms that have the same split source
To perform a search under AND conditions. For example, "Computer" OR
In the case of the conditional expression “Intelligent Interface”, the condensed book
In the sentence search, "" computer "OR (" intelligent "AND" in "
Interface)), that is, "intelligent" and "interface"
Source is in the same document, or
Search for existing documents "as a conditional expression.
And If the result of the condensed text search is 0,
Here, a search result of 0 is output and the search is terminated. Ma
If there is a neighborhood condition or context condition specified, or
Is a searcher that is divided like an "intelligent interface"
Search terms and split search terms are different.
Text search is performed only when it becomes necessary. If not, this
This ends hierarchical pre-search and searches the results of condensed text.
Output as result. Here, the context condition is, for example,
Like "computer" [S] "intelligent interface"
In the conditional expression shown, this is “computer” and “intelligent
Search for a face that is in the same sentence
"Means". Or the neighborhood condition
For example, “Computer” [10C] “Intelligent Interface
This is described as ""
Machine and intelligent interface are within 10 characters
Find the document that appears. " That is, the sentence
Search terms that appear in the document for both pulse and neighborhood conditions
This is a search condition that specifies the placement relationship. [0021] The order of search terms appearing in such texts
If a search condition that specifies the placement relationship is given, or
In the condensed text, the character type
If a changing search term is given,
Refer to the text data corresponding to the result of the
Search for only those terms that appear in the text exactly as they appear
The result is output, and the search ends. This
If the search terms consist of different character types,
Or the occurrence position in the text between search terms
Even when there is a condition specification, the hierarchical
A high-speed full-text search
Can be. Next, a fourth embodiment of the present invention will be described.
I do. This embodiment is based on the character component table in the first embodiment.
The capacity has been reduced to make it more compact. First fruit
The character code-dependent character component table used in the examples is simple to process.
Simple, but a bit list per document in the character composition table
, There is a problem that the character component table becomes large.
Also, although the corresponding character code does not exist, the entry number
There is a problem that there are many useless parts because
You. For example, in the case of shift JIS, from (0000) H
During (8140) H and from (A000) H to (E04
0) During H, that is, from 0th to 33087th and 4
For entry numbers from 0960th to 57408th
Has no corresponding character code. Nevertheless, the sentence
This part is used to determine the entry number by
It is necessary to have all minutes as table entries. This
Statement to eliminate useless parts in the
Convert character code and set bit positions from zero
Create a character composition table for use. This character code
The details of the embodiment using the character conversion table of the character conversion type are as follows.
explain. To create a character code conversion type character component table
The following formula is given as an example of the conversion formula to the character code. Ma
The corresponding PAD diagram is shown in FIG. if SJIS <(A000) H then SCODE = SJIS− (8040) Helse SCODE = SJIS− (C040) H SCODE = SCODE− (SCODE / 256) × 64 (64-1) Formula (4-1) However, the part of the small value of the normal character code is the control code
In this formula, (8140)
Leave some margin as (8040) H instead of H
ing. In addition, the small calculation result of (SCODE / 256)
Truncate below a few points, multiply the result of truncation by 64
Do. ) In the formula, SJIS indicates the original shift JIS code, and SJIS
CODE indicates the character code after conversion. KEIS code
And other code systems are also compatible with Shift JIS code.
Conversion to SCODE is possible with the same formula
Noh. When the expression (4-1) is represented in a character code table, FIG.
It means a conversion like 1. That is, (000
0) From (H) to (FFFF) H, (8140) H to
(9FFC) H and (E040) H ~ (FEFC)
H and the character codes that are distributed
0) Change the character code so that it is located
Will be replaced. Using this equation (4-1), code conversion
In this way, as shown in FIG.
The length can be very short, and the whole
The capacity can be reduced. The control of the hierarchical presearch is performed in the first embodiment.
Is the same as That is, the control procedure of FIG.
First, use the characters in the search term
Secondly, a condensed text search is performed using a search term.
Do. Output search results here if no context condition is specified
And terminate the search. Third, if the context condition is specified
Performs a sentence search and outputs the result. However, character composition table
At the time of search, all of the input search terms are (4-
1) Using character code conversion based on the formula
Become. As described above, the fourth case using the character code conversion type character component table
The embodiment has been described. According to this embodiment, the character
Code and convert the bit positions from the 0th
By creating a well-arranged character component table,
Can eliminate entries that are not assigned
The size of the character composition table can be very small.
You. Next, a fifth embodiment of the present invention will be described.
I do. This embodiment is based on the character component table of the fourth embodiment.
The capacity has been further reduced using hashing techniques.
You. The capacity of the character component table of the fourth embodiment is further reduced.
Therefore, in this embodiment, one entry in the bit list is used.
Assign multiple characters to the serial number. Ie hash
You can use functions to search for characters in search terms and
The method of associating the cut positions is adopted. This hash function and
Then, for example, the following equation can be used. In the equation, SCODE is shifted according to equation (4-1) according to JIS.
This is the character code converted from. mod takes the first argument
This function outputs the remainder after dividing by the second argument. N is optional
Is an integer value. For example, 512 is used as N
"A" is entry number 480, "Ma" is entry number
No. 193. An example of the character component table created in this way is
As shown in FIG. In this case, N was set to 512,
Only 512 bits are required to register one document
I understand. When searching, each sentence of the given search term
In the same way as when registering characters,
The entry number is calculated using the
Refer to the bit position in the character component table. For example, "Aima
In the case of the character string "i", the entry number 4 as shown in FIG.
A document in which all bits at positions 80, 482, 193 are 1
Is the search result of the character component table search. In this way
Next, the condensed book of the documents found by the search
Search for sentences. Hereinafter, the condensed text search and text search system will be described.
The control procedure will be described with reference to FIG. First implementation
In the example, the search term starts from one character after the character component table search.
The search result is the character component table search result.
To output the hierarchical pre-search. But,
In the character component table search of the character component table used in this embodiment,
Is a condensed text because of possible search noise
It is necessary to continue the hierarchical presearch until the search. An example
For example, hiragana 'wa' (shift JIS code (82C
D) H) is the entry number 13 in the equation (5-1).
But the kanji 'ship' (shift JIS code (8ACD)
H) has the same entry number 13. This means that the search
If the term “ship” is given, a sentence containing “wa”
All books are also searched as a result of the character component table search.
Will be. Therefore further scan the condensed body
To actually extract the document that contains the kanji “ship” and inspect it.
It will be output as a search result. As described above, the fifth embodiment
Was explained. In this embodiment, a hash function is used.
To assign multiple characters to one entry in the character composition table
By doing so, the capacity of the character component table can be significantly reduced
The effect is obtained. Next, a sixth embodiment will be described. Fifth
In case of simple hashing as in the example of
Characters that easily appear in documents such as
Characters that rarely appear like the Kanji
The possibility of becoming a re-number comes out. For example, hiragana
'Wa' and kanji 'ship' have the same entry number 13.
If “ship” is given as a search term,
All included documents are hit as a result of character component table search
Will do. Hiragana 'ha' is a Japanese document
Almost all documents are text because of the very frequently used text
Hits in the ingredient list search. Thus, the character composition table server
When the rate of narrowing down in the
Search time increases due to the number of documents to be searched
Will be. In order to prevent such a reduction in the narrowing rate,
Must determine the hash function taking into account the frequency of character use.
It is necessary. The character component table used in this embodiment is
It is called a single-type character component table. Character type hashing type character
To create a composition table, for example, as shown in FIG.
Allocate the character component table entry area for each character type,
A hash function that wraps in the area by character code
make. To implement such a hash function, the character
After judging the character type by code, fold by mod function
May be returned, or a correspondence table between character codes and entry numbers
Can also be realized. An example of this hash function
FIG. 16 is a PAD diagram. In this embodiment, hiragana,
The number of katakana and alphabetic entries is assumed to be 20 and the symbol
The number of entries is 10, the number of numeric entries is 10, JIS
The number of first-level entries is 370, and the JIS second-level entries are
The number of birds is 61. First, the entered search term
To determine the character type based on the character code.
Of the assigned entry in the character composition table for each character type
The part is folded back using the mod function. That is, whether SCODE is (01DF) H
If it is in the range of (0231) H, it is a hiragana character string.
So, take that SCODE and mod it with 20
Let it be an entry number. SCODE is from (0240) H
(0296) If it is in the range of H, it is a katakana character string
So, take the SCODE mod 20 and
Value obtained by adding 20 which is the head of the katakana hashing area
Is the entry number. SCODE is (01A0) H
If it is in the range of (01DA) H, it is an alphabetic character string.
So, take the SCODE and mod it at 20,
Enter the value obtained by adding 40, which is the beginning of the character hashing area.
It is a bird number. SCODE changes from (018F) H to (0
198) If it is in the range of H, it is a numeric character string.
Take the SCODE of 10 as the mod, and add
The entry number is the value obtained by adding 70, which is the head of the
No. SCODE changes from (065F) H to (123
2) If it is in the range of H, use a JIS first-level kanji character string.
So, take the SCODE mod at 370,
In addition to this, the hashing area for JIS 1st level kanji character strings
The value obtained by adding the leading 80 is set as the entry number. SC
ODE is in the range of (125F) H to (1FDE) H
Is a JIS second-level kanji character string.
MOD was taken at 61 and JIS 2nd water
450 which is the beginning of the hashing area of the quasi-kanji character string
The added value is used as the entry number. Other than the above SCODE
In the case of, it is regarded as a character string with symbols and other character types
Then, modulate the SCODE by 10 and write it down.
The value obtained by adding 60, which is the head of the hashing area of the
It is a bird number. Using this character type hashing type character component table
The control procedure of the hierarchical pre-search was the same as in the fifth embodiment.
The same. That is, first, the characters in the search term
Second, a character component table search is performed using a search term.
Perform a condensed text search. Context conditions etc. are not specified
If so, end the search here, otherwise
Thirdly, performs a text search and outputs the result. Explanation above
As described above, according to the present embodiment, the sentence is
Characters that correspond to the character component table entry numbers for each character type
By using the type hashing type character component table,
Condensed text because noise in component table search can be reduced
Scans the document in the
Kist search becomes possible. Next, as a seventh embodiment, a character component
Improve the rate of narrowing down in table search,
Frequency information hashing type that can reduce the amount of scanning
Explains the control method of hierarchical pre-search using character component table
I do. How to create a frequency information hashing type character composition table
Is the frequency of use of characters in documents registered in the database
And determine a hash function based on the frequency information. frequency
For characters with large
Characters, and infrequent characters
Hash function so that multiple characters are included in the same entry
To adjust. By doing so, an average stable aperture
The insertion rate can be obtained by the character component table search. Ingredient
Specifically, as shown in FIG. 17, it can be obtained by equation (4-1).
Once in the database based on SCODE
Check the number of documents using, and sort by frequency. Next
From the most frequent to the number of entries in the character component table
Take only t. And the top of frequency distribution within Nt
Other entries, leaving only the entry with the highest frequency.
Entry numbers equal to or greater than Nt are sequentially assigned to the addresses. This
No. (Nt + 1) is assigned to the entry number of Nt or more
The first entry is an entry of Nt, and the (Nt + 2) th entry
To be the (Nt-1) th entry
Entries with higher frequency are sequentially assigned. allocation
Process, the entry with the highest frequency is always
Should not be assigned other entries. Assignment
The digit entry is in the form of a table as shown in FIG.
Remember and refer to this table to construct a hash function.
To achieve. That is, the character of SCODE is (095F) H
It can be seen that “check” is entry number 231. The control procedure of the hierarchical presearch is based on the fifth embodiment.
It is the same as the embodiment. That is, the control procedure of FIG.
First, use the characters in the search term to form characters.
Secondly, perform a table search, and use the search term to condense the text.
Perform a search. When no context condition is specified
Ends the search here, but otherwise,
3. Perform a text search and output the result. Thus, the book
According to the embodiment, statements actually used in the database
By creating a character component table based on the frequency distribution of characters,
In the character component table search, a consistently high narrowing rate
As a result, stable and short-term
The search processing time can be obtained. As described above, the embodiments having different character component tables are described.
Five embodiments have been described. The actual content of the condensed text is different
An example will be described. Condensation used in the first example
The text is easy to create, but can be seen in Figure 4.
So that it is not originally used for searches like "for"
Even a character string will remain in the condensed text. This is
This leads to a reduction in the compression rate of the compressed text. That is, scan on search
Search processing time increases because the amount of condensed text
Would. Decreasing the compression rate of such condensed text
The main factor is a series of adjuncts such as “for”
Register a character string that has no meaning by itself in the condensed text
It is in the place to do. Therefore, as an eighth embodiment, this search
Hierarchy using condensed body text from which unnecessary attachments are removed
The type presearch will be described. This condensed text is divided into character types
This is called a deduplication / adjunct removal type condensed text. This condensed text
As shown in FIG. 19, the method of creating
Split character type from column to substring, then duplicate
After removing the words, the attached words are removed. Character type division and weight
Deduplication is not different from the first embodiment. Attachment removal is heavy
This is performed on the de-duplicated hiragana character string. This attachment
The analysis for the word removal is performed as shown in FIG.
It is performed based on the connection rules between books and words. The basic word dictionary contains
Verbs and instructions composed of only hiragana as in Fig. 21
Pronoun, adjective, adjective verb, adverb, conjunction, particle, auxiliary
Part-of-speech and the conjugation ending of these parts-of-speech are registered together with part-of-speech information.
Has been recorded. In the example of this figure, the verbs <a>, <
<Naru>, <Uta>, etc. are registered with their endings.
Have been. The connection rules include each word registered in the basic word dictionary.
Register which words can be connected to. For example, FIG.
As shown in <verb-having adjunct form> and <noun-thing>
Are connected, and <noun-thing> is connected to <noun-
It is registered that it can continue. Such basic words
Hiragana substrings using appendix and connection rules
Judge whether the sentence is composed of
Determines whether to register a character string. For example, for
Is a substring <particle-of><noun-for>
Can be analyzed as a connected character string such as particle->
And remove it as a character string consisting only of attached words
You. On the other hand, the character string “ambiguity” is
To the condensed text as it is without exclusion
You. As described above, the attached words are analyzed and the hiragana sentence is
Eliminate character strings and useless information that is not used for search
Increase the compression rate of the condensed text by deleting it
Becomes possible. In addition, the basic word dictionary used for analysis and connection rules
The rule is that the traditional key word that the number of registered words increases with the times
Basically, it is a universal dictionary.
There is an advantage that it does not need to be updated once it is completed.
To exclude only those that can be parsed as adjuncts,
Even if a new word composed of hiragana that does not exist in the book appears
It will always remain in the condensed text. Next, character type division / duplication elimination / adjunct word removal
Control of Hierarchical Presearch Method Using Type Condensed Text
Will be explained. Character type division, deduplication, adjunct removal type condensation
In the text, the Hiragana character string is analyzed as ancillary words and converted to a condensed text.
May not register. Therefore, certain hiragana characters
If you try to search by column, the condensed text search is missed
It may be. For example, the character string “vertigo”
The verb conjugation ending "me" and the adjective "mai"
Can be analyzed as connected. A specific example is “Accepted
"Mai" is a noun.
Even if it is used, the condensed book as a result of attached word removal processing
It is deleted from the sentence. Therefore such a place
Search for condensed text with "vertigo"
The possibility comes out. Therefore, the search term is condensed text
Is it an original word in the middle, or too much condensed text
Check if the word may have been removed
It is necessary to search from. Search terms appear in condensed text
Checking whether a word should be recorded is done by creating a condensed text.
The adjunct removal algorithm used when
Well apply. In this example, the search term "vertigo"
Is given, judge this as a sequence of adjuncts
be able to. The above search control procedure will be described with reference to FIG.
You. First, a character component table search is performed. If the number of results is 0
If so, output 0 as a search result and end the search process
You. As described in the first embodiment, do not use a hash function.
If the search term is a single character,
The search result of the distribution table can be output as the final search result. You
That is, the character component table described in the first and fourth embodiments is
If used, determine whether the search term is a single character.
In addition, if it is one character, the result of the character component table search result
Is output, and the process ends. Fifth, sixth, seventh fruit
When using the character component table by the hash function described in the embodiment
Check if this search term is a single character
Is not performed, the next condensed text search is always performed. After this,
As in the case of the first embodiment, a divided search term is generated. Next, for each of the divided search terms
Perform attached word analysis. Includes one of the split search terms
If it is determined that the term is a condensed text,
May have been deleted.
Without performing, directly based on the results of the character component table search
Search. On the other hand, as a result of adjunct analysis,
If all are not adjuncts, the first embodiment
A condensed text search is performed in the same manner as. Neighborhood condition or statement
If no pulse condition is specified, or if the split search
If the search term is the same as
The result is output as the final search result, and the search ends. Also
If a neighborhood condition or context condition is specified,
Or if the split search term and the original search term are different
Then performs a full text search and the results are the final search
Output the result. Thus, according to this embodiment,
Analyze kana character strings and condense unnecessary adjunct strings
Type separation / duplication elimination / adjunct removal type condensation
By using the text, the compression rate of the condensed text is improved.
Thus, the search processing time can be reduced. Next, as a ninth embodiment, a hiragana character
Character type division, duplicate elimination, Hiragana sentence with all columns removed
Explain Hierarchical Presearch Using Condensed Text with String Removal
You. The condensed text explained in the eighth embodiment does not
Can be parsed incorrectly when parsing words
There is. For example, "vertigo" used in the eighth embodiment
In addition to the example of the character string,
In rare cases, it is not possible to correctly determine which is an adjunct word.
For example, in the document "Working in this application ..."
The substring "Toshino" is
Is used in the meaning of "~"
Judge whether it means a machine lever like "~"
Difficult. When used in the latter sense,
When you specify the search term “Lever”, “Lever”
Search for condensed text because it is not determined as an adjunct
Will be. On the other hand, in the creation of the condensed text,
Condensed because it is analyzed as an adjunct and deleted from the condensed text
Text search is missing. This adjunct analysis
To correct incompleteness of
To achieve hierarchical pre-search with a simple
This is the ninth embodiment. How to create this condensed text
Is shown in FIG. In this method, after character type division,
And remove duplicate registrations. This character type division / duplication elimination / Hiragana character
Control procedure of hierarchical presearch using condensed text with column elimination
Will be described with reference to FIG. First, the eighth embodiment
Similarly, a character component table search is performed. After this, the split search
Generate a system. Next, for each of the split search terms
Check whether the character string is a hiragana character string. Split searcher
If there is a hiragana character string in at least one of the
Performs a search based on the results of the character component table search without performing a search.
Search sentences directly. On the other hand, during split search terms
If there is no unique character string, the condensed text
If the neighborhood and context conditions are specified, or
If the split search term is different from the original search term,
Continue the search process until the text search. Thus, the real
According to the example, the condensed text that excludes all the hiragana character strings
Search for hiragana character strings by using
An accurate full-text search without leakage can be realized. Next, a tenth embodiment of the present invention will be described.
I will tell. In the ninth embodiment, the search term of Hiragana
, You need to refer to the text directly. I
As a result, more search time is required. There
So, even if Hiragana search terms are given,
As a method that allows full-text search, the tenth embodiment
Give an explanation. In this embodiment, the condensation used in the ninth embodiment
In the ninth embodiment, the removed hiragana character strings
Create the registered condensed text separately. As shown in FIG.
The remaining character string after character type division and duplicate registration elimination
Judge whether it is a Hiragana character string
Is registered as condensed text A, and the hiragana character string is condensed text.
Register as B. This will allow you to search only Hiragana
When given, the user can search for the condensed text B.
Will reduce search time.
You. FIG. 27 shows the procedure of actual hierarchical presearch search control.
Shown in First, a character component table search is performed as in the eighth embodiment.
Do. If the search result is 0, end the search here
You. Thereafter, a divided search term is generated. Next, the split inspection
String terms that are hiragana for search terms and other strings
Classified into terms consisting of After that, sentences other than Hiragana
If there is a split search term consisting of character strings,
Search. Next, if there is a Hiragana split search term
, Search for condensation B. After that, the first embodiment
Similarly, if there are neighbors, context conditions specified, or
If the search term is different from the original search term,
The search process is continued until the sentence search. In this way, hiragana
Separate from the condensed text of Nanano and the condensed text other than Hiragana
By storing, search term of any character type can be input
Even if it is done, the condensed text can be used effectively and it is always fast full
Text search can be realized. Next, an eleventh embodiment will be described.
In this embodiment, in order to increase the compression rate of the
It is based on a method that uses a separate condensed text for each
You. Character type division / duplication elimination for the condensed text used in this embodiment
-It is called a character type registration type condensed text. This character type split / heavy
Figure 2 shows how to create a deduplication / character type registration type condensed text.
As shown in Fig. 8, character type division and duplicate registration elimination were performed.
After that, determine the character type of the remaining substring and condense Hiragana
Text H, Katakana Condensed Text I, Kanji Condensed Text J, English Text
Condensed text K, number condensed text L, symbols and other character type condensed books
Classify and register as sentence M. By doing this, for example,
When searching with the kanji search term, the kanji character type
Since only the contracted body J needs to be searched,
The time can be further reduced. Specific hierarchical type
The control procedure of the research will be described with reference to FIG. First,
A character component table search is performed as in the eighth embodiment. Search result
If the number of results is 0, the search ends here. After this,
Generate a split search term. Next, split search terms into characters
Classify by species. Then, Hiragana split search terms
In some cases, the condensed H is
In the decomposition search term.
Select the condensed text to search according to the character type. That
Thereafter, as in the first embodiment, the designation of the neighborhood and the context condition is not performed.
If any, or if the split search term is the original search term
If not, continue the search process until the text search
You. In this way, separate the condensed text file for each character type
By reducing the volume of each condensed text,
Only, katakana only, or hiragana only
Fast full-text search for single-character search terms
The effect that can be performed is obtained. Next, a twelfth embodiment will be described with reference to FIGS.
This will be described with reference to FIG. This embodiment is described in Japanese Patent Application No.
Using the document search device proposed in 193015, the present invention
It has been realized. The main configuration of this device is a keyboard
3001, search expression analysis program 3002, bit server
Multi-processor 3007a, string search engine 3
006, Complex condition determination microprocessor 3045
a, search result storage memory 3046, display 302
0, semiconductor memory device 3010a, RAM disk device
3010b, collective magnetic disk 3010c, and search
An execution control program 3008 is provided. Semiconductor memory device
The character component table is stored in the storage 3010a.
Reference numeral 010b denotes a condensed text, a collective magnetic disk device 301
0c stores the text. However,
The distribution table and the condensed text are stored on the collective magnetic disk 3010c.
Are stored, and are semi-conductive at the start of operation of this equipment.
Body memory device 3010a and RAM disk device 301
0b. The procedure of the hierarchical pre-search control has been implemented up to now.
It is not different from what was explained in the example. Implementation up to now
The difference from the example is that the character composition table
Is stored on a RAM disk and the text is stored on a collective magnetic disk.
And a microprocessor dedicated to character component table search
String search, condensed text search and text search
That is, the use of a search engine. Search procedure
Will be described below. Search condition input from keyboard 3001
The formula is a search machine control microprocessor MPU03.
Analyzed by the search expression analysis program 3002 on 050
It is. That is, the search expression analysis program 3002 searches for
Keyword parts that make up search condition expressions and their inclusion conditions
And a decoding condition description section that describes the arrangement condition. Parcel
Containment conditions are described as logical conditions, and placement conditions are neighborhood conditions.
And context conditions. After separation and extraction,
The keyword part is also a synonym exhibition on MPU03050
The program is passed to the open program 3003.
It is passed to the condition analysis program 3041. Synonym expansion
In program 3003, the built-in synonym dictionary is
Refers to a synonym for the entered keyword
You. And the keyword group expanded here is synonymous.
It is passed to the notation development program 3004. In the case of this example
In the case of "computer", "computer", "computer",
“COMPUTER” or the like is generated. Different notation expansion
In the program 3004, the keyword entered here
A different notation development process is performed on the C group. In the case of this example
If "computer" is changed from "computer" to "C
"Computer" generated from "OMPUTER"
Is done. Keywords developed in this way as synonyms and variants
Then, the automaton generation microprocessor M
Automaton generation program 3 on PU13005a
005. Automaton generation program 30
05, sent from the different notation development program 3004
For all keywords that have been
Key to generate tomato and match with state transition table
As the identification code information of the word, the search engine 300
Set to 6. Search engine 3006 is a finite automatic
This is a high-speed multi-character matching circuit based on the ton method. Also,
Key expanded in different notation by the different notation expansion program 3004
The word group, along with the corresponding keyword,
Bit search on microprocessor MPU33007a
The program is passed to the program 3007. On the other hand, neighborhood conditions, context conditions, AND, O
Logical conditions such as R are obtained from the search expression analysis program 3002.
Compound condition analysis program 3041, neighborhood condition analysis program
RAM 3042, context condition analysis program 3043, logic
Compound condition judgment program via condition analysis program 3044
It is sent to the ram 3045. The required search information is
Approach program 3007, string search engine 3
006, sent to the complex condition determination program 3045
Then, the search control execution program 3008 first
Of the program 3007. Bit search
The program 3007 is stored in the semiconductor memory device 3010a.
Read the stored character component table and search for the character component table
I do. The results of the character component table search are stored in the search result storage memo.
Stored in the folder 3046. After the character component table search is completed, a search execution system
The control program 3008 has a search result storage memory 3046.
And if the search result is 0, 0 search results
Output and interrupt the search process. Search results must be 0
If so, start the string search engine 3006
Is stored in the search result storage memory 3046 at the same time.
Condensed text of documents that were hit in the results of the character component table search
Is read from the RAM disk device 2910b, and the
Sent to the search engine 3006
Let it run. As a result, the condition judgment whether the number of cases is 0
The setting is performed by the search execution control program 3008. String
Search engine 3006, the RAM disk device 3
Split search term for condensed text read from 010b
Search by. The comparison result is a compound condition determination program 30
45. Complex condition determination program 3045
Now, determine the logical condition given between the search terms,
The search result storage memory 30 stores the document number of the document that matches the search condition.
The data is sequentially stored in 46. After the condensed text search is completed, a search execution system
The control program 3008 stores the search result storage memory once again.
3046, if the number of results is 0, 0
Output as a search result and end the search. If not 0
The neighborhood, context conditions are set, or split
Search only if the search term is different from the search term
Read the search result document number from the search result storage memory,
The corresponding text is stored in the collective magnetic disk drive 3010.
read from c and to string search engine 3006
Send it, and execute a text search this time. Neighborhood, context conditions
Is not set and the split search term is
If they are equal, they are stored in the search result storage memory
Outputs the number of search results and ends the search. In the string search engine 3006,
Book read from collective magnetic disk drive 3010c
Scan the sentence and perform a text search. The result is a complex conditional
It is sequentially sent to the fixed program 3045. Compound condition judgment
In the program 3045, the logic assigned between the search terms
A sentence that determines the condition, neighborhood and context conditions, and matches the condition
The document numbers of the documents are sequentially stored in the search result storage memory 3046.
I do. If the search is performed up to the text search,
After completion, the search execution control program 3008
The number of search results is output with reference to the delivery memory 3046 for searching.
To end. In this way, large volume text data is
A small character composition table and condensed text
By storing in semiconductor memory or RAM disk,
Fast full-text support for large databases
Can be realized. Next, the condensed text is stored in the magnetic disk.
Thirteenth embodiments will be described. Condensed text on magnetic disc
When storing in a hierarchical
By optimizing, normal hierarchy using the same configuration
Can be faster than performing type pre-search.
Wear. Hereinafter, the procedure of this control will be described. Magnetic de
Disks usually have a magnetic head that moves mechanically.
For this reason, the information on the disk is read out at intervals (scans).
Rather than collective information)
And read (called sequential access) is faster
There is a feature that. Now, read skip access
Speed Vskip MB / s, sequential access
Assuming that the data read speed is Vseq MB / s,
The total number of documents in the database is Na,
If the number of results is Nc and the document size is
Nc> (Vskip / Vseq) · Na …………………………………………………………………………………………… (12-1)
The person who searches is based on the results of the character component table search.
The processing time is shorter than with the Kip access. But
Therefore, after the character component table search as shown in FIG.
Determine the number of results in the pre-search control program,
When the number of hits satisfying the expression (12-1) is reached,
Condensed text data is ignored, ignoring the results of the character component table search
Search for all bases. Using the above method,
Large amount of RAM to store condensed text on disk
Eliminates the need for discs and provides relatively fast full-text
To be able to implement strike search with a low-cost document search device
Become. Next, the condensed text is stored in the magnetic disk.
Fourteenth embodiments will be described. Specify neighborhood and context conditions
The search results are very low.
If there is no search, the text component table
Searching the text directly based on the search results
Be shorter. Now, the search speed of the condensed text is Vsr MB /
s, the search speed of the text is VtxMB / s,
Nc is the number of results in the distribution table, and Ns is the number of results in the condensed text.
r, the data volume per case of condensed text Qsr, book
Assuming that the data capacity per sentence is Qtx, when NcQsr / Vsr + NsrQtx / Vtx> NcQtx / Vtx... (13-1), the text search is directly performed without performing the condensation text search.
Search time is shorter. Nsr writes the condensed text
I don't know until I actually search,
To determine whether to perform a condensed text search.
You. For example, let Na be the number of documents in the entire database.
Nsr = αNa (0 <α <1)... (13-2), by transforming equation (13-1), Nc <αNa (Qtx / Vtx) / (Qtx / Vtx−Qsr / Vsr) In the case of Expression (13-3), the text search is directly performed. α threshold
Set a value in advance as a value before searching, and
After the table search, the condensed text search is performed using equation (13-3).
Decide whether to do it. By performing this control,
High-speed full-text search under specified context conditions
Can be realized. The cheap version of the twelfth embodiment is described above.
Tenth to realize full-text search with system configuration
Third and Fourteenth Embodiments have been described. In addition, use the condensed text at all.
Omitting the step of condensed text search
Control by executing a text search directly from the
Layered presearch can be realized. By this method
Search time is longer because the amount of text to be scanned increases.
Small, but not expensive RAM disks
And there is no need for magnetic disk capacity to store the condensed text.
Therefore, a lower-priced document search device can be realized.
And Also, directly use RAM data without using a character component table.
Search all texts on disk or magnetic disk
Search for positional relationships between search terms such as neighborhood and context conditions.
Control method to search text only when search condition is specified
Therefore, the hierarchical pre-search can be realized. This
Method increases the amount of search for condensed text,
It takes some time, but semiconductor memory to store character composition table
Is not necessary, so a low-priced document search device is realized.
You can do it. Alternatively, the video used in the previous embodiments may be used.
As shown in FIG.
A form in which characters appearing in the book are arranged in a row, that is, one character
The character code itself is not represented as one bit.
A character component table stored as a body can also be used.
Alternatively, at this time, the fifth embodiment, the sixth embodiment, and
One sentence using the hash function described in the seventh embodiment
Character entry table capacity by associating multiple characters with character entries
Can also be reduced. Store character code like this
Character component table search using the extracted character component table
Data from a file one character at a time, similar to text and text search
To determine whether the corresponding character exists
Can be realized. Thus, the sentence used in the text
By using a character component table that collects only characters,
Condensed text, which can simplify the structure and without bit operation,
The same scan type search as the text search can be used.
The effect is that the search processing method can be simplified.
Can be Further, a character component table is also stored on the magnetic disk.
Can achieve a hierarchical pre-search
You. When a character component table is stored on this magnetic disk
Is used in the search term in the character component table search.
Bit list of characters
While performing bit operation processing. Or on
If the character code of
While reading the character component table sequentially,
Out documents. This character composition table is stored on a magnetic disk.
According to the method of delivery, it is not necessary to use semiconductor memory
In addition, it is possible to realize a lower-priced document search device
It becomes. According to the present invention, a character component table and a condensed book
Input hierarchically at the character level and word level using sentences
To filter out documents that are not relevant to the search term
Since the useless text search can be omitted,
Is a means of realizing high-speed full-text search
Full response with practical response speed even for a simple document database
It becomes possible to do a kist search.

【図面の簡単な説明】 【図1】本発明の第一の実施例の構成を示す図である。 【図2】本発明の特徴となる階層型プリサーチのための
登録処理を示す図である。 【図3】本発明の特徴となる階層型プリサーチの検索処
理を示す図である。 【図4】凝縮本文を作成する一例を示した図である。 【図5】凝縮本文の格納形態を示す図である。 【図6】文字成分表の概要を示す図である。 【図7】文字成分表サーチの概要を示す図である。 【図8】階層型プリサーチの処理手順を示す図である。 【図9】第三の実施例における文字成分表サーチの処理
を示す図である。 【図10】第四の実施例で用いる文字成分表のコード変
換の処理を示すPAD図である。 【図11】第四の実施例で用いる文字成分表のコード変
換の概要を示す図である。 【図12】第四の実施例で用いる文字成分表の概要を示
す図である。 【図13】第五の実施例で用いる文字成分表の概要を示
す図である。 【図14】第五の実施例で用いる階層型プリサーチの処
理手順を示す図である。 【図15】第六の実施例で用いる文字成分表の概要を示
す図である。 【図16】第六の実施例で用いる階層型プリサーチの処
理手順を示す図である。 【図17】第七の実施例で用いる文字成分表の作成方法
の概要を示す図である。 【図18】第七の実施例で用いる文字成分表のためのハ
ッシュ関数で用いる文字コード−エントリ番号の対応表
の概要を示す図である。 【図19】第八の実施例で用いる凝縮本文の作成する方
法を示す図である。 【図20】第八の実施例で用いる凝縮本文のためのひら
がな文字列の処理方法を示す図である。 【図21】第八の実施例で用いる付属語解析のための基
本単語辞書を示す図である。 【図22】第八の実施例で用いる付属語解析のための接
続規則を示す図である。 【図23】第八の実施例で用いる階層型プリサーチの処
理手順を示す図である。 【図24】第九の実施例で用いる凝縮本文の作成する方
法を示す図である。 【図25】第九の実施例で用いる階層型プリサーチの処
理手順を示す図である。 【図26】第十の実施例で用いる凝縮本文の作成する方
法を示す図である。 【図27】第十の実施例で用いる階層型プリサーチの処
理手順を示す図である。 【図28】第十一の実施例で用いる凝縮本文の作成する
方法を示す図である。 【図29】第十一の実施例で用いる階層型プリサーチの
処理手順を示す図である。 【図30】第十二の実施例の構成の部分を示す図であ
る。 【図31】第十二の実施例の構成の残りの部分を示す図
である。 【図32】第十二の実施例で用いる階層型プリサーチの
処理手順を示す図である。 【図33】文字として格納した文字成分表の概要を示す
図である。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a diagram showing a configuration of a first exemplary embodiment of the present invention. FIG. 2 is a diagram showing a registration process for hierarchical presearch, which is a feature of the present invention. FIG. 3 is a diagram illustrating a search process of a hierarchical presearch, which is a feature of the present invention. FIG. 4 is a diagram showing an example of creating a condensed text. FIG. 5 is a diagram showing a storage form of a condensed text. FIG. 6 is a diagram showing an outline of a character component table. FIG. 7 is a diagram showing an outline of a character component table search. FIG. 8 is a diagram showing a processing procedure of a hierarchical pre-search. FIG. 9 is a diagram showing a character component table search process according to the third embodiment. FIG. 10 is a PAD diagram showing a code conversion process of a character component table used in the fourth embodiment. FIG. 11 is a diagram illustrating an outline of code conversion of a character component table used in the fourth embodiment. FIG. 12 is a diagram showing an outline of a character component table used in a fourth embodiment. FIG. 13 is a diagram showing an outline of a character component table used in the fifth embodiment. FIG. 14 is a diagram showing a processing procedure of a hierarchical presearch used in the fifth embodiment. FIG. 15 is a diagram showing an outline of a character component table used in the sixth embodiment. FIG. 16 is a diagram showing a processing procedure of a hierarchical presearch used in the sixth embodiment. FIG. 17 is a diagram showing an outline of a method of creating a character component table used in the seventh embodiment. FIG. 18 is a diagram showing an outline of a character code-entry number correspondence table used in a hash function for a character component table used in the seventh embodiment. FIG. 19 is a diagram showing a method of creating a condensed text used in the eighth embodiment. FIG. 20 is a diagram illustrating a method of processing a hiragana character string for a condensed text used in the eighth embodiment. FIG. 21 is a diagram showing a basic word dictionary for attached word analysis used in the eighth embodiment. FIG. 22 is a diagram showing connection rules for attached word analysis used in the eighth embodiment. FIG. 23 is a diagram showing a processing procedure of a hierarchical presearch used in the eighth embodiment. FIG. 24 is a diagram showing a method of creating a condensed text used in the ninth embodiment. FIG. 25 is a diagram showing a processing procedure of hierarchical presearch used in the ninth embodiment. FIG. 26 is a diagram illustrating a method of creating a condensed text used in the tenth embodiment. FIG. 27 is a diagram illustrating a processing procedure of hierarchical presearch used in the tenth embodiment. FIG. 28 is a diagram illustrating a method of creating a condensed text used in the eleventh embodiment. FIG. 29 is a diagram illustrating a processing procedure of hierarchical presearch used in the eleventh embodiment. FIG. 30 is a diagram showing a part of the configuration of a twelfth embodiment. FIG. 31 is a diagram showing the remaining part of the configuration of the twelfth embodiment. FIG. 32 is a diagram illustrating a processing procedure of hierarchical presearch used in the twelfth embodiment. FIG. 33 is a diagram showing an outline of a character component table stored as characters.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 加藤 寛次 東京都国分寺市東恋ケ窪1丁目280番地 株式会社日立製作所 中央研究所内 (72)発明者 川口 久光 東京都国分寺市東恋ケ窪1丁目280番地 株式会社日立製作所 中央研究所内 (72)発明者 嶺岸 直材 神奈川県川崎市幸区鹿島田890番地の12 株式会社日立製作所 情報システム工 場内 (56)参考文献 特開 昭59−112339(JP,A) 加藤寛次他「全文検索用テキストサー チマシンの開発」電子情報通信学会研究 報告(DE−89−38)Vol.89 N o.335(平1−12−14)P.17−24   ────────────────────────────────────────────────── ─── Continuation of front page    (72) Inventor Kanji Kato               1-280 Higashi Koigakubo, Kokubunji-shi, Tokyo                 Central Research Laboratory, Hitachi, Ltd. (72) Inventor Hisamitsu Kawaguchi               1-280 Higashi Koigakubo, Kokubunji-shi, Tokyo                 Central Research Laboratory, Hitachi, Ltd. (72) Inventor Naoki Minegishi               890-12 Kashimada, Saiwai-ku, Kawasaki-shi, Kanagawa                 Hitachi, Ltd. Information System Engineer               Inside the hall                (56) References JP-A-59-112339 (JP, A)                 Kanji Kato et al. "Text Search for Full Text Search               Development of Chimashin "Research of IEICE               Report (DE-89-38) Vol. 89 N               o. 335 (Heisei 1-12-14) P. 17−24

Claims (1)

(57)【特許請求の範囲】 【請求項1】 文書情報を文字コードデータとして蓄積
した文書データベースを対象として、検索者が指定した
キーワードを含む文書をその本文内容を参照して検索す
るフルテキストサーチ方法であって、 該文書データベースに文書を登録する際、 該登録文書の本文文字列をひらがな、漢字、及び英数字
等の文字種ごとに分割し、 各文字種毎に分割した各部分文字列の間で相互に文字列
の包含関係を調べ、他の文字列に含まれる文字列を排除
した部分文字列の集合からなる凝縮本文と、本文中に現
れる文字を登録した文字成分表を作成し、 検索時には文字成分表により、キーワードに用いられた
文字をすべて含む文書の候補を調べ、 その結果得られた候補文書の凝縮本文をサーチすること
により文字種分割された部分文字列をすべて含む文書を
調べ、 その結果得られた候補文書の本文をサーチすることによ
りキーワードを含む文書を検索する階層プリサーチ方式
を用いたフルテキストサーチ方法において、 該文字成分表の作成時に、予め設定された文字コードと
文字成分表内でのエントリとを対応付ける対応表を用い
て、文字成分表のエントリに複数の文字を対応付けるこ
とを特徴とするフルテキストサーチ方法。
(57) [Claims] [Claim 1] Full text for searching a document including a keyword specified by a searcher with reference to the body content of a document database storing document information as character code data In a search method, when registering a document in the document database, a body character string of the registered document is divided for each character type such as hiragana, kanji, and alphanumeric characters, and a partial character string for each character type is divided. Investigate the mutual inclusion of character strings between each other, create a condensed text consisting of a set of partial character strings excluding character strings included in other character strings, and a character component table that registers the characters that appear in the text, At the time of retrieval, the character component table is used to examine candidates for documents that include all the characters used in the keyword, and the condensed text of the resulting candidate document is searched for the part that is divided into character types In a full-text search method using a hierarchical pre-search method in which a document including all character strings is searched and a document including a keyword is searched by searching the body of a candidate document obtained as a result, A full-text search method, wherein a plurality of characters are associated with entries in the character component table using a correspondence table that associates a preset character code with an entry in the character component table.
JP2000375505A 2000-12-11 2000-12-11 Full text search method Expired - Lifetime JP3376996B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000375505A JP3376996B2 (en) 2000-12-11 2000-12-11 Full text search method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000375505A JP3376996B2 (en) 2000-12-11 2000-12-11 Full text search method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP05831191A Division JP3220865B2 (en) 1989-06-14 1991-02-28 Full text search method

Publications (2)

Publication Number Publication Date
JP2001202388A JP2001202388A (en) 2001-07-27
JP3376996B2 true JP3376996B2 (en) 2003-02-17

Family

ID=18844511

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000375505A Expired - Lifetime JP3376996B2 (en) 2000-12-11 2000-12-11 Full text search method

Country Status (1)

Country Link
JP (1) JP3376996B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7523102B2 (en) 2004-06-12 2009-04-21 Getty Images, Inc. Content search in complex language, such as Japanese
AU2008259833B2 (en) 2007-06-01 2012-11-08 Getty Images, Inc. Method and system for searching for digital assets
JP5970882B2 (en) 2012-03-16 2016-08-17 富士通株式会社 Configuration information management device, configuration information management program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57137965A (en) * 1981-02-20 1982-08-25 Nippon Kagaku Gijutsu Joho Center Automatic key word extraction system of sentence consisting of chinese character and "kana"(japanese syllabary)
JPS59112339A (en) * 1982-12-20 1984-06-28 Fujitsu Ltd Speeding method of document retrieval
JPS63244259A (en) * 1987-03-31 1988-10-11 Matsushita Electric Ind Co Ltd Keyword extraction device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
加藤寛次他「全文検索用テキストサーチマシンの開発」電子情報通信学会研究報告(DE−89−38)Vol.89 No.335(平1−12−14)P.17−24

Also Published As

Publication number Publication date
JP2001202388A (en) 2001-07-27

Similar Documents

Publication Publication Date Title
US5469354A (en) Document data processing method and apparatus for document retrieval
JP3696745B2 (en) Document search method, document search system, and computer-readable recording medium storing document search program
US6697801B1 (en) Methods of hierarchically parsing and indexing text
JP3636941B2 (en) Information retrieval method and information retrieval apparatus
JP4911028B2 (en) Word translation device, translation method, and translation program
US4775956A (en) Method and system for information storing and retrieval using word stems and derivative pattern codes representing familes of affixes
KR101157693B1 (en) Multi-stage query processing system and method for use with tokenspace repository
US5748953A (en) Document search method wherein stored documents and search queries comprise segmented text data of spaced, nonconsecutive text elements and words segmented by predetermined symbols
CN100562870C (en) Translation device and translation method
JP3263963B2 (en) Document search method and apparatus
JP2742115B2 (en) Similar document search device
JP5615476B2 (en) Parallel translation phrase presentation program, parallel translation phrase presentation method, and parallel translation phrase presentation apparatus
JP2011511366A (en) Data retrieval and indexing method and system for implementing the same
JPH09259140A (en) Information retrieval method and device therefor, and medium for storing information retrieval program
JP3220865B2 (en) Full text search method
JP3303881B2 (en) Document search method and apparatus
US8682900B2 (en) System, method and computer program product for documents retrieval
JPH0782504B2 (en) Information retrieval processing method and retrieval file creation device
JP3376996B2 (en) Full text search method
US20040143574A1 (en) System and method for creating a data file for use in searching a database
JPH06348757A (en) Device and method for retrieving document
JPH11143902A (en) Similar document search method using n-gram
JP2004348514A (en) Parallel translation word extraction method, parallel translation word dictionary construction method, and translation memory construction method
EP0501416B1 (en) Method and apparatus for registering text document data and for document retrieval
KR20020054254A (en) Analysis Method for Korean Morphology using AVL+Trie Structure

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071206

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20081206

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20081206

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20091206

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20101206

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20101206

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20111206

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20111206

Year of fee payment: 9