JP2012014646A - Document retrieval device, document retrieval method, and program - Google Patents

Document retrieval device, document retrieval method, and program Download PDF

Info

Publication number
JP2012014646A
JP2012014646A JP2010153273A JP2010153273A JP2012014646A JP 2012014646 A JP2012014646 A JP 2012014646A JP 2010153273 A JP2010153273 A JP 2010153273A JP 2010153273 A JP2010153273 A JP 2010153273A JP 2012014646 A JP2012014646 A JP 2012014646A
Authority
JP
Japan
Prior art keywords
key
search
document
index
mixed
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.)
Granted
Application number
JP2010153273A
Other languages
Japanese (ja)
Other versions
JP5560971B2 (en
Inventor
Motohiro Akaishizawa
元博 赤石沢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2010153273A priority Critical patent/JP5560971B2/en
Publication of JP2012014646A publication Critical patent/JP2012014646A/en
Application granted granted Critical
Publication of JP5560971B2 publication Critical patent/JP5560971B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

PROBLEM TO BE SOLVED: To provide a document retrieval device capable of performing retrieval at high speed without causing omission of the retrieval.SOLUTION: The document retrieval device includes: an index creation part 6 which uses a character string of N characters obtained by dividing a document, or a character string of N+1 or more characters with high use frequency in the retrieval as a key, and creates a mixed N-gram index for holding an identifier of a document including the key, and an appearance position of the key in the document; and a retrieval part 3 which outputs a list of documents including the input retrieval key by referring to the mixed N-gram index. The retrieval part 3 retrieves, when a key which matches the retrieval key does not exist in the mixed N-gram index, the mixed N-gram index by each character string obtained by dividing the retrieval key into character strings of the N characters, when the key which matches each character string exists, determines whether or not the document includes the retrieval key based on the appearance position of the key in the document including the key, and outputs a list of documents determined to include the retrieval key.

Description

本発明は、文書検索装置、文書検索方法、及びプログラムに関する。   The present invention relates to a document search apparatus, a document search method, and a program.

記憶装置に記憶された大量の文書ファイルの中から、入力されたキーワードを含む文書を検索する全文検索技術が知られている。全文検索を行う文書検索装置においては、予め検索対象の文書ファイルのインデックスを作成しておき、検索時にはこのインデックスのキーワードと入力された検索キーワードを照合する方法が一般的である。   A full-text search technique for searching for a document including an input keyword from a large number of document files stored in a storage device is known. In a document search apparatus that performs full-text search, a method of creating an index of a document file to be searched in advance and collating the keyword of this index with an input search keyword at the time of search is common.

従来の文書検索装置は、インデックスの作成方法によって大きく2つに分けられる。1つは、辞書を用いて文書を単語に分割し、単語をインデックスのキーとする形態素解析方式であり、もう1つは、文書をN文字ずつに分割してインデックスのキーとするN−gram方式である。   Conventional document search apparatuses are roughly divided into two types according to the index creation method. One is a morphological analysis method that uses a dictionary to divide a document into words and uses the words as index keys, and the other is an N-gram that divides a document into N characters and uses them as index keys. It is a method.

形態素解析方式は検索速度が速いという利点があるが、インデックス作成速度は遅い。また、インデックス作成の際に間違った単語の切り出しを行うと、検索漏れが発生するという問題がある。間違った単語の切り出しを避けるためには、インデックス作成の際に用いる辞書のメンテナンスが必要である。   Although the morphological analysis method has an advantage that the search speed is fast, the index creation speed is slow. In addition, if an incorrect word is cut out when creating an index, there is a problem that a search omission occurs. In order to avoid cutting out wrong words, it is necessary to maintain a dictionary used for index creation.

N−gram方式は、インデックス作成速度が速く、検索漏れも少ないため広く利用されている方式であるが、検索時に入力された検索キーをN文字のキーに分割し、それぞれのキーでのインデックス検索結果を統合する必要があるため、検索速度が遅いという短所を持っている。なお、N−gram方式では、Nが小さすぎても大きすぎても性能が劣化するため、一般に2文字ずつに文書を分割するbi−gram方式が広く利用されている。   The N-gram method is widely used because it has a high index creation speed and few search omissions. However, the search key input at the time of searching is divided into N-character keys, and index search with each key is performed. Since the results need to be integrated, the search speed is slow. Note that in the N-gram system, the performance deteriorates when N is too small or too large, and therefore the bi-gram system that divides a document into two characters is widely used.

特許文献1には、テキストデータを全文検索する情報検索方法において、検索対象テキストを単語単位に分割し、単語単位に分割したテキストから、単語の区切りを示す単語情報を持ち文字数がNである単語情報付文字列インデックスを作成し、単語情報付文字列インデックスから、検索語を文字列検索または単語検索もしくはその両方で検索する方法が記載されている。   Japanese Patent Application Laid-Open No. 2004-133830 discloses an information search method for searching text data in a full text, a search target text is divided into words, a word having word information indicating a word break and having N characters from the divided text. A method is described in which a character string index with information is created and a search word is searched by a character string search or a word search or both from the word information-added character string index.

特開2001−034623号公報JP 2001-034623 A

特許文献1に記載された方法では、単語の区切りを調べることにより検索ノイズを減らそうとしているが、通常のN−gram方式に比べると検索漏れが増える可能性がある。   In the method described in Patent Document 1, an attempt is made to reduce search noise by examining word breaks, but there is a possibility that search omissions may increase as compared with the normal N-gram method.

そこで、本発明の目的は、検索漏れを起こさず、かつ検索を高速に行うことが可能な文書検索装置を得ることである。   Accordingly, an object of the present invention is to obtain a document search apparatus that does not cause a search omission and can perform a search at a high speed.

本発明に係る文書検索装置は、文書を分割して生成したN(Nは自然数)文字の文字列、又は検索時にキーワードとして使用される頻度が一定条件を超えるN+1文字以上の文字列をキーとし、そのキーを含む文書の識別子、及びその文書におけるキーの出現位置を保持する混合N−gramインデックスを作成する、インデックス作成部と、前記混合N−gramインデックスを参照することにより、入力された検索キーを含む文書のリストを出力する検索部と、を備え、前記検索部は、まず、前記検索キーそのもので前記混合N−gramインデックスを検索し、前記検索キーと一致するキーが存在する場合には、そのキーを含む文書のリストを出力し、前記検索キーと一致するキーが存在しない場合には、前記検索キーをN文字の文字列に分割し、分割した各々の文字列で前記混合N−gramインデックスを検索し、各々の文字列と一致するキーが存在する場合には、そのキーを含む文書におけるキーの出現位置に基づいて、その文書が前記検索キーを含むか否かを判定し、前記検索キーを含むと判断された文書のリストを出力するものである。   The document search apparatus according to the present invention uses, as a key, a character string of N (N is a natural number) characters generated by dividing a document, or a character string of N + 1 characters or more whose frequency used as a keyword during a search exceeds a certain condition. An index creation unit that creates a mixed N-gram index that holds an identifier of a document including the key, and an appearance position of the key in the document, and a search input by referring to the mixed N-gram index A search unit that outputs a list of documents including a key, and the search unit first searches the mixed N-gram index with the search key itself, and there is a key that matches the search key. Outputs a list of documents including the key, and if there is no key that matches the search key, the search key is set to N characters. The mixed N-gram index is searched for each divided character string, and when there is a key that matches each character string, based on the appearance position of the key in the document including the key, It is determined whether or not the document includes the search key, and a list of documents determined to include the search key is output.

本発明によれば、検索漏れを起こさず、かつ検索を高速に行うことが可能な文書検索装置を得ることができる。   According to the present invention, it is possible to obtain a document search apparatus that does not cause a search omission and can perform a search at a high speed.

本発明の実施の形態による、文書検索装置の構成を示すブロック図。The block diagram which shows the structure of the document search apparatus by embodiment of this invention. 本発明の実施の形態による、文書検索装置の動作を説明する図。The figure explaining operation | movement of the document search apparatus by embodiment of this invention. 本発明の実施の形態による、文書検索装置の動作のフローチャート。The flowchart of operation | movement of the document search apparatus by embodiment of this invention. 本発明の実施の形態による、文書検索装置の動作のフローチャート。The flowchart of operation | movement of the document search apparatus by embodiment of this invention. 本発明の実施の形態による、文書検索装置の動作のフローチャート。The flowchart of operation | movement of the document search apparatus by embodiment of this invention.

次に、本発明を実施するための形態について、図面を参照して詳細に説明する。
実施の形態
図1は、本発明の実施の形態による文書検索装置10の構成を示すブロック図である。
文書検索装置10は、入力部1、出力部2、検索部3、検索キーインデックス記憶部4、混合bi−gramインデックス(混合N−gramインデックス)記憶部5、及びインデックス作成部6を備えている。なお、文書検索装置10はN−gram方式の中でも、2文字ずつに文書を分割するbi−gram方式を用いている。
Next, embodiments for carrying out the present invention will be described in detail with reference to the drawings.
Embodiment FIG. 1 is a block diagram showing a configuration of a document search apparatus 10 according to an embodiment of the present invention.
The document search apparatus 10 includes an input unit 1, an output unit 2, a search unit 3, a search key index storage unit 4, a mixed bi-gram index (mixed N-gram index) storage unit 5, and an index creation unit 6. . Note that the document search apparatus 10 uses a bi-gram method that divides a document into two characters at a time among the N-gram methods.

入力部1、出力部2、検索部3、およびインデックス作成部6は、プログラムに従ってコンピュータのプロセッサが行う動作のモジュールを表している。検索キーインデックス記憶部4、混合bi−gramインデックス記憶部5は、メモリやハードディスクにより実現される。   The input unit 1, the output unit 2, the search unit 3, and the index creation unit 6 represent modules of operations performed by a computer processor according to a program. The search key index storage unit 4 and the mixed bi-gram index storage unit 5 are realized by a memory or a hard disk.

入力部1は、利用者が、検索を実行する際に検索キーの入力を行うキーボード、マウス等によって実現される。   The input unit 1 is realized by a keyboard, a mouse, or the like that allows a user to input a search key when executing a search.

出力部2は、検索結果としてヒットした文書ファイル等のリストを表示するディスプレイなどの表示装置によって実現される。   The output unit 2 is realized by a display device such as a display that displays a list of hit document files and the like as search results.

検索部3は、混合bi−gramインデックス記憶部5を参照し、入力部1を介して入力された検索キーを含む文書ファイルのリストを結果として出力する。検索部3は、まず検索キーそのもので混合bi−gramインデックス記憶部5を参照し、検索キーと一致するキーワードを有する文書ファイルがあれば、ヒットした文書ファイルをリストの形式で出力部2へ通知する。   The search unit 3 refers to the mixed bi-gram index storage unit 5 and outputs a list of document files including the search key input via the input unit 1 as a result. The search unit 3 first refers to the mixed bi-gram index storage unit 5 with the search key itself, and if there is a document file having a keyword that matches the search key, notifies the output unit 2 of the hit document file in the form of a list. To do.

もし、検索キーと一致するキーワードを有する文書ファイルがない場合、検索キーの長さが2文字より長い場合は、検索キーを2文字ずつに分割して混合bi−gramインデックス記憶部5を参照し、ヒットしたレコードのファイルIDと文字の出現位置に基づいて、検索キーを含む文書ファイルを取得し、取得した文書ファイルをリストの形式で出力部2へ通知する。さらに、検索キーが2文字より長い場合は、その検索キーを検索キーインデックス記憶部4に登録する。   If there is no document file having a keyword that matches the search key and the length of the search key is longer than two characters, the search key is divided into two characters and the mixed bi-gram index storage unit 5 is referred to. The document file including the search key is acquired based on the file ID of the hit record and the appearance position of the character, and the acquired document file is notified to the output unit 2 in the form of a list. Further, when the search key is longer than two characters, the search key is registered in the search key index storage unit 4.

検索キーインデックス記憶部4は、検索に用いられた検索キーをキーとして、検索回数、最終検索日時を保持するインデックスを記憶する。   The search key index storage unit 4 stores an index that holds the number of searches and the last search date and time using the search key used for the search as a key.

混合bi−gramインデックス記憶部5は、文書を各文字位置から2文字ずつ取り出したものと検索に利用された検索キーをキーとするインデックスを記憶する。   The mixed bi-gram index storage unit 5 stores an index in which two characters are extracted from each character position and a search key used for the search as a key.

インデックス作成部6は、文書ファイルを走査して混合bi−gramインデックスを作成し、混合bi−gramインデックス記憶部5に記憶する。すなわち、インデックス作成部6は、通常のbi−gramインデックスの2文字キーに加えて、検索キーインデックス記憶部4を参照し、2文字より長いキーを追加する。   The index creation unit 6 creates a mixed bi-gram index by scanning the document file and stores it in the mixed bi-gram index storage unit 5. That is, the index creation unit 6 refers to the search key index storage unit 4 in addition to the normal two-character key of the bi-gram index, and adds a key longer than two characters.

次に、文書検索装置10の動作について説明する。
なお、一般の検索装置では、フォルダと時間等を指定すると、指定されたフォルダの配下にあるフォルダ内の文書ファイルを定期的に参照し、更新されたファイルがあったら、その更新内容をインデックスに反映させるような仕組みで運用される。また、Web上の文書ファイルを検索対象とする場合は、フォルダをたどる代わりに、htmlファイル内のURLをたどってインデックスを更新する。ここでは、単純化のため、ファイルを指定すると、そのファイルに関してインデックスを更新する仕組みとする。
Next, the operation of the document search apparatus 10 will be described.
In a general search device, when a folder and time are specified, document files in the folder under the specified folder are periodically referenced. If there is an updated file, the updated content is used as an index. It is operated in a mechanism that reflects it. When a document file on the Web is to be searched, the index is updated by following the URL in the html file instead of following the folder. Here, for simplification, when a file is specified, the index is updated for the file.

まず、図2と図3用いてインデックス作成部6の動作について説明する。
インデックス作成部6は、文書ファイルfile1.txtやfile2.txtなどから、混合bi−gramインデックスを作成する。図2に示すように、fil1.txtの内容は、「今日は良い天気です。・・・」であり、fil2.txtの内容は、「今日は良い日です。・・・」である。
First, the operation of the index creation unit 6 will be described with reference to FIGS.
The index creation unit 6 reads the document files file1. txt or file2. A mixed bi-gram index is created from txt and the like. As shown in FIG. The content of txt is “Today is a good weather. The content of txt is “Today is a good day ...”.

まず、インデックス作成部6は、file1.txtとそのID(1)を受け取る(図3:ステップS1)。   First, the index creation unit 6 sets file1. txt and its ID (1) are received (FIG. 3: step S1).

file名とIDの対応関係は、図2に示す「ファイルID対応テーブル」に保持される。ファイルID対応テーブルは、例えば、混合bi−gramインデックス記憶部5に保持することができる。なお、ファイルのIDの変わりに直接ファイル名を混合bi−gramインデックス記憶部5に保持するようにしてもよい。ただし、文字列のままでは記憶容量が大きくなり、処理効率も悪いので、ここではファイル名をIDに変換している。   The correspondence between the file name and the ID is held in the “file ID correspondence table” shown in FIG. The file ID correspondence table can be held in the mixed bi-gram index storage unit 5, for example. Note that the file name may be directly stored in the mixed bi-gram index storage unit 5 instead of the file ID. However, if the character string is left as it is, the storage capacity becomes large and the processing efficiency is poor, so here the file name is converted to ID.

次に、まず同一のファイルが更新された場合のことを想定し、すでに、混合bi−gramインデックス中の「ファイルID=出現位置」を保持するフィールドに、file1.txtのIDがあれば、それを消去する(ステップS2)。すなわち、1=〜(〜は任意)のペアを削除する。ファイルID=出現位置フィールドが空になれば、キー自体も削除する。   Next, assuming that the same file has been updated, file1.file is already stored in the field holding “file ID = appearance position” in the mixed bi-gram index. If there is an ID of txt, it is deleted (step S2). That is, a pair of 1 = ˜ (˜ is arbitrary) is deleted. If the file ID = appearance position field becomes empty, the key itself is also deleted.

次に、ファイル中の文書をバッファに読み込み、先頭から1文字ずつずらして、インデックス登録処理を行う(ステップS3〜S7)。   Next, the document in the file is read into the buffer, and the index registration process is performed by shifting the characters one by one from the beginning (steps S3 to S7).

まず、file1.txtの先頭から2文字のキーを登録する。すなわち、キー:「今日」、ファイルID=出現位置:1=0というレコードを混合bi−gramインデックス記憶部5に登録する(ステップS4)。   First, file1. Register a two-character key from the beginning of txt. That is, a record of key: “today”, file ID = appearance position: 1 = 0 is registered in the mixed bi-gram index storage unit 5 (step S4).

次に、2文字より大きいキーを、検索キーインデックス記憶部4を参照して検索する。すなわち、検索キーインデックス記憶部4から「今日は」、「今日は良」、「今日は良い」等を検索する。最大何文字まで検索するかは、例えば8文字のように、あらかじめ決めておく。   Next, a key larger than two characters is searched with reference to the search key index storage unit 4. That is, “today is good”, “today is good”, “today is good”, and the like are searched from the search key index storage unit 4. The maximum number of characters to be searched is determined in advance, for example, 8 characters.

2文字より大きいキーが検索キーインデックスに存在し、検索回数が一定以上(例えば5件)で、検索日時が現在より一定期間内(例えば10日)などの条件を満たす場合には、そのキーを混合bi−gramインデックス記憶部5に登録する。   If a key larger than 2 characters exists in the search key index, the search frequency is more than a certain number (for example, 5), and the search date is within a certain period (for example, 10 days) from the present, the key is Register in the mixed bi-gram index storage unit 5.

例えば、ポインタが文書の先頭から3つ進んだ状態でキーが「良い天気です。」の場合、図2に示す検索キーインデックスの中の「良い天気」がヒットするので、キー:「良い天気」、ファイルID=出現位置:1=3というデータを混合bi−gramインデックス記憶部5に登録する(ステップS5)。   For example, if the key is “good weather” with the pointer advanced three from the beginning of the document, “good weather” in the search key index shown in FIG. 2 is hit, so the key: “good weather” The data of file ID = appearance position: 1 = 3 is registered in the mixed bi-gram index storage unit 5 (step S5).

ポインタを1文字進め(ステップS6)、ファイルの最後まで進んだら、登録が完了する(ステップS7:NO)。   When the pointer is advanced by one character (step S6) and the end of the file is reached, registration is completed (step S7: NO).

次に、図4を用いて検索部3の動作を説明する。
まず、検索部3は、利用者が入力部1を介して入力した検索キーを取得する(ステップS11)。
Next, the operation of the search unit 3 will be described with reference to FIG.
First, the search part 3 acquires the search key which the user input via the input part 1 (step S11).

次に、検索部3は、入力された検索キーで、混合bi−gramインデックス記憶部5を検索する(ステップS12)。   Next, the search unit 3 searches the mixed bi-gram index storage unit 5 with the input search key (step S12).

入力された検索キーでヒットするキーがあった場合には(ステップS13:YES)、そのキーのファイルID=出現位置に登録されているファイルIDをファイル名に変換して出力部2に出力する(ステップS15)。   If there is a hit key in the input search key (step S13: YES), the file ID of the key = the file ID registered at the appearance position is converted into a file name and output to the output unit 2. (Step S15).

入力された検索キーでヒットするキーがなかった場合には(ステップS13:NO)、検索キーを2文字ずつに分割して、それぞれのキーについて混合bi−gramインデックス記憶部5を検索し、ヒットするキーに登録されているファイルIDのリストを取得する(ステップS14)。さらに、ファイルIDをファイル名に変換して出力部2に出力する(ステップS15)。   When there is no hit key among the input search keys (step S13: NO), the search key is divided into two characters, the mixed bi-gram index storage unit 5 is searched for each key, and the hit A list of file IDs registered in the key to be acquired is acquired (step S14). Further, the file ID is converted into a file name and output to the output unit 2 (step S15).

さらに、検索キーが3文字以上である場合には(ステップS16:YES)、その検索キーを検索キーインデックス記憶部4に登録する(ステップS17)。   Further, when the search key is 3 characters or more (step S16: YES), the search key is registered in the search key index storage unit 4 (step S17).

次に、図5を用いて検索キーインデックス記憶部4の更新処理について説明する。
まず、検索部3は、利用者が入力部1を介して入力した検索キーを取得する(ステップS21)。
Next, the update process of the search key index storage unit 4 will be described with reference to FIG.
First, the search part 3 acquires the search key which the user input via the input part 1 (step S21).

次に、取得した検索キーで検索キーインデックス記憶部4を検索する(ステップS22)。   Next, the search key index storage unit 4 is searched with the acquired search key (step S22).

検索キーインデックスに、取得した検索キーでヒットするキーがあった場合には(ステップS23:YES)、そのキーのレコードの「検索回数」を1加算し、「検索日時」に現在の日時を登録する(ステップS24)。   If there is a key hit in the search key index with the acquired search key (step S23: YES), the "search count" of the record of the key is incremented by 1, and the current date is registered in "search date" (Step S24).

取得した検索キーでヒットするキーがなかった場合には(ステップS23:NO)、検索キーインデックス記憶部4にそのキーのレコードを追加し、「検索日時」には現在の日時を登録する(ステップS25)。   If there is no hit key in the acquired search key (step S23: NO), a record of the key is added to the search key index storage unit 4, and the current date and time is registered in “search date and time” (step S23). S25).

以上のように、本実施形態によれば、混合bi−gramインデックスとして、通常のbi−gramインデックスのキーに加え、よく利用される検索キーの場合には、その検索キー自体をインデックスのキーとすることにより、同一の検索キーが何度も検索される環境において、検索漏れを起こさずに、かつ検索速度を向上させることができる。特に、社内文書の検索など、同一の文字列が検索キーとしてよく使われる環境では有効である。   As described above, according to the present embodiment, as a mixed bi-gram index, in addition to a normal bi-gram index key, in the case of a frequently used search key, the search key itself is used as an index key. By doing so, in the environment where the same search key is searched many times, the search speed can be improved without causing a search omission. This is particularly effective in an environment where the same character string is often used as a search key, such as in-house document search.

本発明の効果について具体例を用いて説明する。例えば、検索キーとして「良い天気」が入力された場合を例に説明する。また、混合bi−gramインデックスの内容は図2に示すものとする。   The effect of the present invention will be described using a specific example. For example, a case where “good weather” is input as a search key will be described as an example. The contents of the mixed bi-gram index are shown in FIG.

まず、「良い天気」という4文字の検索キーが混合bi−gramインデックス記憶部5に登録されていない場合には、検索キーを2文字ずつに分割し、それぞれのキーについて混合bi−gramインデックス記憶部5を検索する(通常のN−gram方式の検索)。   First, when the four-character search key “good weather” is not registered in the mixed bi-gram index storage unit 5, the search key is divided into two characters, and the mixed bi-gram index is stored for each key. Part 5 is searched (normal N-gram search).

この結果、キー:「良い」、ファイルID=出現位置:1=3、2=3、及びキー:「天気」、ファイルID=出現位置:1=5の2つのレコードがヒットする。この中で、ファイルIDが共通に存在し、それぞれの出現位置が順番どおりつながるものを探す。この場合、「天気」の出現位置が「良い」の出現位置より2文字分後のものを選ぶ必要がある。キー「良い」のファイルID=出現位置「1=3」、キー「天気」のファイルID=出現位置「1=5」がこの条件を満たすため、ファイルID=1、すなわち(file1.txt)に「良い天気」が含まれると判断できる。   As a result, two records of key: “good”, file ID = appearance position: 1 = 3, 2 = 3, and key: “weather”, file ID = appearance position: 1 = 5 are hit. Among these, a search is made for a file ID that exists in common and whose appearance positions are connected in order. In this case, it is necessary to select the “weather” appearing position two characters after the “good” appearing position. Since the file ID of the key “good” = appearance position “1 = 3” and the file ID of the key “weather” = appearance position “1 = 5” satisfy this condition, the file ID = 1, that is, (file1.txt) It can be determined that “good weather” is included.

インデックスの規模が大きくなると、それぞれのキーについてレコードが何千件もヒットする可能性があり、検索速度が遅くなってしまう。一方、本実施形態によれば、「良い天気」という検索キーの使用頻度が多い場合には、混合bi−gramインデックスに登録されているため、上記のような通常のN−gram方式の検索処理を省略することができ、検索の高速化が実現できる。   As the size of the index grows, thousands of records can be hit for each key, slowing down the search. On the other hand, according to the present embodiment, when the search key “good weather” is frequently used, since it is registered in the mixed bi-gram index, the normal N-gram search process as described above is used. Can be omitted, and the search speed can be increased.

上記の実施の形態の一部または全部は、以下の付記のようにも記載されうるが、以下には限られない。
(付記1)文書を分割して生成したN(Nは自然数)文字の文字列、又は検索時にキーワードとして使用される頻度が一定条件を超えるN+1文字以上の文字列をキーとし、そのキーを含む文書の識別子、及びその文書におけるキーの出現位置を保持する混合N−gramインデックスを作成する、インデックス作成部と、
前記混合N−gramインデックスを参照することにより、入力された検索キーを含む文書のリストを出力する検索部と、を備え、
前記検索部は、まず、前記検索キーそのもので前記混合N−gramインデックスを検索し、前記検索キーと一致するキーが存在する場合には、そのキーを含む文書のリストを出力し、前記検索キーと一致するキーが存在しない場合には、前記検索キーをN文字の文字列に分割し、分割した各々の文字列で前記混合N−gramインデックスを検索し、各々の文字列と一致するキーが存在する場合には、そのキーを含む文書におけるキーの出現位置に基づいて、その文書が前記検索キーを含むか否かを判定し、前記検索キーを含むと判断された文書のリストを出力する、文書検索装置。
A part or all of the above embodiment can be described as in the following supplementary notes, but is not limited thereto.
(Supplementary note 1) A character string of N (N is a natural number) characters generated by dividing a document, or a character string of N + 1 characters or more whose frequency used as a keyword during search exceeds a certain condition is included as a key. An index creation unit for creating a mixed N-gram index that holds an identifier of a document and an appearance position of a key in the document;
A search unit that outputs a list of documents including the input search key by referring to the mixed N-gram index;
The search unit first searches the mixed N-gram index with the search key itself, and when there is a key that matches the search key, outputs a list of documents including the key, and the search key If there is no key that matches the character string, the search key is divided into N character strings, the mixed N-gram index is searched for each divided character string, and the key that matches each character string is found. If it exists, it is determined whether or not the document includes the search key based on the appearance position of the key in the document including the key, and a list of documents determined to include the search key is output. Document retrieval device.

(付記2)前記検索部は、
検索時にキーワードとして使用された文字列をキーとし、そのキーワードの使用回数を保持する検索キーインデックスを作成し、
前記インデックス作成部は、
前記検索キーインデックスを参照し、前記使用回数が一定条件を超えるN+1文字以上のキーを混合N−gramインデックスのキーとして登録する、付記1に記載の文書検索装置。
(Appendix 2) The search unit
Create a search key index that holds the number of times the keyword is used, using the character string used as a keyword during the search as a key.
The index creation unit
The document search apparatus according to appendix 1, wherein the search key index is referred to, and a key of N + 1 characters or more in which the number of uses exceeds a predetermined condition is registered as a key of the mixed N-gram index.

(付記3)文書を分割して生成したN(Nは自然数)文字の文字列、又は検索時にキーワードとして使用される頻度が一定条件を超えるN+1文字以上の文字列をキーとし、そのキーを含む文書の識別子、及びその文書におけるキーの出現位置を保持する混合N−gramインデックスを作成する工程と、
前記混合N−gramインデックスを参照することにより、入力された検索キーを含む文書のリストを出力する工程と、を備え、
前記文書のリストを出力する工程では、まず、前記検索キーそのもので前記混合N−gramインデックスを検索し、前記検索キーと一致するキーが存在する場合には、そのキーを含む文書のリストを出力し、前記検索キーと一致するキーが存在しない場合には、前記検索キーをN文字の文字列に分割し、分割した各々の文字列で前記混合N−gramインデックスを検索し、各々の文字列と一致するキーが存在する場合には、そのキーを含む文書におけるキーの出現位置に基づいて、その文書が前記検索キーを含むか否かを判定し、前記検索キーを含むと判断された文書のリストを出力する、文書検索方法。
(Supplementary note 3) A character string of N (N is a natural number) characters generated by dividing a document or a character string of N + 1 characters or more whose frequency used as a keyword when searching exceeds a certain condition is included as a key. Creating a mixed N-gram index that holds the identifier of the document and the appearance position of the key in the document;
Outputting a list of documents including the input search key by referring to the mixed N-gram index,
In the step of outputting the list of documents, first, the mixed N-gram index is searched with the search key itself, and if there is a key that matches the search key, a list of documents including the key is output. If there is no key that matches the search key, the search key is divided into character strings of N characters, the mixed N-gram index is searched for each divided character string, and each character string is searched. If there is a key that coincides with the document, it is determined whether or not the document includes the search key based on the appearance position of the key in the document including the key, and the document determined to include the search key Document search method that outputs a list of files.

(付記4)コンピュータを、
文書を分割して生成したN(Nは自然数)文字の文字列、又は検索時にキーワードとして使用される頻度が一定条件を超えるN+1文字以上の文字列をキーとし、そのキーを含む文書の識別子、及びその文書におけるキーの出現位置を保持する混合N−gramインデックスを作成する、インデックス作成部と、
前記混合N−gramインデックスを参照することにより、入力された検索キーを含む文書のリストを出力する検索部と、して機能させるプログラムであって、
前記検索部は、まず、前記検索キーそのもので前記混合N−gramインデックスを検索し、前記検索キーと一致するキーが存在する場合には、そのキーを含む文書のリストを出力し、前記検索キーと一致するキーが存在しない場合には、前記検索キーをN文字の文字列に分割し、分割した各々の文字列で前記混合N−gramインデックスを検索し、各々の文字列と一致するキーが存在する場合には、そのキーを含む文書におけるキーの出現位置に基づいて、その文書が前記検索キーを含むか否かを判定し、前記検索キーを含むと判断された文書のリストを出力する、プログラム。
(Appendix 4)
A character string of N (N is a natural number) characters generated by dividing a document, or a character string of N + 1 characters or more whose frequency used as a keyword during a search exceeds a certain condition, and an identifier of a document including the key, An index creation unit that creates a mixed N-gram index that holds the appearance position of the key in the document;
A program that functions as a search unit that outputs a list of documents including an input search key by referring to the mixed N-gram index,
The search unit first searches the mixed N-gram index with the search key itself, and when there is a key that matches the search key, outputs a list of documents including the key, and the search key If there is no key that matches the character string, the search key is divided into N character strings, the mixed N-gram index is searched for each divided character string, and the key that matches each character string is found. If it exists, it is determined whether or not the document includes the search key based on the appearance position of the key in the document including the key, and a list of documents determined to include the search key is output. ,program.

1 入力部、2 出力部、3 検索部、4 検索キーインデックス記憶部、5 混合bi−gramインデックス記憶部、6 インデックス作成部、10 文書検索装置   1 input unit, 2 output unit, 3 search unit, 4 search key index storage unit, 5 mixed bi-gram index storage unit, 6 index creation unit, 10 document search device

Claims (4)

文書を分割して生成したN(Nは自然数)文字の文字列、又は検索時にキーワードとして使用される頻度が一定条件を超えるN+1文字以上の文字列をキーとし、そのキーを含む文書の識別子、及びその文書におけるキーの出現位置を保持する混合N−gramインデックスを作成する、インデックス作成部と、
前記混合N−gramインデックスを参照することにより、入力された検索キーを含む文書のリストを出力する検索部と、を備え、
前記検索部は、まず、前記検索キーそのもので前記混合N−gramインデックスを検索し、前記検索キーと一致するキーが存在する場合には、そのキーを含む文書のリストを出力し、前記検索キーと一致するキーが存在しない場合には、前記検索キーをN文字の文字列に分割し、分割した各々の文字列で前記混合N−gramインデックスを検索し、各々の文字列と一致するキーが存在する場合には、そのキーを含む文書におけるキーの出現位置に基づいて、その文書が前記検索キーを含むか否かを判定し、前記検索キーを含むと判断された文書のリストを出力する、文書検索装置。
A character string of N (N is a natural number) characters generated by dividing a document, or a character string of N + 1 characters or more whose frequency used as a keyword during a search exceeds a certain condition, and an identifier of a document including the key, An index creation unit that creates a mixed N-gram index that holds the appearance position of the key in the document;
A search unit that outputs a list of documents including the input search key by referring to the mixed N-gram index;
The search unit first searches the mixed N-gram index with the search key itself, and when there is a key that matches the search key, outputs a list of documents including the key, and the search key If there is no key that matches the character string, the search key is divided into N character strings, the mixed N-gram index is searched for each divided character string, and the key that matches each character string is found. If it exists, it is determined whether or not the document includes the search key based on the appearance position of the key in the document including the key, and a list of documents determined to include the search key is output. Document retrieval device.
前記検索部は、
検索時にキーワードとして使用された文字列をキーとし、そのキーワードの使用回数を保持する検索キーインデックスを作成し、
前記インデックス作成部は、
前記検索キーインデックスを参照し、前記使用回数が一定条件を超えるN+1文字以上のキーを混合N−gramインデックスのキーとして登録する、請求項1に記載の文書検索装置。
The search unit
Create a search key index that holds the number of times the keyword is used, using the character string used as the keyword during the search,
The index creation unit
The document search apparatus according to claim 1, wherein the search key index is referenced and a key of N + 1 characters or more in which the number of uses exceeds a certain condition is registered as a key of a mixed N-gram index.
文書を分割して生成したN(Nは自然数)文字の文字列、又は検索時にキーワードとして使用される頻度が一定条件を超えるN+1文字以上の文字列をキーとし、そのキーを含む文書の識別子、及びその文書におけるキーの出現位置を保持する混合N−gramインデックスを作成する工程と、
前記混合N−gramインデックスを参照することにより、入力された検索キーを含む文書のリストを出力する工程と、を備え、
前記文書のリストを出力する工程では、まず、前記検索キーそのもので前記混合N−gramインデックスを検索し、前記検索キーと一致するキーが存在する場合には、そのキーを含む文書のリストを出力し、前記検索キーと一致するキーが存在しない場合には、前記検索キーをN文字の文字列に分割し、分割した各々の文字列で前記混合N−gramインデックスを検索し、各々の文字列と一致するキーが存在する場合には、そのキーを含む文書におけるキーの出現位置に基づいて、その文書が前記検索キーを含むか否かを判定し、前記検索キーを含むと判断された文書のリストを出力する、文書検索方法。
A character string of N (N is a natural number) characters generated by dividing a document, or a character string of N + 1 characters or more whose frequency used as a keyword during a search exceeds a certain condition, and an identifier of a document including the key, And creating a mixed N-gram index that holds the location of the key in the document;
Outputting a list of documents including the input search key by referring to the mixed N-gram index,
In the step of outputting the list of documents, first, the mixed N-gram index is searched with the search key itself, and if there is a key that matches the search key, a list of documents including the key is output. If there is no key that matches the search key, the search key is divided into character strings of N characters, the mixed N-gram index is searched for each divided character string, and each character string is searched. If there is a key that coincides with the document, it is determined whether or not the document includes the search key based on the appearance position of the key in the document including the key, and the document determined to include the search key Document search method that outputs a list of files.
コンピュータを、
文書を分割して生成したN(Nは自然数)文字の文字列、又は検索時にキーワードとして使用される頻度が一定条件を超えるN+1文字以上の文字列をキーとし、そのキーを含む文書の識別子、及びその文書におけるキーの出現位置を保持する混合N−gramインデックスを作成する、インデックス作成部と、
前記混合N−gramインデックスを参照することにより、入力された検索キーを含む文書のリストを出力する検索部と、して機能させるプログラムであって、
前記検索部は、まず、前記検索キーそのもので前記混合N−gramインデックスを検索し、前記検索キーと一致するキーが存在する場合には、そのキーを含む文書のリストを出力し、前記検索キーと一致するキーが存在しない場合には、前記検索キーをN文字の文字列に分割し、分割した各々の文字列で前記混合N−gramインデックスを検索し、各々の文字列と一致するキーが存在する場合には、そのキーを含む文書におけるキーの出現位置に基づいて、その文書が前記検索キーを含むか否かを判定し、前記検索キーを含むと判断された文書のリストを出力する、プログラム。
Computer
A character string of N (N is a natural number) characters generated by dividing a document, or a character string of N + 1 characters or more whose frequency used as a keyword during a search exceeds a certain condition, and an identifier of a document including the key, An index creation unit that creates a mixed N-gram index that holds the appearance position of the key in the document;
A program that functions as a search unit that outputs a list of documents including an input search key by referring to the mixed N-gram index,
The search unit first searches the mixed N-gram index with the search key itself, and when there is a key that matches the search key, outputs a list of documents including the key, and the search key If there is no key that matches the character string, the search key is divided into N character strings, the mixed N-gram index is searched for each divided character string, and the key that matches each character string is found. If it exists, it is determined whether or not the document includes the search key based on the appearance position of the key in the document including the key, and a list of documents determined to include the search key is output. ,program.
JP2010153273A 2010-07-05 2010-07-05 Document search apparatus, document search method, and program Expired - Fee Related JP5560971B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010153273A JP5560971B2 (en) 2010-07-05 2010-07-05 Document search apparatus, document search method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010153273A JP5560971B2 (en) 2010-07-05 2010-07-05 Document search apparatus, document search method, and program

Publications (2)

Publication Number Publication Date
JP2012014646A true JP2012014646A (en) 2012-01-19
JP5560971B2 JP5560971B2 (en) 2014-07-30

Family

ID=45600956

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010153273A Expired - Fee Related JP5560971B2 (en) 2010-07-05 2010-07-05 Document search apparatus, document search method, and program

Country Status (1)

Country Link
JP (1) JP5560971B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09198395A (en) * 1996-01-16 1997-07-31 Fuji Xerox Co Ltd Document retrieval device
JPH10307835A (en) * 1997-05-08 1998-11-17 Canon Inc Information processor and its method
JP2000057151A (en) * 1998-08-05 2000-02-25 Hitachi Ltd Document retrieving method, its executing device and medium recording its processing program
JP2008026963A (en) * 2006-07-18 2008-02-07 Toshiba Corp Retrieval processor and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09198395A (en) * 1996-01-16 1997-07-31 Fuji Xerox Co Ltd Document retrieval device
JPH10307835A (en) * 1997-05-08 1998-11-17 Canon Inc Information processor and its method
JP2000057151A (en) * 1998-08-05 2000-02-25 Hitachi Ltd Document retrieving method, its executing device and medium recording its processing program
JP2008026963A (en) * 2006-07-18 2008-02-07 Toshiba Corp Retrieval processor and program

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
CSNG200600932003; 山本裕、外1名: 'Ngram型全文検索システムにおけるインデクス長の実験的検討' 電気学会論文誌C 第126巻,第9号, 20060901, p.1173-1180, (社)電気学会 *
JPN6014002638; 山本裕、外1名: 'Ngram型全文検索システムにおけるインデクス長の実験的検討' 電気学会論文誌C 第126巻,第9号, 20060901, p.1173-1180, (社)電気学会 *
JPN6014002639; Hiroshi Yamamoto、外2名: 'Incremental Indexing and Its Evaluation for Full Text Search' Information Technology & Organizations: Trends, Issues, Challenges & Solutions [ONLINE] , 2003, p.1-3 *

Also Published As

Publication number Publication date
JP5560971B2 (en) 2014-07-30

Similar Documents

Publication Publication Date Title
JP5437557B2 (en) Search processing method and search system
JP5138046B2 (en) Search system, search method and program
US20060179039A1 (en) Method and system for performing secondary search actions based on primary search result attributes
EP1826692A2 (en) Query correction using indexed content on a desktop indexer program.
JP2007226729A (en) Translation word information output processing program, processing method, and processing apparatus
JP2009003541A (en) Index preparation system, method and program for database
JP2008033687A (en) Retrieval query generation device
JP2013196358A (en) Retrieval supporting apparatus and retrieval supporting method
JP2010256951A (en) Similar data retrieval device and program for the same
JP5185402B2 (en) Document search apparatus, document search method, and document search program
JP2008198237A (en) Structured document management system
JP2008217157A (en) Automatic information organization device, method and program using operation history
JP5560971B2 (en) Document search apparatus, document search method, and program
JP2007133682A (en) Full text retrieval system and full text retrieval method therefor
JP5127553B2 (en) Information processing apparatus, information processing method, program, and recording medium
JP2011138365A (en) Term extraction device, method, and data structure of term dictionary
JP5585489B2 (en) Search support apparatus, program and method
JP2010146273A (en) Document retrieval device and program
JP5184987B2 (en) Index information creating apparatus, index information creating method and program
CN109710844A (en) The method and apparatus for quick and precisely positioning file based on search engine
US20110022591A1 (en) Pre-computed ranking using proximity terms
JP2015103101A (en) Text summarization device, method, and program
US9230013B1 (en) Suffix searching on documents
JP5303500B2 (en) Document search apparatus, method, and program
JP2004258912A (en) Document retrieval device, method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130613

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140117

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140123

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140324

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140513

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140526

R150 Certificate of patent or registration of utility model

Ref document number: 5560971

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees