JP2007219620A - Text retrieval device, program, and method - Google Patents

Text retrieval device, program, and method Download PDF

Info

Publication number
JP2007219620A
JP2007219620A JP2006036567A JP2006036567A JP2007219620A JP 2007219620 A JP2007219620 A JP 2007219620A JP 2006036567 A JP2006036567 A JP 2006036567A JP 2006036567 A JP2006036567 A JP 2006036567A JP 2007219620 A JP2007219620 A JP 2007219620A
Authority
JP
Japan
Prior art keywords
search
text
index
word
extracted
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.)
Pending
Application number
JP2006036567A
Other languages
Japanese (ja)
Inventor
Yasuhiro Ishitobi
康浩 石飛
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2006036567A priority Critical patent/JP2007219620A/en
Priority to CN2006101289654A priority patent/CN101021851B/en
Publication of JP2007219620A publication Critical patent/JP2007219620A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide a text retrieval device, a text retrieval program, and a text retrieval method further reducing retrieval noise while minimizing an increase in the amount of retrieval processing or index capacity in a retrieval system using an N-gram (bi-gram) index. <P>SOLUTION: The text retrieval device is provided with a retrieval object text section for analyzing a retrieval object text to extract a retrieval word, and a retrieval analysis section for analyzing the retrieval word to extract the word. Words are extracted using respectively different analysis rules to carry out index formation and text retrieval. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、テキスト検索装置、テキスト検索プログラム、及びテキスト検索方法に関し、特に、単語や文章などをキーワードとして検索するテキスト検索装置、テキスト検索プログラム、及びテキスト検索方法に関するものである。   The present invention relates to a text search device, a text search program, and a text search method, and more particularly, to a text search device, a text search program, and a text search method for searching for words or sentences as keywords.

複数のテキスト文章(検索対象テキスト)から目的となるテキストを検索する検索サービスへの要求項目として、検索性能、検索精度(ノイズや検索漏れ)、索引生成時間、索引容量などがあり、これらの項目は、検索漏れの低減を図ると検索ノイズが増えるといったように、トレードオフの関係にある。   The required items for the search service to search for the target text from multiple text sentences (search target text) include search performance, search accuracy (noise and search omission), index generation time, index capacity, etc. Are in a trade-off relationship such that search noise increases when search omission is reduced.

例えば、検索漏れを低減する方法の一つとして、bi-gram索引を用いた検索方式があり、この検索方式では、(a)文書中の文字出現位置を保持した索引を利用する検索方式や、(b)文書から抽出される索引語の並び順を保持した索引を利用する検索方式などを用いて検索ノイズの低減を図っている。   For example, as one of the methods for reducing search omissions, there is a search method using a bi-gram index. In this search method, (a) a search method using an index that holds character appearance positions in a document, (B) Search noise is reduced by using a search method that uses an index that maintains the order of index words extracted from a document.

しかし、(a)の検索方式では、索引語の位置情報を示すため、文書の長さに比例したバイト長が必要となり、(b)の検索方式に比べて索引容量が大きくなる。   However, in the search method of (a), since the index word position information is indicated, a byte length proportional to the length of the document is required, and the index capacity is larger than that of the search method of (b).

また、(a)の検索方式では、文字の出現位置などを加味して検索を行うため、検索語の文字列長と索引語の位置情報を加味した計算量が増加し、(b)の検索方式に比べて検索処理量も多くなる。   Further, in the search method of (a), since the search is performed in consideration of the appearance position of characters, the amount of calculation including the character string length of the search word and the position information of the index word is increased, and the search of (b) is performed. Compared to the method, the search processing amount is also increased.

このため、重複パターンがある場合に既に処理した演算結果を再利用する方法(例えば、特許文献1参照)や、単語の境界への成り易さに基づいてテキストを分割する方法(例えば、特許文献2参照)、索引語間で重複のない極大単語を用いた索引を別途保持する方法(例えば、特許文献3参照)などが提案されている。
特開平10−307841号公報 特開平10−320421号公報 特開平11−073429号公報
For this reason, when there is an overlapping pattern, a method of reusing a calculation result that has already been processed (for example, see Patent Document 1) or a method of dividing a text based on the ease of word boundaries (for example, Patent Document) 2), and a method of separately holding an index using a maximal word that does not overlap between index words (for example, see Patent Document 3).
Japanese Patent Laid-Open No. 10-307841 JP-A-10-320421 Japanese Patent Laid-Open No. 11-073429

一方、(b)の検索方式では、索引語の並び順だけを利用するため、(a)の検索方式に比べて検索ノイズが増加する。   On the other hand, in the search method of (b), only the order of index words is used, so that search noise increases compared to the search method of (a).

例えば、文書から索引語を抽出する際に、あらかじめ定義された区切り文字で区切られた文字列単位で処理をする場合、
(例1)テキスト「東京都,…」の索引は、「東京」「京都」…となり、
(例2)テキスト「東京,京都,…」の索引は、「東京」「京都」…となる。
なお、この場合、カンマが区切り文字の1つである。
For example, when extracting an index word from a document, when processing in units of character strings separated by a predefined delimiter,
(Example 1) The index of the text "Tokyo, ..." becomes "Tokyo", "Kyoto" ...
(Example 2) The index of the text “Tokyo, Kyoto,...” Is “Tokyo” “Kyoto”.
In this case, a comma is one of the delimiters.

このため、索引語の並びが同じとなり、検索語「東京都」で、テキスト「東京,京都…」が検索され、検索ノイズが発生するという問題があった。   For this reason, the order of the index words is the same, and the text “Tokyo, Kyoto ...” is searched for the search word “Tokyo”, causing a search noise.

また、上記の例において、検索語「東京都」の「都」で全ての索引語の最後の文字をチェックし、「京都」の「都」を検索することによって検索ノイズを軽減する方法もあるが、検索時間が索引語の種類に比例していた。   In the above example, there is also a method of reducing the search noise by checking the last character of all index words in the “city” of the search word “Tokyo” and searching for “city” of “Kyoto”. However, the search time was proportional to the type of index word.

さらに、索引語の文字の並びの逆順(例えば、「都京」「京東」など)を別途検索して検索ノイズを抑える方法もあるが、全体の索引容量が増加してしまうという問題があった。   In addition, there is a method of suppressing the search noise by separately searching the reverse order of the character sequence of the index word (for example, “Tokyo”, “Kyoto”, etc.), but there is a problem that the overall index capacity increases. .

そこで、本発明では、N-gram(bi-gram)索引を用いた検索方式において、検索処理量や索引容量の増加を抑えながら、検索ノイズをさらに低減することが可能なテキスト検索装置、テキスト検索プログラム、及びテキスト検索方法を提供することを目的とする。   Therefore, in the present invention, in a search method using an N-gram (bi-gram) index, a text search device and a text search that can further reduce search noise while suppressing an increase in search processing amount and index capacity. It is an object to provide a program and a text search method.

本発明は、N-gram方式を用いてテキスト検索を行うテキスト検索装置において、検索対象テキストをテキスト解析ルールに基づいて解析し、索引語を抽出する検索対象テキスト解析手段と、前記索引語を用いて索引を生成する索引生成手段と、検索条件に含まれる検索語を検索語解析ルールに基づいて解析し、該検索語から語を切り出す検索語解析手段と、前記検索語から切り出した語に基づいて内部的な検索条件を生成する検索条件生成手段と、前記内部的な検索条件に基づいて前記索引を検索する検索処理手段とを具備することを特徴とする。   The present invention provides a text search apparatus that performs text search using an N-gram method, and uses search index text analysis means for analyzing search target text based on text analysis rules and extracting index terms, and the index terms. Index generation means for generating an index, search word analysis means for analyzing a search word included in a search condition based on a search word analysis rule, and extracting a word from the search word, and based on a word cut out from the search word Search condition generating means for generating an internal search condition, and search processing means for searching the index based on the internal search condition.

当該構成では、N-gram方式において、検索対象テキストと検索条件を異なる解析ルールに基づいて解析するため、検索語専用の解析ルールに基づいて検索語から語を切り出すことが可能であり、N-gram方式における検索ノイズを低減し、さらにN-gram索引における1文字検索を効率的に処理することができる。   In this configuration, in the N-gram method, the search target text and the search conditions are analyzed based on different analysis rules, so it is possible to cut out words from the search terms based on the analysis rules dedicated to the search terms. Search noise in the gram method can be reduced, and a one-character search in the N-gram index can be efficiently processed.

また、前記テキスト解析ルールは、前記検索対象テキスト内の処理単位文字列の最後の一文字を前記索引語として切り出すことが少なくとも規定され、前記検索語解析ルールは、前記検索語が2文字以上であって最後の一文字が非ASCII文字であると最後の一文字を語として切り出さないことが少なくとも規定されていることが望ましい。   Further, the text analysis rule is at least defined to cut out the last character of the processing unit character string in the search target text as the index word, and the search word analysis rule is that the search word includes two or more characters. If the last character is a non-ASCII character, it is desirable that at least the last character should not be cut out as a word.

次に、本発明は、N-gram方式を用いたテキスト検索を情報処理装置に実行させるテキスト検索プログラムにおいて、検索対象テキストをテキスト解析ルールに基づいて解析し、索引語を抽出するステップと、前記索引語を用いて索引を生成するステップと、検索条件に含まれる検索語を検索語解析ルールに基づいて解析し、該検索語から語を切り出すステップと、前記検索語から切り出した語に基づいて内部的な検索条件を生成するステップと、前記内部的な検索条件に基づいて前記索引を検索するステップとを情報処理装置に実行させることを特徴とする。   Next, the present invention provides a text search program for causing an information processing apparatus to execute a text search using an N-gram method, analyzing a search target text based on a text analysis rule, and extracting an index word; Generating an index using an index word; analyzing a search word included in a search condition based on a search word analysis rule; cutting out a word from the search word; and based on a word cut out from the search word The information processing apparatus is caused to execute a step of generating an internal search condition and a step of searching the index based on the internal search condition.

当該構成では、N-gram方式において、検索対象テキストと検索条件を異なる解析ルールに基づいて解析するため、検索語専用の解析ルールに基づいて検索語から語を切り出すことが可能であり、N-gram方式における検索ノイズを低減し、さらにN-gram索引における1文字検索を効率的に処理することができる。   In this configuration, in the N-gram method, the search target text and the search conditions are analyzed based on different analysis rules, so it is possible to cut out words from the search terms based on the analysis rules dedicated to the search terms. Search noise in the gram method can be reduced, and a one-character search in the N-gram index can be efficiently processed.

また、前記テキスト解析ルールは、前記検索対象テキスト内の処理対象文字列の最後の一文字を前記索引語として切り出すことが少なくとも規定され、前記検索語解析ルールは、前記検索語が2文字以上であって最後の一文字が非ASCII文字であると最後の一文字を語として切り出さないことが少なくとも規定されていることが望ましい。   Further, the text analysis rule is at least defined to cut out the last character of the processing target character string in the search target text as the index word, and the search word analysis rule is that the search word includes two or more characters. If the last character is a non-ASCII character, it is desirable that at least the last character should not be cut out as a word.

本発明では、N-gram方式を用いてテキスト検索を行うテキスト検索方法において、検索対象テキストをテキスト解析ルールに基づいて検索対象テキスト解析手段で解析して索引語を抽出し、前記索引語を用いて索引生成手段で索引を生成し、検索条件に含まれる検索語を検索語解析ルールに基づいて検索語解析手段で解析して該検索語から語を切り出し、前記検索語から切り出した語に基づいて検索条件生成手段で内部的な検索条件を生成し、前記内部的な検索条件に基づいて検索処理手段で前記索引を検索することを特徴とする。   In the present invention, in a text search method for performing text search using the N-gram method, a search target text is analyzed by a search target text analysis means based on a text analysis rule, and an index word is extracted, and the index word is used. The index generation means generates an index, the search word included in the search condition is analyzed by the search word analysis means based on the search word analysis rule, the word is cut out from the search word, and based on the word cut out from the search word Then, an internal search condition is generated by the search condition generation means, and the index is searched by the search processing means based on the internal search condition.

当該構成では、N-gram方式において、検索対象テキストと検索条件を異なる解析ルールに基づいて解析するため、検索語専用の解析ルールに基づいて検索語から語を切り出すことが可能であり、N-gram方式における検索ノイズを低減し、さらにN-gram索引における1文字検索を効率的に処理することができる。   In this configuration, in the N-gram method, the search target text and the search conditions are analyzed based on different analysis rules, so it is possible to cut out words from the search terms based on the analysis rules dedicated to the search terms. Search noise in the gram method can be reduced, and a one-character search in the N-gram index can be efficiently processed.

また、前記テキスト解析ルールは、前記検索対象テキストの文字列の最後の一文字を前記索引語として切り出すことが少なくとも規定され、前記検索語解析ルールは、前記検索語が2文字以上であって最後の一文字が非ASCII文字であると最後の一文字を語として切り出さないことが少なくとも規定されていることが望ましい。   Further, the text analysis rule is at least defined to cut out the last character of the character string of the search target text as the index word, and the search word analysis rule is that the search word is two characters or more and the last character It is desirable that at least it should be specified that the last character is not extracted as a word if a character is a non-ASCII character.

本発明では、bi-gram索引を用いた検索方式において、検索処理量や索引容量の増加を抑えながら、検索ノイズをより低減することができる。   In the present invention, in a search method using a bi-gram index, search noise can be further reduced while suppressing an increase in search processing amount and index capacity.

図1は、本発明におけるテキスト検索装置の構成の一例を示す機能ブロック図である。   FIG. 1 is a functional block diagram showing an example of the configuration of a text search apparatus according to the present invention.

同図に示すようにテキスト検索装置10は、テキスト検索の対象となる検索対象テキストから、テキスト検索時に用いる索引語(キーワード)を抽出する検索対象テキスト解析部11と、索引を生成する索引生成部12と、索引を、図示しないHDD(Hard Disk Drive)などの記憶装置に格納して保持する索引保持部13と、テキストを検索する際の条件である検索条件内の各検索語について、語の切り出しを行う検索語解析部14と、検索語から抽出した語の並びを利用して、後述する内部的な検索条件を生成する検索条件生成部15と、内部的な検索条件に基づいて索引を検索する検索処理部16と、検索の結果に基づいて、ユーザが必要とするテキストのテキスト識別子を索引から取得・出力する検索結果抽出部17とを具備して構成されている。   As shown in the figure, the text search apparatus 10 includes a search target text analysis unit 11 that extracts index words (keywords) used for text search from a search target text that is a target of text search, and an index generation unit that generates an index. 12, an index holding unit 13 that stores and holds an index in a storage device such as an HDD (Hard Disk Drive) (not shown), and each search word in a search condition that is a condition for searching for a text, A search word analysis unit 14 that performs segmentation, a search condition generation unit 15 that generates an internal search condition to be described later using a sequence of words extracted from the search word, and an index based on the internal search condition A search processing unit 16 for searching, and a search result extracting unit 17 for acquiring and outputting a text identifier of text required by the user from the index based on the search result are configured. That.

なお、当該テキスト検索装置は、各機能を備えたモジュールなどの組合せによって実現されるほか、汎用サーバなどの情報処理装置にインストールされた、本発明におけるテキスト検索方法を実現することが可能なテキスト検索プログラムなどを用いて実現することができる。   Note that the text search device is realized by a combination of modules having each function or the like, and is also installed in an information processing device such as a general-purpose server. The text search method can realize the text search method according to the present invention. It can be realized using a program or the like.

ここで、図2は、検索対象テキストから索引語群を抽出し、索引を生成する際の処理の流れの一例を示す模式図である。   Here, FIG. 2 is a schematic diagram illustrating an example of a processing flow when an index word group is extracted from the search target text and an index is generated.

まず、検索対象テキストにおけるマルチバイトの英数文字をASCII文字(半角英数字)に統一すると共に、半角カタカナを全角カタカナに統一するなど、索引語を正規化するための処理を行う。   First, the multi-byte alphanumeric characters in the search target text are unified to ASCII characters (half-width alphanumeric characters), and the processing for normalizing the index word is performed, such as unifying half-width katakana to full-width katakana.

次に、以下に示す解析ルール(テキスト解析ルール)に従って検索対象テキストを解析し、索引語群を抽出する。   Next, the search target text is analyzed according to the following analysis rule (text analysis rule) to extract an index word group.

テキスト解析ルール:
・記号や空白などは区切り文字とし、索引語としない。
・ASCIIと非ASCIIの連接部分は、索引語の区切りとする。
・検索語が2文字以上で、最後の1文字が非ASCII文字の場合、最後の1文字のみの語を索引語として抽出する。
・上記の区切りルールに基づいて、検索対象テキスト内の処理単位文字列を決定する。
・処理単位文字列については、以下のルールとする。
・連続するASCII文字は、1つの索引語とする。
・非ASCII文字は、bi-gramによる索引語抽出をする。
・2文字以上の非ASCII文字列の場合、bi-gramの索引語を抽出する際に、最後の1文字のみの語を索引語として抽出する。
Text analysis rules:
・ Symbols and spaces are delimiters and not index words.
-Concatenated parts of ASCII and non-ASCII shall be index word separators.
-If the search word is two or more characters and the last character is a non-ASCII character, the word of only the last character is extracted as an index word.
-A processing unit character string in the search target text is determined based on the above delimitation rule.
-The following rules apply to processing unit character strings.
・ Consecutive ASCII characters shall be one index word.
・ Non-ASCII characters are indexed by bi-gram.
In the case of a non-ASCII character string of two or more characters, when extracting a bi-gram index word, the word of only the last one character is extracted as an index word.

このため、例えば、図2(a)に示すように、“東京都に支社を持つXYZ Co., Ltd.は新製品を発表した。”というテキストを検索対象として解析を行うと、図2(b)に直線で囲んで示したように、“東京”“京都”“都に”“に支”“支社”“社を”“を持”“持つ”“XYZ”“Co”“Ltd”“は新”“新製”“製品”“品を”“を発”“発表”“表し”“した”“た”を索引語群として抽出する。   For this reason, for example, as shown in FIG. 2 (a), when the text “XYZ Co., Ltd. with a branch office in Tokyo has announced a new product” is analyzed as a search target, FIG. b) “Tokyo” “Kyoto” “In Tokyo” “Branch” “Branch” “Company” “Hold” “Hold” “XYZ” “Co” “Ltd” “ Extracts "new", "newly made", "product", "product", "departure", "announcement", "representation", "done", and "ta" as index word groups.

そして、抽出した索引語群を、抽出順序を維持した状態でインバーテッドファイル化し、図2(c)に示す索引を生成する。   Then, the extracted index word group is converted into an inverted file while maintaining the extraction order, and the index shown in FIG. 2C is generated.

この際、少なくとも次の索引を生成することが望ましい。
・1つの索引語から、その索引語が出現するテキスト識別子を求めることが可能なデータ構造の索引(なお、全索引語が文字コード順にソートされている状態であるのが望ましい。)。
・1つのテキスト識別子から、そのテキスト内に出現する索引語とその出現順を求めることが可能なデータ構造の索引。
At this time, it is desirable to generate at least the next index.
An index of a data structure capable of obtaining a text identifier in which an index word appears from one index word (note that it is desirable that all index words are sorted in the character code order).
An index of a data structure capable of obtaining an index word appearing in the text and an order of appearance from one text identifier.

なお、索引語からそれが出現するテキストの識別子情報を取得することが可能なデータ構造の索引(前者)に、テキスト識別子とテキスト内での出現位置(何番目の索引語か、など)の情報を持たせることにより、テキスト識別子からその中に出現する索引語とその出現順を求めることが可能なデータ構造の索引(後者)を省略してもよい。   In addition, in the index of the data structure (the former) that can obtain the identifier information of the text in which it appears from the index word, the information of the text identifier and the appearance position (such as the index word) in the text The index of the data structure (the latter) that can determine the index word appearing in the text identifier and the order of appearance from the text identifier may be omitted.

また、データ構造は、図2を用いて示したデータ構造に限られるものではなく、例えば、従来から用いられているインバーテッド方式のデータ構造など、インバーテッド方式の任意のデータ構造を用いることができる。   In addition, the data structure is not limited to the data structure shown in FIG. 2, and an arbitrary inverted data structure such as an inverted data structure conventionally used may be used. it can.

図3は、検索語を解析し、内部的な検出条件を生成する際の処理の流れの一例を示す模式図である。なお、ダブルクォートで囲まれた文字列は、その文字列が1つの検索語であることを示している。   FIG. 3 is a schematic diagram showing an example of the flow of processing when analyzing a search word and generating an internal detection condition. Note that a character string enclosed in double quotes indicates that the character string is one search term.

まず、検索語を正規化するための処理を行い、検索語が2文字以上で最後の1文字が非ASCII文字の場合は、最後の1文字のみの語を索引語として抽出しない点を除いて、図2を用いて説明した、検索対象テキストを解析して索引語群を抽出する際の処理と同様の処理を行って語を切り出す。   First, the process to normalize the search word is performed. If the search word is 2 or more characters and the last character is a non-ASCII character, only the last one word is not extracted as an index word. The word is cut out by performing the same process as the process of extracting the index word group by analyzing the search target text described with reference to FIG.

すなわち、以下に示す解析ルール(検索語解析ルール)に従って検索語を解析して語の切り出しを行う。   That is, a search word is analyzed according to an analysis rule (search word analysis rule) shown below to cut out a word.

検索語解析ルール:
・検索対象テキスト解析ルールと同様に、検索語から索引語を抽出する。ただし、検索語が2文字以上であり、最後の1文字が非ASCII文字である場合は、最後の1文字のみは抽出しない。
Search term analysis rules:
-Index terms are extracted from search terms in the same way as search target text analysis rules. However, if the search word is two or more characters and the last character is a non-ASCII character, only the last character is not extracted.

次に、検索語から切り出された語が連続して存在するテキストを検索するための検索条件(内部的な検索条件)を生成する。   Next, a search condition (internal search condition) for searching for text in which words extracted from the search word continuously exist is generated.

このため、例えば、図3(a)に示すように“東京都”and“XYZ”を検索条件とすると、“東京都”からは“東京”と“京都”の語が切り出され、“XYZ”からは“XYZ”の語が切り出され、内部的な検索条件は、“東京”、“京都”が連続して出現すると共に、“XYZ”が出現するという検索条件となる。   Therefore, for example, as shown in FIG. 3A, if “Tokyo” and “XYZ” are used as search conditions, the words “Tokyo” and “Kyoto” are extracted from “Tokyo” and “XYZ”. The word “XYZ” is extracted from the search condition, and the internal search condition is a search condition that “Tokyo” and “Kyoto” appear successively and “XYZ” appears.

また、図3(b)に示すように“東京/京都 XYZ”を検索条件とすると、“東京”、“京”、“京都”、“都”、“XYZ”の語が切り出され、内部的な検索条件は、“東京”、“京”、“京都”、“都”、“XYZ”が連続して出現するという検索条件となる。   Also, as shown in FIG. 3B, when “Tokyo / Kyoto XYZ” is used as a search condition, the words “Tokyo”, “Kyo”, “Kyoto”, “Metro”, and “XYZ” are cut out, and the internal The search conditions are such that “Tokyo”, “Kyo”, “Kyoto”, “Miyako”, and “XYZ” appear successively.

従来のbi-gram方式のテキスト検索では、検索語を“東京都”としても、“東京/京都”としても、共に“東京”、“京都”の語が切り出され、どちらの検索条件で検索しても同じ検索結果となるが、本発明におけるテキスト検索方法では、“東京都”を索引に含むテキストは、検索条件1で検出され、“東京/京都”を索引に含むテキストは、検索条件2で検出され、検索条件に応じた検索結果が得られるため、検索ノイズを低減することができる。   In the conventional bi-gram text search, the words “Tokyo” and “Kyoto” are both extracted as “Tokyo” or “Tokyo / Kyoto”. However, in the text search method of the present invention, the text including “Tokyo” in the index is detected by the search condition 1, and the text including “Tokyo / Kyoto” in the index is searched. Since search results corresponding to the search conditions are obtained, search noise can be reduced.

上記構成を用いて、本発明におけるテキスト検索装置は、まず、検索の対象となる検索対象テキストを検索対象テキスト解析部11で解析して索引語を抽出し、索引生成部12索引を生成すると共に、索引保持部13で索引を格納して保持する。   Using the above configuration, the text search apparatus according to the present invention first analyzes the search target text to be searched by the search target text analysis unit 11 to extract index words, and generates the index generation unit 12 index. The index holding unit 13 stores and holds the index.

次に、検索語解析部14で検索語から語の切り出しを行い、内部的な検索条件を検索条件生成部15で生成する。   Next, the search term analysis unit 14 extracts words from the search terms, and the search condition generation unit 15 generates internal search conditions.

そして、内部的な検索条件に基づいて通常の検索方法で索引を検索処理部16で検索し、ユーザが必要とするテキストのテキスト識別子を検索結果抽出部17で索引から取得して出力する。   Then, the index is searched by the search processing unit 16 by a normal search method based on the internal search condition, and the text identifier of the text required by the user is acquired from the index by the search result extracting unit 17 and output.

図4は、本発明における検索装置において、検索対象テキストの索引を生成する際の処理の流れを示すフローチャートである。   FIG. 4 is a flowchart showing a flow of processing when an index of search target text is generated in the search device according to the present invention.

まず、検索対象テキストを取得する(ステップ100)と、検索対象テキストの解析ルールに基づいて当該検索対象テキストを解析する(ステップ101)。   First, when a search target text is acquired (step 100), the search target text is analyzed based on an analysis rule for the search target text (step 101).

次に、解析結果に基づいて索引語群を抽出し、索引を生成・格納する(ステップ102)。   Next, an index word group is extracted based on the analysis result, and an index is generated and stored (step 102).

図5は、本発明における検索装置において、ユーザが入力した検索条件に基づいて検索対象テキストの検索を行う際の処理の流れを示すフローチャートである。   FIG. 5 is a flowchart showing the flow of processing when searching for the text to be searched based on the search condition input by the user in the search device according to the present invention.

まず、ユーザから入力された検索条件を取得する(ステップ200)と、検索語の解析ルールに基づいて検索語を解析する(ステップ201)。   First, when the search condition input by the user is acquired (step 200), the search term is analyzed based on the analysis rule of the search term (step 201).

次に、解析結果に基づいて内部的な検索条件を生成し(ステップ202)、内部的な検索条件に基づいて索引を検索する(ステップ203)と共に、検索結果を出力する(ステップ204)。   Next, an internal search condition is generated based on the analysis result (step 202), an index is searched based on the internal search condition (step 203), and the search result is output (step 204).

なお、本発明における検索処理は、bi-gram方式に限られるものではなく、N-gram方式に用いることができる。   Note that the search processing in the present invention is not limited to the bi-gram method, and can be used for the N-gram method.

また、1文字の検索語が与えられた場合、その文字から始まる索引語に展開して、検索を行う。   Also, when a one-word search word is given, the search is performed by expanding the index word starting from that character.

このように本発明では、 従来、検索対象テキストと検索語を同じ解析ルールに基づいて解析を行っていたところを、検索対象テキストから索引語を切り出すための検索対象テキスト解析部と、検索語から語を切り出す検索語解析部の2種類を用意し、異なる解析ルールを用いて解析を行っているため、検索語から切り出した語と、テキストから切り出した索引語の並びを異ならせることができる。   As described above, in the present invention, the search target text and the search word are conventionally analyzed based on the same analysis rule. The search target text analysis unit for extracting the index word from the search target text and the search word are used. Since two types of search word analysis units for extracting words are prepared and analysis is performed using different analysis rules, it is possible to make the order of the words cut out from the search words and the index words cut out from the text different.

例えば、検索対象のテキスト(文字列)が「東京都港区,…」の場合は、「東京」「京都」「都港」「港区」「区」…が索引となり、「東京,京都, …」の場合は、「東京」「京」「京都」「都」…が索引となる。   For example, if the search target text (string) is “Minato-ku, Tokyo,…”, “Tokyo”, “Kyoto”, “Minato-ku”, “Minato-ku”, “Ku” ... In the case of “...”, “Tokyo”, “Kyo”, “Kyoto”, “Miyako”, etc. are indexes.

そして、検索語の解析を、検索対象テキストの解析と同様に処理する(従来の方法)と、検索語「東京都」で、「東京」「京都」「都」が連続して出現するテキストを検索することとなり、テキスト「東京都港区,…」を検索することができない。   When the search term is analyzed in the same way as the analysis of the text to be searched (conventional method), the text “Tokyo”, “Kyoto” and “Miyako” appear continuously in the search term “Tokyo”. This means that the text “Minato-ku,…, Tokyo” cannot be searched.

一方、本発明では、検索語の解析時と、検索対象テキストの解析時とで解析ルールが異なるため、検索語が「東京都」の場合は、「東京」「京都」の語が切り出され、検索語が「東京,京都」の場合は、「東京」「京」「京都」の語が切り出される。   On the other hand, in the present invention, since the analysis rules are different between the analysis of the search word and the analysis of the search target text, when the search word is “Tokyo”, the words “Tokyo” and “Kyoto” are cut out, When the search term is “Tokyo, Kyoto”, the words “Tokyo”, “Kyo”, and “Kyoto” are extracted.

このため、検索語「東京都」ではテキスト「東京都港区, …」、検索語「東京,京都」ではテキスト「東京,京都, …」のみが検索される。   Therefore, only the text “Tokyo, Kyoto,...” Is searched for the search word “Tokyo, Kyoto” and the search word “Tokyo, Kyoto” for the search word “Tokyo”.

従って、本発明では、検索語に応じた検索結果を得ることが可能であり、bi-gram(N-gram)方式を用いて、検索ノイズを低減することができる。   Therefore, in the present invention, it is possible to obtain a search result corresponding to a search word, and search noise can be reduced using a bi-gram (N-gram) method.

本発明おけるテキスト検索装置の構成の一例を示す機能ブロック図である。It is a functional block diagram which shows an example of a structure of the text search device in this invention. 索引を生成する際の処理の流れの一例を示す模式図である。It is a schematic diagram which shows an example of the flow of a process at the time of producing | generating an index. 検索語を解析し、内部的な検出条件を生成する際の処理の流れの一例を示す模式図である。It is a schematic diagram which shows an example of the flow of a process at the time of analyzing a search word and producing | generating an internal detection condition. 検索対象テキストの索引を生成する際の処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of a process at the time of producing | generating the index of search object text. ユーザが入力した検索条件に基づいて検索対象テキストの検索を行う際の処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of a process at the time of searching a search object text based on the search conditions input by the user.

符号の説明Explanation of symbols

10…テキスト検索装置
11…検索対象テキスト解析部
12…索引生成部
13…索引保持部
14…検索語解析部
15…検索条件生成部
16…検索処理部
17…検索結果抽出部
DESCRIPTION OF SYMBOLS 10 ... Text search apparatus 11 ... Search object text analysis part 12 ... Index production | generation part 13 ... Index holding | maintenance part 14 ... Search term analysis part 15 ... Search condition production | generation part 16 ... Search processing part 17 ... Search result extraction part

Claims (5)

N-gram方式を用いてテキスト検索を行うテキスト検索装置において、
検索対象テキストをテキスト解析ルールに基づいて解析し、索引語を抽出する検索対象テキスト解析手段と、
前記索引語を用いて索引を生成する索引生成手段と、
検索条件に含まれる検索語を検索語解析ルールに基づいて解析し、該検索語から語を切り出す検索語解析手段と、
前記検索語から切り出した語に基づいて内部的な検索条件を生成する検索条件生成手段と、
前記内部的な検索条件に基づいて前記索引を検索する検索処理手段と
を具備することを特徴とするテキスト検索装置。
In a text search device that performs text search using the N-gram method,
Analyzing the text to be searched based on text analysis rules and extracting index terms,
Index generating means for generating an index using the index word;
A search term analysis means for analyzing a search term included in the search condition based on a search term analysis rule and cutting out a word from the search term;
Search condition generating means for generating an internal search condition based on a word extracted from the search word;
A text search apparatus comprising: search processing means for searching the index based on the internal search condition.
前記テキスト解析ルールは、
前記検索対象テキスト内の処理単位文字列の最後の一文字を前記索引語として切り出すことが少なくとも規定され、
前記検索語解析ルールは、
前記検索語が2文字以上であって最後の一文字が非ASCII文字であると最後の一文字を語として切り出さないことが少なくとも規定されている
ことを特徴とする請求項1記載のテキスト検索装置。
The text analysis rule is:
It is defined at least that the last character of the processing unit character string in the search target text is cut out as the index word,
The search term analysis rule is:
2. The text search apparatus according to claim 1, wherein if the search word is two or more characters and the last character is a non-ASCII character, at least the last character is not extracted as a word.
N-gram方式を用いたテキスト検索をコンピュータに実行させるテキスト検索プログラムにおいて、
検索対象テキストをテキスト解析ルールに基づいて解析し、索引語を抽出するステップと、
前記索引語を用いて索引を生成するステップと、
検索条件に含まれる検索語を検索語解析ルールに基づいて解析し、該検索語から語を切り出すステップと、
前記検索語から切り出した語に基づいて内部的な検索条件を生成するステップと、
前記内部的な検索条件に基づいて前記索引を検索するステップと
をコンピュータに実行させることを特徴とするテキスト検索プログラム。
In a text search program that causes a computer to execute a text search using the N-gram method,
Analyzing the text to be searched based on text analysis rules and extracting index terms;
Generating an index using the index terms;
Analyzing a search term included in the search condition based on a search term analysis rule, and cutting out a word from the search term;
Generating an internal search condition based on a word extracted from the search word;
A text search program for causing a computer to execute the step of searching the index based on the internal search condition.
前記テキスト解析ルールは、
前記検索対象テキスト内の処理単位文字列の最後の一文字を前記索引語として切り出すことが少なくとも規定され、
前記検索語解析ルールは、
前記検索語が2文字以上であって最後の一文字が非ASCII文字であると最後の一文字を語として切り出さないことが少なくとも規定されている
ことを特徴とする請求項3記載のテキスト検索プログラム。
The text analysis rule is:
It is defined at least that the last character of the processing unit character string in the search target text is cut out as the index word,
The search term analysis rule is:
4. The text search program according to claim 3, wherein if the search word is two or more characters and the last character is a non-ASCII character, at least the last character is not extracted as a word.
N-gram方式を用いてテキスト検索を行うテキスト検索方法において、
検索対象テキストをテキスト解析ルールに基づいて検索対象テキスト解析手段で解析して索引語を抽出し、
前記索引語を用いて索引生成手段で索引を生成し、
検索条件に含まれる検索語を検索語解析ルールに基づいて検索語解析手段で解析して該検索語から語を切り出し、
前記検索語から切り出した語に基づいて検索条件生成手段で内部的な検索条件を生成し、
前記内部的な検索条件に基づいて検索処理手段で前記索引を検索する
ことを特徴とするテキスト検索方法。
In a text search method that performs text search using the N-gram method,
The search target text is analyzed by the search target text analysis means based on the text analysis rules, and index words are extracted.
An index is generated by index generation means using the index word,
The search terms included in the search conditions are analyzed by the search term analysis means based on the search term analysis rules, and the words are extracted from the search terms,
An internal search condition is generated by a search condition generation unit based on a word extracted from the search word,
A text search method, wherein the index is searched by search processing means based on the internal search condition.
JP2006036567A 2006-02-14 2006-02-14 Text retrieval device, program, and method Pending JP2007219620A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2006036567A JP2007219620A (en) 2006-02-14 2006-02-14 Text retrieval device, program, and method
CN2006101289654A CN101021851B (en) 2006-02-14 2006-09-05 Text search device, text search method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006036567A JP2007219620A (en) 2006-02-14 2006-02-14 Text retrieval device, program, and method

Publications (1)

Publication Number Publication Date
JP2007219620A true JP2007219620A (en) 2007-08-30

Family

ID=38496885

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006036567A Pending JP2007219620A (en) 2006-02-14 2006-02-14 Text retrieval device, program, and method

Country Status (2)

Country Link
JP (1) JP2007219620A (en)
CN (1) CN101021851B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102662982A (en) * 2012-03-14 2012-09-12 镇江畅远信息科技有限公司 A document retrieval system
WO2012120560A1 (en) * 2011-03-07 2012-09-13 株式会社日立製作所 Search device and search method
KR101473535B1 (en) 2012-12-28 2014-12-18 한양대학교 산학협력단 Malware classification method using multi n―gram
JP2017537391A (en) * 2014-11-10 2017-12-14 オラクル・インターナショナル・コーポレイション Automatic generation of N-grams and concept relationships from language input data

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136190B (en) * 2007-12-06 2015-10-28 谷歌公司 CJK name detects
CN103631784B (en) * 2012-08-21 2018-07-20 腾讯科技(深圳)有限公司 Page content retrieval method and system
CN107368494A (en) * 2016-05-12 2017-11-21 索意互动(北京)信息技术有限公司 A kind of document analysis method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001052029A (en) * 1999-08-17 2001-02-23 Ricoh Co Ltd Document retrieval system
JP2002269138A (en) * 2001-03-08 2002-09-20 Ricoh Co Ltd Method for generating retrieval condition

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001052029A (en) * 1999-08-17 2001-02-23 Ricoh Co Ltd Document retrieval system
JP2002269138A (en) * 2001-03-08 2002-09-20 Ricoh Co Ltd Method for generating retrieval condition

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012120560A1 (en) * 2011-03-07 2012-09-13 株式会社日立製作所 Search device and search method
CN102662982A (en) * 2012-03-14 2012-09-12 镇江畅远信息科技有限公司 A document retrieval system
CN102662982B (en) * 2012-03-14 2014-10-29 镇江畅远信息科技有限公司 A document retrieval method
KR101473535B1 (en) 2012-12-28 2014-12-18 한양대학교 산학협력단 Malware classification method using multi n―gram
JP2017537391A (en) * 2014-11-10 2017-12-14 オラクル・インターナショナル・コーポレイション Automatic generation of N-grams and concept relationships from language input data

Also Published As

Publication number Publication date
CN101021851B (en) 2011-05-18
CN101021851A (en) 2007-08-22

Similar Documents

Publication Publication Date Title
JP5599662B2 (en) System and method for converting kanji into native language pronunciation sequence using statistical methods
JP2007517338A (en) Search quality improvement system and improvement method
JP2006252380A (en) Question answering system, data retrieval method, and computer program
JP2007219620A (en) Text retrieval device, program, and method
US8484229B2 (en) Method and system for identifying traditional arabic poems
JP2008083952A (en) Dictionary creation support system, method and program
JP2010262577A (en) System, method and program for creation of extraction rule
JP2007233446A (en) Synonym pair extraction device and synonym pair extraction method
US20080243478A1 (en) Efficient Implementation of Morphology for Agglutinative Languages
JP5979650B2 (en) Method for dividing terms with appropriate granularity, computer for dividing terms with appropriate granularity, and computer program thereof
JP2008234049A (en) Summary sentence generation device and summary sentence generation program
KR100617317B1 (en) Method for re-analysis of compound noun to decide lexical entries and apparatus thereof
WO2009113289A1 (en) New case generation device, new case generation method, and new case generation program
JP4734400B2 (en) Document search apparatus and program
Lee et al. Syllable-based Malay word stemmer
JP2007133682A (en) Full text retrieval system and full text retrieval method therefor
JP5795302B2 (en) Morphological analyzer, method, and program
JP2003303194A (en) Idiom dictionary producing device, retrieval index producing device, document retrieving device, and their method, program, and recording medium
JP2005063030A (en) Method for expressing concept, method and device for creating expression of concept, program for implementing this method, and recording medium for recording this program
JP4341077B2 (en) Document processing apparatus, document processing method, and document processing program
JP2010250389A (en) Information retrieval system, method and program, and index generation system, method, and program
JP2009282903A (en) Knowledge extraction/search apparatus and method thereof
JP2008276561A (en) Morpheme analysis device, morpheme analysis method, morpheme analysis program, and recording medium with computer program recorded thereon
JP2004258759A (en) Text analyzing device, method and program
JP2010140107A (en) Method, apparatus, program, and computer readable recording medium for registering unknown word

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081225

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110106

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110118

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110628