JP2002297660A - Method, device, program, and recording medium for character similarity calculation - Google Patents

Method, device, program, and recording medium for character similarity calculation

Info

Publication number
JP2002297660A
JP2002297660A JP2002012259A JP2002012259A JP2002297660A JP 2002297660 A JP2002297660 A JP 2002297660A JP 2002012259 A JP2002012259 A JP 2002012259A JP 2002012259 A JP2002012259 A JP 2002012259A JP 2002297660 A JP2002297660 A JP 2002297660A
Authority
JP
Japan
Prior art keywords
character string
similarity
partial
partial character
calculating
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
JP2002012259A
Other languages
Japanese (ja)
Other versions
JP4065695B2 (en
Inventor
Kyoji Umemura
恭司 梅村
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.)
INFORMATION TECHNOLOGY PROMOTI
INFORMATION-TECHNOLOGY PROMOTION AGENCY JAPAN
Sumitomo Electric Industries Ltd
Original Assignee
INFORMATION TECHNOLOGY PROMOTI
INFORMATION-TECHNOLOGY PROMOTION AGENCY JAPAN
Sumitomo Electric Industries 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 INFORMATION TECHNOLOGY PROMOTI, INFORMATION-TECHNOLOGY PROMOTION AGENCY JAPAN, Sumitomo Electric Industries Ltd filed Critical INFORMATION TECHNOLOGY PROMOTI
Priority to JP2002012259A priority Critical patent/JP4065695B2/en
Publication of JP2002297660A publication Critical patent/JP2002297660A/en
Priority to CN 02159822 priority patent/CN1230770C/en
Application granted granted Critical
Publication of JP4065695B2 publication Critical patent/JP4065695B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To speed up document retrieval by selecting a partial character string used for similarity calculation. SOLUTION: An input character string X and a document Y in a document database are regarded as two character strings and their similarity is calculated. Partial character strings cut out of the input character string are sorted according to their appearance frequencies and recorded in a partial character string management table. Then matching information is gathered as to the respective partial character strings in the partial character string management table and recorded in a matching information management table. A list regarding the document Y is taken out of the table and the similarity to the input character string X is calculated. The document number and the similarity are recorded in a pair in a document management table. Those processes are repeated for all documents. Lastly, the document management table is rearranged in the decreasing order of the similarity and a document having high similarity is selected as a retrieval result from the database.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、二つの文字列の類
似度判定に関するものであり、特に情報検索において、
入力された文字列とデータベースに登録された文書との
類似度判定に用いると好適である。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to similarity determination between two character strings, and more particularly, to information retrieval.
It is suitable for use in determining the similarity between an input character string and a document registered in a database.

【0002】[0002]

【従来の技術】文書のデータベースから、所望の文書を
取り出す情報検索がよく行なわれている。このような情
報検索において、文書は、複数の文字からなる単語を組
み合わせた文字列の集合として扱う。そして、検索文字
列と検索対象文書中の文字列同士を比較し、類似度の高
いものを一つあるいは複数選び出すことで情報検索を行
っている。この文字列同士の類似度は、大きく分けて、
形態素解析を用いる方法と、長さnの部分文字列(以
下、nグラムと称する)の一致を求める方法の2通りが
ある。
2. Description of the Related Art Information retrieval for extracting a desired document from a document database is often performed. In such information retrieval, a document is treated as a set of character strings obtained by combining words including a plurality of characters. Then, the information search is performed by comparing the search character string with the character strings in the search target document, and selecting one or a plurality of characters having a high degree of similarity. The similarity between these character strings can be roughly divided into
There are two methods, a method using morphological analysis and a method for finding a match between partial character strings of length n (hereinafter, referred to as n-grams).

【0003】形態素解析を用いる方法は、例えば、Gera
rd Salton and Christopher Buckley, Term-Weighting
Approaches in Automatic Text Retrieval, Informatio
n Proceeding and Management, 24, pp.513-523, 1988.
に開示されている。この方法で二つの文字列同士の類似
度を求める基本的手順は以下のようになる。まず、両方
の文字列を、辞書と文法知識を用いた形態素解析により
単語の列に分解する。次に、両方の単語列を比較して、
一致する単語を求める。そして、一致する単語に対して
重みを設定する。その上で、この重みを、すべての一致
する単語に関して加算する。この加算の結果得られた総
和が、形態素解析による類似度となる。
A method using morphological analysis is described, for example, in Gera
rd Salton and Christopher Buckley, Term-Weighting
Approaches in Automatic Text Retrieval, Informatio
n Proceeding and Management, 24, pp.513-523, 1988.
Is disclosed. The basic procedure for obtaining the similarity between two character strings by this method is as follows. First, both character strings are decomposed into word strings by morphological analysis using a dictionary and grammatical knowledge. Next, compare both word strings,
Find matching words. Then, weights are set for the matching words. The weight is then added for all matching words. The sum obtained as a result of this addition is the similarity based on the morphological analysis.

【0004】形態素解析を用いる方法は、形態素解析自
体の精度が低いと情報検索が不調に終わるという本質的
な問題を有している。形態素解析の精度を上げるには、
単語辞書や文法規則などが大規模にならざるを得ず、簡
単に情報検索を利用することが難しくなる。さらに、流
行語、造語、限られた分野でのみ用いられる専門用語が
出現する文書では、単語辞書の整備の手間が大きな負担
となる。
[0004] The method using morphological analysis has an essential problem that if the accuracy of the morphological analysis itself is low, the information retrieval ends abnormally. To improve the accuracy of morphological analysis,
Word dictionaries and grammar rules must be large, making it difficult to easily use information retrieval. Furthermore, for documents in which buzzwords, coined words, and technical terms used only in limited fields appear, the time and effort required to maintain a word dictionary is a large burden.

【0005】次に、nグラムによる方法は、例えば、Ya
sushi Ogawa and Toru Matsuda, Overlapping statisti
cal word indexing: A new indexing method for Japan
esetext, In proceeding of SIGIR'97, Philadelphia P
A, USA, pp.226-234, 1997.に開示されている。この方
法で文字列同士の類似度を求める基本的手順は以下のよ
うになる。まず、両方の文字列に共通して含まれるn文
字の部分文字列を求める。次に、この共通する部分文字
列に対して、重みを設定する。そして、この重みを、す
べての一致する部分に関して加算する。この加算の結果
得られた総和が、nグラムによる類似度となる。
[0005] Next, the method using the n-gram is, for example, Ya
sushi Ogawa and Toru Matsuda, Overlapping statisti
cal word indexing: A new indexing method for Japan
esetext, In proceeding of SIGIR'97, Philadelphia P
A, USA, pp. 226-234, 1997. The basic procedure for obtaining the similarity between character strings by this method is as follows. First, a partial character string of n characters included in both character strings is obtained. Next, a weight is set for the common partial character string. Then, this weight is added for all matching parts. The sum obtained as a result of this addition is the similarity based on n-grams.

【0006】共通する部分文字列の重みの設定に関して
は、特定の文書に集中的に出現して、他の文書には出現
しない文字列には大きな値が与えられる。逆に多くの文
書に出現する文字列には小さな値しか与えられない。こ
れは多くの文書に出現する文字列は文書を特徴づける要
素になっておらず、検索に際し、有効に利用できないこ
とを反映したものである。
Regarding the setting of the weight of a common partial character string, a large value is given to a character string that appears intensively in a specific document and does not appear in other documents. Conversely, strings that appear in many documents are given only small values. This reflects that character strings appearing in many documents are not elements that characterize documents, and cannot be used effectively in searching.

【0007】nグラムによる方法は、形態素解析を要し
ないため、新しい技術用語などの未知語にも対応するこ
とができ、簡単に利用できる。
The method based on n-grams does not require morphological analysis, and therefore can deal with unknown words such as new technical terms and can be used easily.

【0008】nグラムによる方法の中でも、特に、長さ
2の文字列(以下、bigramと称する)による類似度の算
出においては、切り出されるすべてのbigramを対象にす
るのではなく、ひらがなを含まないbigramに限定して、
文字列同士に関する一致情報を求め、類似度を算出する
方法がある。これは、ひらがなを含むbigramは、文書デ
ータベース内の多くの文書で出現する可能性が高く、各
文書を特徴づける文字列となる確率が極めて小さいこと
を考慮したものである。ひらがなを含むbigramを文字列
の比較の対象に含めると計算量が大きくなるばかりで、
検索の精度は大きな向上が期待できないと認識されてい
る。
[0008] Among the methods using n-grams, particularly, in calculating the similarity using a character string of length 2 (hereinafter, referred to as bigram), not all the extracted bigrams are used, but no hiragana is included. limited to bigram,
There is a method of calculating coincidence between character strings and calculating similarity. This is because bigrams including Hiragana are highly likely to appear in many documents in the document database, and the probability of becoming a character string characterizing each document is extremely small. If you include bigrams including hiragana in the comparison of character strings, the amount of calculation will only increase,
It is recognized that search accuracy cannot be expected to significantly improve.

【0009】[0009]

【発明が解決しようとする課題】上記のように、nグラ
ムによる方法は形態素解析による方法と比較して有利な
面が多く、情報検索の分野で利用される場面が多い。n
グラム法における問題は、文書データベースが大きくな
るに従って計算量が増し、検索結果を得るまでの時間が
かかることである。
As described above, the method based on n-grams has many advantages in comparison with the method based on morphological analysis, and is often used in the field of information retrieval. n
The problem with the Gram method is that the amount of calculation increases as the size of the document database increases, and it takes time to obtain search results.

【0010】ところで、文字列から切り出される部分文
字列の中には、必ずしも類似度の算出において有効でな
い部分文字列、すなわち文書データベース内の多くの文
書に含まれるため重みが小さく、類似度に与える影響の
小さい部分文字列が多く含まれていると考えられてい
る。そのため、文字列から切り出されるすべてのnグラ
ムについて一致するかどうかを調べる方法は、計算時間
の点からみて効率がよくない。
By the way, the partial character strings cut out from the character string are not necessarily effective in calculating the similarity, that is, they are included in many documents in the document database, so that the weight is small and given to the similarity. It is thought that many substrings with small effects are included. Therefore, the method of checking whether all n-grams extracted from a character string match each other is not efficient in terms of calculation time.

【0011】また、切り出されたbigramに対し、ひらが
なを含む文字列を一致情報として扱わないという方法
は、計算時間の点については効率化されているが、本来
は検索に有効な文字列までも一律に切り捨てられてしま
う。その結果、検索精度が低下してしまうという問題が
あった。
The method of not treating a character string including hiragana as matching information in the extracted bigram is efficient in terms of calculation time, but even a character string that is originally effective for retrieval is used. It will be truncated uniformly. As a result, there is a problem that search accuracy is reduced.

【0012】本発明は上記したnグラム法における問題
を解決し、計算時間短縮と検索精度向上を両立する方法
を提供するものである。
The present invention solves the above-mentioned problem in the n-gram method, and provides a method that achieves both reduction in calculation time and improvement in search accuracy.

【0013】[0013]

【課題を解決するための手段】請求項1に記載の発明
は、二つの文字列の類似度を算出する方法において、第
1の文字列から切り出した部分文字列のうち、類似度算
出に対する効果に基づいて選別した部分文字列につい
て、第2の文字列との一致情報を収集し、前記一致情報
から一致した部分文字列の重みを算出し、前記重みに基
づいて類似度を算出することを特徴とする。このように
文字列同士の一致情報を求める際に、切り出されるすべ
てのnグラムを扱うのではなく、類似度の算出に対する
効果を推定することで、類似度の算出に有効なnグラム
を選別している。
According to a first aspect of the present invention, there is provided a method for calculating a similarity between two character strings, wherein the effect on the similarity calculation among partial character strings cut out from the first character string is provided. Collecting the matching information with the second character string for the partial character string selected on the basis of, calculating the weight of the matching partial character string from the matching information, and calculating the similarity based on the weight. Features. As described above, when obtaining matching information between character strings, n-grams that are effective in calculating the similarity are selected by estimating the effect on the calculation of the similarity instead of treating all the n-grams cut out. ing.

【0014】かかるように構成されているので、選別し
ない方法による検索精度とほぼ同等の検索精度を保ちつ
つ、計算時間の短縮を図ることが可能となる。
With such a configuration, it is possible to reduce the calculation time while maintaining the search accuracy almost equal to the search accuracy by the method of not selecting.

【0015】請求項2に記載の発明は、二つの文字列の
類似度を算出する方法において、第1の文字列から切り
出した部分文字列のうち、類似度算出に対する効果に基
づいて選別した部分文字列について、第2の文字列との
一致情報を収集し、前記一致情報に含まれる部分文字列
の中から、第1および第2の文字列に出現する順序が適
合する部分文字列の重みに基づいて類似度を算出するこ
とを特徴とする。このように、文字列同士の類似度の算
出において、一致情報に記録された部分文字列の中か
ら、さらにそれぞれの文字列に出現する順序が適合する
部分文字列を選び、その重みを類似度の算出に用いてい
る。
According to a second aspect of the present invention, in the method for calculating the similarity between two character strings, a part selected based on an effect on similarity calculation among partial character strings cut out from the first character string. For character strings, matching information with the second character string is collected, and among partial character strings included in the matching information, weights of the partial character strings in which the order of appearance in the first and second character strings matches The similarity is calculated based on As described above, in calculating the similarity between character strings, a partial character string whose order of appearance in each character string matches is further selected from the partial character strings recorded in the matching information, and the weight is determined by the similarity degree. Is used to calculate

【0016】かかるように構成されているので、重みを
算出する部分文字列が限定され、検索精度を保ったま
ま、一層の計算の高速化が達成できる。
With such a configuration, the partial character string for calculating the weight is limited, and the calculation can be further speeded up while maintaining the search accuracy.

【0017】請求項3に記載の発明は、請求項1または
2に記載の発明において、部分文字列の選別を、第1の
文字列から切り出した部分文字列が第2の文字列に出現
する回数を加味して行うことを特徴とする。
According to a third aspect of the present invention, in the first or second aspect of the present invention, the selection of the partial character string is performed such that the partial character string cut out from the first character string appears in the second character string. It is characterized in that it is performed taking the number of times into account.

【0018】かかるように構成されているので、類似度
の算出に効果のある部分文字列が効率的に選別でき、検
索精度を保ちつつ、一層の計算時間の短縮を図ることが
可能となる。
With such a configuration, partial character strings that are effective in calculating the similarity can be efficiently selected, and the calculation time can be further reduced while maintaining the search accuracy.

【0019】請求項4に記載の発明は、請求項1から3
のいずれかに記載の発明において、文字列同士の一致情
報として、部分文字列の長さ、第1の文字列における部
分文字列の出現場所、第2の文字列における部分文字列
の出現場所、第2の文字列内で何番目の一致かを表すシ
ーケンス番号、を含むことを特徴とする。
The invention according to claim 4 is the invention according to claims 1 to 3.
In the invention according to any one of the above, as the matching information between the character strings, the length of the partial character string, the location of the partial character string in the first character string, the location of the partial character string in the second character string, And a sequence number indicating the number of matches in the second character string.

【0020】かかるように構成されているので、一致し
たnグラムの重みを加算して類似度を算出する方法だけ
でなく、多くの類似度算出方法を併用することが可能と
なる。
With such a configuration, not only a method of calculating the similarity by adding the weights of the matched n-grams but also many similarity calculating methods can be used together.

【0021】請求項5に記載の発明は、二つの文字列の
類似度を算出する文字列類似度算出装置において、第1
の文字列から切り出した部分文字列のうち、類似度算出
に対する効果に基づいて選別する部分文字列選別部と、
第2の文字列との一致情報を収集する一致情報収集部
と、前記一致情報に基づき一致した部分文字列の重みを
算出し、前記重みを総和することで類似度を算出する類
似度算出部と、を有することを特徴とする文字列類似度
算出装置である。
According to a fifth aspect of the present invention, in the character string similarity calculating device for calculating the similarity between two character strings,
A partial character string selecting unit that selects based on an effect on similarity calculation among partial character strings cut out from the character string of
A matching information collecting unit that collects matching information with the second character string; and a similarity calculating unit that calculates a weight of the partial character string that matches based on the matching information, and calculates a similarity by summing the weights. And a character string similarity calculating device.

【0022】かかるように構成されているので、選別し
ない方法による検索精度とほぼ同等の検索精度を保ちつ
つ、計算時間の短縮を図る装置を実現できる。
With such a configuration, it is possible to realize a device that shortens the calculation time while maintaining the search accuracy substantially equal to the search accuracy by the method of not selecting.

【0023】請求項6に記載の発明は、二つの文字列の
類似度を算出する文字列類似度算出装置において、第1
の文字列から切り出した部分文字列について、類似度算
出に対する効果に基づいて選別する部分文字列選別部
と、前記選別部分文字列について、第2の文字列との一
致情報を収集する一致情報収集部と、前記一致情報に含
まれる部分文字列の中から、それぞれの文字列に出現す
る順序が適合する部分文字列を選択する適合部分文字列
選択手段と、前記適合部分文字列に付けられた重みを総
和する類似度算出部と、を有することを特徴とする文字
列類似度算出装置である。
According to a sixth aspect of the present invention, in the character string similarity calculating device for calculating the similarity between two character strings,
A partial character string selection unit that selects a partial character string extracted from the character string based on the effect on similarity calculation, and a match information collection unit that collects match information of the selected partial character string with a second character string Part, a matching partial character string selecting means for selecting a matching partial character string from among the partial character strings included in the matching information, the order of appearance in each character string, and a matching partial character string attached to the matching partial character string. A character string similarity calculation device, comprising: a similarity calculation unit that sums weights.

【0024】かかるように構成されているので、重みを
算出する部分文字列が限定され、検索精度を保ったま
ま、一層の計算の高速化が達成できる装置を実現でき
る。
With such a configuration, a partial character string for calculating the weight is limited, and an apparatus can be realized in which the calculation speed can be further increased while maintaining the search accuracy.

【0025】請求項7に記載の発明は、二つの文字列の
類似度を算出する文字列類似度算出プログラムであっ
て、コンピュータを、第1の文字列から切り出した部分
文字列が第2の文字列に出現する回数に基づいて選別す
る選別手段と、前記選別部分文字列について、第2の文
字列との一致情報を収集する一致情報収集手段と、前記
一致情報に基づき一致した部分文字列の重みを算出し、
前記重みを総和することで類似度を算出する類似度算出
手段、として機能させることを特徴とする文字列類似度
算出プログラムである。
According to a seventh aspect of the present invention, there is provided a character string similarity calculating program for calculating a similarity between two character strings, wherein the computer is configured to execute a partial character string cut out from the first character string. Selecting means for selecting based on the number of appearances in the character string; matching information collecting means for collecting matching information of the selected partial character string with a second character string; and a partial character string matching based on the matching information Calculate the weight of
A character string similarity calculation program that functions as similarity calculation means for calculating a similarity by summing the weights.

【0026】かかるように構成されているので、コンピ
ュータを、選別しない方法による検索精度とほぼ同等の
検索精度を保ちつつ、計算時間の短縮を図る手段として
機能させることができる。
With such a configuration, the computer can be made to function as means for shortening the calculation time while maintaining the search accuracy almost equal to the search accuracy by the method of not selecting.

【0027】請求項8に記載の発明は、二つの文字列の
類似度を算出する文字列類似度算出プログラムであっ
て、コンピュータを、第1の文字列から切り出した部分
文字列について、類似度算出に対する効果に基づいて選
別する選別手段と、前記選別部分文字列について、第2
の文字列との一致情報として、部分文字列の長さ、第1
の文字列における部分文字列の出現場所、第2の文字列
における部分文字列の出現場所、第2の文字列内で何番
目の一致かを表すシーケンス番号、を収集する一致情報
収集手段と、前記一致情報に含まれる部分文字列の中か
ら、それぞれの文字列に出現する順序が適合する部分文
字列に付けられた重みに基づいて類似度を算出する類似
度算出手段、として機能させることを特徴とする文字列
類似度算出プログラムである。
An eighth aspect of the present invention is a character string similarity calculation program for calculating the similarity between two character strings, wherein the computer is configured to execute the similarity degree calculation on the partial character string cut out from the first character string. Selecting means for selecting based on the effect on the calculation;
The length of the partial character string, the first
Matching information collecting means for collecting the occurrence position of the partial character string in the character string, the occurrence position of the partial character string in the second character string, and the sequence number indicating the number of the match in the second character string; Functioning as similarity calculating means for calculating a similarity based on a weight given to a partial character string whose order of appearance in each character string matches from among partial character strings included in the matching information. This is a character string similarity calculation program as a feature.

【0028】かかるように構成されているので、コンピ
ュータを、重みを算出する部分文字列を限定し検索精度
を保ったまま、一層の計算の高速化を図る手段として機
能させることができる。
With such a configuration, the computer can be made to function as a means for further increasing the calculation speed while maintaining the search accuracy by limiting the partial character string for calculating the weight.

【0029】請求項9に記載の発明は、請求項7または
8に記載のプログラムを記録したコンピュータ読取可能
な記録媒体である。
According to a ninth aspect of the present invention, there is provided a computer-readable recording medium storing the program according to the seventh or eighth aspect.

【0030】かかるように構成されているので、記録さ
れた機能を必要な場所で実現することができる。
With such a configuration, the recorded function can be realized at a necessary place.

【0031】[0031]

【発明の実施の形態】本発明は、nグラムによる文字列
同士の類似度の算出方法およびそれを実現する装置、プ
ログラム、記録媒体に関する。入力された文字列とデー
タベースに登録された複数の文書との類似度を算出する
ことを想定しているが、それ以外の応用も可能である。
文字列同士の一致部分を求める際に、データベース中の
すべての文書それぞれに対して、入力文字列と文書に共
通するnグラムを求めるという方法ではなく、入力文字
列からnグラムを切り出し、それぞれのnグラムを含む
文書をサフィックスファイルの利用によって効率的にデ
ータベース内から検索するという方法を用いる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention relates to a method for calculating similarity between character strings using n-grams, and an apparatus, a program, and a recording medium for realizing the method. Although it is assumed that the similarity between the input character string and a plurality of documents registered in the database is calculated, other applications are also possible.
When finding a matching part between character strings, instead of obtaining an n-gram common to the input character string and the document for each document in the database, an n-gram is cut out from the input character string and A method is used in which a document including an n-gram is efficiently searched from a database by using a suffix file.

【0032】入力文字列から切り出されるnグラムの中
には、類似度の算出に与える影響の少ないnグラムが多
く含まれていると考えられる。入力文字列から切り出さ
れる部分文字列の数は、例えば、入力文字列の長さをm
とし、部分文字列を2文字であるbigramに限定するとm
−1となる。従って、部分文字列の選別を行わずに、切
り出されたbigramすべてに対し一致情報を求めると、入
力文字列長mが大きくなるほど、計算時間も大きくな
る。そこで、本発明では、切り出されたnグラムの中か
ら、類似度の算出に対する効果を推定することでnグラ
ムを選別し、定数個のnグラムのみを一致情報の収集に
適用する。
It is considered that the n-grams cut out from the input character string include many n-grams having little influence on the calculation of the similarity. The number of partial character strings cut out from the input character string is, for example, m
And if the partial character string is limited to bigram which is two characters, m
It becomes -1. Therefore, if matching information is obtained for all of the extracted bigrams without selecting the partial character strings, the calculation time increases as the input character string length m increases. Therefore, in the present invention, n-grams are selected by estimating the effect on the calculation of similarity from the extracted n-grams, and only a constant number of n-grams are applied to the collection of coincidence information.

【0033】部分文字列の選別については、類似度に加
算される重みの大きな部分文字列を選別するのが検索精
度向上のために必要である。重みは、その部分文字列を
含むデータベース中の文書の数(以下、dfと記す)に
よって決まるので、dfの値を元に選別するのが自然で
ある。しかし、本発明の一つの局面では、dfの代わり
に、nグラムがデータベース内の文書に出現する数(以
下、出現度数、もしくは、tfと記す)に基づき部分文
字列の選別を行うことが推奨される。
In selecting a partial character string, it is necessary to select a partial character string having a large weight added to the similarity in order to improve search accuracy. Since the weight is determined by the number of documents in the database including the partial character string (hereinafter referred to as df), it is natural to select based on the value of df. However, in one aspect of the present invention, it is recommended to select a partial character string based on the number of occurrences of an n-gram in a document in a database (hereinafter, referred to as occurrence frequency or tf) instead of df. Is done.

【0034】tfは直接的に算出でき、その値が増えて
も計算時間はほとんど変わらないのに対し、dfを算出
するには、tfを算出した後に文書内の重複を再計算し
なければならず、tfの値が大きな場合は計算時間が大
きくなる。一方、tfとdfには大きな相関があり、d
fの代わりにtfを用いても、検索の精度に影響しない
ことが期待できる。
Although tf can be calculated directly and the calculation time hardly changes even if its value increases, to calculate df, the duplication in the document must be recalculated after calculating tf. On the other hand, when the value of tf is large, the calculation time becomes long. On the other hand, there is a large correlation between tf and df, and df
Even if tf is used instead of f, it can be expected that search accuracy is not affected.

【0035】一致情報の収集は選別された各nグラムに
対し、次のような方法で行う。まず、nグラムの重みを
計算する。次に、文書データベース全体からそのnグラ
ムを含む文書を求め、その文書内におけるnグラムの出
現場所、入力文字列におけるnグラムの出現場所、nグ
ラムの長さ、文書内において何番目の一致かを表すシー
ケンス番号、nグラムの重みを一致情報として記録す
る。
The collection of the matching information is performed on each of the selected n-grams in the following manner. First, the weight of the n-gram is calculated. Next, a document containing the n-gram is obtained from the entire document database, and the appearance location of the n-gram in the document, the appearance location of the n-gram in the input character string, the length of the n-gram, and the number of matches in the document And the weight of the n-gram is recorded as matching information.

【0036】通常、得られた一致情報は、記録・管理す
ることなく、そのまま重みの加算がされ類似度が算出さ
れるが、本発明では、これを記録・管理することによ
り、一致したnグラムの重みを加算して類似度を算出す
る方法だけでなく、高速性を保ったまま、多くの類似度
算出方法に適用することも可能にしている。
Normally, the obtained coincidence information is directly added to the weight without calculating and managing the similarity, and the similarity is calculated. In the present invention, the matching n-gram is obtained by recording and managing the similarity. In addition to the method of calculating the similarity by adding the weights of the above, the present invention can be applied to many similarity calculation methods while maintaining high speed.

【0037】入力文字列とデータベース内の文書との類
似度は、一致したnグラムに付けられた重みを加算する
ことによって算出される。ただし、一致するnグラムが
同じ文書内に2回以上出現する場合でも、その重みは1
度しか加算されない。つまり、一致するnグラムが2回
現れるからといって、加算される重みが2倍になるわけ
ではない。そうではなく、nグラムが文書内に出現する
回数(以下、dtf)に応じて、一致情報として記憶さ
れているnグラムの重みは各文書によって異なり、dt
fの値が大きいほど、与えられる重みは大きくなってい
る。また、この重みは、各nグラムに対して、dtf=
0の場合にも定義されており、そのnグラムを含まない
文書すべてに対して、0以下の重みが加算される。これ
は、nグラムを含まないということは類似していないと
いうことを示すものである、という考え方に基づくもの
で、加算される重みは、類似していない度合いを数値化
したものと言える。従って、類似度を示す値は負の値を
含む実数値を取り、その数直線上での値が大きいほど入
力文字列との類似度は高くなる。
The similarity between the input character string and the document in the database is calculated by adding the weights given to the matched n-grams. However, even if the matching n-gram appears more than once in the same document, its weight is 1
Only degrees are added. That is, just because the matching n-gram appears twice does not mean that the added weight is doubled. Rather, the weight of the n-gram stored as the matching information differs for each document according to the number of times that the n-gram appears in the document (hereinafter, dtf).
The greater the value of f, the greater the weight given. This weight is given by dtf =
It is also defined as 0, and a weight of 0 or less is added to all documents that do not include the n-gram. This is based on the idea that not including an n-gram indicates that there is no similarity, and it can be said that the weight to be added is a numerical value of the degree of dissimilarity. Accordingly, the value indicating the similarity takes a real value including a negative value, and the greater the value on the number line, the higher the similarity with the input character string.

【0038】類似度を算出する方法は、一致したnグラ
ムに付けられた重みを加算するという前記の方法に限定
されるものではなく、これ以外の類似度算出方法を適用
することも可能である。その一例が、一致したnグラム
の中からそれぞれの文字列に出現する順序が適合するn
グラムだけを選び、それらのnグラムに付けられた重み
を総和した値を類似度とする方法である。
The method of calculating the similarity is not limited to the above-described method of adding the weights assigned to the matched n-grams, and other similarity calculation methods can be applied. . One example is n that matches the order in which each character string appears in the matched n-grams.
In this method, only the gram is selected, and the value obtained by summing the weights assigned to the n-grams is used as the similarity.

【0039】文字列の出現順序を考慮して類似度を算出
する方法は、これまでも提案されている。しかしそれら
は一致する全ての長さの部分文字列について重みを計算
するため、一致したnグラムの重みを加算する方法に比
べて計算量が増え、扱う文字列の長さが大きくなるほど
計算時間が大きくなる。
A method of calculating the similarity in consideration of the appearance order of character strings has been proposed. However, since they calculate the weight for the substrings of all matching lengths, the amount of calculation increases as compared with the method of adding the weights of the matched n-grams. growing.

【0040】本発明では、選別されたnグラムに重みを
与え、それらのnグラムが一致した時にのみ類似度に重
みが加算される。従って、選別された部分文字列に対し
てのみ、一致および出現順序を考慮すればよいので、こ
れまでの方法に比べて高速に計算でき、扱う文字列の長
さが大きくなっても計算時間に与える影響は小さい。こ
の方法では、適合するnグラムの組み合わせの中で最も
類似度が高くなる組み合わせを効率的に見つけるため、
動的計画法(Dynamic Programming、以下DPと称す
る)を用いて類似度を計算する。以下では、DPを使っ
て、nグラムDP類似度を求める方法を説明する。
In the present invention, weights are assigned to the selected n-grams, and the weight is added to the similarity only when the n-grams match. Therefore, it is only necessary to consider the match and the appearance order only for the selected partial character strings, so that the calculation can be performed at a higher speed as compared with the conventional method. The effect is small. In this method, to efficiently find the combination with the highest similarity among the combinations of matching n-grams,
The similarity is calculated using dynamic programming (hereinafter, referred to as DP). In the following, a method for obtaining n-gram DP similarity using DP will be described.

【0041】α、β、γ、δを長さ0以上の文字列、
ξ、ζ、ηを長さ1以上の文字列、""を空文字列とす
る。複数の文字列(例えば、ξとγ)を繋げた文字列
(例えば、α)は、要素となる文字列の記号を続けて書
くことで表す。(例えば、α=ξγ)。
Α, β, γ, δ are character strings of length 0 or more,
ξ, ζ, η are character strings of length 1 or more, and “” is an empty character string. A character string (for example, α) connecting a plurality of character strings (for example, ξ and γ) is represented by successively writing symbols of the character strings that are elements. (Eg, α = ξγ).

【0042】nグラムDP類似度SimDPは、引数の文字
列の部分に関する一致パターンに応じて、以下の式を再
帰的に当てはめることで求める。まず、両方とも空文字
列の時は、 SimDP("", "") = 0 (1) とする。それ以外のときは、 SimDP(α, β) = MAX( SimDPs(α, β), SimDPg(α, β) ) (2) とする。ここで、SimDPs(α, β)は、ξを、一致情報管
理テーブルのαとβに関するリストに記録されている文
字列とし、α=ξγ、β=ξδとすると、 SimDPs(α, β) = MAX( Score(ξ) + SimDP(γ, δ) ) (3) を、全てのξに関して計算することによって求められる。そのような文字列ξが 存在しないときは、 SimDPs(α, β) = 0.0 (4) とする。Score(ξ)は、一致情報管理テーブルに記録さ
れたξの重みを返す関数である。
The n-gram DP similarity SimDP is obtained by recursively applying the following equation according to the matching pattern for the character string portion of the argument. First, when both are empty character strings, SimDP ("", "") = 0 (1). Otherwise, SimDP (α, β) = MAX (SimDPs (α, β), SimDPg (α, β)) (2) Here, SimDPs (α, β) is expressed as follows: ξ is a character string recorded in a list regarding α and β in the matching information management table, and α = ξγ, β = ξδ, SimDPs (α, β) = MAX (Score (ξ) + SimDP (γ, δ)) (3) is obtained by calculating for all ξ. If there is no such character string ξ, SimDPs (α, β) = 0.0 (4). Score (ξ) is a function that returns the weight of ξ recorded in the matching information management table.

【0043】また、ζとηをα=ζγ、β=ηδを満た
し、かつ、一致情報管理テーブルのαとβに関するリス
トに記録された文字列と共通部分を持たない最大の文字
列とすると、SimDPg(α, β)は、 SimDPg(α,β)=MAX(SimDP(α,δ), SimDP(γ,β), SimDP(γ,δ) ) (5) によって求められる。この式は、二つの文字列(ζγと
ηδ)から、ζかηの一方、もしくはζとηの両方を取
り除いた残りに相当する文字列同士(αとδ、γとβ、
γとδ)の類似度のうち、最も高い類似度を採用するこ
とを意味する。
If す る と and η are the largest character strings that satisfy α = ζγ and β = ηδ and do not have a common part with the character strings recorded in the lists related to α and β in the coincidence information management table, SimDPg (α, β) is obtained by SimDPg (α, β) = MAX (SimDP (α, δ), SimDP (γ, β), SimDP (γ, δ)) (5). This expression is equivalent to the character strings (α and δ, γ and β, γ and β, and γ) that are obtained by removing one of ζ and η or both ζ and η from the two character strings (ζγ and ηδ).
This means that the highest similarity among the similarities between γ and δ) is adopted.

【0044】以上の式を再帰的に適用することで、一致
情報管理テーブルに記録された部分文字列の中から、二
つの文字列それぞれの順序に適合する部分文字列が求め
られ、かつ、類似度が最大となる。
By applying the above expression recursively, a partial character string conforming to the order of each of the two character strings is obtained from the partial character strings recorded in the matching information management table, and the similarity is obtained. The degree is maximum.

【0045】上記で示したnグラムDP類似度は、式
(3)のように、文字(長さ1の文字列)ではなく、n
グラム(長さnの文字列)に対する一致を考慮し、重み
を与えることによって、文字の連続性を加味した類似度
算出法になっている。また、全ての部分文字列について
文字列同士の一致を考慮するのではなく、一致情報管理
テーブルに記録されたnグラムに限定することで、式
(5)のように、一致情報管理テーブルに記録された部
分文字列に関係のない部分については、一致の有無を判
定する必要がなく、取り除くことができる。これによっ
て、類似度の算出対象とする文字列の長さがどんなに大
きくても、一致情報管理テーブルに記録された部分文字
列に関係する部分だけを考慮すればよいので、全ての部
分文字列について文字列同士の一致を考慮する従来の方
法に比べ、高速に類似度を算出することができる。
The n-gram DP similarity shown above is not a character (a character string of length 1) but n, as shown in equation (3).
A similarity calculation method that takes into account character continuity by giving weights in consideration of matching with a gram (character string of length n). In addition, instead of considering the match between the character strings for all the partial character strings, the character strings are limited to n-grams recorded in the match information management table, and are recorded in the match information management table as shown in Expression (5). The part irrelevant to the set partial character string can be removed without the need to determine the presence or absence of a match. Thus, no matter how long the length of the character string for which the similarity is to be calculated, only the part related to the partial character string recorded in the match information management table needs to be considered. The similarity can be calculated at a higher speed than in a conventional method that considers the matching between character strings.

【0046】(第1実施例)まず、nグラムを用いて文
字列同士の類似度を算出する方法の実施例を示す。図1
は選別された部分文字列に基づき、入力された文字列と
最も類似度の高い文書を検索する文書検索装置の例であ
る。この文書検索装置は、文書データベース10、文字
列入力部11、部分文字列選別部13、一致情報収集部
14、類似度算出部15、類似度算出制御部16、及
び、検索結果出力部12から構成されている。
(First Embodiment) First, an embodiment of a method of calculating the similarity between character strings using n-grams will be described. FIG.
Is an example of a document search device that searches for a document having the highest similarity to the input character string based on the selected partial character string. This document search apparatus includes a document database 10, a character string input unit 11, a partial character string selection unit 13, a coincidence information collection unit 14, a similarity calculation unit 15, a similarity calculation control unit 16, and a search result output unit 12. It is configured.

【0047】文書データベース10には、検索対象とな
る複数の文書10a、10b、…、10cが登録されて
いる。検索のためには、キーワード、語、語句、文、文
章などを入力する(以下、代表して検索文章と呼ぶ)。
文字列入力部11は、検索文章を文字列Xとして部分文
字列選別部13に与える。
A plurality of documents 10a, 10b,..., 10c to be searched are registered in the document database 10. For the search, a keyword, a word, a phrase, a sentence, a sentence, and the like are input (hereinafter, referred to as a search sentence).
The character string input unit 11 provides the search sentence to the partial character string selection unit 13 as a character string X.

【0048】部分文字列選別部13は、文字列入力部1
1から与えられた文字列Xから部分文字列を切り出し、
出現頻度tfを算出した後、算出したtfの小さいもの
から定数個を取り出し、部分文字列管理テーブルT1に
登録する。部分文字列選別部13は、部分文字列切り出
し制御部31、部分文字列切り出し部32、文字列出現
頻度算出部33、部分文字列登録部34から成る。部分
文字列切り出し制御部31は、部分文字列切り出し部3
2がどの部分文字列を切り出すかを制御する。部分文字
列切り出し部32は文字列Xより部分文字列xを切り出
す。文字列出現頻度算出部33は部分文字列xの文書デ
ータベース10内における出現頻度tfを算出する。部
分文字列登録部34は切り出された部分文字列をtfの
値の小さい順に定数個選び、部分文字列管理テーブルT
1に登録する。
The partial character string selection section 13 is a character string input section 1
Cut out a partial character string from the character string X given from 1,
After calculating the appearance frequency tf, a constant number is extracted from the one with the smaller calculated tf and registered in the partial character string management table T1. The partial character string selection unit 13 includes a partial character string cutout control unit 31, a partial character string cutout unit 32, a character string appearance frequency calculation unit 33, and a partial character string registration unit 34. The partial character string cutout control unit 31
2 controls which partial character string is cut out. The partial character string extracting unit 32 extracts a partial character string x from the character string X. The character string appearance frequency calculation unit 33 calculates an appearance frequency tf of the partial character string x in the document database 10. The partial character string registration unit 34 selects a constant number of the extracted partial character strings in ascending order of the value of tf, and sets the partial character string management table T
Register to 1.

【0049】一致情報収集部14は部分文字列管理テー
ブルT1に登録された各部分文字列に対し、文字列に与
える重みを算出し、文書データベース内における各部分
文字列の出現場所を検出し、一致情報として、文書内に
おける出現場所、入力文字列における出現場所、部分文
字列の文字列の長さ、文書内において何番目の一致かを
表すシーケンス番号、文字列の重みを一致情報管理テー
ブルT2に記録する。一致情報収集部14は、一致情報
収集制御部41、文字列出現場所検索部42、文字列重
み算出部43、一致情報登録制御部44、一致情報登録
部45から成る。一致情報収集制御部41は部分文字列
管理テーブルT1に登録された部分文字列aを1つずつ
取り出し、文字列出現場所検索部42と文字列重み算出
部43に与える。文字列出現場所検索部42は与えられ
た部分文字列aの文書データベース内における出現場所
の全てについて、出現場所、部分文字列aの長さ、文書
内において何番目の一致かを表すシーケンス番号を求め
る。文字列重み算出部43は与えられた文字列aに与え
る重みを計算する。一致情報登録制御部44は部分文字
列aの出現場所を1つずつ選び、文書内における出現場
所、入力文字列における出現場所、部分文字列aの長
さ、文書内におけるシーケンス番号、部分文字列aの重
みと組にして、一致情報登録部45に与える。一致情報
登録部45は受け取った各組を、一致情報管理テーブル
T2の該当する文書番号のリストに一致情報として登録
する。
The matching information collecting unit 14 calculates the weight given to the character string for each partial character string registered in the partial character string management table T1, detects the appearance position of each partial character string in the document database, As the matching information, the occurrence location in the document, the occurrence location in the input character string, the length of the character string of the partial character string, the sequence number indicating the number of the match in the document, and the weight of the character string are described in the matching information management table T2. To record. The match information collection unit 14 includes a match information collection control unit 41, a character string appearance location search unit 42, a character string weight calculation unit 43, a match information registration control unit 44, and a match information registration unit 45. The matching information collection control unit 41 extracts the partial character strings a registered in the partial character string management table T1 one by one, and gives them to the character string appearance location search unit 42 and the character string weight calculation unit 43. The character string appearance location search unit 42 determines, for all occurrence locations of the given partial character string a in the document database, the appearance location, the length of the partial character string a, and a sequence number indicating the number of matches in the document. Ask. The character string weight calculator 43 calculates the weight given to the given character string a. The matching information registration control unit 44 selects the occurrence positions of the partial character string a one by one, and determines the occurrence position in the document, the occurrence position in the input character string, the length of the partial character string a, the sequence number in the document, the partial character string The combination with the weight of a is given to the coincidence information registration unit 45. The matching information registration unit 45 registers each received pair as matching information in a list of corresponding document numbers in the matching information management table T2.

【0050】類似度算出制御部16は一致情報管理テー
ブルT2から、ある1つの文書Yに関するリストを取り
出し、類似度算出部15に与える。
The similarity calculation control unit 16 extracts a list relating to a certain document Y from the coincidence information management table T2, and supplies the list to the similarity calculation unit 15.

【0051】類似度算出部15は、与えられた一致情報
のリストより、XとYの類似度を算出する。類似度算出
部15は、文字列重み加算制御部51、文字列重み加算
部52から成る。文字列重み加算制御部51は一致情報
のリストより1つの一致情報を選び、その一致情報の持
つシーケンス番号が1であれば、その文字列の重みscor
eを文字列重み加算部52に与える。文字列重み加算部
52は与えられた重みをXとYの類似度Sim(X,Y)に加算
する。
The similarity calculator 15 calculates the similarity between X and Y from the given list of matching information. The similarity calculation unit 15 includes a character string weight addition control unit 51 and a character string weight addition unit 52. The character string weight addition control unit 51 selects one piece of matching information from the list of matching information, and if the sequence number of the matching information is 1, the weight scor of the character string
e is given to the character string weight adding unit 52. The character string weight adding unit 52 adds the given weight to the similarity Sim (X, Y) between X and Y.

【0052】検索結果出力部12は類似度が最も高い文
書を選択し出力する。この時、類似度が一定値以上の文
書や、上位から一定の順位までの文書を合わせて出力し
ても良い。
The search result output unit 12 selects and outputs a document having the highest similarity. At this time, documents having a similarity equal to or higher than a certain value or documents from a higher rank to a certain order may be output together.

【0053】(第2実施例)本発明による文章検索をソ
フトウエアにより実施する実施例を以下に説明する。
(Second Embodiment) An embodiment in which a text search according to the present invention is implemented by software will be described below.

【0054】図2に、文章検索の実行に用いる計算機シ
ステムの一例を示す。この計算機システムは、ディスプ
レイ101、プリンタ102、キーボード103、フロ
ッピー(R)ディスク装置104、CD−ROM(Comp
act Disk− Read Only Memory)装置105、読み出し
専用メモリ(Read Only Memory。以下、ROM)10
6、読み書き可能なランダムアクセスメモリ(Random A
ccess Memory。以下、RAM)107、磁気ディスク装
置108、中央処理装置(Central Processing Unit。
以下、CPU)109、通信インターフェイス110、
及び、これらを接続するバス111から構成されてい
る。フロッピー(R)ディスク装置104はフロッピー
(R)ディスク112の読み書きを行い、CD−ROM
装置104はCD−ROM113の読み出しを行う。ま
た、通信インターフェイス110により、本計算機シス
テムは通信ネットワーク114に接続されている。
FIG. 2 shows an example of a computer system used for executing a sentence search. The computer system includes a display 101, a printer 102, a keyboard 103, a floppy (R) disk device 104, a CD-ROM (Comp
act Disk-Read Only Memory (Device) 105, Read Only Memory (hereinafter referred to as ROM) 10
6. Read / write random access memory (Random A)
ccess Memory. Hereinafter, a RAM 107, a magnetic disk device 108, and a central processing unit (Central Processing Unit).
Hereinafter, CPU) 109, communication interface 110,
And a bus 111 for connecting them. The floppy (R) disk device 104 reads and writes a floppy (R) disk 112, and stores a CD-ROM.
The device 104 reads the CD-ROM 113. The computer system is connected to a communication network 114 via a communication interface 110.

【0055】本発明を実施する文章検索プログラムは、
ROM106に記憶しておく。あるいは、フロッピー
(R)ディスク112、CD−ROM113、又は、磁
気ディスク装置108に文章検索プログラムを記憶して
おき、RAM107に転送した後、CPU109が実行
するのでも良い。CPU109は、RAM107を作業
領域に使って文章検索プログラムを実行する。必要に応
じて、磁気ディスク装置108を作業領域に使っても良
い。文章検索プログラムの実行の指示はキーボード10
3から行い、実行結果は、ディスプレイ101、又は、
プリンタ102に出力する。文章検索プログラムの実行
を、フロッピー(R)ディスク112から指示すること
や、実行結果をフロッピー(R)ディスク112に書き
込んでも良いのは言うまでもない。
A sentence search program for implementing the present invention is:
It is stored in the ROM 106. Alternatively, the text search program may be stored in the floppy (R) disk 112, the CD-ROM 113, or the magnetic disk device 108, transferred to the RAM 107, and then executed by the CPU 109. The CPU 109 executes the text search program using the RAM 107 as a work area. If necessary, the magnetic disk device 108 may be used as a work area. The instruction to execute the sentence search program is sent to the keyboard 10
3 and the execution result is the display 101 or
Output to the printer 102. It goes without saying that the execution of the text search program may be instructed from the floppy (R) disk 112 and the execution result may be written to the floppy (R) disk 112.

【0056】文書データベースは、フロッピー(R)デ
ィスク112、CD−ROM113、又は、磁気ディス
ク108に蓄えておく。高速なアクセスのためにRAM
107に転送しておくのでも良い。RAM107に転送
する際に、容易に処理できる形式に変換するのも良い。
また、文章検索プログラム、文書データベース、又は、
実行の指示を、ネットワーク114経由で本計算機シス
テムに入力したり、実行の結果をネットワーク114経
由で本計算機システムから出力したりしても良いこと
は、もちろんである。
The document database is stored on the floppy (R) disk 112, the CD-ROM 113, or the magnetic disk 108. RAM for fast access
It may be transferred to 107. When transferring the data to the RAM 107, the data may be converted into a format that can be easily processed.
Also, a text search program, a document database, or
Needless to say, an execution instruction may be input to the computer system via the network 114, or an execution result may be output from the computer system via the network 114.

【0057】また、図に示されたものに限らず、各種の
記録媒体、入力手段、出力手段を用いて、本計算機シス
テムへの入力と出力を行うなど各種の実施態様への変形
が可能なことは言うまでもない。これらの、記録媒体、
入力手段、出力手段は本計算機システムが直接アクセス
するものの他、通信ネットワークを経由してアクセスす
るものであっても良いのはもちろんである。
Further, the present invention is not limited to those shown in the drawings, and various recording media, input means, and output means can be used to input and output to the computer system, and can be modified into various embodiments. Needless to say. These recording media,
The input means and the output means may, of course, be those directly accessed by the computer system or those accessed via a communication network.

【0058】図3から図7に示すのは、計算対象とする
nグラムを選別して算出する文字列類似度による文書検
索プログラムの処理フローである。
FIGS. 3 to 7 show the processing flow of a document search program based on character string similarity calculated by selecting n-grams to be calculated.

【0059】図3は、検索文章に基づいて文書データベ
ースを検索し、類似度の高い文書を選び出して出力する
処理フローを示す。
FIG. 3 shows a processing flow for searching a document database based on a search sentence, selecting and outputting a document having a high degree of similarity.

【0060】まず、ステップS11(以下、S11と略
記)で、ある文字列の出現回数を効率よく計算する準備
のために、文書データベースに含まれる全文書を統合し
てサフィックスファイル(Suffix File)を作成する。
サフィックスファイルの作成法と利用法は、M. Yamamot
o and K. W. Church, Using Suffix Arrays to Compute
Term Frequency and Document Frequency for All Sub
strings in a Corpus,In proceeding of 6th Workshop
on Very Large Corpora, Ed. Eugene Charniak, Motrea
l, pp28-37, 1998に開示されている。
First, in step S11 (hereinafter abbreviated as S11), in order to efficiently calculate the number of occurrences of a certain character string, all documents included in the document database are integrated and a suffix file (Suffix File) is created. create.
For information on how to create and use suffix files, see M. Yamamot
o and KW Church, Using Suffix Arrays to Compute
Term Frequency and Document Frequency for All Sub
strings in a Corpus, In proceeding of 6 th Workshop
on Very Large Corpora, Ed.Eugene Charniak, Motrea
1, pp 28-37, 1998.

【0061】サフィックスファイルを使うと、ある文字
列が文書データベース内に出現する回数を高速に求める
ことができる。サフィックスファイルは、すべての文書
において生じうる部分の文字列を、文字コード順に並び
替えて、通し番号(サフィックス)を付けておくことで実
施する。文字列が文書データベースに出現する回数は、
その文字列と一致する文字列がサフィックスファイルの
中にいくつあるかを算出することで求められる。
The use of a suffix file makes it possible to quickly determine the number of times a character string appears in a document database. The suffix file is implemented by rearranging the character strings of parts that can occur in all documents in the order of character codes and adding serial numbers (suffixes). The number of times the string appears in the document database is
It is obtained by calculating the number of character strings that match the character string in the suffix file.

【0062】具体的には、まず、一致する文字列のサフ
ィックスの最小値minと最大値maxをそれぞれ二分探索法
により求める。一致する文字列がなければ、文書データ
ベースに出現する回数は0である。minとmaxが求まれ
ば、文字列が出現する回数tfは、tf=max‐min+1で
求められる。
Specifically, first, the minimum value min and the maximum value max of the suffix of the matching character string are respectively obtained by the binary search method. If there is no matching character string, the number of occurrences in the document database is zero. Once min and max are determined, the number of times tf that a character string appears can be determined by tf = max-min + 1.

【0063】文書データベースの文書は、文書番号によ
って互いに区別されるものとし、サフィックスファイル
に登録する部分文字列にはこの文書番号を付けておく。
これによって、ある部分文字列を含む文書を効率的に検
索することができる。また、dfは、重複する文書番号
の数を数え上げ、その数をtfから引くことによって計
算することができる。
Documents in the document database are distinguished from each other by a document number, and this document number is assigned to a partial character string registered in a suffix file.
Thus, a document including a certain partial character string can be efficiently searched. Df can be calculated by counting the number of duplicate document numbers and subtracting the number from tf.

【0064】次にS12で、検索文章を文字列Xに読み
込む。
Next, in step S12, the search text is read into the character string X.

【0065】S13では、文字列Xから切り出される部
分文字列を、文書データベース内における出現頻度tf
に基づいて選別し、tfと組にして部分文字列管理テー
ブルに記録する。S13で行う処理については、図4を
用いて後述する。
In S13, the partial character string cut out from the character string X is converted into an appearance frequency tf in the document database.
, And recorded in the partial character string management table as a pair with tf. The processing performed in S13 will be described later with reference to FIG.

【0066】S14では、部分文字列管理テーブルに記
録された各部分文字列に対し、一致情報を収集し、一致
情報管理テーブルへの記録を行う。一致情報管理テーブ
ルには、文書番号毎に、一致情報のリストとして記録さ
れる。S14で行う処理については、図5を用いて後述
する。
In S14, the matching information is collected for each of the partial character strings recorded in the partial character string management table, and is recorded in the matching information management table. The matching information management table records a list of matching information for each document number. The processing performed in S14 will be described later with reference to FIG.

【0067】S15では、一致情報管理テーブルから、
ある一つの文書Yのリストを取り出す。
In S15, from the matching information management table,
A list of one document Y is extracted.

【0068】次にS16で、取り出したリストよりXと
Yの類似度を計算する。S16で行う処理については、
図6を用いて後述する。
Next, in S16, the similarity between X and Y is calculated from the extracted list. Regarding the processing performed in S16,
This will be described later with reference to FIG.

【0069】S17では、求めた類似度と文書番号を組
にして文書管理テーブルに登録する。
In S17, the obtained similarity and the document number are paired and registered in the document management table.

【0070】S18では、一致情報管理テーブルに記録
された全てのリストについて類似度を計算したかどうか
を判定する。もし、まだ全てのリストについて類似度を
計算していなければ、まだ類似度の計算を行っていない
リストをS15で選んで取り出し、S17までの処理を
繰り返す。もし、全てのリストについて計算していれ
ば、S19で、登録したテーブルを類似度の高い順に並
び替える。
In S18, it is determined whether or not the similarity has been calculated for all the lists recorded in the matching information management table. If the similarity has not been calculated for all the lists, a list for which the similarity has not been calculated is selected and extracted in S15, and the processing up to S17 is repeated. If the calculation has been performed for all the lists, the registered tables are rearranged in descending order of similarity in S19.

【0071】S20では、類似度の高い文書の出力する
処理を行う。出力する文書は、一つだけにする、あるい
は、所定の複数にする、所定の類似度以上である全ての
文書にする、など種々の態様が可能である。
In S20, a process of outputting a document having a high degree of similarity is performed. Various modes are possible, such as outputting only one document, outputting a plurality of documents, or outputting all documents having a predetermined similarity or more.

【0072】図4は、検索文章を読み込んだ文字列Xか
ら部分文字列を切り出し、一致情報の収集に利用する部
分文字列を出現頻度に基づき選別し、部分文字列管理テ
ーブルに記録する処理のフローを示す。
FIG. 4 shows a process of extracting a partial character string from a character string X from which a search sentence has been read, selecting a partial character string to be used for collecting matching information based on the frequency of appearance, and recording the partial character string in a partial character string management table. Shows the flow.

【0073】まず、S31で、部分文字列管理テーブル
に記録された部分文字列の数を表す変数num_substring
と切り出す部分文字列の長さを表す変数jを初期化して
いる。MinNgramLengthは、切り出す部分文字列の長さの
最小値を決めるパラメータである。
First, in S31, a variable num_substring representing the number of partial character strings recorded in the partial character string management table
And a variable j representing the length of the partial character string to be cut out. MinNgramLength is a parameter that determines the minimum value of the length of the partial character string to be cut out.

【0074】次にS32で、文字列Xから長さjの部分
文字列を一つ切り出し、文書データベース内における出
現頻度tfを計算する。
Next, in S32, one character string of length j is cut out from the character string X, and the appearance frequency tf in the document database is calculated.

【0075】S33では、切り出された部分文字列のt
fの値が0かどうかを判定する。もし、tf=0なら
ば、文書データベース内にその部分文字列は存在しない
ため、一致情報の収集に利用するのは不適当である。し
たがって、S34の処理を飛ばして、S35に進む。t
f≠0ならば、S34に進む。
At S33, the t of the cut-out partial character string
It is determined whether the value of f is 0. If tf = 0, the partial character string does not exist in the document database, so that it is inappropriate to use it for collecting matching information. Therefore, the process of S34 is skipped, and the process proceeds to S35. t
If f ≠ 0, the process proceeds to S34.

【0076】S34では、切り出された部分文字列をt
fと共に部分文字列管理テーブルに記録し、num_substr
ingの値に1を加える。
At S34, the cut-out partial character string is
Record in the substring management table with f, num_substr
Add 1 to the value of ing.

【0077】S35では、Xから切り出される長さjの
全ての部分文字列についてtfを計算したかどうかを判
定する。もし、まだ長さjの全ての部分文字列について
計算していなければ、まだ計算していない長さjの部分
文字列をS32で選んでtfを計算し、S34までの処
理を繰り返す。もし、長さjの全ての部分文字列につい
て計算していれば、S36で、jに1を加える。
In S35, it is determined whether tf has been calculated for all partial character strings of length j cut out from X. If the calculation has not yet been performed for all the partial character strings of the length j, a partial character string of the length j that has not been calculated is selected in S32, tf is calculated, and the processing up to S34 is repeated. If the calculation has been performed for all the partial character strings having the length j, 1 is added to j in S36.

【0078】S37では、Xから切り出す部分文字列の
長さjの値が、切り出す部分文字列の長さの最大値を決
めるパラメータMaxNgramLengthより大きいかどうかを判
定する。もし、jの値がMaxNgramLength以下なら、S3
2に戻り、長さjの部分文字列に対し、S36までの処
理を繰り返す。もし、jの値がMaxNgramLengthより大き
ければ、長さがMinNgramLength以上、MaxNgramLength以
下のすべての部分文字列に対しtfの計算を終えている
ので、S38に進み、部分文字列管理テーブルに記録さ
れた部分文字列をtfの小さい順に並び替える。
In S37, it is determined whether or not the value of the length j of the partial character string to be extracted from X is greater than the parameter MaxNgramLength which determines the maximum value of the length of the partial character string to be extracted. If the value of j is less than MaxNgramLength, S3
2, the process up to S36 is repeated for the partial character string of length j. If the value of j is greater than MaxNgramLength, the calculation of tf has been completed for all partial character strings whose length is equal to or greater than MinNgramLength and equal to or less than MaxNgramLength. The character strings are rearranged in ascending order of tf.

【0079】S39では、部分文字列管理テーブルに登
録された部分文字列の数num_substringが、一致情報の
収集に用いる部分文字列の数の上限値を決めるパラメー
タSubStringLimitより大きいかどうかを判定する。も
し、num_substringがSubStringLimitより大きければ、
S40に進み、tfの小さい順にSubStringLimit個の部
分文字列を取り出し、これらの部分文字列を改めて部分
文字列管理テーブルに記録する。もし、num_substring
がSubStringLimit以下ならば、S40をスキップしてS
41に進む。
In S39, it is determined whether or not the number num_substring of partial character strings registered in the partial character string management table is larger than a parameter SubStringLimit which determines the upper limit of the number of partial character strings used for collecting matching information. If num_substring is greater than SubStringLimit,
In S40, SubStringLimit partial character strings are extracted in ascending order of tf, and these partial character strings are newly recorded in the partial character string management table. If num_substring
If is less than or equal to SubStringLimit, skip S40 and proceed to S
Go to 41.

【0080】S41は、記録された部分文字列管理テー
ブルを返す処理である。
Step S41 is a process of returning the recorded partial character string management table.

【0081】図5は、部分文字列管理テーブルに記録さ
れた各部分文字列と、文書データベース内の各文書との
一致情報を収集し、その情報を一致情報管理テーブルに
記録する処理のフローを表す。
FIG. 5 is a flowchart showing a process of collecting matching information between each partial character string recorded in the partial character string management table and each document in the document database and recording the information in the matching information management table. Represent.

【0082】まず、S51では、変数p0fit_sumを0に
初期化する。変数p0fit_sumは、類似度を一致したnグ
ラムの重みの加算で算出する際に、計算手間を高速化す
るために用いる変数で、文書データベース内の文書全体
に関する類似度のオフセットである。
First, in S51, a variable p0fit_sum is initialized to 0. The variable p0fit_sum is a variable used to speed up the calculation when calculating the similarity by adding the weights of the matched n-grams, and is an offset of the similarity for the entire document in the document database.

【0083】S52では、部分文字列管理テーブルから
ある一つの部分文字列を選びaに読み込む。
At S52, one partial character string is selected from the partial character string management table and read into a.

【0084】S53では、p0fit、p1fit、p2fit、p3fi
t、p4fitを計算し、p0fit_sumにp0fitを加算する。p0fi
t、p1fit、p2fit、p3fit、p4fitは、それぞれ、aがあ
る文書内に、出現しなかった、1回出現した、2回出現
した、3回出現した、4回以上出現したときの、その文
書におけるaの重みである。p0fit、p1fit、p2fit、p3f
it、p4fitの計算方法については、図7を用いて後述す
る。
In S53, p0fit, p1fit, p2fit, p3fi
Calculate t and p4fit, and add p0fit to p0fit_sum. p0fi
t, p1fit, p2fit, p3fit, and p4fit are the documents when a did not appear, appeared once, appeared twice, appeared three times, and appeared four or more times in a document. Is the weight of a. p0fit, p1fit, p2fit, p3f
The method of calculating it and p4fit will be described later with reference to FIG.

【0085】S54では、文書データベース内でaが出
現する場所を全て求め、これを出現する場所の順に並び
替える。
In S54, all places where a appears in the document database are obtained, and the places are rearranged in the order of the places where they appear.

【0086】S55では、aの各出現場所に対し、aを
含む文書の文書番号を求める。このとき、aは出現場所
順に並んでいるので、得られる文書番号も小さい順に並
んでいる。
In S55, the document number of the document containing a is obtained for each occurrence of a. At this time, since a is arranged in the order of appearance, the obtained document numbers are also arranged in ascending order.

【0087】S56では、出現場所の順にaの出現場所
を一つ選ぶ。
In S56, one appearance location a is selected in the order of appearance locations.

【0088】S57では、選んだaの出現場所が、それ
を含む文書内において、最も前方にある出現場所かどう
かを判定する。つまり、選んだ出現場所の文書と、一つ
前の出現場所の文書が異なっていれば、それは最初の出
現場所であり、同じであれば、2番目以降の出現場所で
ある。最初の出現場所であれば、S58に進み、その文
書内におけるaの出現回数dtfを計算し、aの文書内
における重みを決める。また、sequence_num=1とする。
sequence_numは、選らんだ出現場所が文書内において何
番目のaの出現場所かを表すシーケンス番号である。
In S57, it is determined whether or not the selected appearance location is the forefront occurrence location in the document including the selected a. That is, if the document at the selected appearance location is different from the document at the immediately preceding appearance location, it is the first appearance location, and if the same, it is the second and subsequent appearance locations. If it is the first appearance location, the process proceeds to S58, where the number of appearances dtf of a in the document is calculated, and the weight of a in the document is determined. Also, sequence_num = 1 is set.
sequence_num is a sequence number indicating the order of occurrence of the selected appearance location in the document.

【0089】S59では、文書内のシーケンス番号sequ
ence_num、入力文字列Xにおけるaの出現場所(以下、
startX)、文書内におけるaの出現場所(以下、startd
oc)、aの長さ(以下、termlength)、aの重み(以
下、score)を組にして一致情報管理テーブルに記録
し、sequence_numに1を加える。ただし、scoreに記録
される値はaのそのままの重みではなく、aの重みから
p0fitを引いた値を記録する。これは、類似度を一致し
たnグラムの重みの加算で計算する場合、選別された各
部分文字列について、それを含まない文書の類似度にそ
れぞれの部分文字列のp0fitを加算する代わりに、一致
したnグラムの重みからp0fitを引いた値を加算してお
き、最後に全ての類似度に対して重みのオフセットp0fi
t_sumを加えることによって、計算の手間を減らすため
の工夫である。
At S59, the sequence number sequ
ence_num, the appearance position of a in the input character string X (hereinafter, referred to as
startX), where a appears in the document (startd
oc), the length of a (hereinafter termlength), and the weight of a (hereinafter score) are recorded as a set in the coincidence information management table, and 1 is added to sequence_num. However, the value recorded in the score is not the weight of a as it is, but the weight of a.
Record the value after subtracting p0fit. When calculating the similarity by adding the weights of the matched n-grams, instead of adding the p0fit of each substring to the similarity of the document that does not include each selected substring, A value obtained by subtracting p0fit from the weight of the matched n-gram is added, and finally, the weight offset p0fi for all similarities
By adding t_sum, it is a contrivance to reduce the computational effort.

【0090】S60では、sequence_numとtfの値を比
較して、aの全ての出現場所について一致情報の記録を
行ったかどうかを判定する。もし、記録していない一致
情報があれば、S56で次のaの出現場所を選び、S5
9までの処理を繰り返す。もし、aの全ての出現場所に
ついて一致情報の記録をしていればS61に進む。
In S60, the value of sequence_num is compared with the value of tf to determine whether or not the coincidence information has been recorded for all the occurrence locations of a. If there is matching information that has not been recorded, the next appearance location of a is selected in S56, and S5 is selected.
The processing up to 9 is repeated. If the matching information has been recorded for all the appearance locations of a, the process proceeds to S61.

【0091】S61では、部分文字列管理テーブル内の
全ての部分文字列について、一致情報の収集を行ったか
どうかを判定する。もし、一致情報の収集をしていない
部分文字列があれば、S52で、まだ選んでいない部分
文字列をaに読み込み、S60までの処理を繰り返す。
もし、すべての部分文字列について一致情報の収集を終
えていれば、S62で、得られた一致情報管理テーブル
を返す。
In S61, it is determined whether or not matching information has been collected for all partial character strings in the partial character string management table. If there is a partial character string for which matching information has not been collected, a partial character string not yet selected is read into a in S52, and the processing up to S60 is repeated.
If the matching information has been collected for all the partial character strings, the obtained matching information management table is returned in S62.

【0092】図6は、入力文章Xと文書Yの類似度を、
一致情報管理テーブルから取り出したリストを用いて、
一致した文字列の重みの加算によって求める処理フロー
である。
FIG. 6 shows the similarity between the input text X and the document Y.
Using the list extracted from the match information management table,
It is a processing flow obtained by adding the weights of the matched character strings.

【0093】まず、S71で、XとYの類似度(以下、
sim)を0に初期化する。
First, at step S71, the similarity between X and Y (hereinafter, referred to as X)
sim) is initialized to zero.

【0094】S72では、一致情報管理テーブルに記録
されているYに関するリストからある一つを選び、Iに
読み込む。
At S72, one of the lists related to Y recorded in the matching information management table is selected and read into I.

【0095】S73では、読み込んだIのsequence_num
が1かどうかを判定する。これは、同一の部分文字列の
scoreをsimに重複して加算しないための処理である。も
し、sequence_numが1でなければ、S74をスキップ
し、S75に進む。sequence_num=1であれば、S74
で、simにIのscoreを加算する。
In S73, sequence_num of the read I
Is determined to be 1 or not. This is the same substring
This is a process to avoid adding score to sim repeatedly. If sequence_num is not 1, skip S74 and proceed to S75. If sequence_num = 1, S74
Then, the score of I is added to sim.

【0096】S75では、Yに関する一致情報のリスト
に記録された全ての一致情報について調べたかどうかを
判定する。もし、全ての一致情報について調べていれ
ば、S76で、simに文書全体の重みのオフセットp0fit
_sumを加算する。まだ、調べていない一致情報があれ
ば、S72で、まだ調べていない一致情報を選んでIに
読み込み、S74までの処理を繰り返す。
In S75, it is determined whether all pieces of matching information recorded in the list of matching information regarding Y have been checked. If all pieces of matching information have been checked, in step S76, the weight offset p0fit of the entire document is added to sim.
Add _sum. If there is any matching information that has not been checked yet, in S72, matching information that has not been checked is selected and read into I, and the processing up to S74 is repeated.

【0097】S77は、得られたsimをXとYの類似度
として返す処理である。
S77 is a process of returning the obtained sim as the similarity between X and Y.

【0098】図7は、図5のS53における、p0fit、p
1fit、p2fit、p3fit、p4fitの計算処理フローを示す。
FIG. 7 shows p0fit, p in S53 of FIG.
The calculation processing flow of 1fit, p2fit, p3fit, and p4fit is shown.

【0099】まず、S81で、p0fit、p1fit、p2fit、p
3fit、p4fitをすべて0に初期化する。
First, in S81, p0fit, p1fit, p2fit, p
3fit and p4fit are all initialized to 0.

【0100】S82では、部分文字列aのdfを計算
し、S83で、dfと文書データベース内の文書の総数
Nからidfを計算する。このidfは、情報理論の分
野における情報量を背景とする値で、この値を部分文字
列の重みとする方法も良く知られている。
In S82, df of the partial character string a is calculated, and in S83, idf is calculated from df and the total number N of documents in the document database. This idf is a value based on the amount of information in the field of information theory, and a method of using this value as the weight of a partial character string is well known.

【0101】S84では、部分文字列aが検索に有効な
部分文字列であるかどうかを判定するための閾値tf_thr
esholdを計算する。
In S84, a threshold value tf_thr for determining whether or not the partial character string a is a partial character string effective for retrieval.
Calculate eshold.

【0102】S85では、tfとdfの値から部分文字
列aが検索に有効かどうかを判定する。tf /df > t
f_thresholdであれば、検索に有効な部分文字列である
と判断し、S86に進む。そうでなければ、検索には有
効でないと判断して、S86、S87をスキップし、S
88でp0fit、p1fit、p2fit、p3fit、p4fitを返す。つ
まり、p0fit、p1fit、p2fit、p3fit、p4fitの値は全て
0が返される。
In S85, it is determined from the values of tf and df whether or not the partial character string a is valid for retrieval. tf / df> t
If f_threshold, it is determined that the partial character string is valid for the search, and the process proceeds to S86. Otherwise, it is determined that the search is not valid, S86 and S87 are skipped, and S
At 88, p0fit, p1fit, p2fit, p3fit, p4fit are returned. That is, 0 is returned for the values of p0fit, p1fit, p2fit, p3fit, and p4fit.

【0103】S86では、p0fit、p1fit、p2fit、p3fi
t、p4fitを計算する。
In S86, p0fit, p1fit, p2fit, p3fi
Calculate t, p4fit.

【0104】S87の関数MAXとMINは、それぞれ、引数
に与えられた数値の最大値もしくは最小値を返す関数
で、この関数により、p0fit、p1fit、p2fit、p3fit、p4
fitの値をLB以上UB以下の範囲に制限している。LBとUB
は共にp0fit、p1fit、p2fit、p3fit、p4fitの分布を制
限するパラメータである。S88は、p0fit、p1fit、p2
fit、p3fit、p4fitを返す処理である。
The functions MAX and MIN in S87 are functions that return the maximum value or the minimum value of the numerical value given as an argument, respectively, and are used to calculate p0fit, p1fit, p2fit, p3fit, p4
The value of fit is limited to the range from LB to UB. LB and UB
Are parameters that limit the distribution of p0fit, p1fit, p2fit, p3fit, and p4fit. S88 is p0fit, p1fit, p2
This is the process that returns fit, p3fit, and p4fit.

【0105】以上の説明からも分かる通り、重みp0fi
t、p1fit、p2fit、p3fit、p4fitは、tf、df、id
fの関数として求められる。S84とS86に用いてい
る係数は、Christopher D. Manning and Hinrich Schut
ze, Foundations of Statistical Natural Language Pr
ocessing, The MIT Press, Cambridge, Massachusetts,
pp.529-574, 1999.に開示されている理論に基づき、ド
キュメントデータの観測値を求めることによって定め
た。なおこれらの係数は示された数値に限定されるもの
ではなく、目的に応じて適切な値にすることが許容され
る。
As can be seen from the above description, the weight p0fi
t, p1fit, p2fit, p3fit, p4fit are tf, df, id
It is obtained as a function of f. The coefficients used for S84 and S86 are based on Christopher D. Manning and Hinrich Schut
ze, Foundations of Statistical Natural Language Pr
ocessing, The MIT Press, Cambridge, Massachusetts,
pp.529-574, 1999. Based on the theory disclosed in this document, it was determined by obtaining observations of document data. Note that these coefficients are not limited to the numerical values shown, and may be set to appropriate values according to the purpose.

【0106】図5のS53における、p0fit、p1fit、p2
fit、p3fit、p4fitの計算処理フローとしては、図7で
示したフローの代わりに、図15に示すフローを適用す
ることもできる。図15における計算処理フローを以下
に述べる。
P0fit, p1fit, p2 in S53 of FIG.
As a calculation processing flow of fit, p3fit, and p4fit, a flow shown in FIG. 15 can be applied instead of the flow shown in FIG. The calculation processing flow in FIG. 15 will be described below.

【0107】まず、S181で、p0fit、p1fit、p2fi
t、p3fit、p4fitをすべて0に初期化する。
First, in S181, p0fit, p1fit, p2fi
t, p3fit, p4fit are all initialized to 0.

【0108】S182では、部分文字列aのdfと、部
分文字列aが2回以上出現する文書データベース中の文
書の数(以下、df2と記す)を計算する。S183
で、dfと文書データベース内の文書の総数Nからid
fを計算する。
In S182, the df of the partial character string a and the number of documents in the document database where the partial character string a appears twice or more (hereinafter, referred to as df2) are calculated. S183
And id from df and the total number N of documents in the document database
Calculate f.

【0109】S184では、部分文字列aが検索に有効
な部分文字列であるかどうかを判定するための閾値df2_
thresholdを0.22に設定する。
In S184, a threshold value df2_ for determining whether or not the partial character string a is a partial character string effective for retrieval.
Set threshold to 0.22.

【0110】S185では、dfとdf2の値から部分
文字列aが検索に有効かどうかを判定する。df2 /d
f > df2_thresholdであれば、検索に有効な部分文字列
であると判断し、S186に進む。そうでなければ、検
索には有効でないと判断して、S186、S187をス
キップし、S188でp0fit、p1fit、p2fit、p3fit、p4
fitを返す。つまり、p0fit、p1fit、p2fit、p3fit、p4f
itの値は全て0が返される。
In S185, it is determined from the values of df and df2 whether the partial character string a is valid for the search. df2 / d
If f> df2_threshold, it is determined that the partial character string is valid for search, and the process proceeds to S186. Otherwise, it is determined that the search is not valid, S186 and S187 are skipped, and p0fit, p1fit, p2fit, p3fit, p4
Returns fit. That is, p0fit, p1fit, p2fit, p3fit, p4f
All the values of it return 0.

【0111】S186では、p0fit、p1fit、p2fit、p3f
it、p4fitを計算する。
In S186, p0fit, p1fit, p2fit, p3f
Calculate it and p4fit.

【0112】S187は図7のS87と同様に、p0fi
t、p1fit、p2fit、p3fit、p4fitの値をLB以上UB以下の
範囲に制限するものである。LBとUBは共にp0fit、p1fi
t、p2fit、p3fit、p4fitの分布を制限するパラメータで
ある。S188は、p0fit、p1fit、p2fit、p3fit、p4fi
tを返す処理である。
S187 is the same as p87 in FIG.
This limits the values of t, p1fit, p2fit, p3fit, and p4fit to a range from LB to UB. LB and UB are both p0fit and p1fi
These parameters limit the distribution of t, p2fit, p3fit, and p4fit. S188 is p0fit, p1fit, p2fit, p3fit, p4fi
This is the process that returns t.

【0113】以上の説明からも分かる通り、図15の計
算処理フローでは、部分文字列aが検索に有効かどうか
を判定する基準として、先に述べた図7の計算処理フロ
ーにおけるtfの代わりにdf2を用いている。df2
/dfは、部分文字列の出現集中度、つまり、ある部分
文字列が特定の文書にのみ集中して出現する度合を表し
ており、この情報を用いて部分文字列の選別を行うこと
により、検索精度の向上を図っている。
As can be seen from the above description, in the calculation processing flow of FIG. 15, the reference for judging whether or not the partial character string a is valid for the search is tf instead of tf in the calculation processing flow of FIG. df2 is used. df2
/ Df indicates the degree of occurrence and concentration of partial character strings, that is, the degree to which a certain partial character string is concentrated and appears only in a specific document. By using this information to select partial character strings, The search accuracy has been improved.

【0114】S183における閾値df2_thresholdおよ
びS186に用いている係数は、示された数値に限定さ
れるものではなく、目的に応じて適切な値にすることが
許容される。
The threshold value df2_threshold in S183 and the coefficient used in S186 are not limited to the numerical values shown, but may be set to appropriate values according to the purpose.

【0115】図8に、一致情報管理テーブルの構成図を
示す。一致情報管理テーブルは、文書番号毎の一致情報
のリストによって構成される。図8では、文書番号00
02に一致情報1と一致情報5が、文書番号0100に
一致情報2、一致情報3と一致情報6が、文書番号01
11に一致情報4と一致情報7がリストとして記録され
ている。それぞれの一致情報には、部分文字列の文書内
におけるシーケンス番号sequence_num、入力文字列Xに
おける部分文字列の出現場所(startX)、文書内におけ
る部分文字列の出現場所(startdoc)、部分文字列の長
さ(termlength)、部分文字列に付けられた重み(scor
e)が格納されている。
FIG. 8 shows a configuration diagram of the coincidence information management table. The matching information management table includes a list of matching information for each document number. In FIG. 8, document number 00
02, the match information 1 and the match information 5 are stored in the document number 0100, and the match information 2 and the match information 3 and the match information 6 are stored in the document number 01.
11, the match information 4 and the match information 7 are recorded as a list. The respective pieces of matching information include the sequence number sequence_num of the partial character string in the document, the location of the partial character string in the input character string X (startX), the location of the partial character string in the document (startdoc), and the Length (termlength), weight given to substring (scor)
e) is stored.

【0116】新たに、文書番号0002に関する一致情
報8が得られた場合、図8のように、これまで一致情報
5を指していたリストの先頭を指すポインタは一致情報
8を指し、一致情報8から一致情報5へのポインタが張
られ、文書番号0002のリストの先頭に一致情報8は
記録される。
When the new match information 8 relating to the document number 0002 is newly obtained, as shown in FIG. 8, the pointer that points to the head of the list that has previously pointed to the match information 5 points to the match information 8 and the match information 8 , A pointer to the matching information 5 is set, and the matching information 8 is recorded at the head of the list of the document number 0002.

【0117】(第3実施例)次に、nグラムDP類似度
に基づき、入力された文字列と最も類似度の高い文書を
検索する文書検索装置の実施例を図9に示す。この文書
検索装置は、文書データベース10、文字列入力部1
1、部分文字列選別部13(内部の図示は省略)、一致
情報収集部14(内部の図示は省略)、類似度算出部1
7、類似度算出制御部18、再帰実行制御部19、及
び、検索結果出力部12から構成されている。
(Third Embodiment) Next, FIG. 9 shows an embodiment of a document search apparatus for searching for a document having the highest similarity to an input character string based on the n-gram DP similarity. This document search device includes a document database 10, a character string input unit 1,
1, partial character string selection unit 13 (internal illustration is omitted), coincidence information collection unit 14 (internal illustration is omitted), similarity calculation unit 1
7, a similarity calculation control unit 18, a recursive execution control unit 19, and a search result output unit 12.

【0118】文書データベース10、文字列入力部1
1、部分文字列選別部13、一致情報収集部14、及
び、検索結果出力部12は実施例1の同符号を付した部
分と同じ機能・構成であり説明を省略する。
Document database 10, character string input unit 1
1, the partial character string selection unit 13, the match information collection unit 14, and the search result output unit 12 have the same functions and configurations as the parts denoted by the same reference numerals in the first embodiment, and a description thereof will be omitted.

【0119】類似度算出制御部18は一致情報管理テー
ブルT2より、ある1つの文書Yに関するリストを取り
出し、文字列XとYとともに類似度算出部17に与え
る。
The similarity calculation control unit 18 extracts a list relating to a certain document Y from the coincidence information management table T2, and supplies the list to the similarity calculation unit 17 together with the character strings X and Y.

【0120】類似度算出部17は、与えられた一致情報
のリストより、式(1)または式(2)に基づいてXと
Yの類似度を算出する。この類似度を算出する途中で、
一部分の文字列について同様に類似度を求める必要があ
る。これは、再帰実行制御部19により、類似度算出部
17を繰り返し用いることで実施する。類似度算出部1
7は一致文字列類似度算出部61、任意文字列類似度算
出部62、最大値選択部63から成る。一致文字列類似
度算出部61は式(3)のSimDPs(α, β)を計算する。
任意文字列類似度算出部62は式(5)のSimDPg(α,
β)を計算する。最大値選択部63は、これらに対して
関数MAXを実施することで、式(2)のSimDP(α, β)を
算出する。なお、類似度算出部17の受け取った文字列
α、βの両方が空文字のときは、再帰実行制御部19に
よりSimDP(α,β) =0.0とする。この際、一致文字列類
似度算出部61、任意文字列類似度算出部62、最大値
選択部63は動作させない。言うまでもなく、このSimD
P(α,β) =0.0という値は、式(1)を実施するもので
ある。
The similarity calculating section 17 calculates the similarity between X and Y based on the expression (1) or (2) from the given list of matching information. In the process of calculating this similarity,
It is necessary to similarly determine the similarity for a part of the character string. This is performed by the recursive execution control unit 19 using the similarity calculation unit 17 repeatedly. Similarity calculator 1
Reference numeral 7 includes a matching character string similarity calculating unit 61, an arbitrary character string similarity calculating unit 62, and a maximum value selecting unit 63. The matching character string similarity calculation unit 61 calculates SimDPs (α, β) in Expression (3).
The arbitrary character string similarity calculation unit 62 calculates SimDPg (α,
Calculate β). The maximum value selecting unit 63 calculates SimDP (α, β) in Expression (2) by performing the function MAX on these. When both the character strings α and β received by the similarity calculation unit 17 are empty characters, the recursive execution control unit 19 sets SimDP (α, β) = 0.0. At this time, the matching character string similarity calculating unit 61, the arbitrary character string similarity calculating unit 62, and the maximum value selecting unit 63 are not operated. Needless to say, this SimD
The value of P (α, β) = 0.0 implements equation (1).

【0121】一致文字列類似度算出部61は、文字列分
離制御部71、文字列分離部72、類似度算出部73、
加算部74、最大値選択部75により実施されており、
式(3)のSimDPs(α,β)を算出する。αとβの一致す
る先頭の文字列が一致情報管理テーブルT2に記録され
た文字列である場合のみSimDPs(α,β)を算出する。
The matching character string similarity calculation unit 61 includes a character string separation control unit 71, a character string separation unit 72, a similarity calculation unit 73,
This is performed by the addition unit 74 and the maximum value selection unit 75,
SimDPs (α, β) in equation (3) is calculated. SimDPs (α, β) is calculated only when the leading character string where α and β match is the character string recorded in the match information management table T2.

【0122】まず、文字列分離制御部71は、一致文字
列類似度算出部61が受け取った文字列α(=ξγ)、β
(=ξδ)において、一致する文字列ξがない場合、すな
わち、一致する文字列ξが空文字列の場合は、式(1)
に従い、SimDPs(α,β)=0.0とする。
First, the character string separation control unit 71 sets the character strings α (= ξγ), β
In (= ξδ), if there is no matching character string 、, that is, if the matching character string の is an empty character string, the expression (1)
And SimDPs (α, β) = 0.0.

【0123】次に、文字列分離制御部71は、一致文字
列類似度算出部61が受け取った文字列α(=ξγ)、β
(=ξδ)において、一致する文字列ξがある場合は、全
てのξに関して、文字列分離部72、類似度算出部7
3、加算部74を動作させて、式(3)に含まれるScor
e(ξ)+SimDP(γ, δ)を計算させる。そして、最も大き
な値を最大値選択部75により選択する。このことによ
り、式(3)に示すSimDPs(α,β)が求まる。
Next, the character string separation control unit 71 converts the character strings α (= ξγ), β
In (= ξδ), if there is a matching character string ξ, the character string separating unit 72 and the similarity calculating unit 7
3. By operating the adder 74, the Scor included in the equation (3) is calculated.
Let e (ξ) + SimDP (γ, δ) be calculated. Then, the largest value is selected by the maximum value selector 75. As a result, SimDP s (α, β) shown in Expression (3) is obtained.

【0124】文字列分離部72は、文字列αをξとγ
に、文字列βをξとδに分離した後に一致情報管理テー
ブルT2を参照してξの重みScore(ξ)を加算部74に
与え、γとδを類似度算出部73に与える。類似度算出
部73は、式(3)のSimDP(γ, δ)を算出する。類似
度算出部73は、実際には、再帰実行制御部17によ
り、類似度算出部16をγとδに対して適用すること
で、実施する。加算部74は、式(3)の加算を行う。
The character string separating section 72 converts the character string α into ξ and γ
Then, after separating the character string β into ξ and δ, the weight Score (ξ) of ξ is given to the adding unit 74 and γ and δ are given to the similarity calculating unit 73 with reference to the coincidence information management table T2. The similarity calculation unit 73 calculates SimDP (γ, δ) in Expression (3). The similarity calculation unit 73 is actually implemented by the recursion execution control unit 17 applying the similarity calculation unit 16 to γ and δ. The adding unit 74 performs addition of Expression (3).

【0125】任意文字列類似度算出部62は、類似度算
出部81〜83、最大値選択部84により実施されてお
り、式(2)のSimDPg(α,β)を算出する。先頭の文字
列が異なる場合か、先頭の文字列は一致するが一致情報
管理テーブルに登録されていない文字列の場合に任意文
字列類似度算出部62は実行される。受け取った文字列
α(=ζγ)、β(=ηδ)の先頭の1文字ζ、ηの有無に関
する各場合に対応して、類似度算出部81、82、83
は、それぞれ式(5)のSimDP(α,δ), SimDP(γ,β),
SimDP(γ,δ)を求める。類似度算出部81〜83は、実
際には、再帰実行制御部19により、類似度算出部17
を、αとδ、γとβ、γとδのそれぞれに対して適用す
ることで、実施する。最大値選択部84は、式(5)の
関数MAXを実施する。
The arbitrary character string similarity calculating section 62 is implemented by the similarity calculating sections 81 to 83 and the maximum value selecting section 84, and calculates SimDPg (α, β) in equation (2). If the leading character strings are different, or if the leading character strings match but are not registered in the matching information management table, the arbitrary character string similarity calculating unit 62 is executed. The similarity calculators 81, 82, 83 correspond to the respective cases regarding the presence or absence of the first character ζ, η of the received character strings α (= ζγ), β (= ηδ).
Are SimDP (α, δ), SimDP (γ, β),
Find SimDP (γ, δ). Actually, the similarity calculating sections 81 to 83 are controlled by the recursive execution control section 19 to execute the similarity calculating section 17.
Is applied to each of α and δ, γ and β, and γ and δ. The maximum value selection unit 84 implements the function MAX of Expression (5).

【0126】(第4実施例)ソフトウエアにより文字列
Xと文字列YのnグラムDP類似度を求める処理フロー
を図10と図11に示す。この処理は、図3のS16の
内部処理として、図6で説明した処理の代わりに用いる
ことが可能である。また、実行にあたっては第2実施例
で示したコンピュータシステムを用いている。
(Fourth Embodiment) FIGS. 10 and 11 show the processing flow for obtaining the n-gram DP similarity between the character strings X and Y by software. This processing can be used as the internal processing of S16 in FIG. 3 instead of the processing described in FIG. In the execution, the computer system shown in the second embodiment is used.

【0127】まず、S91では、XとYそれぞれにおい
て、リストに記録された部分文字列の先頭文字と最終文
字の中で、最も前にある先頭文字の場所minX、minYと、
最も後ろにある最終文字の場所maxX、maxYを求め、長さ
maxX-minX+1の配列X_indexと、長さmaxY-minY+1の配列Y
_indexを用意し、全ての要素を−1に初期化する。これ
らの配列は、それぞれ、XのminXからmaxXまでの各文
字、YのminYからmaxYまでの各文字と対応している。
First, in S91, for each of X and Y, among the first character and the last character of the partial character string recorded in the list, the position of the earliest first character minX, minY,
Find the location of the last character at the end, maxX, maxY, and length
An array X_index of maxX-minX + 1 and an array Y of length maxY-minY + 1
Prepare _index and initialize all elements to -1. These arrays correspond to characters from X minX to maxX and characters from Y minY to maxY, respectively.

【0128】S92からS94の処理では、Xにおける
minXからmaxXまでの各文字、YにおけるminYからmaxYま
での各文字で、リストに記録された各部分文字列の先頭
文字もしくは最終文字にあたる文字と対応する配列X_in
dex、Y_indexの要素に0を代入する。
In the processing from S92 to S94,
An array X_in corresponding to each character from minX to maxX, each character from minY to maxY in Y, the character corresponding to the first character or the last character of each partial character string recorded in the list
Substitute 0 for the elements of dex and Y_index.

【0129】S95からS99の処理では、X_index
[i]=0であるiに対し、前から順に、0,1,2,…, X_i
ndex_num-1と通し番号を振り、その番号をX_index[i]
に代入する。従って、X_index_numは、X_index[i]≠−
1であるiの数である。
In the processing from S95 to S99, X_index
[i] = 0, i, 0, 1, 2,..., X_i
Assign a serial number to ndex_num-1 and assign that number to X_index [i]
Substitute for Therefore, X_index_num is X_index [i] ≠ −
It is the number of i that is 1.

【0130】S100からS104では、Y_indexに対
して同様の処理を行う。Y_index[j]=0であるjに対
し、前から順に、0,1,2,…, Y_index_num-1と通し番
号を振り、その番号をY_index[j]に代入する。従っ
て、Y_index_numは、Y_index[j]≠−1であるjの数で
ある。
In S100 to S104, similar processing is performed on Y_index. With respect to j for which Y_index [j] = 0, serial numbers 0, 1, 2,..., Y_index_num-1 are assigned in order from the front, and the number is substituted for Y_index [j]. Therefore, Y_index_num is the number of js for which Y_index [j] ≠ −1.

【0131】S105では、リストに記録されたXとY
の一致情報を、まずXにおける部分文字列の出現する順
に並び替える。次にXにおける部分文字列の出現する順
が同じものについて、Yにおける部分文字列の出現する
順に並び替え、一致情報の数をmに読み込む。
In S105, X and Y recorded in the list
Are first sorted in the order in which the partial character strings in X appear. Next, the same order of appearance of the partial character strings in X is rearranged in the order of appearance of the partial character strings in Y, and the number of pieces of matching information is read into m.

【0132】次に、類似度をDPによって効率的に求め
るための準備として、(X_index_num+2)行(Y_index_num+
2)列のスコア表scoretableを作り、表の全ての要素を0
に初期化する。この表は、縦方向が、文字列Xの中で、
リストに記録された部分文字列の先頭文字もしくは最終
文字にあたる文字、横方向が、文字列Yの中で、リスト
に記録された部分文字列の先頭文字もしくは最終文字に
あたる文字に対応している。
Next, as a preparation for efficiently obtaining the similarity by DP, the (X_index_num + 2) row (Y_index_num +
2) Create a score table scoretable for the columns, and set all elements of the table to 0
Initialize to This table shows that the vertical direction is
The character corresponding to the first character or the last character of the partial character string recorded in the list, and the horizontal direction corresponds to the character corresponding to the first character or the last character of the partial character string recorded in the list in the character string Y.

【0133】S106では、kとiを、k=1、i=0に初期
化する。
In S106, k and i are initialized to k = 1 and i = 0.

【0134】S107では、jをj=0に初期化する。変
数kは、現在、先頭からk番目の一致情報について注目
していることを表し、iとjは、それぞれ、XとYにお
けるリストに記録された部分文字列の先頭文字もしくは
最終文字の中で、どの文字に注目しているかを表す変数
である。S108では、現在のスコアとして、currents
coreにscoretable[i] [j]を代入する。
In S107, j is initialized to j = 0. The variable k indicates that attention is currently focused on the k-th matching information from the beginning, and i and j are the first character or the last character of the partial character string recorded in the list in X and Y, respectively. , A variable indicating which character is being focused on. In S108, the current score is currents
Substitute scoretable [i] [j] for core.

【0135】ここで、説明の便宜上、リストの先頭から
k番目の一致情報を、それぞれ、startX(k)、startdoc
(k)、termlength(k)、score(k)と表すことにする。
Here, for convenience of explanation, the k-th matching information from the head of the list is referred to as startX (k) and startdoc, respectively.
(k), termlength (k), and score (k).

【0136】S109では、iとjが指す場所が、前か
らk番目の一致情報の部分文字列が出現する場所と一致
しているかどうかを判定する。一致していれば、S11
0に進み、一致していなければ、S114に進む。
In S109, it is determined whether or not the location indicated by i and j matches the location where the partial character string of the kth matching information appears from the beginning. If they match, S11
The process proceeds to 0, and if they do not match, the process proceeds to S114.

【0137】S110では、スコア表において、一致し
た部分文字列の最終文字と対応する行番号と列番号を求
め、それぞれ、target_iとtarget_jに代入する。
In S110, a line number and a column number corresponding to the last character of the matched partial character string are obtained from the score table, and are substituted into target_i and target_j, respectively.

【0138】S111では、scoretable[target_i][tar
get_j]において、現段階で得られているスコアと、curr
entscoreに一致する部分文字列の重みscore(k)を加算し
て得られるスコアを比較し、もし、scoretable[target_
i][target_j]よりcurrentscore+score(k)の方が大きけ
れば、S112で、scoretable[target_i][target_j]に
currentscore+score(k)を代入する。そうでなければ、
S112をスキップし、S113に進む。
At S111, scoretable [target_i] [tar
get_j], the current score and curr
Compare the scores obtained by adding the score (k) of the substring that matches entscore, and if scoretable [target_
If currentscore + score (k) is larger than i] [target_j], in S112, scoretable [target_i] [target_j]
Substitute currentscore + score (k). Otherwise,
Skip S112 and proceed to S113.

【0139】S113では、kの値に1を加え、リスト
内の次の一致情報に注目し、S109に戻る。S109
では、次の一致情報もiとjを出現場所とするならS1
13までの処理を繰り返し、そうでなければ、S114
に進む。
In S113, 1 is added to the value of k, and attention is paid to the next matching information in the list, and the flow returns to S109. S109
Then, if i and j also appear in the next matching information in the appearance location, S1
13 is repeated, otherwise, S114
Proceed to.

【0140】S114からS119までの処理では、現
在のスコアcurrentscoreとスコア表の右、下、右下のス
コアを比較し、currentscoreの方が大きければcurrents
coreを代入する。
In the processing from S114 to S119, the current score currentscore is compared with the scores at the right, lower, and lower right of the score table. If the currentscore is larger, the currentscore is
Substitute core.

【0141】S120では、jがスコア表の右端まで来
たかどうかを判定する。もし、右端まで来ていなけれ
ば、S121でjに1を加え、S108に戻り、S11
9までの処理を繰り返す。右端まで来ていれば、S12
2に進む。
In S120, it is determined whether j has reached the right end of the score table. If the right end has not been reached, 1 is added to j in S121, the process returns to S108, and S11
The processing up to 9 is repeated. If it has reached the right end, S12
Proceed to 2.

【0142】S122では、iがスコア表の下端までに
来たかどうかを判定する。もし、下端まで来ていなけれ
ば、S123でiに1を加え、S107に戻り、S12
0までの処理を繰り返す。下端までていれば、S124
に進み、scoretable[X_index_num+1][Y_index_num+1]を
XとYの類似度として返す。
In S122, it is determined whether i has reached the lower end of the score table. If it does not reach the lower end, 1 is added to i in S123, the process returns to S107, and S12
The process up to 0 is repeated. If it has reached the lower end, S124
And returns scoretable [X_index_num + 1] [Y_index_num + 1] as the similarity between X and Y.

【0143】[0143]

【発明の効果】請求項1に記載の発明によれば、入力さ
れた文字列から切り出した部分文字列のうち、文書デー
タベース内の文書との類似度算出に関して効果のある文
字列を選別して、類似度を求めることができる。すなわ
ち検索に効果の高い文字列に限定して類似度を求めるこ
とができる。
According to the first aspect of the present invention, a character string that is effective in calculating similarity with a document in a document database is selected from partial character strings cut out from an input character string. , The degree of similarity can be obtained. That is, the similarity can be obtained by limiting the search to a character string having a high effect on the search.

【0144】請求項2に記載の発明によれば、二つの文
字列それぞれにおける順序に適合し、かつ、共通する部
分文字列に着目して類似度を求めることができる。すな
わち文字列の出現順序を考慮した類似度が求められる。
According to the second aspect of the present invention, the degree of similarity can be obtained by focusing on a partial character string that conforms to the order of each of the two character strings and is common. That is, the similarity is determined in consideration of the appearance order of the character strings.

【0145】請求項3に記載の発明によれば、類似度算
出に関する効果の大きな順に文字列を選別して、類似度
を求めることができる。これにより決まった類似度はよ
り適切な値となる。
According to the third aspect of the present invention, similarities can be obtained by selecting character strings in descending order of the effect on similarity calculation. As a result, the determined similarity becomes a more appropriate value.

【0146】請求項4に記載の発明によれば、一致した
部分文字列の重みを加算する方法だけでなく、その他の
類似度算出方法を組み合わせることができる。これによ
り検索精度が更に向上する。
According to the invention described in claim 4, not only the method of adding the weights of the matched partial character strings but also other similarity calculation methods can be combined. Thereby, the search accuracy is further improved.

【0147】請求項5に記載の発明によれば、入力され
た文字列から切り出した部分文字列のうち、文書データ
ベース内の文書との類似度算出に関して効果のある文字
列を選別して、検索に効果の高い文字列に限定して類似
度を求める装置を実現できる。
According to the fifth aspect of the present invention, a character string that is effective in calculating the similarity with a document in the document database is selected from the partial character strings cut out from the input character string and searched. It is possible to realize a device that obtains the similarity by limiting the character string to a highly effective one.

【0148】請求項6に記載の発明によれば、二つの文
字列それぞれにおける順序に適合し、かつ、共通する部
分文字列に着目して文字列の出現順序を考慮した類似度
を求める装置を実現できる。
According to the sixth aspect of the present invention, there is provided an apparatus which obtains a similarity which conforms to the order of two character strings and takes into account the order of appearance of the character strings by paying attention to a common partial character string. realizable.

【0149】請求項7の発明によれば、入力された文字
列から切り出した部分文字列のうち、文書データベース
内の文書との類似度算出に関して効果のある文字列を選
別して、検索に効果の高い文字列に限定して類似度を求
めるプログラムを提供できる。
According to the seventh aspect of the present invention, a character string that is effective in calculating the similarity with a document in the document database is selected from the partial character strings cut out from the input character string, and this is effective in the search. It is possible to provide a program that obtains the similarity only for character strings having a high character string.

【0150】請求項8に記載の発明によれば、二つの文
字列それぞれにおける順序に適合し、かつ、共通する部
分文字列に着目して文字列の出現順序を考慮した類似度
を求めるプログラムを提供できる。
According to the eighth aspect of the present invention, there is provided a program which obtains a similarity which conforms to the order of each of two character strings and takes into account the appearance order of the character strings by paying attention to a common partial character string. Can be provided.

【0151】請求項9に記載の発明によれば、以上述べ
たような効果を種々のコンピュータ上で実現できる。
According to the ninth aspect, the effects described above can be realized on various computers.

【0152】次に、第1および第2の実施例に関する検
索性能を説明する。入力文字列から切り出される部分文
字列を選別する効果と、部分文字列の選別基準にdfの
代わりにtfを用いることの効果を確認するための評価
実験を行った。
Next, search performance in the first and second embodiments will be described. An evaluation experiment was performed to confirm the effect of selecting a partial character string cut out from an input character string and the effect of using tf instead of df as a selection criterion for a partial character string.

【0153】選別の基準にtf、dfを用いた時の、選
択した部分文字列の数と検索精度の関係を図12に、選
別した部分文字列の数と検索時間の関係を図13に示
す。検索精度には、11pt平均精度と呼ばれる値を用
いた。11pt平均精度とは、再現率(0〜1)に対
し、0.1刻みで1〜11点を割り当て、それぞれの値
を平均した評価指数で、詳細については、G Salton and
M. J MacGill, Introduction to Modern Information
Retrieval, p174-181, MacGraw-Hill Book Co., New Yo
rk, 1983.に開示されている。
FIG. 12 shows the relationship between the number of selected partial character strings and the search accuracy when tf and df are used as the selection criteria, and FIG. 13 shows the relationship between the number of selected partial character strings and the search time. . For the search accuracy, a value called 11pt average accuracy was used. The 11 pt average precision is an evaluation index obtained by allocating 1 to 11 points in 0.1 increments to the recall (0 to 1) and averaging the respective values. For details, see G Salton and
M. J MacGill, Introduction to Modern Information
Retrieval, p174-181, MacGraw-Hill Book Co., New Yo
rk, 1983.

【0154】入力文字列から切り出す部分文字列の長さ
は2に、つまりbigramのみとした。また、図7のS87
で用いるパラメータLBとUBは、それぞれ、LB=0、UB=i
dfとした。用いた文書データは、NTCIR1テストコレク
ションと呼ばれる代表的な類似情報検索用テストデータ
で、約300,000件の文書と53件の検索文章を含
んでいる。
The length of the partial character string cut out from the input character string was set to 2, that is, only bigram. Also, S87 of FIG.
Parameters LB and UB used in LB = 0 and UB = i, respectively
df. The used document data is a representative similar information search test data called NTCIR1 test collection, which includes about 300,000 documents and 53 search sentences.

【0155】図12、図13共に、横軸には選択した部
分文字列の数、つまりSubStringLimitの値を、図12の
縦軸には検索精度を、図13の縦軸には53件の検索文
章を検索するのに要した時間を示している。
12 and 13, the horizontal axis indicates the number of selected partial character strings, that is, the value of SubStringLimit, the vertical axis in FIG. 12 indicates search precision, and the vertical axis in FIG. Indicates the time required to search for a sentence.

【0156】図12を見ると、tf、df共に、SubStr
ingLimitの値が小さい時には、SubStringLimitを増加さ
せることによって検索精度が向上することが確認できる
が、ある程度大きくなると、SubStringLimitの値を増加
させても検索精度があまり変化しないことが確認でき
る。このことから、SubStringLimitを適当な値に設定し
てやれば、部分文字列の選別を行っても、検索精度の低
下を抑えることができる。また、tfとdfを比較する
と、dfを基準とした選別による検索精度の方が上回っ
ていることが確認できるが、SubStringLimitの値がある
程度大きくなると、tfを基準として選別した場合で
も、dfの時とほぼ同等の検索精度を持つことが確認で
きる。
Referring to FIG. 12, both tf and df have SubStr.
When the value of ingLimit is small, it can be confirmed that the search accuracy is improved by increasing SubStringLimit. However, when the value of ingLimit is large, it can be confirmed that the search accuracy does not change much even if the value of SubStringLimit is increased. For this reason, if SubStringLimit is set to an appropriate value, a decrease in search accuracy can be suppressed even if a partial character string is selected. In addition, when comparing tf and df, it can be confirmed that the search accuracy by the selection based on df is higher, but when the value of SubStringLimit increases to some extent, even when the selection is performed based on tf, the time of df It can be confirmed that it has almost the same search accuracy as.

【0157】図13を見ると、tf、df共に、SubStr
ingLimitの値が減少するにつれ検索時間が短くなってお
り、部分文字列を選別することによる高速化の効果が確
認できる。また、tfとdfの比較をすると、tfを用
いた方の検索時間が小さく、SubStringLimitの値が小さ
いほどその差は大きくなることが確認できる。仮に、Su
bStringLimitの値を、tf、df共に高い検索精度を示
している値、SubStringLimit=22に設定したとすると、
その時の検索時間は、tfが264.6秒、dfが36
7.1秒で、1.4倍ほどtfの方が高速である。この
ように、本発明によって検索時間を向上させることがで
きる。
Referring to FIG. 13, both tf and df have SubStr.
As the value of ingLimit decreases, the search time becomes shorter, and the effect of speeding up by selecting the partial character strings can be confirmed. Further, when comparing tf and df, it can be confirmed that the search time using tf is shorter, and the difference becomes larger as the value of SubStringLimit is smaller. Suppose Su
Assuming that the value of bStringLimit is set to SubStringLimit = 22, a value indicating high search accuracy for both tf and df,
The search time at that time is as follows: tf is 264.6 seconds, df is 36
At 7.1 seconds, tf is about 1.4 times faster. As described above, the search time can be improved by the present invention.

【0158】次に、図3のS16における類似度の算出
に、第3および第4実施例による方法を適用した時の検
索性能を説明する。類似度の算出法に、図6の加算によ
る方法を用いた場合と、図10、11のDPによる方法
を用いた場合の検索精度の比較を行い、その結果を図1
4に示す。検索精度には、11pt平均精度を用いた。
入力文字列から切り出す部分文字列の長さは2に、つま
りbigramのみとし、図7のS87で用いるパラメータLB
とUBは、それぞれ、LB=0、UB=idfとした。用いた文
書データは、NTCIR1テストコレクションである。
Next, search performance when the method according to the third and fourth embodiments is applied to the calculation of the similarity in S16 of FIG. 3 will be described. The search accuracy is compared between the case of using the addition method of FIG. 6 and the case of using the DP method of FIGS. 10 and 11 for calculating the similarity, and the result is shown in FIG.
It is shown in FIG. 11 pt average precision was used for search precision.
The length of the partial character string cut out from the input character string is 2, that is, only the bigram is used, and the parameter LB used in S87 of FIG. 7 is used.
And UB are set to LB = 0 and UB = idf, respectively. The document data used is the NTCIR1 test collection.

【0159】図14の横軸には選択した部分文字列の
数、つまりSubStringLimitの値を、縦軸には検索精度を
示している。図14を見ると、SubStringLimitが15以
下の時には、検索精度に大きな差はないが、15を超え
た場合には、DPを用いた方法が加算による方法に比
べ、検索精度が上回っていることが確認できる。また、
検索時間を測定した所、DPによる方法は、加算による
方法に比べ約2倍の検索時間を要すること、既存のDP
による方法と比較すると数十倍高速であることが確認さ
れた。
In FIG. 14, the horizontal axis indicates the number of selected partial character strings, that is, the value of SubStringLimit, and the vertical axis indicates search accuracy. Referring to FIG. 14, when SubStringLimit is 15 or less, there is no significant difference in the search accuracy. However, when the value exceeds 15, the search accuracy using the DP is higher than the addition method. You can check. Also,
When the search time was measured, the DP method requires about twice the search time as compared to the addition method, and the existing DP
It was confirmed that the speed was several tens of times higher than that of the method described in the above.

【0160】このように、本発明によって、収集した一
致情報に対しDPを適用することで、加算による方法よ
りも検索精度を向上することができ、既存のDPによる
方法と比べ高速に類似度を算出できることができる。
As described above, according to the present invention, by applying the DP to the collected coincidence information, the search accuracy can be improved as compared with the method using addition, and the similarity can be calculated faster than the method using the existing DP. Can be calculated.

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

【図1】本発明による文書検索装置の実施例を示す図で
ある。
FIG. 1 is a diagram showing an embodiment of a document search device according to the present invention.

【図2】本発明により文章検索を行う計算機システムの
実施例を示す図である。
FIG. 2 is a diagram showing an embodiment of a computer system for performing a sentence search according to the present invention.

【図3】本発明の実施例の文章検索を行う処理のフロー
チャートである。
FIG. 3 is a flowchart of a process for performing a sentence search according to the embodiment of the present invention.

【図4】文字列から切り出される部分文字列の選別を行
う処理のフローチャートである。
FIG. 4 is a flowchart of a process for selecting a partial character string cut out from a character string.

【図5】一致情報を収集し、記録する処理のフローチャ
ートである。
FIG. 5 is a flowchart of a process of collecting and recording matching information.

【図6】一致情報から加算による類似度を求める処理の
フローチャートである。
FIG. 6 is a flowchart of a process of calculating a similarity by addition from matching information.

【図7】部分文字列の重みを求める処理のフローチャー
トである。
FIG. 7 is a flowchart of a process for calculating a weight of a partial character string.

【図8】一致情報管理テーブルの構成図である。FIG. 8 is a configuration diagram of a matching information management table.

【図9】本発明による文書検索装置の別の実施例を示す
図である。
FIG. 9 is a diagram showing another embodiment of the document search device according to the present invention.

【図10】一致情報からnグラムDP類似度を求める処
理の前半部分のフローチャートである。
FIG. 10 is a flowchart of a first half of a process for obtaining an n-gram DP similarity from matching information.

【図11】一致情報からnグラムDP類似度を求める処
理の後半部分のフローチャートである。
FIG. 11 is a flowchart of a latter half of a process for obtaining an n-gram DP similarity from matching information.

【図12】選別の基準にtf、dfを用いた時の、選択
した部分文字列の数と検索精度の関係を示す図である。
FIG. 12 is a diagram illustrating a relationship between the number of selected partial character strings and search accuracy when tf and df are used as selection criteria.

【図13】選別の基準にtf、dfを用いた時の、選別
した部分文字列の数と検索時間の関係を示す図である。
FIG. 13 is a diagram illustrating a relationship between the number of selected partial character strings and a search time when tf and df are used as selection criteria.

【図14】本発明におけるDPを用いた類似度算出法と
加算による類似度算出法の、検索精度の対比を示す図で
ある。
FIG. 14 is a diagram illustrating a comparison of search accuracy between a similarity calculation method using DP and a similarity calculation method by addition according to the present invention.

【図15】部分文字列の重みを求める別の処理のフロー
チャートである。
FIG. 15 is a flowchart of another process for calculating the weight of a partial character string.

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

10:文書データベース 10a、10b、10c:文書 11:文字列入力部 12:検索結果出力部 13:部分文字列選別部 14:一致情報収集部 15、17、73、81、82、83:類似度算出部 16、18:類似度算出制御部 19:再帰実行制御部 31:部分文字列切り出し制御部 32:部分文字列切り出し部 33:文字列出現頻度算出部 34:部分文字列登録部 41:一致情報収集制御部 42:文字列出現場所検索部 43:文字列重み算出部 44:一致情報登録制御部 45:一致情報登録部 51:文字列重み加算制御部 52:文字列重み加算部 61:一致文字列類似度算出部 62:任意文字列類似度算出部 63、75、84:最大値選択部 71:文字列分離制御部 72:文字列分離部 74:加算部 101:ディスプレイ 102:プリンタ 103:キーボード 104:フロッピー(R)ディスク装置 105:CD−ROM装置 106:読み出し専用メモリ(ROM) 107:ランダムアクセスメモリ(RAM) 108:磁気ディスク装置 109:中央処理装置(CPU) 110:通信インターフェイス 111:バス 112:フロッピー(R)ディスク 113:CD−ROM 114:通信ネットワーク 10: Document database 10a, 10b, 10c: Document 11: Character string input unit 12: Search result output unit 13: Partial character string selection unit 14: Matching information collection unit 15, 17, 73, 81, 82, 83: Similarity Calculation units 16, 18: Similarity calculation control unit 19: Recursive execution control unit 31: Partial character string cutout control unit 32: Partial character string cutout unit 33: Character string appearance frequency calculation unit 34: Partial character string registration unit 41: Match Information collection control unit 42: Character string appearance location search unit 43: Character string weight calculation unit 44: Match information registration control unit 45: Match information registration unit 51: Character string weight addition control unit 52: Character string weight addition unit 61: Match Character string similarity calculation unit 62: Arbitrary character string similarity calculation unit 63, 75, 84: Maximum value selection unit 71: Character string separation control unit 72: Character string separation unit 74: Addition unit 101: Display A 102: Printer 103: Keyboard 104: Floppy (R) disk device 105: CD-ROM device 106: Read only memory (ROM) 107: Random access memory (RAM) 108: Magnetic disk device 109: Central processing unit (CPU) 110: Communication interface 111: Bus 112: Floppy (R) disk 113: CD-ROM 114: Communication network

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5B075 ND03 NK06 NR05 PP12 PP24 PR06 QM01 QM08 QS01 UU06 ──────────────────────────────────────────────────続 き Continued on the front page F term (reference) 5B075 ND03 NK06 NR05 PP12 PP24 PR06 QM01 QM08 QS01 UU06

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 二つの文字列の類似度を算出する方法に
おいて、第1の文字列から切り出した部分文字列のう
ち、類似度算出に対する効果に基づいて選別した部分文
字列について、第2の文字列との一致情報を収集し、前
記一致情報から一致した部分文字列の重みを算出し、前
記重みに基づいて類似度を算出することを特徴とする文
字列類似度算出方法。
In a method for calculating the similarity between two character strings, a partial character string selected based on an effect on similarity calculation among partial character strings cut out from the first character string is subjected to a second character string. A character string similarity calculating method, wherein information on matching with a character string is collected, a weight of a partial character string matched from the matching information is calculated, and a similarity is calculated based on the weight.
【請求項2】 二つの文字列の類似度を算出する方法に
おいて、第1の文字列から切り出した部分文字列のう
ち、類似度算出に対する効果に基づいて選別した部分文
字列について、第2の文字列との一致情報を収集し、前
記一致情報に含まれる部分文字列の中から、第1および
第2の文字列に出現する順序が適合する部分文字列の重
みに基づいて類似度を算出することを特徴とする文字列
類似度算出方法。
2. A method for calculating a similarity between two character strings, wherein a partial character string selected based on an effect on similarity calculation among partial character strings cut out from the first character string is subjected to a second character string. Information on matching with a character string is collected, and a similarity is calculated from partial character strings included in the matching information based on the weight of the partial character string in which the order of appearance in the first and second character strings matches. A character string similarity calculation method.
【請求項3】 前記部分文字列の選別を、第1の文字列
から切り出した部分文字列が第2の文字列に出現する回
数を加味して行うことを特徴とする請求項1または2に
記載の文字列類似度算出方法。
3. The method according to claim 1, wherein the selection of the partial character string is performed in consideration of the number of times the partial character string cut out from the first character string appears in the second character string. Character string similarity calculation method described.
【請求項4】 前記文字列同士の一致情報は、部分文字
列の長さ、第1の文字列における部分文字列の出現場
所、第2の文字列における部分文字列の出現場所、第2
の文字列内で何番目の一致かを表すシーケンス番号、を
含むことを特徴とする請求項1から3のいずれかに記載
の文字列類似度算出方法。
4. The character string matching information includes a partial character string length, a partial character string appearance location in a first character string, a partial character string appearance location in a second character string, and a second character string appearance location.
4. A character string similarity calculation method according to claim 1, further comprising: a sequence number indicating the number of a match in the character string.
【請求項5】 二つの文字列の類似度を算出する文字列
類似度算出装置において、第1の文字列から切り出した
部分文字列のうち、類似度算出に対する効果に基づいて
選別する部分文字列選別部と、第2の文字列との一致情
報を収集する一致情報収集部と、前記一致情報に基づき
一致した部分文字列の重みを算出し、前記重みを総和す
ることで類似度を算出する類似度算出部と、を有するこ
とを特徴とする文字列類似度算出装置。
5. A character string similarity calculating apparatus for calculating a similarity between two character strings, wherein a partial character string selected based on an effect on similarity calculation among partial character strings cut out from the first character string. A selecting unit, a matching information collecting unit that collects matching information with the second character string, and calculating a weight of the matched partial character string based on the matching information, and calculating the similarity by summing the weights A character string similarity calculation device comprising: a similarity calculation unit.
【請求項6】 二つの文字列の類似度を算出する文字列
類似度算出装置において、第1の文字列から切り出した
部分文字列について、類似度算出に対する効果に基づい
て選別する部分文字列選別部と、前記選別部分文字列に
ついて、第2の文字列との一致情報を収集する一致情報
収集部と、前記一致情報に含まれる部分文字列の中か
ら、それぞれの文字列に出現する順序が適合する部分文
字列を選択する適合部分文字列選択手段と、前記適合部
分文字列に付けられた重みを総和する類似度算出部と、
を有することを特徴とする文字列類似度算出装置。
6. A character string similarity calculating apparatus for calculating a similarity between two character strings, wherein a partial character string cut out from the first character string is selected based on an effect on similarity calculation. Part, a matching information collection unit that collects matching information with the second character string for the selected partial character string, and an order in which each character string appears from among the partial character strings included in the matching information. A matching partial character string selecting unit that selects a matching partial character string, and a similarity calculating unit that sums weights assigned to the matching partial character strings,
A character string similarity calculation device characterized by having:
【請求項7】 二つの文字列の類似度を算出する文字列
類似度算出プログラムであって、コンピュータを、第1
の文字列から切り出した部分文字列が第2の文字列に出
現する回数に基づいて選別する選別手段と、前記選別部
分文字列について、第2の文字列との一致情報を収集す
る一致情報収集手段と、前記一致情報に基づき一致した
部分文字列の重みを算出し、前記重みを総和することで
類似度を算出する類似度算出手段、として機能させるこ
とを特徴とする文字列類似度算出プログラム。
7. A character string similarity calculation program for calculating a similarity between two character strings, comprising:
Selection means for selecting based on the number of times a partial character string cut out from the character string appears in the second character string, and matching information collection for collecting matching information of the selected partial character string with the second character string A character string similarity calculation program that functions as means and similarity calculation means for calculating weights of the matched partial character strings based on the match information and calculating the similarity by summing the weights. .
【請求項8】 二つの文字列の類似度を算出する文字列
類似度算出プログラムであって、コンピュータを、第1
の文字列から切り出した部分文字列について、類似度算
出に対する効果に基づいて選別する選別手段と、前記選
別部分文字列について、第2の文字列との一致情報とし
て、部分文字列の長さ、第1の文字列における部分文字
列の出現場所、第2の文字列における部分文字列の出現
場所、第2の文字列内で何番目の一致かを表すシーケン
ス番号、を収集する一致情報収集手段と、前記一致情報
に含まれる部分文字列の中から、それぞれの文字列に出
現する順序が適合する部分文字列に付けられた重みに基
づいて類似度を算出する類似度算出手段、として機能さ
せることを特徴とする文字列類似度算出プログラム。
8. A character string similarity calculation program for calculating a similarity between two character strings, comprising:
Selecting means for selecting a partial character string cut out from the character string based on the effect on the similarity calculation, and for the selected partial character string, as the matching information with the second character string, the length of the partial character string, Matching information collecting means for collecting the occurrence position of the partial character string in the first character string, the occurrence position of the partial character string in the second character string, and the sequence number indicating the number of the match in the second character string And functioning as similarity calculating means for calculating a similarity based on a weight given to a partial character string whose order of appearance in each character string matches from among the partial character strings included in the matching information. A character string similarity calculation program characterized by the following.
【請求項9】 請求項7または8に記載のプログラムを
記録したコンピュータ読取可能な記録媒体。
9. A computer-readable recording medium on which the program according to claim 7 is recorded.
JP2002012259A 2001-01-24 2002-01-22 Character string similarity calculation device, character string similarity calculation program, computer-readable recording medium recording the same, and character string similarity calculation method Expired - Lifetime JP4065695B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2002012259A JP4065695B2 (en) 2001-01-24 2002-01-22 Character string similarity calculation device, character string similarity calculation program, computer-readable recording medium recording the same, and character string similarity calculation method
CN 02159822 CN1230770C (en) 2002-01-22 2002-12-27 Method, device, program, and recording medium for chararacter similarity calculation

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2001-16204 2001-01-24
JP2001016204 2001-01-24
JP2002012259A JP4065695B2 (en) 2001-01-24 2002-01-22 Character string similarity calculation device, character string similarity calculation program, computer-readable recording medium recording the same, and character string similarity calculation method

Publications (2)

Publication Number Publication Date
JP2002297660A true JP2002297660A (en) 2002-10-11
JP4065695B2 JP4065695B2 (en) 2008-03-26

Family

ID=26608242

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002012259A Expired - Lifetime JP4065695B2 (en) 2001-01-24 2002-01-22 Character string similarity calculation device, character string similarity calculation program, computer-readable recording medium recording the same, and character string similarity calculation method

Country Status (1)

Country Link
JP (1) JP4065695B2 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005011078A (en) * 2003-06-19 2005-01-13 Patolis Corp Similar word retrieval device and method, its program, recording medium with its program recorded and information retreival system
JP2008287324A (en) * 2007-05-15 2008-11-27 Just Syst Corp Retrieval method, retrieval program, and retrieval device
JP2009098952A (en) * 2007-10-17 2009-05-07 Mitsubishi Electric Corp Information retrieval system
US8095526B2 (en) 2003-12-02 2012-01-10 Nec Corporation Efficient retrieval of variable-length character string data
CN102982292A (en) * 2012-11-05 2013-03-20 北京奇虎科技有限公司 Method of obtaining credible file digital signature and device and system thereof
CN103678655A (en) * 2013-12-23 2014-03-26 国家电网公司 Method and device for verifying information
US9747274B2 (en) 2014-08-19 2017-08-29 International Business Machines Corporation String comparison results for character strings using frequency data
US9785726B2 (en) 2014-02-25 2017-10-10 International Business Machines Corporation Pattern matching based character string retrieval
JP2022527060A (en) * 2019-03-22 2022-05-30 サービスナウ, インコーポレイテッド Determining the semantic similarity of text based on its subsections

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005011078A (en) * 2003-06-19 2005-01-13 Patolis Corp Similar word retrieval device and method, its program, recording medium with its program recorded and information retreival system
JP4486324B2 (en) * 2003-06-19 2010-06-23 ヤフー株式会社 Similar word search device, method, program, and information search system
US8095526B2 (en) 2003-12-02 2012-01-10 Nec Corporation Efficient retrieval of variable-length character string data
US8200646B2 (en) 2003-12-02 2012-06-12 Nec Corporation Efficient retrieval of variable-length character string data
JP2008287324A (en) * 2007-05-15 2008-11-27 Just Syst Corp Retrieval method, retrieval program, and retrieval device
JP2009098952A (en) * 2007-10-17 2009-05-07 Mitsubishi Electric Corp Information retrieval system
CN102982292A (en) * 2012-11-05 2013-03-20 北京奇虎科技有限公司 Method of obtaining credible file digital signature and device and system thereof
CN103678655B (en) * 2013-12-23 2017-02-08 国网浙江省电力公司 Method and device for verifying information
CN103678655A (en) * 2013-12-23 2014-03-26 国家电网公司 Method and device for verifying information
US9785726B2 (en) 2014-02-25 2017-10-10 International Business Machines Corporation Pattern matching based character string retrieval
US9916397B2 (en) 2014-02-25 2018-03-13 International Business Machines Corporation Pattern matching based character string retrieval
US9946812B2 (en) 2014-02-25 2018-04-17 International Business Machines Corporation Pattern matching based character string retrieval
US10007740B2 (en) 2014-02-25 2018-06-26 International Business Machines Corporation Pattern matching based character string retrieval
US10176274B2 (en) 2014-02-25 2019-01-08 International Business Machines Corporation Pattern matching based character string retrieval
US9747274B2 (en) 2014-08-19 2017-08-29 International Business Machines Corporation String comparison results for character strings using frequency data
US9747273B2 (en) 2014-08-19 2017-08-29 International Business Machines Corporation String comparison results for character strings using frequency data
JP2022527060A (en) * 2019-03-22 2022-05-30 サービスナウ, インコーポレイテッド Determining the semantic similarity of text based on its subsections

Also Published As

Publication number Publication date
JP4065695B2 (en) 2008-03-26

Similar Documents

Publication Publication Date Title
US9195738B2 (en) Tokenization platform
CN110362824B (en) Automatic error correction method, device, terminal equipment and storage medium
JP2004139553A (en) Document retrieval system and question answering system
JPH10232866A (en) Method and device for processing data
WO2008043582A1 (en) Systems and methods for building an electronic dictionary of multi-word names and for performing fuzzy searches in said dictionary
CN110263127A (en) Text search method and device is carried out based on user query word
JP2000200281A (en) Device and method for information retrieval and recording medium where information retrieval program is recorded
JP2002132811A (en) Method and system for answering question and recording medium with recorded question answering program
JP2002297660A (en) Method, device, program, and recording medium for character similarity calculation
JP2006227823A (en) Information processor and its control method
CN108345694B (en) Document retrieval method and system based on theme database
KR20020089677A (en) Method for classifying a document automatically and system for the performing the same
CN110287284B (en) Semantic matching method, device and equipment
JP5418138B2 (en) Document search system, information processing apparatus, and program
KR100559472B1 (en) System for Target word selection using sense vectors and Korean local context information for English-Korean Machine Translation and thereof
JP2004133565A (en) Postprocessing device for character recognition using internet
US20110106849A1 (en) New case generation device, new case generation method, and new case generation program
WO2022019275A1 (en) Document search device, document search system, document search program, and document search method
JP5145288B2 (en) Synonym dictionary construction apparatus and method, computer program
JP3249743B2 (en) Document search system
JP2005326952A (en) Method and device for word registration in concept dictionary, and program
JP4015661B2 (en) Named expression extraction device, method, program, and recording medium recording the same
JPH10177575A (en) Device and method for extracting word and phrase and information storing medium
JP2001067378A (en) Calculation method and device for similarity of character string and recording medium
JP4206266B2 (en) Full-text search device, processing method, processing program, and recording medium

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20021010

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041005

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20060227

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060522

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060522

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070515

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070717

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20070717

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20070717

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070911

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071108

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: 20071218

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080107

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4065695

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110111

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110111

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120111

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120111

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130111

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130111

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140111

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term