[go: up one dir, main page]

JP3081093B2 - Index creation method and apparatus and document search apparatus - Google Patents

Index creation method and apparatus and document search apparatus

Info

Publication number
JP3081093B2
JP3081093B2 JP05253032A JP25303293A JP3081093B2 JP 3081093 B2 JP3081093 B2 JP 3081093B2 JP 05253032 A JP05253032 A JP 05253032A JP 25303293 A JP25303293 A JP 25303293A JP 3081093 B2 JP3081093 B2 JP 3081093B2
Authority
JP
Japan
Prior art keywords
index
character
characters
data
search
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP05253032A
Other languages
Japanese (ja)
Other versions
JPH07105237A (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.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co 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 Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP05253032A priority Critical patent/JP3081093B2/en
Publication of JPH07105237A publication Critical patent/JPH07105237A/en
Application granted granted Critical
Publication of JP3081093B2 publication Critical patent/JP3081093B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、電子計算機を応用した
文書検索システムや文書編集システムにおける文書中か
ら文字列等を検索するための索引の作成方法およびその
装置と文書検索装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and apparatus for creating an index for retrieving a character string or the like from a document in a document retrieval system or a document editing system using an electronic computer. .

【0002】[0002]

【従来の技術】近年、ワードプロセッサやパーソナルコ
ンピューターの普及、コンピュータの記憶装置の容量の
増大、コンピュータによる文字認識の実用化等に伴い、
文書中の全ての文字情報を蓄積した全文データベースが
多くなってきた。このため、大量の文字情報を蓄積し、
必要に応じて文書情報を検索する全文データベース検索
システムに対する関心が高まってきている。
2. Description of the Related Art In recent years, with the spread of word processors and personal computers, an increase in the capacity of computer storage devices, and the practical use of character recognition by computers, etc.,
The number of full-text databases storing all character information in documents has increased. Therefore, a large amount of character information is accumulated,
Interest in a full-text database retrieval system that retrieves document information as needed has been growing.

【0003】従来の文書データベースシステムでは、文
書を検索する際の鍵として、文書毎に人手により付与さ
れたキーワードを利用するキーワード検索方式が一般的
であった。しかし、キーワード付け作業が蓄積文書の増
加に間に合わない、時間が経過するとキーワードが陳腐
化する、キーワード付けを行った者と検索する者とのキ
ーワードの解釈の相違により検索もれが生じる、などの
問題点があった。このような背景から、近年、全文検索
(フルテキストサーチ)と呼ばれる文書検索方式が注目
されている。
[0003] In a conventional document database system, a keyword search system using a keyword manually assigned to each document as a key for searching for a document is generally used. However, keyword addition work cannot keep up with the increase of stored documents, keywords become obsolete over time, and search omissions occur due to differences in keyword interpretation between the keyword assigner and the searcher. There was a problem. From such a background, in recent years, a document search method called full-text search (full-text search) has attracted attention.

【0004】全文検索は、文書データのほかには補助的
な情報を持たずに、検索毎に文書データを全文走査する
「フルテキストスキャン」方式と、検索に先だって、文
書データ中に出現する文字あるいは文字列の情報を高速
に取り出せるような索引情報を自動的に作成しておい
て、検索時にこの索引を検索する方式の2種類に大別さ
れる。
[0004] The full-text search includes a "full-text scan" method in which the document data is scanned every text without any auxiliary information other than the document data, and a character that appears in the document data prior to the search. Alternatively, index information is automatically created so that character string information can be extracted at a high speed, and the index is searched at the time of search.

【0005】このうち、フルテキストスキャン方式は、
原文書以外の情報を用いないので、記憶容量が少なくて
済むとともに文書データの更新直後でも即座に検索でき
る点、および正規表現等の文字列パターンや論理条件を
含む複雑な検索条件の場合や検索結果が多い場合でも、
検索時間がほぼ一定である点が長所であるが、文書デー
タの全てを走査するため、索引方式に比べて検索速度が
遅いという問題が指摘されている。
[0005] Among them, the full text scanning method is
Since information other than the original document is not used, the storage capacity is small and the search can be performed immediately after the document data is updated. In the case of complex search conditions including character string patterns such as regular expressions and logical conditions, and search Even if there are many results,
The advantage is that the search time is substantially constant, but it has been pointed out that the search speed is slower than that of the indexing method because all the document data is scanned.

【0006】一方、索引方式は、一般にフルテキストス
キャン方式よりも検索速度が速く、索引の作成方法によ
っては、検索速度が文書量にほとんど依存しないという
利点があるが、索引情報の容量が大きいこと、索引を作
成する時間が長いこと、検索条件が複雑な場合や検索結
果が多い場合に検索速度が低下すること等の問題が指摘
されている。
On the other hand, the index system generally has a higher search speed than the full-text scan system, and has the advantage that the search speed hardly depends on the amount of documents depending on the method of creating the index, but the index information has a large capacity. It has been pointed out that the time required to create an index is long and that the search speed is reduced when the search conditions are complicated or the search results are large.

【0007】このような従来の全文検索ための文書検索
方法と索引作成方法とその特徴は、「Access M
ethods for Text](Ohristos
Faloutsos,Computing Surv
eys,Vol.17,No.1,March 198
5)等の論文や、「テキスト検索プロセッサ」(高橋恒
介著、電子情報通信学会刊)等の成書に詳細な説明がな
されている。
[0007] Such a conventional document search method and index creation method for full-text search and its features are described in "Access M."
methods for Text] (Ohristos
Falloutsos, Computing Surv
eys, Vol. 17, No. 1, March 198
Detailed descriptions are given in papers such as 5) and textbooks such as "Text Search Processor" (by Kosuke Takahashi, published by the Institute of Electronics, Information and Communication Engineers).

【0008】[0008]

【発明が解決しようとする課題】しかしながら、上記の
論文、成書で紹介されている従来の方法では、索引を用
いないと検索速度が上がらず、一方索引を用いると、索
引の作成・更新時間がかかる上に、索引データの容量が
大きくなり、正規表現などの複雑な文字列パターンでの
検索にも時間がかかるという課題があった。
However, in the conventional methods introduced in the above-mentioned papers and compendiums, the search speed cannot be increased without using an index, while the index creation / update time can be reduced by using the index. In addition to this, there is a problem that the capacity of the index data becomes large and it takes time to search for a complicated character string pattern such as a regular expression.

【0009】本発明は、上記の従来技術の課題を解決す
るもので、作成・更新時間が短く、容量が小さく、正規
表現などの複雑な文字列パターンでの近似検索も高速で
行なうことのできる索引作成方法とその装置および作成
された索引データとフルテキストスキャンとを組み合わ
せた検索速度の速い文書検索装置を提供することを目的
とする。
SUMMARY OF THE INVENTION The present invention solves the above-mentioned problems of the prior art, in which the creation / update time is short, the capacity is small, and an approximate search using a complicated character string pattern such as a regular expression can be performed at high speed. An object of the present invention is to provide an index creation method and an apparatus therefor, and a document search apparatus having a high search speed by combining created index data and full text scan.

【0010】[0010]

【課題を解決するための手段】上記目的を達成するため
に、本発明による索引作成方法は、サンプル文書データ
の文字および文字列の出現を統計的に調べて前記索引デ
ータを作成する際の共通情報となる索引型式データを作
成する段階と、前記索引型式データの型式に従って検索
対象文書データに関する索引データを作成する段階とか
ら成り、索引型式データ作成段階では、前記文字列の出
現を統計的に調べる動作として、一定度数以下の文字
(低頻度文字)については、1文字で索引を作成するこ
とを決定し、一定度数以上の文字(高頻度文字)につい
ては、高頻度文字同士の2文字連続を調べ、次に、一定
度数以下の2文字連続文字(低頻度2文字連続)につい
ては、2文字で索引を作成することを決定し、一定度数
以上の2文字連続(高頻度2文字連続)については、高
頻度2文字連続文字同士の3文字連続を調べる動作を順
次行なうことにより、高頻度な文字列ほど、長い文字連
続として索引を作成することを決定した内容の索引型式
データを作成するようにしたものである。
In order to achieve the above object, an index creation method according to the present invention provides a method for generating index data by statistically examining the appearance of characters and character strings in sample document data. Creating index type data as information; and creating index data on the search target document data according to the type of the index type data. In the index type data creating step, the appearance of the character string is statistically determined. As a check operation, it is determined that an index is created with one character for a character having a certain frequency or less (low-frequency character), and for a character having a certain frequency or more (high-frequency character), two consecutive characters of the high-frequency character are determined. Then, for two consecutive characters having a certain frequency or less (low-frequency two consecutive characters), it is decided to create an index using two characters, and two characters having a certain frequency or more (two consecutive characters) are determined. The frequency 2 character sequence), high by frequency 2 that the characters perform successive characters sequentially three characters examine the continuous operation among high enough frequency strings, long as a character sequence of content determined to create an index Index Model data is created.

【0011】また、本発明によると索引作成装置は、サ
ンプル文書データ中のある1文字の出現の度合を統計的
に調べる文字出現頻度算定手段と、前回調べた文字の出
現の度合が予め定められた値よりも高い場合に、前回調
べた文字の全てを含むN文字(Nは2、3、4、・・・
の自然数)の文字列についての出現の度合を統計的に調
べる複数のN文字連続出現頻度算定手段と、サンプル文
書データ中の文字または文字列の出現の度合に応じて文
字出現頻度算定手段および複数のN文字連続出現頻度算
定手段の出力から検索対象文書データに関する索引デー
タを作成する際の共通情報となる索引型式データを作成
する索引型式出力手段とを備えたものである。
Further, according to the present invention, the index creation apparatus is characterized in that a character appearance frequency calculating means for statistically examining the degree of appearance of a certain character in the sample document data, and the degree of appearance of the character examined last time is predetermined. , N characters including all of the characters examined last time (N is 2, 3, 4,...)
A natural number), a plurality of N-character continuous appearance frequency calculating means for statistically examining the degree of appearance of the character string, a character appearance frequency calculating means according to the degree of appearance of the character or the character string in the sample document data, and And index type output means for generating index type data serving as common information when index data relating to the search target document data is generated from the output of the N character continuous appearance frequency calculating means.

【0012】さらに、本発明による索引作成装置は、サ
ンプル文書データ中の文字または文字列をその出現の度
合に応じてグループ化する複数のグループ化手段を備
え、索引型式出力手段が、各グループ化手段から出力さ
れたグループ化情報を基に各グループの通し番号と所属
する文字または文字列との対応表を出力するようにした
ものである。
Further, the index creating apparatus according to the present invention comprises a plurality of grouping means for grouping characters or character strings in the sample document data according to the degree of appearance thereof, and the index type output means comprises a grouping means. Based on the grouping information output from the means, a correspondence table between the serial number of each group and the character or character string to which it belongs is output.

【0013】さらに、本発明による索引作成装置は、検
索対象文書データに関する索引データを作成する際に用
いる検索文字数を上記構成の索引作成装置から出力され
た索引型式データに従って決定する文字連続数算定手段
と、文字連続数算定手段により決定された文字数と上記
構成の索引作成装置から出力された索引型式データとか
ら対応するグループ番号を算定するグループ番号算定手
段と、グループ番号算定手段から出力されたグループ番
号からそれぞれの文書レコードの索引データを作成する
索引情報蓄積出力手段とを備えたものである。
Further, the index creation device according to the present invention is a character continuation number calculating means for determining the number of search characters to be used when creating index data relating to search target document data in accordance with the index type data output from the index creation device having the above configuration. And a group number calculating means for calculating a corresponding group number from the number of characters determined by the character continuation number calculating means and the index type data output from the index creating apparatus having the above configuration; and a group output from the group number calculating means. Index information storing and outputting means for generating index data of each document record from the number.

【0014】また、本発明による文書検索装置は、文字
列パターンを含む検索条件を入力する検索入力手段と、
検索条件から上記構成の索引作成装置から出力された索
引データを照合するための文字または文字列のAND/
OR木を作成する索引照合条件作成手段と、索引データ
と索引照合条件作成手段が作成したAND/OR木との
照合を行なう索引照合手段と、照合が成功した場合に、
検索対象文書データの対応する部分を検索条件入力手段
から入力された文字列パターンを含む検索条件と照合
し、照合の成功した部分を最終的な検索結果として出力
する全文走査文字列照合手段とを備えたものである。
[0014] Further, the document search device according to the present invention comprises: search input means for inputting search conditions including a character string pattern;
AND / of a character or a character string for collating the index data output from the index creating apparatus with the above configuration based on the search condition
An index matching condition creating means for creating an OR tree; an index matching means for matching index data with an AND / OR tree created by the index matching condition creating means;
A full-text scanning character string matching unit that matches a corresponding part of the search target document data with a search condition including a character string pattern input from the search condition input unit, and outputs a successfully matched part as a final search result. It is provided.

【0015】[0015]

【作用】本発明は、上記構成によって、検索対象文書デ
ータに関する索引の型式が統計的に検索対象文書データ
に適合した、容量の小さい索引データを、検索対象文書
データの統計的性質を調べることなしに高速に作成し、
また、サンプル文書中における出現の度合が、予め定め
られた値以下すなわち絞り込み率以下である低頻度文字
については、索引型式出力手段が検索対象文書データに
おける1文字の出現を記録するための索引データの型式
を指示し、サンプル文書中における出現の度合が絞り込
み率よりも高い高頻度文字については、高頻度文字に属
するN文字、すなわちまず初めに2つの文字からなる2
文字連続のサンプル文書データ中における出現の度合を
2文字連続出現頻度算定手段が統計的に調べ、サンプル
文書データ中における出現の度合が絞り込み率以下であ
る低頻度2文字連続については、索引型式出力手段が検
索対象文書データにおける2文字連続の出現を記録する
ための索引データの型式を指示し、サンプル文書データ
中における出現の度合が絞り込み率よりも高い高頻度2
文字連続については、高頻度2文字連続に属する2つの
2文字連続をそれぞれ初めの2文字、および最後の2文
字に持つ3文字連続のサンプル文書データ中における出
現の度合を3文字連続出現頻度算定手段が統計的に調
べ、索引型式出力手段が、検索対象文書データにおける
3文字連続の出現を記録するための索引データの型式を
指示することによって、文字および文字列の出現の度合
が異なっていても、検索条件によらずに絞り込み率以下
に検索対象文書データを絞り込むことを可能にする索引
データを作成することができる。
According to the present invention, a small-capacity index data in which the type of an index relating to the retrieval target document data is statistically adapted to the retrieval target document data by the above-mentioned structure is obtained without examining the statistical properties of the retrieval target document data. Create fast
For low-frequency characters whose degree of appearance in the sample document is equal to or less than a predetermined value, that is, equal to or less than the narrowing-down rate, index data for recording the appearance of one character in the search target document data by the index type output unit. For high-frequency characters whose degree of appearance in the sample document is higher than the narrowing-down ratio, N characters belonging to the high-frequency characters, that is, 2 characters consisting of two characters first
The frequency of occurrence of two consecutive characters in the sample document data of character continuity is statistically checked by the two character continuous appearance frequency calculating means. Means for indicating the type of index data for recording the appearance of two consecutive characters in the search target document data, and the frequency of appearance in the sample document data is higher than the narrowing rate.
Regarding the character continuation, the frequency of appearance of three consecutive characters having two consecutive two characters belonging to the high frequency two consecutive characters as the first two characters and the last two characters in the sample document data is calculated as a three-character consecutive appearance frequency. The means statistically examines, and the index type output means indicates the type of index data for recording the appearance of three consecutive characters in the search target document data, so that the degrees of appearance of characters and character strings are different. Also, it is possible to create index data that enables the search target document data to be narrowed to a narrowing rate or less regardless of the search conditions.

【0016】また、サンプル文書データ中の文字または
文字列の出現の度合を文字列出現頻度算定手段が統計的
に調べ、その後で、グループ化手段が、1つ以上の文字
または文字列からなるグループであって、当該グループ
に属する文字または文字列の少なくとも1種が出現する
度合が予め定めた絞り込み率以下であるグループに、サ
ンプル文書データ中の文字または文字列を振り分け、検
索対象文書データにおいて当該グループに所属するいず
れかの文字あるいは文字列が出現した場合には、「当該
グループに属する文字あるいは文字列のいずれかが出現
した」という情報を記録するための索引データの型式を
索引型式決定手段が決定して索引型式データを作成する
ことによって、多くの種類の低頻度文字がある場合で
も、容量の小さな索引を作成することができる。
The character string appearance frequency calculating means statistically examines the degree of appearance of a character or a character string in the sample document data, and thereafter, the grouping means sets a group consisting of one or more characters or character strings. The characters or character strings in the sample document data are sorted into groups in which the degree of appearance of at least one of the characters or character strings belonging to the group is equal to or less than a predetermined narrowing-down ratio. If any character or character string belonging to the group appears, the type of index data for recording information that "any of the characters or character string belonging to the group has appeared" is determined by an index type determining means. Determines and creates indexed format data, so that even if there are many types of It is possible to create.

【0017】さらに、文書検索装置においては、利用者
が検索条件入力手段から入力した文字列パターンを含む
検索条件から、索引照合条件作成手段が、索引データを
照合するための文字または文字列のAND/OR木を作
成し、索引照合手段が、索引データと、索引照合条件作
成手段の作成したAND/OR木との照合を行い、照合
が成功したデータの場合には、全文走査文字列照合手段
が、検索対象文書データの対応する部分を検索条件入力
手段から入力された文字列パターンを含む検索条件と完
全に照合し、照合の成功した部分を最終的な検索結果と
することにより、従来はフルテキストスキャン方式でし
か扱えなかった複雑な検索条件の場合でも、索引による
検索速度の高速化を実現することができる。
Further, in the document retrieval apparatus, the index collation condition creating means uses the character or character string AND for collating the index data based on the retrieval condition including the character string pattern inputted by the user from the retrieval condition input means. / OR tree is created, and the index collating means collates the index data with the AND / OR tree created by the index collating condition creating means, and if the collation is successful, the full-text scanning character string collating means Conventionally, by completely matching the corresponding part of the search target document data with the search condition including the character string pattern input from the search condition input means, and making the part that has been successfully matched the final search result, Even in the case of complex search conditions that could only be handled by the full-text scan method, it is possible to increase the search speed by the index.

【0018】[0018]

【実施例】【Example】

(実施例1)以下、本発明の索引作成方法を実施するた
めの装置について、図面を参照しながら説明する。図1
は本発明の第1の実施例における索引作成装置の構成を
示すブロック図である。図1において、101は文書デ
ータを構成する複数の文書レコードを格納したサンプル
文書データである。サンプル文書データは、検索対象文
書データの全部または一部でもよく、検索対象文書デー
タに対し、文字および文字列の出現に関する統計的性質
が類似している他の文書データであってもよい。102
はサンプル文書データ101中の各文書レコードの位置
を記録したサンプル文書句切りデータ、103はサンプ
ル文書句切りデータ102の位置情報に従ってサンプル
文書データ101から指定された文書レコードを切り出
して、レコード先頭を表す特別な文字<START>を
文書レコード先頭に付与し、レコード終了を表す特別な
文字<END>を文書レコード末尾に付与した文字列を
出力する文書区切り手段、104は文書区切り手段10
3の出力である文書レコード文字列を受け取ってサンプ
ル文書データ101中に出現する各文字の出現の度合
を、「当該文字の出現する文書レコードの文字数の総和
を全文書レコードの文字数の総和で除した値」として算
定する文字出現頻度算定手段、105は文書区切り手段
103の出力である文書レコード文字列と、文字出現頻
度算定手段104の算定結果とを受け取って、サンプル
文書データ101中に高頻度で出現する2文字連続の出
現の度合を、「当該2文字連続の出現する文書レコード
の文字数の総和を全文書レコードの文字数の総和で除し
た値」として算定する2文字連続出現頻度算定手段、1
06は文書区切り手段103の出力である文書レコード
文字列と、2文字連続出現頻度算定手段105の算定結
果とを受け取って、サンプル文書データ101中に高頻
度で出現する3文字連続の出現の度合を、「当該3文字
連続の出現する文書レコードの文字数の総和を全文書レ
コードの文字数の総和で除した値」として算定する3文
字連続出現頻度算定手段、107は文字出現頻度算定手
段104の算定結果を受け取って、出現の度合が予め定
められた「絞り込み率」以下である複数の文字をグルー
プ化し、グループに属するいずれかの文字が出現する度
合が絞り込み率を越えない範囲で絞り込み率に最も近く
なるように調整する文字グループ化手段、108は2文
字連続出現頻度算定手段105の算定結果を受け取っ
て、出現の度合が絞り込み率以下である複数の2文字連
続をグループ化し、グループに属するいずれかの2文字
連続が出現する度合が絞り込み率を越えない範囲で絞り
込み率に最も近くなるように調整する2文字連続グルー
プ化手段、109は3文字連続出現頻度算定手段106
の算定結果を受け取って、出現の度合が絞り込み率以下
である複数の3文字連続がある場合には、これをグルー
プ化し、グループに属するいずれかの3文字連続が出現
する度合が絞り込み率を越えない範囲で絞り込み率に最
も近くなるように調整し、出現の度合が絞り込み率より
も高い3文字連続はそれ1つだけで1グループにする3
文字連続グループ化手段、110は文字グループ化手段
107と2文字連続グループ化手段108と3文字連続
グループ化手段109の出力であるグループ化情報を受
け取って、各グループに通し番号を付与し、各グループ
の通し番号と、所属文字あるいは2文字連続あるいは3
文字連続との対応表を出力する索引型式出力手段、11
1は索引型式出力手段110の出力する索引型式データ
である。
(Embodiment 1) Hereinafter, an apparatus for implementing an index creation method of the present invention will be described with reference to the drawings. FIG.
FIG. 1 is a block diagram illustrating a configuration of an index creation device according to a first embodiment of the present invention. In FIG. 1, reference numeral 101 denotes sample document data storing a plurality of document records constituting the document data. The sample document data may be all or part of the search target document data, or may be other document data having similar statistical properties regarding the appearance of characters and character strings to the search target document data. 102
Is sample document punctuation data in which the position of each document record in the sample document data 101 is recorded, and 103 is a specified document record cut out from the sample document data 101 in accordance with the position information of the sample document punctuation data 102, and the beginning of the record is extracted. A document delimiter that outputs a character string in which a special character <START> representing the end of the document record is added to the head of the document record and a special character <END> indicating the end of the record is added to the end of the document record.
3, the degree of appearance of each character appearing in the sample document data 101 after receiving the document record character string is determined by dividing the sum of the number of characters of the document record in which the character appears by the sum of the number of characters of all the document records. The character appearance frequency calculating means 105 which calculates the value as a “value” is received by the document record character string output from the document separating means 103 and the calculation result of the character appearance frequency calculating means 104, A two-character continuation frequency calculating means for calculating a degree of occurrence of two consecutive characters appearing as “a value obtained by dividing the total number of characters of the document records in which the two consecutive characters appear by the total number of characters of all the document records”; 1
Reference numeral 06 denotes a document record character string output from the document delimiter 103 and a calculation result of the two-character continuous appearance frequency calculator 105, and the degree of occurrence of three consecutive characters appearing frequently in the sample document data 101. Is calculated as “the value obtained by dividing the sum of the number of characters of the document record in which the three consecutive characters appear by the sum of the number of characters of all the document records”, and 107 is the calculation of the character appearance frequency calculation means 104. Receiving the result, a plurality of characters whose degree of appearance is equal to or less than a predetermined “narrowing rate” are grouped, and the degree of occurrence of any character belonging to the group does not exceed the narrowing rate. The character grouping means 108 for adjusting to be close to each other receives the calculation result of the two-character continuous appearance frequency calculating means 105 and narrows the degree of appearance. Grouping a plurality of two-character continuations that are equal to or less than the narrowing-down ratio, and adjusting the degree of occurrence of any two-character continuation belonging to the group to be the closest to the narrowing-down ratio within a range that does not exceed the narrowing-down ratio. Means 109, three character continuous appearance frequency calculating means 106
If there is a plurality of consecutive three characters whose degree of appearance is equal to or less than the narrowing rate after receiving the calculation result of, the degree of occurrence of any three consecutive characters belonging to the group exceeds the narrowing rate. Make adjustments so as to be the closest to the narrowing-down ratio within a range that does not exist, and make a group of three consecutive characters whose appearance is higher than the narrowing-down ratio.
The character continuation grouping means 110 receives the grouping information output from the character grouping means 107, the two-character continuation grouping means 108, and the three-character continuation grouping means 109, and assigns a serial number to each group. Serial number and the assigned character or two consecutive characters or 3
Index type output means for outputting a correspondence table with character continuity, 11
Reference numeral 1 denotes index type data output from the index type output unit 110.

【0019】サンプル文書データ101には、図4に示
すような、書籍のISBN番号が1番号1文書レコード
として、553966レコード分記録されており、サン
プル文書区切りデータ102には、図4に示した文書デ
ータの各文書レコードの先頭の文字の、サンプル文書デ
ータ101先頭からの文字単位での隔たりが記録されて
いるものとし、絞り込み率として、0.05を指定する
ものとする。
As shown in FIG. 4, 553,966 ISBN numbers of books are recorded in the sample document data 101 as one-by-one document record, and the sample document delimiter data 102 shown in FIG. It is assumed that the distance of the head character of each document record of the document data from the head of the sample document data 101 in character units is recorded, and 0.05 is specified as a narrowing-down ratio.

【0020】以上のように構成された索引作成装置につ
いて、その動作を説明する。まず、サンプル文書データ
101中の各文書レコードが、文書区切り手段103で
切り出されて、文字出現頻度算定手段104に送られ、
各文字の出現の度合が、当該文字の出現する文書レコー
ドの文字数の総和/全文書レコードの文字数の総和によ
って算定される。図5〜図23は、この索引作成装置の
レポート出力であり、図5の「文字頻度表(Chara
cter histgram & Monogram−
index)」、図6〜図7の「高頻度2文字連連続
表」(Frequent Digram)、図8の「2
文字連続のグループ化結果」(Digram part
itions)、図9〜図18の「高頻度3文字連続
表」(Trigram Table)、図19〜図22
の「3文字連続のグループ化結果」(Trigram
Partitioning Table)、図23の
「索引の大きさ」(Index size)の各情報
が、順に記録されている。
The operation of the index creating apparatus configured as described above will be described. First, each document record in the sample document data 101 is cut out by the document separating means 103 and sent to the character appearance frequency calculating means 104,
The degree of appearance of each character is calculated by the sum of the number of characters of the document record in which the character appears / the sum of the number of characters of all the document records. FIG. 5 to FIG. 23 show the report output of this index creation device, and refer to the “character frequency table (Chara) in FIG.
cter histgram & Monogram-
index), “High-frequency two-character continuous table” in FIGS. 6 to 7 (Frequency Digram), and “2 in FIG.
Character grouping result "(Digram part
9) to FIG. 9 to FIG. 18 (trigger table), FIG. 19 to FIG.
Of "Grouping results of three consecutive characters" (Trigram
Information of “Partitioning Table” and “index size” of FIG. 23 are sequentially recorded.

【0021】文字出現頻度算定手段104の算定結果で
ある図5において、「Occurence」項目は、着
目文字の出現する文書レコードの文字数の総和を表し、
「(Percent)」項目は、着目文字の出現する文
書レコードの文字数の総和を全文書レコードの文字数の
総和で除した値に100を乗じた値を表し、「Ran
k」項目は、着目文字の出現度合による順序を表し、
「Char」項目は、着目文字を表し、「Monogr
am−index」項目は、出現度合によってグループ
化された文字グループ番号を表す。例えば、「Cha
r」項目の文字「−」は、第4番目に高頻度の文字であ
り、出現文書レコードの文字数の総和は、369924
1文字であり、87.29%の出現頻度を持つ。なお、
このサンプル文書データの場合には、文字種が16種と
少ないため、2文字以上からなる文字グループは存在し
ない。
In FIG. 5, which is the calculation result of the character appearance frequency calculation means 104, the item “Occurrence” indicates the total number of characters of the document record in which the character of interest appears.
The “(Percent)” item represents a value obtained by multiplying 100 by a value obtained by dividing the total number of characters of the document record in which the character of interest appears by the total number of characters of all the document records.
The “k” item indicates the order of appearance of the character of interest,
The “Char” item indicates a character of interest, and “Monogr”
The “am-index” item indicates character group numbers grouped according to the degree of appearance. For example, "Cha
The character "-" in the "r" item is the fourth most frequent character, and the total number of characters in the appearing document record is 369924.
It is one character and has an appearance frequency of 87.29%. In addition,
In the case of this sample document data, since the character types are as small as 16 types, there is no character group including two or more characters.

【0022】こうして、サンプル文書データ101の1
回目の走査が終了したら、文書区切り手段103は、サ
ンプル文書データ101の2回目の走査を開始し、切り
出した文書レコードを2文字連続出現頻度算定手段10
5に送る。2文字連続出現頻度算定手段105は、文書
レコード中の2文字連続のうちで、高頻度文字(この例
の場合には、全ての文字種が高頻度文字に当たる)同士
の連続のみを抽出し、各2文字連続の出現の度合が、
「当該2文字連続の出現する文書レコードの文字数の総
和/全文書レコードの文字数の総和」によって算定され
る。そのうちで、出現の度合が絞り込み率よりも高い、
高頻度の2文字連続を表示したのが、図6〜図7の「高
頻度2文字連続表」である。
As described above, 1 of the sample document data 101
When the second scanning is completed, the document delimiter 103 starts the second scanning of the sample document data 101 and converts the cut document record into a two-character continuous appearance frequency calculating unit 10.
Send to 5. The two-character continuation frequency calculation means 105 extracts only continuation of high-frequency characters (in this example, all character types correspond to high-frequency characters) from two-character continuation in the document record. The appearance of two consecutive characters is
It is calculated by “the sum of the number of characters of the document record in which the two consecutive characters appear / the sum of the number of characters of all the document records”. Among them, the degree of appearance is higher than the refinement rate,
The "high-frequency two-character continuation table" shown in FIGS.

【0023】図6において、「No.」項目は、高頻度
2文字連続の通し番号を表し、「Digram−Cod
e」項目は、2文字連続を構成する第1文字、第2文字
を文字グループ番号で表現した組を表し、「Digra
m−Character」項目は、2文字連続を構成す
る文字列を表し、「Occ」項目は着目2文字連続の出
現する文書レコードの文字数の総和を表し、「(Per
cent)」項目は、着目2文字連続の出現する文書レ
コードの文字数の総和を全文書レコードの文字数の総和
で除した値に100を乗じた値を表す。例えば、通し番
号が6である「−4」という2文字連続は、出現の度合
が17.57%であることがわかる。高頻度文字同士か
らなる2文字連続のうち、高頻度2文字連続以外のすべ
てを、文字グループ番号で第1文字、第2文字を表現し
た際の文字列の昇順に並べ、その後で、並び順が近接す
る2文字連続を、2文字連続グループ化手段108がグ
ループにまとめる。グループ化の際の、グループのいず
れかの2文字連続が表れる度合の算定法は、グループ内
の各2文字連続の出現が統計的に独立であると仮定し、
以下の式から求める。
In FIG. 6, the “No.” item indicates a serial number of two consecutive high-frequency characters, and “Digram-Cod”.
The item “e” represents a set in which the first character and the second character constituting two consecutive characters are represented by a character group number, and “Digra”
The “m-Character” item represents a character string forming two consecutive characters, and the “Occ” item represents the total number of characters of a document record in which two consecutive characters of interest appear, and “(Per
The “cent)” item represents a value obtained by multiplying the value obtained by dividing the total number of characters of the document records in which two consecutive characters of interest appear by the total number of characters of all the document records by 100. For example, it can be seen that the appearance degree of two consecutive characters “-4” having the serial number 6 is 17.57%. Of the two consecutive characters consisting of high-frequency characters, all but the two consecutive high-frequency characters are arranged in ascending order of the character string when the first character and the second character are represented by the character group number, and then the arrangement order Are grouped by the two-character continuation grouping means 108. When grouping, the method of calculating the degree to which any two consecutive characters of a group appear is based on the assumption that the appearance of each two consecutive characters in the group is statistically independent.
It is calculated from the following equation.

【0024】[0024]

【数1】 ただし、Pはグループ内のn個の2文字連続のいずれか
が現れる度合であり、Pj (j=1,2,・・・n)は
グループ内のj番目の2文字連続が現れる度合である。
(Equation 1) Here, P is the degree of appearance of any of n consecutive two characters in the group, and P j (j = 1, 2,... N) is the degree of appearance of the jth two consecutive characters in the group. is there.

【0025】その結果が、図8の「2文字連続のグルー
プ化結果」である。図8において、「No.」項目は、
2文字連続のグループ番号を表し、「Digram−C
ode」項目はグループとグループの境界に位置する当
該グループ中で最も文字列順の大きい2文字連続の第1
文字、第2文字の文字グループ番号を表し、「Digr
am−Character」項目は当該2文字連続を構
成する文字列を表す。例えば、2文字連続のグループ番
号7には、2文字連続「22」および「23」が含ま
れ、2文字連続のグループ番号8には、2文字連続「2
5」、「26」、「27」、「29」が含まれる。
The result is the “grouping result of two consecutive characters” in FIG. In FIG. 8, the "No."
Represents a group number consisting of two consecutive characters, "Digram-C
The “mode” item is the first character of a two-character continuation having the largest character string order among the groups located at the boundary between the groups.
Represents the character group number of the character and the second character, "Digr
The “am-Character” item indicates a character string that forms the two-character continuation. For example, two-character continuous group number 7 includes two-character continuous “22” and “23”, and two-character continuous group number 8 includes two-character continuous “2”.
5 "," 26 "," 27 ", and" 29 ".

【0026】こうして、サンプル文書データ101の2
回目の走査が終了したら、文書区切り手段103は、サ
ンプル文書データ101の3回目の走査を開始し、切り
出した文書レコードを3文字連続出現頻度算定手段10
6に送る。3文字連続出現頻度算定手段106は、文書
レコード中の3文字連続のうちで、(第1文字、第2文
字)および(第2文字、第3文字)がいずれも高頻度2
文字連続である3文字連続のみを抽出し、各3文字連続
の出現の度合が、「当該3文字連続の出現する文書レコ
ードの文字数の総和/全文書レコードの文字数の総和」
によって算定され、その結果が3文字連続グループ化手
段109に送られ、式(1)と同様の基準によって、絞
り込み率をもとにグループ化される。その結果を表示し
たのが図9〜図18の「高頻度3文字連続表」および図
19〜図22の「3文字連続のグループ化結果」であ
る。
Thus, the sample document data 101-2
When the first scanning is completed, the document separating unit 103 starts the third scanning of the sample document data 101, and converts the extracted document record into the three-character continuous appearance frequency calculating unit 10.
Send to 6. The three-character consecutive appearance frequency calculation unit 106 determines that (first character, second character) and (second character, third character) are both high-frequency two out of three consecutive characters in the document record.
Only three consecutive characters, which are consecutive characters, are extracted, and the degree of appearance of each consecutive three characters is determined as “the total number of characters of the document records in which the consecutive three characters appear / the total number of characters of all the document records”.
Is calculated, and the result is sent to the three-character continuous grouping means 109, and is grouped based on the narrowing-down ratio according to the same criterion as in the equation (1). The results are displayed in the “high-frequency three-character continuation table” in FIGS. 9 to 18 and the “three-character continuation grouping result” in FIGS. 19 to 22.

【0027】図9において、「No.」項目は、3文字
連続の通し番号を表し、「Group」項目は、3文字
連続のグループ番号を表し、「Trigram−Cod
e」項目は、3文字連続の第1文字、第2文字、第3文
字の文字グループ番号を表し、「Trigram−Ch
aracter」項目は、当該3文字連続を構成する文
字列を表し、「Occ」項目は、着目3文字連続の出現
する文書レコードの文字数の総和を表し、「(Perc
ent)」項目は、着目3文字連続の出現する文書レコ
ードの文字数の総和を全文書レコードの文字数の総和で
除した値に100を乗じた値を表す。
In FIG. 9, the "No." item represents a serial number of three consecutive characters, the "Group" item represents a group number of three consecutive characters, and "Trigram-Cod".
The “e” item indicates a character group number of a first character, a second character, and a third character of three consecutive characters, and “Trigram-Ch”
The “aractor” item represents a character string that forms the three consecutive characters, and the “Occ” item represents the total number of characters of a document record in which the three consecutive characters of interest appear, and “(Perc
ent) "item represents a value obtained by multiplying 100 by a value obtained by dividing the total number of characters of the document records in which three consecutive characters of interest appear by the total number of characters of all the document records.

【0028】また、図19において、「No.」項目
は、3文字連続のグループ番号を表し、「Trigra
m−Code」項目は、グループとグループの境界に位
置する当該グループ中で文字グループ番号で計った文字
列順の大きい2文字連続の第1文字、第2文字の文字グ
ループ番号を表し、「Trigram−Charact
er」項目は、当該3文字連続を構成する文字列を表
す。例えば、3文字連続のグループ番号138には、3
文字連続「202」、「203」、「205」、「20
6」、「207」、「209」、「204」が所属す
る。
In FIG. 19, the item “No.” represents a group number of three consecutive characters, and “Trigraph”.
The “m-Code” item indicates the first and second character group numbers of two consecutive characters in large character string order measured by the character group number in the group located at the boundary between the groups. -Charact
The “er” item represents a character string constituting the three consecutive characters. For example, a group number 138 having three consecutive characters has 3
Character continuation "202", "203", "205", "20"
6 "," 207 "," 209 ", and" 204 ".

【0029】こうして、得られたグループ化情報が、索
引型式出力手段110に送られ、低頻度文字グループ、
2文字連続グループ、3文字連続グループの1つ1つに
対して、1bitの索引情報を割り当てるような索引型
式を、索引型式データ111に出力する。作成される索
引の文書レコード当りの大きさを表示したものが、図2
3の「索引の大きさ」である。
The obtained grouping information is sent to the index type output means 110, and the low-frequency character group,
An index type that assigns 1-bit index information to each of the two-character continuous group and the three-character continuous group is output to the index type data 111. FIG. 2 shows the size of the created index per document record.
No. 3 “index size”.

【0030】図23において、「1)Monogram
−index:」項目は、低頻度文字索引の大きさを表
し、「2)Digram−index:」項目は、2文
字連続の索引の大きさを表し、「3)Trigram−
index:」項目は、3文字連続の索引の大きさを表
し、「Total Index size:」項目は、
1)2)3)を合計した1文書レコード当りの索引のサ
イズを表す。この例では、1文書レコードあたり、合計
32バイトの索引が作成される。
In FIG. 23, "1) Monogram
The “-index:” item indicates the size of the low-frequency character index, “2) Digram-index:” indicates the size of the index of two consecutive characters, and “3) Trigram-
The “index:” item indicates the size of an index of three consecutive characters, and the “Total Index size:” item is
1) represents the size of the index per document record obtained by summing up 2) and 3). In this example, an index of a total of 32 bytes is created for one document record.

【0031】以上のように、本実施例によれば、サンプ
ル文書データの文字および文字列の出現の度合から、多
く出現する文字については、2文字連続情報を用いて、
より詳細な索引情報をつくり、その中でより多く出現す
る2文字連続には、3文字連続情報を用いてさらに詳細
な索引情報をつくることで、高頻度で出現する文字およ
び文字列に対して高精度な索引型式データを作成でき、
逆に、あまり出現しない文字および文字列については、
グループ化によって、索引情報の容量を縮小した索引型
式データを作成することができる。
As described above, according to the present embodiment, from the degree of appearance of characters and character strings in sample document data, for characters that frequently appear, two-character continuation information is used.
By creating more detailed index information and creating more detailed two-character continuation information using the three-letter continuity information, more frequently occurring characters and character strings can be created. High-precision index type data can be created,
Conversely, for characters and strings that do not appear often,
By grouping, index type data in which the capacity of index information is reduced can be created.

【0032】(実施例2)次に、本発明の第2の実施例
について、図面を参照しながら説明する。図2は本発明
の第2の実施例における索引作成装置の構成を示すブロ
ック図である。図2において、201は複数の文書レコ
ードを格納した検索対象文書データ、202は検索対象
文書データ201中の各文書レコードの位置を記録した
検索対象文書句切りデータ、203は検索対象文書句切
りデータ202の位置情報に従って検索対象文書データ
201から指定された文書レコードを切り出して、レコ
ード先頭を表す特別な文字<START>を文書レコー
ド先頭に付与し、レコード終了を表す特別な文字<EN
D>を文書レコード末尾に付与した文字列を出力する文
書区切り手段、204は図1に示した索引作成装置によ
り作成された索引型式データ、205は文書区切り手段
203の出力である文書レコード文字列を受け取って、
検索対象文書データ201中に出現する各文字から始ま
る文字列の、索引作成時に用いる検索文字数が1である
か2であるか3であるかを、索引型式データ204に従
って決定する文字連続数算定手段、206は文字連続数
算定手段205の算定結果である文字数と、文字列およ
び索引型式データのグループの定義とを受け取って、対
応するグループ番号を算定するグループ番号算定手段、
207はグループ番号算定手段206の出力であるグル
ープ番号を受け取って、1文書レコードの索引情報を作
成して出力する索引情報蓄積出力手段、208は索引情
報蓄積出力手段207が出力する検索対象データ201
に関する索引データである。
(Embodiment 2) Next, a second embodiment of the present invention will be described with reference to the drawings. FIG. 2 is a block diagram showing the configuration of the index creation device according to the second embodiment of the present invention. In FIG. 2, reference numeral 201 denotes search target document data storing a plurality of document records, 202 denotes search target document punctuation data in which the position of each document record in the search target document data 201 is recorded, and 203 denotes search target document punctuation data. A specified document record is cut out from the search target document data 201 according to the position information of 202, a special character <START> indicating the head of the record is added to the head of the document record, and a special character <EN indicating the end of the record is added.
D> a document delimiter for outputting a character string with the document record added to the end of the document record; 204, index type data created by the index creation device shown in FIG. Receiving
A character continuation number calculating means for determining, based on the index type data 204, whether the number of search characters to be used at the time of creating an index of a character string starting from each character appearing in the search target document data 201 is 1, 2 or 3. , 206 are group number calculating means for receiving the number of characters as the calculation result of the character continuation number calculating means 205 and the definition of the group of character strings and index type data, and calculating the corresponding group number;
Reference numeral 207 denotes an index information storage and output unit that receives the group number output from the group number calculation unit 206 and creates and outputs index information of one document record. Reference numeral 208 denotes search target data 201 output by the index information storage and output unit 207.
Is index data for

【0033】以上のように構成された索引作成装置につ
いて、その動作を、図24に示すこの索引作成装置が動
作する際に出力したレポート出力を例にして説明する。
図24において、Record No,2の「<STA
RT>4−587−51151−X<END>」は、検
索対象データの第2レコードの切り出し結果である。こ
の文字列が文字連続数算定手段205に送られると、ま
ず、各文字を文字グループ番号に直し、次に索引型式デ
ータ204にしたがって、文字連続数を算定する。この
例の文字列は、文字グループ番号で表現すると、「0、
2、3、9、6、11、3、7、7、10、5、4、
3、10、1」となる。そして、先頭の「<START
>,4」なる2文字が2文字連続として、文字グループ
番号の組[0−2]で切り出され、グループ番号算定手
段206が、これからグループ番号0を算定し、索引情
報蓄積出力手段207が、これを受け取って、内部のビ
ット列の0番目のものを、16進「0000」から16
進「0001」に変える。先頭から2文字目の「4,
−,5」なる3文字の場合は、3文字連続として、文字
グループ番号の組[2−3−9]で切り出され、グルー
プ番号算定手段206が、これからグループ番号72を
算定し、索引情報蓄積出力手段207が、これを受け取
って、内部のビット列の4番目のものを、16進「00
00」から16進「0100」に変える。このようにし
て、着目文字を次々と移動させながら、索引情報蓄積出
力手段207の内部のビット列に、第2レコードの索引
情報をビット列の形で蓄積する。最後の文字の処理が終
了した場合には、蓄積したビット列を、索引データ20
8に出力する。以上の処理を各文書レコードに対して次
々に行うことにより、最終的に、検索対象データ101
内の全文書レコードに関する索引情報を、索引データ2
08に格納し、索引作成処理を終了する。
The operation of the index creating apparatus configured as described above will be described with reference to an example of a report output output when the index creating apparatus shown in FIG. 24 operates.
In FIG. 24, “<STA” of Record No. 2
RT> 4-587-5151-X <END> ”is a result of extracting the second record of the search target data. When this character string is sent to the character continuation number calculating means 205, first, each character is converted into a character group number, and then the character continuation number is calculated according to the index type data 204. The character string in this example can be expressed as “0,
2, 3, 9, 6, 11, 3, 7, 7, 10, 5, 4,
3, 10, 1 ". Then, at the beginning "<START
>, 4 ”is cut out as a two-character continuation by a set of character group numbers [0-2], the group number calculation means 206 calculates the group number 0 from this, and the index information accumulation and output means 207 Receiving this, the 0th bit string inside is changed from hexadecimal “0000” to 16
Change to hexadecimal "0001". "4," the second character from the beginning
In the case of three characters “−, 5”, the characters are cut out as a group of three characters consecutively by a set of character group numbers [2-3-9], and the group number calculation means 206 calculates the group number 72 from this and stores the index information. The output means 207 receives this, and outputs the fourth internal bit string to hexadecimal "00".
"00" to hexadecimal "0100". In this way, the index information of the second record is accumulated in the bit string inside the index information accumulation and output means 207 in the form of a bit string while moving the character of interest one after another. When the processing of the last character is completed, the accumulated bit string is stored in the index data 20.
8 is output. By sequentially performing the above processing for each document record, finally, the search target data 101
Index information about all document records in the index data 2
08, and the index creation processing ends.

【0034】このように、本実施例の索引作成装置によ
れば、索引型式データ204が、検索対象文書データと
文字および文字列の出現の度合が類似している場合に
は、索引型式データ204内の統計情報を用いて、検索
対象文書データを調べることなしに、多く出現する文字
については、2文字連続情報を用いてより詳細な索引情
報を作り、その中でより多く出現する2文字連続には、
3文字連続情報を用いてさらに詳細な索引情報をつくる
ことで、高頻度で出現する文字および文字列に対して、
高精度な索引データを作成でき、逆に、あまり出現しな
い文字および文字列については、グループ化によって、
索引情報の容量を縮小した索引データを作成することが
できる。
As described above, according to the index creating apparatus of this embodiment, if the index type data 204 is similar in the appearance of characters and character strings to the search target document data, the index type data 204 Without examining the search target document data using the statistical information in, for more characters, create more detailed index information using the two-character continuous information, and use the two-character continuous In
By creating more detailed index information using three-character continuous information, characters and character strings that appear frequently
High-precision index data can be created. Conversely, for characters and character strings that do not appear often,
Index data in which the capacity of index information is reduced can be created.

【0035】(実施例3)次に、本発明の第3の実施例
について、図面を参照しながら説明する。図3は本発明
の文書検索方法を用いた文書検索装置の一実施例を示す
ブロック図である。図3において、301は複数の文書
レコードを格納した検索対象文書データ、302は利用
者が検索条件を入力する検索条件入力手段、303は検
索対象文書データ301に関する索引情報を記録した図
2の索引作成装置を用いて作成した索引データ、304
は検索対象文書データ301を走査して、検索条件入力
手段302から入力された検索条件と照合する文書レコ
ードを出力する全文走査文字列照合手段、305は検索
条件入力手段302から入力された検索条件を、索引デ
ータ303が取り扱える検索条件に変形する索引照合条
件作成手段、306は索引データ303と、索引照合条
件作成手段305の作成した索引照合条件との照合を行
って、照合した文書レコードの情報を、全文走査文字列
照合手段304に通知する索引照合手段、307は全文
走査文字列照合手段304が出力する検索結果である。
Embodiment 3 Next, a third embodiment of the present invention will be described with reference to the drawings. FIG. 3 is a block diagram showing one embodiment of a document search device using the document search method of the present invention. 3, reference numeral 301 denotes search target document data storing a plurality of document records; 302, search condition input means for a user to input search conditions; 303, an index shown in FIG. Index data created using the creation device, 304
Is a full-text scanning character string matching unit that scans the search target document data 301 and outputs a document record that matches the search condition input from the search condition input unit 302, and 305 denotes a search condition input from the search condition input unit 302. Is converted into a search condition that can be handled by the index data 303. An index collation condition creating unit 306 collates the index data 303 with the index collation condition created by the index collation condition creating unit 305, and obtains information of the collated document record. Is sent to the full-text scanning character string matching means 304, and 307 is a search result output by the full-text scanning character string matching means 304.

【0036】以上のように構成された文書検索装置につ
いて、その動作を、図25の検索例により説明する。図
25において、「キーワード?」の次の文字列が、利用
者が検索条件入力手段302を用いて入力した検索条件
で、この例では、正規表現「115[1−3]−X」が
入力されている。この検索条件の解釈は、「1151−
X」か、「1152−X」か、あるいは「1153−
X」のいずれかがレコード中に含まれる文書データを全
て求めよ、ということである。この検索条件が索引照合
条件作成手段305に送られると、図25の「Matc
hing Vector」以下で示されているように、
検索照合条件がベクトルに埋め込まれたAND/OR木
の型式で求まる。このベクトルの各要素は(位置−オフ
セット−ビット列)の情報を持つ。その解釈は、図26
および図27のようになる。この例では、例えば「11
5」の3文字連続に対応する要素が(5−10−100
0)で、このうち、「10」と16進「1000」で、
文書レコードに対応する索引情報のビット列中のビット
を特定する。このベクトル型式の検索照合条件が、索引
照合手段306に送られ、索引データ303と照合さ
れ、図25の「Index match」以下のよう
に、「Record No.3(4−587−5115
1−X)」や「Record No.10347(4−
09−151801−X)」などの文書レコードが照合
し、このレコードの位置情報が全文走査文字列照合手段
304に送られる。全文走査文字列照合手段304は,
この索引照合手段306が照合に成功した文書レコード
の位置情報と、検索対象文書データ301の文書情報を
もとに、必要な文書レコードを読み込み、検索条件入力
手段302から入力された検索条件、この例では正規表
現「115[1−3]−X」との文字列照合を行い、図
25の「Result」のような、最終的な結果を得
て、検索結果307に格納し、文書検索処理を終了す
る。
The operation of the above-configured document search apparatus will be described with reference to a search example shown in FIG. In FIG. 25, the character string next to “keyword?” Is a search condition input by the user using the search condition input unit 302. In this example, the regular expression “115 [1-3] -X” is input. Have been. The interpretation of this search condition is “1151-
X ”,“ 1152-X ”, or“ 1153-
X ”means that all the document data included in the record is obtained. When this search condition is sent to the index matching condition creating means 305, “Matc” in FIG.
hing Vector ", as shown below,
The search collation condition is determined by the type of the AND / OR tree embedded in the vector. Each element of this vector has (position-offset-bit string) information. The interpretation is shown in FIG.
And FIG. 27. In this example, for example, “11
The element corresponding to three consecutive characters of "5" is (5-10-100
0), of which "10" and hexadecimal "1000"
The bit in the bit string of the index information corresponding to the document record is specified. The search collation condition of this vector type is sent to the index collation means 306, collated with the index data 303, and as shown in "Index match" in FIG. 25, "Record No. 3 (4-587-5115)".
1-X) ”and“ Record No. 10347 (4-
09-151801-X) ", and the position information of this record is sent to the full-text scanning character string matching means 304. The full-text scanning character string matching unit 304
Based on the position information of the document record successfully matched by the index matching unit 306 and the document information of the search target document data 301, a necessary document record is read, and the search condition input from the search condition input unit 302. In the example, a character string collation with the regular expression “115 [1-3] -X” is performed, a final result like “Result” in FIG. 25 is obtained, stored in the search result 307, and the document search process is performed. To end.

【0037】このように、本実施例の文書検索装置によ
れば、索引容量が小さく、正規表現などの複雑な検索条
件にも対応可能な本発明の索引作成装置を援用して作成
した索引データを用いて、従来はフルテキストスキャン
方式でしか扱えなかった複雑な検索条件の場合でも、高
速に文書検索を実行することができる。
As described above, according to the document search apparatus of the present embodiment, the index data created with the help of the index creation apparatus of the present invention which has a small index capacity and can cope with complicated search conditions such as regular expressions. , It is possible to execute a high-speed document search even in the case of a complicated search condition which can be conventionally handled only by the full text scan method.

【0038】[0038]

【発明の効果】本発明は、上記各実施例から明らかなよ
うに、検索対象文書データに関する索引データを作成す
る際に、サンプル文書データの文字および文字列の出現
を統計的に調べて前記索引データを作成する際の共通情
報となる索引型式データを作成し、前記索引型式データ
の型式に従って検索対象文書データに関する索引データ
を作成するとともに、索引型式データ作成段階では、前
記文字列の出現を統計的に調べる動作として、一定度数
以下の文字(低頻度文字)については、1文字で索引を
作成することを決定し、一定度数以上の文字(高頻度文
字)については、高頻度文字同士の2文字連続を調べ、
次に、一定度数以下の2文字連続文字(低頻度2文字連
続)については、2文字で索引を作成することを決定
し、一定度数以上の2文字連続(高頻度2文字連続)に
ついては、高頻度2文字連続文字同士の3文字連続を調
べる動作を順次行なうことにより、高頻度な文字列ほ
ど、長い文字連続として索引を作成することを決定した
内容の索引型式データを作成するようにしたので、作成
・更新時間が短く、容量が小さく、正規表現などの複雑
な文字列パターンでの近似検索も高速で行なうことので
きる索引作成方法とその装置および作成された索引デー
タとフルテキストスキャンとを組み合わせた検索速度の
速い文書検索装置を実現することができる。
As is apparent from the above embodiments, the present invention statistically examines the appearance of characters and character strings in sample document data when creating index data relating to search target document data and performs the index search. In addition to creating index type data as common information when creating data, creating index data relating to the search target document data in accordance with the type of the index type data, in the index type data creating step, the appearance of the character string is statistically determined. As an operation to check the characteristics, it is determined that an index is created with one character for a character having a certain frequency or less (low-frequency character), and for a character having a certain frequency or more (high-frequency character), two characters between the high-frequency characters are determined. Check character continuity,
Next, it is determined that an index should be created with two characters for two consecutive characters having a certain frequency or less (low-frequency two consecutive characters), and for two characters having a certain frequency or more (two consecutive high-frequency characters), By sequentially performing an operation of checking for three consecutive characters between two consecutive high-frequency characters, it was determined that an index was created as a longer character sequence for a higher-frequency character string .
An index creation method and device that creates index type data of the contents, so that the creation / update time is short, the capacity is small, and an approximate search with a complex character string pattern such as a regular expression can be performed at high speed. Further, it is possible to realize a high-speed document search apparatus that combines created index data and full-text scan.

【0039】特に、文字および文字列の出現の度合があ
まり変わらない多数の検索対象文書がある場合や、検索
対象文書の更新がひんぱんに行われる場合などは、一旦
索引型式データを作成しておけば、きわめて高速に、小
容量の索引データが作成でき、検索条件の制約なしに、
フルテキストスキャンの高速化を図ることができ、その
効果は大きい。ちなみに本発明による索引データを用い
れば、全国紙の新聞1年分をキーワード1個で検索した
場合、検索速度を従来の20倍程度も向上させることが
できる。
In particular, when there are a large number of documents to be searched in which the degree of appearance of characters and character strings does not change much, or when the documents to be searched are frequently updated, the index format data may be created once. You can create very small amounts of index data very quickly,
The speed of full-text scanning can be increased, and the effect is great. By the way, if the index data according to the present invention is used, when one year's worth of newspapers of the national newspaper is searched with one keyword, the search speed can be improved by about 20 times compared with the related art.

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

【図1】本発明の第1の実施例における索引型式作成装
置の構成を示すブロック図
FIG. 1 is a block diagram showing a configuration of an index type creating apparatus according to a first embodiment of the present invention.

【図2】本発明の第2の実施例における索引作成装置の
構成を示すブロック図
FIG. 2 is a block diagram illustrating a configuration of an index creation device according to a second embodiment of the present invention.

【図3】本発明の第3の実施例における文書検索装置の
構成を示すブロック図
FIG. 3 is a block diagram illustrating a configuration of a document search device according to a third embodiment of the present invention.

【図4】第1の実施例におけるサンプル文書データの一
部を示す一覧図
FIG. 4 is a list diagram showing a part of sample document data in the first embodiment.

【図5】第1の実施例における索引型式作成処理に関す
るレポート出力を示す一覧図
FIG. 5 is a list showing a report output relating to an index type creation process in the first embodiment.

【図6】第1の実施例における索引型式作成処理に関す
るレポート出力を示す一覧図
FIG. 6 is a list diagram showing a report output related to an index type creation process in the first embodiment.

【図7】第1の実施例における索引型式作成処理に関す
るレポート出力を示す一覧図
FIG. 7 is a list diagram showing a report output related to an index type creation process in the first embodiment.

【図8】第1の実施例における索引型式作成処理に関す
るレポート出力を示す一覧図
FIG. 8 is a list diagram showing a report output related to an index type creation process in the first embodiment.

【図9】第1の実施例における索引型式作成処理に関す
るレポート出力を示す一覧図
FIG. 9 is a list diagram showing a report output related to the index type creation processing in the first embodiment.

【図10】第1の実施例における索引型式作成処理に関
するレポート出力を示す一覧図
FIG. 10 is a list diagram showing a report output related to an index type creation process in the first embodiment.

【図11】第1の実施例における索引型式作成処理に関
するレポート出力を示す一覧図
FIG. 11 is a list showing a report output relating to an index type creation process in the first embodiment.

【図12】第1の実施例における索引型式作成処理に関
するレポート出力を示す一覧図
FIG. 12 is a list diagram showing a report output related to an index type creation process in the first embodiment.

【図13】第1の実施例における索引型式作成処理に関
するレポート出力を示す一覧図
FIG. 13 is a list diagram showing a report output related to the index type creation processing in the first embodiment.

【図14】第1の実施例における索引型式作成処理に関
するレポート出力を示す一覧図
FIG. 14 is a list diagram showing a report output related to the index type creation processing in the first embodiment.

【図15】第1の実施例における索引型式作成処理に関
するレポート出力を示す一覧図
FIG. 15 is a list diagram showing a report output related to the index type creation processing in the first embodiment.

【図16】第1の実施例における索引型式作成処理に関
するレポート出力を示す一覧図
FIG. 16 is a list showing a report output relating to an index type creation process in the first embodiment.

【図17】第1の実施例における索引型式作成処理に関
するレポート出力を示す一覧図
FIG. 17 is a list showing a report output relating to the index type creation processing in the first embodiment.

【図18】第1の実施例における索引型式作成処理に関
するレポート出力を示す一覧図
FIG. 18 is a list diagram showing a report output related to the index type creation processing in the first embodiment.

【図19】第1の実施例における索引型式作成処理に関
するレポート出力を示す一覧図
FIG. 19 is a view showing a list of reports output regarding the index type creation processing in the first embodiment.

【図20】第1の実施例における索引型式作成処理に関
するレポート出力を示す一覧図
FIG. 20 is a list showing a report output relating to the index type creation processing in the first embodiment.

【図21】第1の実施例における索引型式作成処理に関
するレポート出力を示す一覧図
FIG. 21 is a list showing report output related to index type creation processing in the first embodiment.

【図22】第1の実施例における索引型式作成処理に関
するレポート出力を示す一覧図
FIG. 22 is a list showing a report output related to the index type creation processing in the first embodiment.

【図23】第1の実施例における索引型式作成処理に関
するレポート出力を示す一覧図
FIG. 23 is a list diagram showing a report output related to an index type creation process in the first embodiment.

【図24】第2の実施例における索引作成処理に関する
レポート出力を示す一覧図
FIG. 24 is a list showing report output related to index creation processing in the second embodiment.

【図25】第3の実施例における文書検索装置の検索例
を示す一覧図
FIG. 25 is a list diagram showing a search example of the document search device in the third embodiment.

【図26】第3の実施例における索引照合条件の形式と
解釈を説明するための一覧図
FIG. 26 is a list for explaining the format and interpretation of index matching conditions in the third embodiment;

【図27】第3の実施例における索引照合条件の形式と
解釈を説明するための一覧図
FIG. 27 is a list for explaining the format and interpretation of index matching conditions in the third embodiment;

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

101 サンプル文書データ 102 サンプル文書区切りデータ 103 文書区切り手段 104 文字出現頻度算定手段 105 2文字連続出現頻度算定手段 106 3文字連続出現頻度算定手段 107 文字グループ化手段 108 2文字連続グループ化手段 109 3文字連続グループ化手段 110 索引型式出力手段 111 索引型式データ 201 検索対象データ 202 検索対象文書区切りデータ 203 文書区切り手段 204 索引型式データ 205 文字連続数算定手段 206 グループ番号算定手段 207 索引情報蓄積出力手段 208 索引データ 301 検索対象データ 302 検索条件入力手段 303 索引データ 304 全文走査文字列照合手段 305 索引照合条件作成手段 306 索引照合手段 307 検索結果 101 sample document data 102 sample document separation data 103 document separation means 104 character appearance frequency calculation means 105 two-character continuous appearance frequency calculation means 106 three-character continuous appearance frequency calculation means 107 character grouping means 108 two-character continuous grouping means 109 three characters Continuous grouping means 110 Index type output means 111 Index type data 201 Search target data 202 Search target document delimiter data 203 Document delimiter means 204 Index type data 205 Character continuation number calculation means 206 Group number calculation means 207 Index information accumulation output means 208 Index Data 301 Search target data 302 Search condition input means 303 Index data 304 Full text scanning character string matching means 305 Index matching condition creating means 306 Index matching means 307 Search results

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平5−174064(JP,A) 菊池,「日本語文書用高速全文検索の 一手法」,情報学基礎,No.25−2, 1992年5月12日,p.9−16 安藤、菅野、伊藤、田村、鶴林、早 川,「フルテキストデータベースシステ ム「検蔵君」」,Advanced D atabase System Sym posium’90,1990年12月5日, p.17−25 (58)調査した分野(Int.Cl.7,DB名) G06F 17/30 G06F 17/21 JICSTファイル(JOIS)──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-5-174064 (JP, A) Kikuchi, "A technique for high-speed full-text search for Japanese documents," Informatics Basics, No. 25-2, May 12, 1992, p. 9-16 Ando, Sugano, Ito, Tamura, Tsurubayashi, Hayakawa, "Full-text database system" Kenzo-kun "", Advanced Data System System Symposium '90, December 5, 1990, p. 17-25 (58) Field surveyed (Int. Cl. 7 , DB name) G06F 17/30 G06F 17/21 JICST file (JOIS)

Claims (5)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 サンプル文書データの文字および文字列
の出現を統計的に調べて前記索引データを作成する際の
共通情報となる索引型式データを作成する段階と、 前記索引型式データの型式に従って検索対象文書データ
に関する索引データを作成する段階とから成り、 索引型式データ作成段階では、 前記文字列の出現を統計的に調べる動作として、一定度
数以下の文字(低頻度文字)については、1文字で索引
を作成することを決定し、一定度数以上の文字(高頻度
文字)については、高頻度文字同士の2文字連続を調
べ、 次に、一定度数以下の2文字連続文字(低頻度2文字連
続)については、2文字で索引を作成することを決定
し、一定度数以上の2文字連続(高頻度2文字連続)に
ついては、高頻度2文字連続文字同士の3文字連続を調
べる動作を順次行なうことにより、高頻度な文字列ほ
ど、長い文字連続として索引を作成することを決定した
内容の索引型式データを作成することを特徴とする索引
作成方法。
A step of statistically examining the appearance of characters and character strings in sample document data to create index type data serving as common information when creating the index data; and searching according to the type of the index type data. Creating index data relating to the target document data. In the index type data creating step, as an operation of statistically examining the appearance of the character string, one character is used for characters having a certain frequency or less (low-frequency characters). It is determined that an index is to be created, and for characters having a certain frequency or higher (high-frequency characters), two consecutive characters between high-frequency characters are checked. For ()), it is decided to create an index with two characters, and for two consecutive characters of a certain frequency or more (high-frequency consecutive two characters), three consecutive characters of high-frequency consecutive two characters By sequentially performing an operation to investigate, it decides to create more frequent string, the index as long character sequence
An index creation method characterized by creating index type data of contents .
【請求項2】 サンプル文書データ中のある1文字の出
現の度合を統計的に調べる文字出現頻度算定手段と、前
回調べた文字の出現の度合が予め定められた値よりも高
い場合に、前回調べた文字の全てを含むN文字(Nは
2、3、4、・・・の自然数)の文字列についての出現
の度合を統計的に調べる複数のN文字連続出現頻度算定
手段と、サンプル文書データ中の文字または文字列の出
現の度合に応じて前記文字出現頻度算定手段および前記
複数のN文字連続出現頻度算定手段の出力から検索対象
文書データに関する索引データを作成する際の共通情報
となる索引型式データを作成する索引型式出力手段とを
備えた索引作成装置。
2. A character appearance frequency calculating means for statistically examining a degree of appearance of a certain character in sample document data, and a character appearance frequency calculating means for determining whether the degree of appearance of a character examined last time is higher than a predetermined value. A plurality of N-character consecutive appearance frequency calculating means for statistically examining the degree of appearance of N character strings (N is a natural number of 2, 3, 4,...) Including all of the checked characters; It becomes common information when creating index data on search target document data from the output of the character appearance frequency calculating means and the plurality of N-character consecutive appearance frequency calculating means according to the degree of appearance of a character or a character string in data. An index creation device comprising: index type output means for creating index type data.
【請求項3】 サンプル文書データ中の文字または文字
列をその出現の度合に応じてグループ化する複数のグル
ープ化手段を備え、索引型式出力手段が、前記各グルー
プ化手段から出力されたグループ化情報を基に各グルー
プの通し番号と所属する文字または文字列との対応表を
出力することを特徴とする請求項2記載の索引作成装
置。
A plurality of grouping means for grouping characters or character strings in the sample document data in accordance with the degree of appearance thereof, wherein the index type output means outputs the grouping output from each of the grouping means. 3. The index creation device according to claim 2, wherein a correspondence table between a serial number of each group and a character or character string belonging to the group is output based on the information.
【請求項4】 検索対象文書データに関する索引データ
を作成する際に用いる検索文字数を請求項3記載の索引
作成装置から出力された索引型式データに従って決定す
る文字連続数算定手段と、前記文字連続数算定手段によ
り決定された文字数と請求項3記載の索引作成装置から
出力された索引型式データとから対応するグループ番号
を算定するグループ番号算定手段と、前記グループ番号
算定手段から出力されたグループ番号からそれぞれの文
書レコードの索引データを作成する索引情報蓄積出力手
段とを備えた索引作成装置。
4. A character continuation number calculating means for determining the number of search characters to be used when generating index data relating to search target document data according to index type data output from the index creation device according to claim 3, and said character continuation number A group number calculating means for calculating a corresponding group number from the number of characters determined by the calculating means and the index type data output from the index creating device according to claim 3, and a group number output from the group number calculating means. An index creation device comprising: index information accumulation output means for creating index data for each document record.
【請求項5】 文字列パターンを含む検索条件を入力す
る検索入力手段と、前記検索条件から請求項4記載の索
引作成装置から出力された索引データを照合するための
文字または文字列のAND/OR木を作成する索引照合
条件作成手段と、前記索引データと前記索引照合条件作
成手段が作成したAND/OR木との照合を行なう索引
照合手段と、照合が成功した場合に、検索対象文書デー
タの対応する部分を前記検索条件入力手段から入力され
た文字列パターンを含む検索条件と照合し、照合の成功
した部分を最終的な検索結果として出力する全文走査文
字列照合手段とを備えた文書検索装置。
5. A search input means for inputting a search condition including a character string pattern, and a character or character string for collating index data output from the index creation device according to the search condition. An index matching condition creating means for creating an OR tree; an index matching means for matching the index data with the AND / OR tree created by the index matching condition creating means; And a full-text scanning character string matching unit that matches a corresponding part of the search condition with a search condition including a character string pattern input from the search condition input unit, and outputs a part that has been successfully matched as a final search result. Search device.
JP05253032A 1993-10-08 1993-10-08 Index creation method and apparatus and document search apparatus Expired - Fee Related JP3081093B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP05253032A JP3081093B2 (en) 1993-10-08 1993-10-08 Index creation method and apparatus and document search apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP05253032A JP3081093B2 (en) 1993-10-08 1993-10-08 Index creation method and apparatus and document search apparatus

Publications (2)

Publication Number Publication Date
JPH07105237A JPH07105237A (en) 1995-04-21
JP3081093B2 true JP3081093B2 (en) 2000-08-28

Family

ID=17245536

Family Applications (1)

Application Number Title Priority Date Filing Date
JP05253032A Expired - Fee Related JP3081093B2 (en) 1993-10-08 1993-10-08 Index creation method and apparatus and document search apparatus

Country Status (1)

Country Link
JP (1) JP3081093B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3325677B2 (en) * 1993-11-29 2002-09-17 株式会社リコー Document search device
JP2996895B2 (en) * 1995-05-19 2000-01-11 松下電器産業株式会社 Index type making device
JP4183767B2 (en) * 1996-01-10 2008-11-19 株式会社野村総合研究所 Character string search device and search method thereof
JP3567711B2 (en) * 1997-07-11 2004-09-22 松下電器産業株式会社 String collation device
JP2008077543A (en) * 2006-09-25 2008-04-03 Fujitsu Ltd Report citation source information acquisition apparatus, report citation source information acquisition method, and report citation source information acquisition program
CN101963965B (en) 2009-07-23 2013-03-20 阿里巴巴集团控股有限公司 Document indexing method, data query method and server based on search engine

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3263963B2 (en) * 1991-12-25 2002-03-11 株式会社日立製作所 Document search method and apparatus

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
安藤、菅野、伊藤、田村、鶴林、早川,「フルテキストデータベースシステム「検蔵君」」,Advanced Database System Symposium’90,1990年12月5日,p.17−25
菊池,「日本語文書用高速全文検索の一手法」,情報学基礎,No.25−2,1992年5月12日,p.9−16

Also Published As

Publication number Publication date
JPH07105237A (en) 1995-04-21

Similar Documents

Publication Publication Date Title
JP3636941B2 (en) Information retrieval method and information retrieval apparatus
EP0510634B1 (en) Data base retrieval system
US6493709B1 (en) Method and apparatus for digitally shredding similar documents within large document sets in a data processing environment
US6240409B1 (en) Method and apparatus for detecting and summarizing document similarity within large document sets
US6826576B2 (en) Very-large-scale automatic categorizer for web content
US7349928B2 (en) System and method for identifying relationships between database records
US7809718B2 (en) Method and apparatus for incorporating metadata in data clustering
US8510312B1 (en) Automatic metadata identification
JP2669601B2 (en) Information retrieval method and system
JP3258063B2 (en) Database search system and method
JP3081093B2 (en) Index creation method and apparatus and document search apparatus
JPH0782504B2 (en) Information retrieval processing method and retrieval file creation device
JP3151730B2 (en) Database search system
JP5206296B2 (en) Similar sentence extraction program, method and apparatus
JPH064584A (en) Text retriever
JP2519129B2 (en) Multi-word information retrieval processing method and retrieval file creation device
JP2000322416A (en) Document retrieving device
JP6764973B1 (en) Related word dictionary creation system, related word dictionary creation method and related word dictionary creation program
JP2993539B2 (en) Database search system and method
JP3288063B2 (en) Variable length data storage and reference system
JP2003288366A (en) Similar text search device
JPH10177575A (en) Device and method for extracting word and phrase and information storing medium
JP2005301855A (en) Document search method, document search program, and document search apparatus for executing the same
JPH07325837A (en) Abstract: Communication word search device using abstract words and communication text search method using abstract words
JP2996895B2 (en) Index type making device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees