JP6740877B2 - Similarity calculation program, similarity calculation method, and similarity calculation device - Google Patents

Similarity calculation program, similarity calculation method, and similarity calculation device Download PDF

Info

Publication number
JP6740877B2
JP6740877B2 JP2016229208A JP2016229208A JP6740877B2 JP 6740877 B2 JP6740877 B2 JP 6740877B2 JP 2016229208 A JP2016229208 A JP 2016229208A JP 2016229208 A JP2016229208 A JP 2016229208A JP 6740877 B2 JP6740877 B2 JP 6740877B2
Authority
JP
Japan
Prior art keywords
vector
character
document
correlation
similarity calculation
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.)
Active
Application number
JP2016229208A
Other languages
Japanese (ja)
Other versions
JP2018085051A (en
Inventor
謙介 馬場
謙介 馬場
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2016229208A priority Critical patent/JP6740877B2/en
Publication of JP2018085051A publication Critical patent/JP2018085051A/en
Application granted granted Critical
Publication of JP6740877B2 publication Critical patent/JP6740877B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、類似度算出プログラム、類似度算出方法、および類似度算出装置に関する。 The present invention relates to a similarity calculation program, a similarity calculation method, and a similarity calculation device.

近年、文書間の比較を行い、類似箇所を抽出することが行われている。例えば、2つの文章の文字列を行と列に配置し、文字間の類似度に基づいて、文字列の類似箇所を抽出する際に、終点からの不一致又は読み飛ばしが連続する文字数を制限し、抽出をリセットして再開することで、代表的な局所対応を網羅的に抽出する技術が知られている。 In recent years, it has been performed to compare documents and extract similar portions. For example, character strings of two sentences are arranged in rows and columns, and when extracting similar portions of character strings based on the similarity between characters, the number of characters that do not match or are skipped consecutively from the end point is limited. , A technique for exhaustively extracting typical local correspondences by resetting and restarting the extraction is known.

また、文書内の文字列に対して検索文字列との一致若しくは類似する文字列の分布状態及びその一致度を表示する技術等が提案されている。 Further, there has been proposed a technique of displaying the distribution state of the character strings in the document that match or is similar to the search character string and the degree of matching thereof.

特開2012−59100号公報JP 2012-59100 A 特開平7−146872号公報JP-A-7-146872 特開平8−249445号公報JP-A-8-249445

M.J.Fischer and M.S.Paterson:String-matching and other products, Complexity of Computation (Proceedings of the SIAM-AMS Applied Mathematics Symposium, New York, 1973),pp.113-125,1974M. J. Fischer and M. S. Paterson:String-matching and other products, Complexity of Computation (Proceedings of the SIAM-AMS Applied Mathematics Symposium, New York, 1973), pp. 113-125, 1974 D.Gusfield: Algorithms on Strings,Trees and Sequences: Computer Science and Computational Biology,Cambridge University Press,1997D. Gusfield: Algorithms on Strings, Trees and Sequences: Computer Science and Computational Biology, Cambridge University Press, 1997 M.J.Atallah et al.:A randomized algorithm for approximate string matching.Algorithmica,29:468-486,2001M. J. Atallah et al. :A randomized algorithm for approximate string matching. Algorithmica, 29:468-486, 2001 K.Baba et al.:A Note on Randomized Algorithm for String Matching with Mismatches,Nordic Journal of Computing,10(1):2-12,2003K. Baba et al. :A Note on Randomized Algorithm for String Matching with Mismatches, Nordic Journal of Computing, 10(1):2-12, 2003 T.Schoenmeyr and D.Yu-Zhang: FFT-based Algorithms for the String Matching with Mismatches Problem, Journal of Algorithms,57:130-139,2005T. Schoenmeyr and D. Yu-Zhang: FFT-based Algorithms for the String Matching with Mismatches Problem, Journal of Algorithms, 57:130-139, 2005

上述した技術では、2文書間で互いに対応する位置での類似度を算出、検索対象の文書に対して与えられた検索文字列に一致若しくは類似する文字列を抽出等を行う技術である。したがって、2文書に対してすべての位置ずれで文書間の類似を算出する場合、文書の文字の種類の多さや文書の区切り等で抽出した文字列の長さに応じて処理負担が大きくなるといった問題がある。 The above-mentioned technique is a technique of calculating the similarity between two documents at positions corresponding to each other, extracting a character string that matches or is similar to the search character string given to the document to be searched. Therefore, when the similarity between documents is calculated for all two documents with respect to all positional deviations, the processing load increases according to the number of character types in the document and the length of the extracted character string due to document breaks. There's a problem.

したがって、1つの側面では、本発明は、文字単位の比較により文書間の比較を行う際の計算量を抑えることを目的とする。 Therefore, in one aspect, the present invention aims to reduce the amount of calculation when comparing documents by character-by-character comparison.

一態様によれば、複数の文書データに含まれる文字または文字列ごとに該複数の文書データをベクトル化した複数のベクトルを生成し、前記複数のベクトルのそれぞれについてフーリエ変換した結果の要素ごとの積を算出し、前記文字または文字列それぞれに対し、前記積を前記要素ごとに加算した合算ベクトルを生成し、前記合算ベクトルより、フーリエ逆変換を用いて、前記複数の文書データ間の相関値を生成する処理をコンピュータが行う類似度算出プログラムが提供される。 According to one aspect, a plurality of vectors obtained by vectorizing the plurality of document data are generated for each character or character string included in the plurality of document data, and each vector of the plurality of vectors is subjected to Fourier transform. A product is calculated, and for each of the character or character string, a summation vector is generated by adding the product for each element, and a Fourier transform is used from the summation vector to calculate a correlation value between the plurality of document data. There is provided a similarity calculation program in which a computer performs a process of generating.

また、上記課題を解決するための手段として、類似度算出方法および類似度算出装置とすることもできる。 Further, as a means for solving the above problems, a similarity calculation method and a similarity calculation device can be used.

文字単位の比較により文書間の比較を行う際の計算量を抑えることができる。 By comparing characters, it is possible to reduce the amount of calculation when comparing documents.

位置ずれを説明するための図である。It is a figure for explaining position gap. 文書間の相関の例を示す図である。It is a figure which shows the example of the correlation between documents. 計算と計算時間との関係を説明するための図である。It is a figure for demonstrating the relationship between calculation and calculation time. 計算方法の概念図を示す図である。It is a figure which shows the conceptual diagram of a calculation method. 計算量の削減を説明するための図である。It is a figure for demonstrating reduction of calculation amount. 類似度算出装置のハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of a similarity calculation apparatus. 類似度算出装置の機能構成例を示す図である。It is a figure which shows the functional structural example of a similarity calculation apparatus. 2文書間の相関を求める第1の類似算出処理を説明するためのフローチャートである。9 is a flowchart illustrating a first similarity calculation process for obtaining a correlation between two documents. 図8のフローチャートでの処理例を示す図である。It is a figure which shows the process example in the flowchart of FIG. 1対N相関を求める第2の類似算出処理を説明するためのフローチャートである。It is a flowchart for demonstrating the 2nd similarity calculation process which calculates|requires 1 to N correlation. 語彙数に対する実行時間の比較結果を示す図である。It is a figure which shows the comparison result of the execution time with respect to the number of vocabularies. 文書長に対する実行時間の比較結果を示す図である。It is a figure which shows the comparison result of the execution time with respect to a document length. 文書中の語彙数と処理時間の比較結果を示す図である。It is a figure which shows the comparison result of the number of vocabularies in a document, and processing time.

以下、本発明の実施の形態を図面に基づいて説明する。先ず、2つの文書のそれぞれの文字列を入力とし、すべての位置ずれについての文字の一致の数(相関)を計算する問題を考察する。「相関」とは、すべての位置ずれで対応させた語との一致数をいう。 Embodiments of the present invention will be described below with reference to the drawings. First, consider the problem of inputting the character strings of two documents and calculating the number of character matches (correlation) for all misregistrations. The "correlation" means the number of matches with the corresponding words in all the positional deviations.

文章間の相関を求める関連技術として、相関を求める高速アルトリズムFFT(Fast Fourier Transform)-based Algorithmが存在する。FFTは高速フーリエ変換の略である。 As a related technique for finding a correlation between sentences, there is a fast Fourier transform (FFT)-based algorithm for finding a correlation. FFT stands for Fast Fourier Transform.

FFT-based Algorithmの処理は、O(nlogn)時間の畳み込み演算をσ回繰り返す。ここで、σは文字又は文字列の種類の数を示し、nは各文章の文字列の長さを示す。 In the process of the FFT-based Algorithm, the convolution operation of O(nlogn) time is repeated σ times. Here, σ indicates the number of types of characters or character strings, and n indicates the length of the character string of each sentence.

次に、相関の計算時間について考察する。相関計算の例として、語の比較を順に行う単純計算と、FFT-Based Algorithmを用いた計算量について比較する。 Next, consider the correlation calculation time. As an example of correlation calculation, a simple calculation that sequentially compares words and a calculation amount using FFT-Based Algorithm are compared.

基本的に、σ≦nと見なせる場合、FFT-Based Algorithmが単純計算より高速である。即ち、σが一定で小さい場合、O(n2)とO(nlogn)の比較と見なせる。しかしながら、σが不定で小さい場合、O(n2logσ)に対するO(σnlogσ)の利点が小さい。即ち、σが大きい場合は想定されておらず、一定で小さいσを想定し、計算時間をO(nlogn)として扱っている(非特許文献1、2)。そのため、FFTの実行回数が多くなるという問題がある。 Basically, the FFT-Based Algorithm is faster than simple calculation when σ≦n can be considered. That is, when σ is constant and small, it can be regarded as a comparison between O(n 2 ) and O(nlogn). However, when σ is indefinite and small, the advantage of O(σnlogσ) over O(n 2 log σ) is small. That is, when σ is large, it is not assumed, and a constant and small σ is assumed, and the calculation time is treated as O(nlogn) (Non-Patent Documents 1 and 2). Therefore, there is a problem that the number of FFT executions increases.

この問題に対して、畳み込みの繰り返しからk回分の結果だけを使って近似することが提案されている(非特許文献3、4、5)。しかしがら、畳み込み演算を一つの処理単位として扱っているため、畳み込み演算の処理回数の削減に留まっている。 To solve this problem, it has been proposed to perform approximation using only the result of k iterations (Non-Patent Documents 3, 4, and 5). However, since the convolution operation is treated as one processing unit, the number of times the convolution operation is processed is reduced.

さらに、このような近似的手法(非特許文献3、4、5)では、厳密な値でなく近似値を出力している。長さnの文書について、k回の繰り返しによる相関ciの推定値の分散は(n-ci)/kで表される。近似値が正しい値ciに対して散らばる程度を表わす。大きなnについて誤差が大きく、長い文書に適していない。さらに、小さなciについて誤差が大きい。相関のうち小さい値の推定値の精度が低いことを示す。つまり、移動平均の計算や相関全体をベクトルとして機械学習等に用いる場合に適用できない。 Furthermore, in such an approximate method (Non-patent documents 3, 4, and 5), an approximate value is output instead of an exact value. For a document of length n, the variance of the estimate of the correlation c i over k iterations is given by (nc i )/k. It represents the degree to which the approximate values are scattered with respect to the correct value c i . Large error for large n, not suitable for long documents. Furthermore, the error is large for small c i . It shows that the accuracy of the estimated value of the small value of the correlation is low. That is, it cannot be applied to the case where the moving average is calculated or the entire correlation is used as a vector for machine learning.

従来より、畳み込み演算は信号処理等の分野で一般的な概念である。信号処理では、データは、送受信間の通信で定められるデータ長を処理単位として処理されるためσが小さい。 Conventionally, the convolution operation is a general concept in the field of signal processing and the like. In signal processing, data is processed with a data length determined by communication between transmission and reception as a processing unit, so that σ is small.

また、畳み込み演算は、プログラミング言語においても既存の関数を利用できる。このような開発環境において、畳み込み演算内での処理負荷について詳細な解析がなさることがなかった。学会誌、学術論文等の文書の長さは、通信におけるデータ長よりはるかに大きい。 Also, the convolution operation can use an existing function in a programming language. In such a development environment, detailed analysis of the processing load in the convolution operation has not been done. The length of documents such as academic journals and academic papers is much larger than the data length in communication.

本実施例では、σが大きな場合に、更なる処理の高速化を実現し、近年の文書間の比較等での大きなσの大量データに対して相関を求める需要に対応する。 In the present embodiment, when σ is large, further speeding up of processing is realized, and in recent years, there is a demand for obtaining a correlation with respect to a large amount of large σ data in comparison between documents.

ここで、相関の計算時間における課題は、現実的な実行時間の削減である。具体的には、σnlogσに対する係数部分、即ち、FFTの実行回数を削減することである。発明者は、畳み込み演算が、離散フーリエ変換と逆離散フーリエ変換の処理により行われることに着目し、大きなσの大量データを扱う場合の相関の計算処理の高速化を実現した。大きなσの大量データを、以下の説明では、文書を例として説明する。 Here, the problem in the calculation time of the correlation is to reduce the actual execution time. Specifically, it is to reduce the coefficient part for σnlogσ, that is, the number of times FFT is executed. The inventor noticed that the convolution operation is performed by the processing of the discrete Fourier transform and the inverse discrete Fourier transform, and realized the speedup of the calculation processing of the correlation when handling a large amount of data of large σ. In the following description, a large amount of data with a large σ will be described using a document as an example.

2文書s,t間の相関を求める場合、2文書s,tの各文字列内で連続した2文字以上で類似する類似部分の位置は必ずしも同一位置ではない。類似部分が出現する位置がずれている場合についても考慮する必要がある。相関で考慮される位置ずれについて説明する。 When obtaining the correlation between two documents s and t, the positions of similar portions that are similar in two or more consecutive characters in each character string of the two documents s and t are not necessarily the same position. It is also necessary to consider the case where the positions where similar portions appear are displaced. The position shift considered in the correlation will be described.

まず、2つの文字列間の相関計算に係る表記を以下に定義する。 First, the notation relating to the correlation calculation between two character strings is defined below.

Figure 0006740877
文書sと文書tの文字は、長さnの文字列全体からなる集合Σnの要素として表される。
Figure 0006740877
The characters of document s and document t are represented as elements of a set Σ n consisting of the entire character string of length n.

Figure 0006740877
文書sと文書tとの相関c(s,t)は、2n-1次元ベクトルで表され、i番目の要素は、
Figure 0006740877
The correlation c(s,t) between the document s and the document t is represented by a 2n-1 dimensional vector, and the i-th element is

Figure 0006740877
で表される。ただし、
Figure 0006740877
It is represented by. However,

Figure 0006740877
について、
Figure 0006740877
about,

Figure 0006740877
のように文字列を数式のように表わすことで、範囲外の形式的な比較のためにダミーの語を付加することを表現する。このようにすることで、位置ずれを考慮して相関を算出できる。
Figure 0006740877
By expressing a character string like a mathematical expression, a dummy word is added for formal comparison outside the range. By doing so, the correlation can be calculated in consideration of the positional deviation.

図1は、位置ずれを説明するための図である。図1では、文書sの文書tに対する語の位置ずれを考慮するために、文書tの前後に、文書sにも文書tにも属さないダミーの語を付加する概念図を示している。 FIG. 1 is a diagram for explaining the positional deviation. FIG. 1 shows a conceptual diagram in which dummy words that do not belong to the document s or the document t are added before and after the document t in order to consider the positional deviation of the word of the document s with respect to the document t.

文章sを1語ずつずらして、ずらした位置における文書tの1語との相関を算出する。文書tに対して、文書sでは語順を変えてある場合がずれ位置に相当する。1語ずらすごとに相関を算出することで、ずれごとの相関c1, c2,・・・, c2n-1を得る。 The sentence s is shifted word by word, and the correlation with the word of the document t at the shifted position is calculated. A case where the word order is changed in the document s with respect to the document t corresponds to the shift position. By calculating the correlation for each word shift, the correlation c 1 , c 2 ,..., C 2n-1 for each shift is obtained.

全ての位置ずれを考慮した相関c(s,t)は、全ての位置ずれでの文字の一致の数に相当するとした場合、単純な計算ではO(n2)回の文字比較が行われる。ここで、1回の文字比較の時間はlogσに依存する。 If it is assumed that the correlation c(s, t) considering all misregistrations corresponds to the number of matching characters in all misregistrations, a simple calculation makes O(n 2 ) times of character comparisons. Here, the time of one character comparison depends on log σ.

図2は、文書間の相関の例を示す図である。図2では、文章sは文字列“abbacab”であり、文書tは文字列“ababbac”である場合の相関の例を示している。図2において、ダミーの語xは空欄で表している。 FIG. 2 is a diagram showing an example of correlation between documents. FIG. 2 shows an example of correlation when the sentence s is the character string “abbacab” and the document t is the character string “ababbac”. In FIG. 2, the dummy word x is blank.

文書tの前後にn-1後のダミーを付加した文書t’の先頭に文書sの先頭を合せて、一語ずつ文書sをずらして一致する文字数をカウントする。この例では、文書t’の先頭に文書sの先頭を合せた場合には、文書sと文書tとに一致する文字が存在しない。従って、相関c1は0となる。一語ずらすと、文書sの末尾2文字と文書tの先頭2文字とが一致する。従って、相関c2は2となる。 The head of the document s is aligned with the head of the document t', which is a dummy of n-1's before and after the document t, and the number of matching characters is counted by shifting the document s word by word. In this example, when the beginning of the document s is aligned with the beginning of the document t′, there is no character that matches the documents s and t. Therefore, the correlation c 1 becomes 0. When shifted by one word, the last two characters of the document s and the first two characters of the document t match. Therefore, the correlation c 2 is 2.

更に1語ずらした相関c3は0となる。順に、相関c4は3、相関c5は1、相関c6は2、相関c7は3、相関c8は1、相関c9は5、相関c10は1、相関c11は0、相関c12は1、そして、相関c13は0となる。 Further, the correlation c 3 shifted by one word becomes 0. Correlation c 4 is 3, correlation c 5 is 1, correlation c 6 is 2, correlation c 7 is 3, correlation c 8 is 1, correlation c 9 is 5, correlation c 10 is 1, correlation c 11 is 0, The correlation c 12 is 1, and the correlation c 13 is 0.

ここで、文字又は文字列の種類毎に行われるFFTによる畳み込みの計算について説明する。2つのn次元ベクトルuとvとの巡回畳み込みrは、 Here, the calculation of the FFT convolution performed for each type of character or character string will be described. The cyclic convolution r of two n-dimensional vectors u and v is

Figure 0006740877
で表される。ただし、-n+1≦i≦0についてはvi=vn+iである。
Figure 0006740877
It is represented by. However, for −n+1≦i≦0, v i =v n+i .

R,U,Vをそれぞれr,u,vの離散フーリエ変換としoを要素ごとの積とすると、 Let R, U, V be the discrete Fourier transforms of r, u, v respectively, and o be the element-wise product,

Figure 0006740877
で表される。このことから、rは、uとvとからFFTによりO(nlogn)時間で計算可能である。計算ルートと計算時間との関係を図3で説明する。
Figure 0006740877
It is represented by. From this fact, r can be calculated in O(nlogn) time by FFT from u and v. The relationship between the calculation route and the calculation time will be described with reference to FIG.

図3は、計算と計算時間との関係を説明するための図である。図3において、nは文章の長さを表わす。uとvとからrを得る計算、即ち、語uと語vの比較rを行う計算の場合、計算時間O(n2)で表される。 FIG. 3 is a diagram for explaining the relationship between calculation and calculation time. In FIG. 3, n represents the length of the sentence. In the case of a calculation for obtaining r from u and v, that is, a calculation for comparing r between the word u and the word v, the calculation time is represented by O(n 2 ).

一方、u,vの離散フーリエ変換U,Vの計算時間はO(nlogn)であり、U,Vの要素毎の積Rの計算時間は、O(n)である。また、Rからrへの逆離散フーリエ変換の計算時間は、O(nlogn)である。 On the other hand, the calculation time of the discrete Fourier transforms U and V of u and v is O(nlogn), and the calculation time of the product R of each element of U and V is O(n). The calculation time of the inverse discrete Fourier transform from R to r is O(nlogn).

次に、FFT-based Algorithmの概要について説明する。FFT-based Algorithmでは、文字を数値化し、文字列間の相関をベクトルの畳み込みにより計算する。そうすることで、文字列全体の集合Σ内のある文字aを1、それ以外を0に置き換えると、文字aの一致のみを考慮した相関を畳み込み演算で算出でき、O(nlogn)時間で計算可能である。文書から数値列への置き換えはO(n)時間である。また、乗算で一致又は不一致を表現できるため、畳み込み演算が適用可能である。 Next, an outline of the FFT-based Algorithm will be described. The FFT-based Algorithm digitizes characters and calculates the correlation between strings by vector convolution. By doing so, if one character a in the set Σ of the entire character string is replaced with 1 and the others are replaced with 0, the correlation considering only the matching of the character a can be calculated by the convolution operation, and the correlation can be calculated in O(nlogn) time. It is possible. It takes O(n) time to replace a document with a sequence of numbers. Further, since congruity or non-coincidence can be expressed by multiplication, convolution operation can be applied.

文字列全体の集合Σ内の要素である文字又は文字列の種類ごとに、O(nlogn)時間の畳み込み演算を行うため、文字又は文字列の種類の数のσ回繰り返される。そして、ベクトルの要素ごとの和をとることで相関を算出する。即ち、ある位置ずれでの相関ciが求まる。 For each type of character or character string that is an element in the set Σ of the entire character string, a convolution operation of O(nlogn) time is performed, and therefore, σ times of the number of character or character string types are repeated. Then, the correlation is calculated by taking the sum for each element of the vector. That is, the correlation c i at a certain displacement can be obtained.

より具体的に、FFT-based Algorithmの計算式を以下に示す。 More specifically, the calculation formula of the FFT-based Algorithm is shown below.

Figure 0006740877
について、φaはaを1、それ以外を0に写す関数とし、定義(数3)より、n≦i≦2n-1について、
Figure 0006740877
, Φ a is a function that maps a to 1 and the others to 0. From the definition (Equation 3), for n≦i≦2n-1,

Figure 0006740877
と表される。ここで、加算の順序を入れ替えて、
Figure 0006740877
Is expressed as Here, change the order of addition,

Figure 0006740877
とする。
Figure 0006740877
And

(ua,1, ua,2,..., ua,2n-1)と(va,1, va,2,..., va,2n-1)とを、 (U a,1 , u a,2 ,..., u a,2n-1 ) and (va ,1 , v a,2 ,..., v a,2n-1 )

Figure 0006740877
である。数11では、1≦i≦nのときには、片方を反転させ、n≦i≦2n-1のときには、0を埋める。2n-1次元ベクトルとすると、数10は、
Figure 0006740877
Is. In Expression 11, one is inverted when 1≦i≦n, and zero is filled when n≦i≦2n−1. Assuming a 2n-1 dimensional vector, Equation 10 is

Figure 0006740877
で表される。数12内の
Figure 0006740877
It is represented by. Within number 12

Figure 0006740877
は巡回畳み込み演算である。
Figure 0006740877
Is a cyclic convolution operation.

類似部分の位置ずれを考慮した場合、文字又は文字列の種類(文字列全体の集合Σ内の要素)の数分の畳み込み演算を繰り返すことになり、計算時間が長くなる。
・1回の畳み込み演算に対して、2回のFFT、1回のベクトルの要素ごとの積、1回の逆FFTが行われる。ここで、逆FFTの計算時間はFFTの計算時間に相当すると考えられる。
・それぞれの1回の計算時間は、FFTがO(nlogn)時間、要素ごとの積はO(n)時間であり、FFTが支配的である。
・従って、1回の相関の計算で、FFTが3σ回必要であることが分かる。
When the positional deviation of similar portions is taken into consideration, the convolution operation is repeated for the number of types of characters or character strings (elements in the set Σ of the entire character string), which increases the calculation time.
-For one convolution operation, two FFTs, one vector element-wise product, and one inverse FFT are performed. Here, the calculation time of the inverse FFT is considered to correspond to the calculation time of the FFT.
-For each calculation time, FFT is O(nlogn) time, and product of each element is O(n) time, and FFT is dominant.
・Therefore, it can be seen that FFT is required 3σ times in one calculation of correlation.

また、畳み込み演算の繰り返しの回数σは、アルファベットサイズσに対する論理的な最小値である。 The number of repetitions σ of the convolution operation is a logical minimum value with respect to the alphabet size σ.

文字又は文字列の種類ごとに畳み込み演算を行い、その結果を集約する関連技術に対して、発明者は、畳み込み演算の最後の処理であるフーリエ変換(逆FFT)の前に集約することで、フーリエ変換の回数を削減することを見出した。フーリエ変換の回数を削減するために、発明者が着目した計算式の変形について説明する。 For the related technology that performs a convolution operation for each type of character or character string and aggregates the results, the inventor aggregates the result before the Fourier transform (inverse FFT), which is the final process of the convolution operation. We have found to reduce the number of Fourier transforms. A modification of the calculation formula focused on by the inventor in order to reduce the number of Fourier transforms will be described.

raをuaとvaの巡回畳み込みとすると、相関c(s,t)は、 If r a is a circular convolution of u a and v a , then the correlation c(s,t) is

Figure 0006740877
のベクトルから得られる。このベクトルを
Figure 0006740877
Is obtained from the vector of. This vector

Figure 0006740877
と表示することにする。そして、fを離散フーリエ変換、Ra=f(ra)とすると、数15は、
Figure 0006740877
Will be displayed. Then, when f is a discrete Fourier transform, and R a =f(r a ), Equation 15 becomes

Figure 0006740877
と変形できる。数16の右辺より、ベクトルの要素ごとの加算後に逆FFTを行なえばよいことが分かる。要素ごとの加算後の逆FFTは、1回のFFTと見なせる。
Figure 0006740877
Can be transformed. It can be seen from the right side of Expression 16 that the inverse FFT may be performed after addition for each element of the vector. The inverse FFT after addition for each element can be regarded as one FFT.

図4は、計算方法の概念図を示す図である。図4において、畳み込み演算2pと、畳み込み演算2pを行わない単純な方法の計算部分は、集合Σの要素(文字又は文字列の種類)ごとに処理が繰り返される部分である。即ちσ回数繰り返される。その後、得られたσ個のベクトルの要素ごとに値を合算して、文書sと文書tとの相関c(s,t)が得られる。 FIG. 4 is a diagram showing a conceptual diagram of the calculation method. In FIG. 4, the convolution operation 2p and the calculation part of the simple method that does not perform the convolution operation 2p are the parts in which the process is repeated for each element (character or character string type) of the set Σ. That is, it is repeated σ times. Then, the values are added up for each element of the obtained σ vectors, and the correlation c(s, t) between the document s and the document t is obtained.

関連技術において、畳み込み演算2pでは、FFTの計算が、離散フーリエ変換時に2σ回行われ、逆離散フーリエ変換時にσ回行われるため、合計3σ回行われる。 In the related art, in the convolution operation 2p, the FFT calculation is performed 2σ times during the discrete Fourier transform and σ times during the inverse discrete Fourier transform, so that a total of 3σ times are performed.

一方、本実施例では、畳み込み演算2pのうち、逆FFTの実行前に、ベクトルの要素ごとの加算を行い、その結果に対して逆FFTを行うことで、逆FFTの計算回数をσ回から1回に削減する。本実施例では、σが大きいほど効果を奏し、関連技術に比べて、約3分の2の時間で2文書間の相関を取得できる。 On the other hand, in the present embodiment, in the convolution operation 2p, the vector-by-element addition is performed before the execution of the inverse FFT, and the inverse FFT is performed on the result, so that the number of times the inverse FFT is calculated changes from σ Reduce to once. In this embodiment, the larger σ is, the more effective the effect is, and the correlation between two documents can be acquired in about two-thirds the time as compared with the related art.

また、σが小さい場合、応用の観点から各文字での相関が得ることが必要となる場合があるが、σが大きい場合、特定文字での相関が必要であっても、その他の文字として大きなσを考える必要があり、その観点において、本実施例がより適していると言える。 Also, when σ is small, it may be necessary to obtain the correlation for each character from the viewpoint of application, but when σ is large, even if the correlation for a specific character is required, it is large for other characters. It is necessary to consider σ, and it can be said that the present embodiment is more suitable in this respect.

図4における関連技術と本実施例の計算例を図5に示し、計算量の削減について更に説明する。図5は、計算量の削減を説明するための図である。 The related technique in FIG. 4 and the calculation example of this embodiment are shown in FIG. 5, and the reduction of the calculation amount will be further described. FIG. 5 is a diagram for explaining the reduction of the calculation amount.

図5では、文章sは文字列“abca”であり、文書tは文字列“abcb”である場合の2文書s,t間の相関c(s,t)を求めるまでの計算例を示す。左にベクトルの例を示し、右にベクトルの離散フーリエ変換の例を示す。 FIG. 5 shows an example of calculation until the correlation c(s,t) between the two documents s and t in the case where the sentence s is the character string “abca” and the document t is the character string “abcb”. An example of the vector is shown on the left, and an example of the discrete Fourier transform of the vector is shown on the right.

文書s,tに存在する語の種別毎にベクトルへと変換する。文書s,tには3つの文字a、bおよびcが存在する。まず、文書s,tのそれぞれにおいて、文字a、b、cごとに、一致する箇所に1を示し、一致しない箇所を0で示したベクトルに変換する。文書sはベクトル
ua=(1,0,0,1)、
ub=(0,1,0,0)、
uc=(0,0,1,0)
に変換され、文書tはベクトル
va=(0,0,0,1)、
vb=(1,0,1,0)、
vc=(0,1,0,0)
に変換される。
Convert to a vector for each word type existing in documents s and t. There are three letters a, b and c in documents s and t. First, in each of the documents s and t, for each of the characters a, b, and c, 1 is indicated in the matching portion, and the non-matching portion is converted into a vector indicated by 0. Document s is a vector
u a =(1,0,0,1),
u b =(0,1,0,0),
u c =(0,0,1,0)
And the document t is a vector
v a =(0,0,0,1),
v b =(1,0,1,0),
v c =(0,1,0,0)
Is converted to.

文書sに関して、ベクトルua、ub、ucのそれぞれを離散フーリエ変換し、 Discrete Fourier transform each of the vectors u a, u b, and u c with respect to the document s,

Figure 0006740877
同様に、文書tに関して、ベクトルva、vb、vcのそれぞれを離散フーリエ変換し、
Figure 0006740877
Similarly, for document t, perform a discrete Fourier transform of each of the vectors v a, v b, v c ,

Figure 0006740877
を得る。即ち、離散フーリエ変換が6(2×σ)回行われる。
Figure 0006740877
To get That is, the discrete Fourier transform is performed 6 (2×σ) times.

次に、UxとVxの要素ごとの積Rx(x=a,b,c)を求める。従って、 Next, the product R x (x=a, b, c) of each element of U x and V x is obtained. Therefore,

Figure 0006740877
を得る。
Figure 0006740877
To get

関連技術では、各Ra、Rb、Rcについて、逆離散フーリエ変換を行うことで、
ra=(0,0,0,1)、
rb=(1,0,1,0)、
rc=(0,1,0,0)
を得る。関連技術では、逆離散フーリエ変換が3(σ)回行われる。その後、要素ごとの和を求めて、2つの文書sと文書tの相関値
(0,1,0,3,0,0,1)
を得る。
In the related art, by performing an inverse discrete Fourier transform on each R a , R b , and R c ,
r a =(0,0,0,1),
r b =(1,0,1,0),
r c =(0,1,0,0)
To get In the related art, the inverse discrete Fourier transform is performed 3(σ) times. After that, the sum for each element is calculated and the correlation value between the two documents s and t
(0, 1, 0, 3, 0, 0, 1)
To get

一方、本実施例では、UxとVxの要素ごとの積Rx(x=a,b,c)を求めた後、要素ごとの逆離散フーリエ変換を行わずに、要素ごとの和を求める。求めた On the other hand, in the present embodiment, after obtaining the product R x (x=a, b, c) of U x and V x for each element, the sum of each element is calculated without performing the inverse discrete Fourier transform for each element. Ask. Sought

Figure 0006740877
に対して、逆離散フーリエ変換を行なえば、関連技術と同様に、相関値
(0,1,0,3,0,0,1)
を得る。即ち、1回の逆離散フーリエ変換で、2つの文書sと文書tの相関を得ることができる。この例では、σは3であるため、逆離散フーリエ変換に係る処理時間は1/3になる。全体の処理として、関連技術ではFFTの回数が9σ(=6σ+3σ)、即ち、27回行われたのに対して、本実施例ではFFTの回数が7σ(=6σ+σ)、即ち、21回に削減される。σ=3の場合で説明したが、σが大きい程、本実施例の効果は大きい。
Figure 0006740877
On the other hand, if the inverse discrete Fourier transform is performed, the correlation value is
(0, 1, 0, 3, 0, 0, 1)
To get That is, the correlation between two documents s and t can be obtained by one inverse discrete Fourier transform. In this example, since σ is 3, the processing time associated with the inverse discrete Fourier transform is 1/3. As a whole process, in the related art, the number of FFTs is 9σ (=6σ+3σ), that is, 27 times, whereas in the present embodiment, the number of FFTs is 7σ (=6σ+σ), that is, It will be reduced to 21 times. Although the case of σ=3 has been described, the larger σ, the greater the effect of this embodiment.

次に、上述した処理を行う類似度算出装置100(図6)のハードウェア構成について説明する。図6は、類似度算出装置のハードウェア構成を示す図である。図6において、類似度算出装置100は、コンピュータによって制御される情報処理装置であって、CPU(Central Processing Unit)11と、主記憶装置12と、補助記憶装置13と、入力装置14と、表示装置15と、通信I/F(インターフェース)17と、ドライブ装置18とを有し、バスBに接続される。 Next, the hardware configuration of the similarity calculation device 100 (FIG. 6) that performs the above-described processing will be described. FIG. 6 is a diagram showing a hardware configuration of the similarity calculation device. 6, the similarity calculation device 100 is an information processing device controlled by a computer, and includes a CPU (Central Processing Unit) 11, a main storage device 12, an auxiliary storage device 13, an input device 14, and a display. It has a device 15, a communication I/F (interface) 17, and a drive device 18, and is connected to the bus B.

CPU11は、主記憶装置12に格納されたプログラムに従って類似度算出装置100を制御するプロセッサに相当する。主記憶装置12には、RAM(Random Access Memory)、ROM(Read Only Memory)等が用いられ、CPU11にて実行されるプログラム、CPU11での処理に必要なデータ、CPU11での処理にて得られたデータ等を記憶又は一時保存する。 The CPU 11 corresponds to a processor that controls the similarity calculation device 100 according to a program stored in the main storage device 12. A RAM (Random Access Memory), a ROM (Read Only Memory), or the like is used for the main storage device 12, and a program executed by the CPU 11, data required for processing by the CPU 11, and data obtained by the processing by the CPU 11 are obtained. Stored or temporarily saved the data etc.

補助記憶装置13には、HDD(Hard Disk Drive)等が用いられ、各種処理を実行するためのプログラム等のデータを格納する。補助記憶装置13に格納されているプログラムの一部が主記憶装置12にロードされ、CPU11に実行されることによって、各種処理が実現される。 An HDD (Hard Disk Drive) or the like is used as the auxiliary storage device 13, and stores data such as programs for executing various processes. Various processes are realized by loading a part of the program stored in the auxiliary storage device 13 into the main storage device 12 and executing it in the CPU 11.

入力装置14は、マウス、キーボード等を有し、ユーザが類似度算出装置100による処理に必要な各種情報を入力するために用いられる。表示装置15は、CPU11の制御のもとに必要な各種情報を表示する。入力装置14と表示装置15とは、一体化したタッチパネル等によるユーザインタフェースであってもよい。通信I/F17は、有線又は無線などのネットワークを通じて通信を行う。通信I/F17による通信は無線又は有線に限定されるものではない。
類似度算出装置100によって行われる処理を実現するプログラムは、例えば、CD−ROM(Compact Disc Read-Only Memory)等の記憶媒体19によって類似度算出装置100に提供される。
The input device 14 has a mouse, a keyboard, and the like, and is used by the user to input various information necessary for the processing by the similarity calculation device 100. The display device 15 displays various information required under the control of the CPU 11. The input device 14 and the display device 15 may be a user interface such as an integrated touch panel. The communication I/F 17 communicates via a wired or wireless network. The communication by the communication I/F 17 is not limited to wireless or wired.
A program that implements the processing performed by the similarity calculation device 100 is provided to the similarity calculation device 100 by a storage medium 19 such as a CD-ROM (Compact Disc Read-Only Memory).

ドライブ装置18は、ドライブ装置18にセットされた記憶媒体19(例えば、CD−ROM等)と類似度算出装置100とのインターフェースを行う。 The drive device 18 interfaces the storage medium 19 (for example, a CD-ROM or the like) set in the drive device 18 and the similarity calculation device 100.

また、記憶媒体19に、後述される本実施の形態に係る種々の処理を実現するプログラムを格納し、この記憶媒体19に格納されたプログラムは、ドライブ装置18を介して類似度算出装置100にインストールされる。インストールされたプログラムは、類似度算出装置100により実行可能となる。 Further, the storage medium 19 stores a program that implements various processes according to the present embodiment described later, and the program stored in the storage medium 19 is stored in the similarity calculation device 100 via the drive device 18. Installed. The installed program can be executed by the similarity calculation device 100.

尚、プログラムを格納する記憶媒体19はCD−ROMに限定されず、コンピュータが読み取り可能な、データとしての構造(structure)を有する1つ以上の非一時的(non-transitory)な、有形(tangible)な媒体であればよい。コンピュータ読取可能な記憶媒体として、CD−ROMの他に、DVD(Digital Versatile Disk)ディスク、USBメモリ等の可搬型記録媒体、フラッシュメモリ等の半導体メモリであっても良い。 The storage medium 19 for storing the program is not limited to the CD-ROM, and is one or more non-transitory, tangible (tangible) tangible computer-readable structures having a data structure. ) Any medium. The computer-readable storage medium may be a DVD (Digital Versatile Disk) disk, a portable recording medium such as a USB memory, or a semiconductor memory such as a flash memory, in addition to the CD-ROM.

類似度算出装置100は、ラップトップ、タブレット端末等であってもよい。その場合、記憶媒体19は、SD(Secure Digital)メモリカード等であり、ドライブ装置18は、ドライブ装置18にセットされた記憶媒体19と類似度算出装置100とのインターフェースを行う。 The similarity calculation device 100 may be a laptop, a tablet terminal, or the like. In this case, the storage medium 19 is an SD (Secure Digital) memory card or the like, and the drive device 18 interfaces the storage medium 19 set in the drive device 18 and the similarity calculation device 100.

図7は、類似度算出装置の機能構成例を示す図である。図7において、類似度算出装置100は、ベクトル変換部61と、離散フーリエ変換部62と、要素乗算部63と、要素加算部64と、逆離散フーリエ変換部65とを有する。記憶部130は、文書データ70、ベクトルデータ71、変換後ベクトルデータ72、積ベクトルデータ73、合算ベクトル74、相関結果79等を記憶する。 FIG. 7 is a diagram illustrating a functional configuration example of the similarity calculation device. In FIG. 7, the similarity calculation device 100 includes a vector conversion unit 61, a discrete Fourier transform unit 62, an element multiplication unit 63, an element addition unit 64, and an inverse discrete Fourier transform unit 65. The storage unit 130 stores the document data 70, the vector data 71, the converted vector data 72, the product vector data 73, the sum vector 74, the correlation result 79, and the like.

ベクトル変換部61は、記憶部130に記憶されている文書データ70の文書s、t等をそれぞれベクトルに変換する。ベクトルへの変換方法は、上述したように、文字の種別ごとに一致を1、不一致を0で表わせばよい。ベクトル変換部61によって得られたベクトルu、v等を含むベクトルデータ71が記憶部130に記憶される。 The vector conversion unit 61 converts each of the documents s, t, etc. of the document data 70 stored in the storage unit 130 into a vector. As described above, the conversion method into a vector may be represented by 1 for each character type and 0 for disagreement for each character type. Vector data 71 including the vectors u, v, etc. obtained by the vector conversion unit 61 is stored in the storage unit 130.

離散フーリエ変換部62は、記憶部130に記憶されたベクトルデータ71のベクトルu、v等をそれぞれに対して離散フーリエ変換を実行する。離散フーリエ変換は、(文書数)×(文字又は文字列の種類の数σ)の回数分実行される。離散フーリエ変換後のベクトルU、V等を含む変換後ベクトルデータ72が記憶部130に記憶される。 The discrete Fourier transform unit 62 performs a discrete Fourier transform on each of the vectors u, v, etc. of the vector data 71 stored in the storage unit 130. The discrete Fourier transform is executed for the number of times (the number of documents)×(the number of types of characters or character strings σ). The transformed vector data 72 including the vectors U and V after the discrete Fourier transform is stored in the storage unit 130.

要素乗算部63は、変換後ベクトルデータ72内の全てのベクトルを対象に、要素ごとの積(アダマール積)を求める。全ての文字の種類のそれぞれに対して得られたベクトルRを含む積ベクトルデータ73が記憶部130に記憶される。 The element multiplication unit 63 obtains a product (Hadamard product) for each element for all the vectors in the converted vector data 72. The product vector data 73 including the vector R obtained for each of all character types is stored in the storage unit 130.

要素加算部64は、積ベクトルデータ73の文字又は文字列の種類毎のベクトルRに対して、要素ごとの和を求めることで、合算ベクトル74を得る。得られた合算ベクトル74は、記憶部130に記憶される。 The element addition unit 64 obtains the sum vector 74 by obtaining the sum for each element of the vector R for each type of character or character string of the product vector data 73. The obtained sum vector 74 is stored in the storage unit 130.

逆離散フーリエ変換部65は、合算ベクトル74に対して、逆離散フーリエ変換を行って、文書s、t等に関する相関値を示す相関結果79を取得する。相関結果79は記憶部130に記憶される。また、相関結果79を表示装置15に表示するようにしてもよい。 The inverse discrete Fourier transform unit 65 performs an inverse discrete Fourier transform on the sum vector 74 to obtain a correlation result 79 indicating a correlation value regarding the documents s, t and the like. The correlation result 79 is stored in the storage unit 130. Further, the correlation result 79 may be displayed on the display device 15.

文書データ70は、文書s、t等の2以上の文書を含み、ユーザによって与えられる。ユーザは、予め相関を検証する対象文書として複数の文書を用意し、特定文書(例えば、オリジナル文書)を入力とし類似度算出装置100に与えてもよい。 The document data 70 includes two or more documents such as documents s and t, and is given by the user. The user may prepare a plurality of documents as target documents for verifying the correlation in advance, and input the specific document (for example, the original document) to the similarity calculation apparatus 100.

ベクトルデータ71は、文書データ70の各文書s、t等ごとにベクトル変換した結果を示す。例えば、文書sがベクトルuに相当し、文書tがベクトルvに相当する。他の文書に対しても同様に変換されたベクトルが示される。本実施例において、「文書」は種々のデータファイルに相当する。 The vector data 71 shows the result of vector conversion for each document s, t, etc. of the document data 70. For example, the document s corresponds to the vector u, and the document t corresponds to the vector v. Similar converted vectors are shown for other documents. In the present embodiment, the "document" corresponds to various data files.

変換後ベクトルデータ72は、文書s、t等のそれぞれに対してベクトルu、v等を含み、各ベクトルu、v等は、文字の種類ごとに存在する。変換後ベクトルデータ72は、(文書数)×(文字の種類の数σ)の数のベクトルを含む。 The converted vector data 72 includes vectors u, v, etc. for the documents s, t, etc., and each vector u, v, etc. exists for each type of character. The converted vector data 72 includes a number of vectors of (the number of documents)×(the number of character types σ).

積ベクトルデータ73は、文字又は文字列の種類ごとに、要素ごとの積を示すベクトルRを示す。積ベクトルデータ73は、文字又は文字列の種類の数のベクトルRを含む。特定文書に対して複数の対象文書で相関を算出する1対N相関の場合には、各対象文書ごとに、文字の種類の数のベクトルRが生成される。 The product vector data 73 indicates a vector R indicating a product for each element for each type of character or character string. The product vector data 73 includes a vector R of the number of types of characters or character strings. In the case of 1:N correlation in which a plurality of target documents are used to calculate the correlation with respect to a specific document, a vector R of the number of character types is generated for each target document.

合算ベクトル74は、文字の種類ごとのベクトルRに対して要素ごとの和を示す。2文書s、t間の相関に対しては、1の合算ベクトル74が生成される。本実施例において、逆離散フーリエ変換が行われるのはこの合算ベクトル74のみである。1対N相関の場合には、N個の合算ベクトル74が生成されるため、逆離散フーリエ変換はN回行われるが、畳み込み演算を行う関連技術と比べた場合、1/(文字又は文字列の種類の数)回に削減可能である。 The summation vector 74 indicates a sum for each element with respect to the vector R for each character type. For the correlation between the two documents s and t, a sum vector 74 of 1 is generated. In this embodiment, it is only this sum vector 74 that the inverse discrete Fourier transform is performed. In the case of 1-to-N correlation, since N summed vectors 74 are generated, the inverse discrete Fourier transform is performed N times, but when compared with the related technique that performs the convolution operation, 1/(character or character string It can be reduced to the number of types) times.

相関結果79は、合算ベクトル74に対して逆フーリエ変換を行うことにより得られた文書間の相関を示す。2文書s、t間の相関に対しては、1つの相関値が示される。1対N相関では、各対象文書との相関値が出力されるため、相関結果79によって、N個の相関値が示される。 The correlation result 79 shows the correlation between documents obtained by performing the inverse Fourier transform on the sum vector 74. One correlation value is shown for the correlation between two documents s and t. In the 1-to-N correlation, since the correlation value with each target document is output, the correlation result 79 shows N correlation values.

本実施例では、文書の文字列からベクトルへの変換を任意の関数としても、処理時間の削減が可能である。一例として、出力される相関の各要素は文字の一致の数ではなく、ベクトルの内積の和で示しても良い。文書を空白等による分ち書き、句読点等による分割等により抽出した処理単位を要素とする配列を作成し、要素の特徴を表わすベクトルの内積の和をとる。ベクトルの内積の和は、文字の類似度を表わすベクトルへの変換(例えば、文書データから学習した語の分散表現)により、重み付きの相関とみなすことができる。 In this embodiment, the processing time can be reduced even if the conversion from the character string of the document to the vector is performed by using an arbitrary function. As an example, each element of the output correlation may be represented by the sum of inner products of vectors instead of the number of matching characters. The document is divided into spaces and divided into punctuation marks to create an array whose elements are processing units, and the sum of the inner products of the vectors representing the characteristics of the elements is calculated. The sum of vector inner products can be regarded as a weighted correlation by conversion into a vector representing the similarity of characters (for example, a distributed expression of words learned from document data).

次に、2文書s,t間の相関を求める第1の類似算出処理について説明する。図8は、2文書間の相関を求める第1の類似算出処理を説明するためのフローチャートである。 Next, the first similarity calculation process for obtaining the correlation between two documents s and t will be described. FIG. 8 is a flowchart for explaining the first similarity calculation process for obtaining the correlation between two documents.

図8において、ベクトル変換部61は、文書データ70から文書sと文書tとを読み込み(ステップS301)、各文書s,tを文字の種類ごとにベクトルに変換する(ステップS302)。文書sはベクトルuに変換され、文書tはベクトルvに変換される。ベクトルuとベクトルvとを含むベクトルデータ71が、記憶部130に記憶される。 In FIG. 8, the vector conversion unit 61 reads the documents s and t from the document data 70 (step S301), and converts each document s, t into a vector for each character type (step S302). Document s is converted to vector u and document t is converted to vector v. Vector data 71 including the vector u and the vector v is stored in the storage unit 130.

離散フーリエ変換部62は、ベクトルuに対して離散フーリエ変換を行ってベクトルUを生成し、ベクトルvに対して離散フーリエ変換を行ってベクトルVを生成する(ステップS303)。ベクトルUとベクトルVとを含む変換後ベクトルデータ72が、記憶部130に記憶される。 The discrete Fourier transform unit 62 performs a discrete Fourier transform on the vector u to generate a vector U, and performs a discrete Fourier transform on the vector v to generate a vector V (step S303). The converted vector data 72 including the vector U and the vector V is stored in the storage unit 130.

要素乗算部63は、文字又は文字列の種類ごとに、ベクトルの各要素の積を算出し(アダマール積を求め)、文字の種類ごとのベクトルRを取得する(ステップS304)。ベクトルRは、文字の種類の数だけ生成される。文字の種類の数のベクトルRを含む積ベクトルデータ73が、記憶部130に記憶される。 The element multiplication unit 63 calculates the product of each element of the vector for each type of character or character string (calculates Hadamard product), and acquires the vector R for each type of character (step S304). The vector R is generated by the number of character types. The product vector data 73 including the vector R of the number of character types is stored in the storage unit 130.

要素加算部64は、文字又は文字列の種類ごとのベクトルRの要素を加算して、合算ベクトル74を取得する(ステップS305)。合算ベクトル74が、記憶部130に記憶される。 The element addition unit 64 adds the elements of the vector R for each type of character or character string to obtain the summed vector 74 (step S305). The added vector 74 is stored in the storage unit 130.

逆離散フーリエ変換部65は、合算ベクトル74に対して逆離散フーリエ変換を行って、相関結果79を得る(ステップS306)。相関結果79が、記憶部130に記憶される。また、相関結果79が表示装置15に表示されるようにしてもよい。 The inverse discrete Fourier transform unit 65 performs an inverse discrete Fourier transform on the sum vector 74 to obtain a correlation result 79 (step S306). The correlation result 79 is stored in the storage unit 130. Further, the correlation result 79 may be displayed on the display device 15.

図9は、図8のフローチャートでの処理例を示す図である。図9では、図8のステップ番号と対応付けている。ベクトル変換部61が文書s,tを読み込んだ後のステップS302から説明する。 FIG. 9 is a diagram showing a processing example in the flowchart of FIG. In FIG. 9, it is associated with the step numbers of FIG. The step S302 after the vector conversion unit 61 reads the documents s and t will be described.

図9において、文書s,tのいずれかに含まれる文字の種類は複数存在し、文字の種類をa、b、・・・zで表す。英数字、日本語(ひらがな、カタカナ、及び漢字)、その他の言語の各文字が、文字の種類に相当する。 In FIG. 9, there are a plurality of character types included in any of the documents s and t, and the character types are represented by a, b,... Z. Alphanumeric characters, Japanese (Hiragana, Katakana, and Kanji) and other characters in other languages correspond to the character types.

また、語、フレーズ等を文字とみなすことで本実施例を適用可能である。この場合、各文書s,tにおいて文字とみなす処理単位からベクトルへの変換の前に、空白等による分ち書き、句読点等による分割等により処理単位を抽出することで、処理単位を要素とする配列を作成すればよい。また、処理単位は、品詞ごとであっても良いし、文字又はフレーズごとであってもよい。処理単位は、文書内の文字又は文字列の種類である。処理単位で表される配列それぞれを文書s,tとすることで、以下のように処理される。 Further, this embodiment can be applied by regarding words, phrases, etc. as characters. In this case, before converting the processing unit regarded as a character in each document s, t into a vector, the processing unit is extracted by dividing the processing unit by a space, dividing by a punctuation mark, etc. Just create an array. The processing unit may be each part of speech, or each character or phrase. The processing unit is the type of character or character string in the document. By processing the arrays represented by the processing units as documents s and t, the processing is performed as follows.

ベクトル変換部61は、文書sに対して、文字の種類a、b、・・・zの各々に関してベクトル変換し、ベクトルua、ub、・・・uzを得る(ステップS302s)。また、ベクトル変換部61は、文書tに対して、文字の種類a、b、・・・zの各々に関してベクトル変換し、ベクトルva、vb、・・・vzを得る(ステップS302t)。 The vector conversion unit 61 performs vector conversion on the document s for each of the character types a, b,... Z to obtain vectors u a , u b ,... U z (step S302s). Further, the vector conversion unit 61 performs vector conversion on the document t for each of the character types a, b,... Z to obtain vectors v a , v b ,... V z (step S302t). ..

離散フーリエ変換部62は、文書sから生成したベクトルua、ub、・・・uzの各々について、離散フーリエ変換を行ってベクトルUa、Ub、・・・Uzを得る(ステップS303ua、S303ub、・・・、及びS303uz)。また、離散フーリエ変換部62は、文書tから生成したベクトルva、vb、・・・vzの各々について、離散フーリエ変換を行ってベクトルVa、Vb、・・・Vzを得る(ステップS303va、S303vb、・・・、及びS303vz)。 Discrete Fourier transform unit 62, the vector u a, u b generated from the document s, for each of the · · · u z, vector U a performing discrete Fourier transform, U b, obtaining · · · U z (step S303ua, S303ub,..., And S303uz). Further, the discrete Fourier transform unit 62, the vector v a generated from the document t, v b, for each of the · · · v z, to obtain a vector V a, V b, ··· V z by performing a discrete Fourier transform (Steps S303va, S303vb,..., And S303vz).

要素乗算部63は、文書s,t間で、文字の種類ごとに、ベクトルの各要素の積を算出し、文字の種別ごとのベクトルRa、Rb、・・・Rzを取得する(ステップS304a、S305b、・・・S304z)。 The element multiplication unit 63 calculates the product of each element of the vector between the documents s and t for each character type, and obtains the vectors R a , R b ,... R z for each character type ( Steps S304a, S305b,..., S304z).

要素加算部64は、更に、ベクトルRa、Rb、・・・Rzにおいて同一ずれ位置の要素の値を加算して、1つの合算ベクトル74を得る(ステップS305)。その後、逆離散フーリエ変換部65は、合算ベクトル74に対して逆離散フーリエ変換を行い、相関r(s,t)を示す相関結果を得る(ステップS306)。 The element adding unit 64 further adds the values of the elements at the same displacement positions in the vectors Ra , Rb ,..., Rz to obtain one sum vector 74 (step S305). Then, the inverse discrete Fourier transform unit 65 performs an inverse discrete Fourier transform on the sum vector 74 to obtain the correlation result indicating the correlation r(s,t) (step S306).

次に、1対N相関を求める第2の類似算出処理について説明する。図10は、1対N相関を求める第2の類似算出処理を説明するためのフローチャートである。図10では、特定文書sと各対象文書t1〜tnとの相関を求める。 Next, the second similarity calculation process for obtaining the 1-to-N correlation will be described. FIG. 10 is a flowchart for explaining the second similarity calculation process for obtaining the 1:N correlation. In FIG. 10, the correlation between the specific document s and each target document t 1 to t n is calculated.

図10において、ベクトル変換部61は、文書データ70から特定文書sとn個の対象文書t1〜tnとを読み込んで(ステップS401)、各文書s及びt1〜tnを文字の種類ごとにベクトルに変換する(ステップS402)。特定文書sはベクトルuに変換され、対象文書t1〜tnはそれぞれベクトルv1〜vnに変換される。ベクトルuとベクトルv1〜vnとを含むベクトルデータ71が、記憶部130に記憶される。 10, the vector conversion unit 61 reads the specific document s and n pieces of target document t 1 ~t n from the document data 70 (step S401), the type of each document s and t 1 ~t n characters It is converted into a vector for each (step S402). The specific document s is converted into a vector u, and the target documents t 1 to t n are converted into vectors v 1 to v n , respectively. Vector data 71 including the vector u and the vectors v 1 to v n is stored in the storage unit 130.

離散フーリエ変換部62は、ベクトルuに対して離散フーリエ変換を行ってベクトルUを生成し、ベクトルv1〜vnのそれぞれに対して離散フーリエ変換を行ってベクトルV1〜Vnを生成する(ステップS303)。ベクトルUとベクトルV1〜Vnとを含む変換後ベクトルデータ72が、記憶部130に記憶される。 Discrete Fourier transform unit 62 generates a vector U by performing a discrete Fourier transform to the vector u, and generates a vector V 1 ~V n by performing a discrete Fourier transform on each vector v 1 to v n (Step S303). The converted vector data 72 including the vector U and the vectors V 1 to V n is stored in the storage unit 130.

要素乗算部63は、対象文書t1〜tnに係るベクトルV1〜Vnの中から1つ選択し(ステップS404−1)、特定文書sに係るベクトルUと選択したベクトルViとにおいて、文字の種類ごとに、ベクトルの各要素の積を算出し(アダマール積を求め)、文字の種類ごとのベクトルRiを取得する(ステップS404−2)。ベクトルRiは、文字の種類の数だけ生成される。文字の種類の数のベクトルRiを含む積ベクトルデータ73が、記憶部130に記憶される。 The element multiplication unit 63 selects one from the vectors V 1 to V n related to the target documents t 1 to t n (step S404-1), and selects the vector U related to the specific document s and the selected vector V i . , The product of each element of the vector is calculated for each character type (hadamard product is calculated), and the vector R i for each character type is acquired (step S404-2). The vectors R i are generated by the number of character types. The product vector data 73 including the vector R i of the number of character types is stored in the storage unit 130.

要素加算部64は、文字の種類ごとのベクトルRiの要素を加算して、合算ベクトル74iを取得する(ステップS405)。合算ベクトル74iが、記憶部130に記憶される。逆離散フーリエ変換部65は、合算ベクトル74iに対して逆離散フーリエ変換を行って、記憶部130の相関結果79に追加する(ステップS406)。 The element adding unit 64 adds the elements of the vector R i for each type of character to obtain a summed vector 74 i (step S405). The added vector 74 i is stored in the storage unit 130. The inverse discrete Fourier transform unit 65 performs an inverse discrete Fourier transform on the sum vector 74 i and adds it to the correlation result 79 of the storage unit 130 (step S406).

その後、第2の類似算出処理は、変換後ベクトルデータ72に未処理のベクトルViが存在するか否かを判断する(ステップS407)。存在する場合には、第2の類似算出処理は、ステップS401−1へと戻り、上述同様の処理を繰り返す。 Then, the second similarity calculation process determines whether or not the unprocessed vector V i exists in the converted vector data 72 (step S407). If it exists, the second similarity calculation process returns to step S401-1, and the same process as described above is repeated.

一方、存在しない場合、第2の類似算出処理は、終了する。記憶部130内の相関結果79には、特定文書sと各対象文書t1〜tnの相関値r1〜rnが記憶されている。未処理のベクトルViが存在しない場合、相関結果79を表示装置15に表示して、第2の類似算出処理を終了してもよい。 On the other hand, if there is not, the second similarity calculation process ends. The correlation result 79 in the storage unit 130, the correlation value r 1 ~r n particular document s and the target document t 1 ~t n are stored. When there is no unprocessed vector V i , the correlation result 79 may be displayed on the display device 15 and the second similarity calculation process may be ended.

ここで、文書80の実データのサイズについて、概ねの範囲を示す。 Here, the range of the actual data size of the document 80 is shown.

σについて、
・核酸塩基:4〜
・アルファベット:26
・2バイト文字:65536
・単一言語の語録数(語を文字として扱う):数千〜数万
nについて、
・学術論文(語の数):数千〜数万
・ゲノム配列:数十万〜数千万
・センサーデータ:数億以上
関連技術を用いた実行例では、数百編の学術論文間の相関の算出で数日かかる。また、1研究機関がリポジトリで公開する論文数は数万以上である。以下に、本実施例と関連技術との実験結果の比較を示す。
For σ,
・Nucleic acid base: 4 to
・Alphabet: 26
・Double-byte character: 65536
・Number of monolingual lexicons (words are treated as characters): Thousands to tens of thousands
For n,
・Academic papers (number of words): tens of thousands to tens of thousands ・Genome sequence: hundreds of thousands to tens of millions ・Sensor data: hundreds of millions or more Correlation between hundreds of academic papers in an example using related technology It takes several days to calculate. The number of papers published by one research institution in the repository is more than tens of thousands. The following is a comparison of experimental results between this example and related art.

図11は、語彙数に対する実行時間の比較結果を示す図である。図11中、横軸に語彙数を示し、縦軸に実行時間(msec)を示す。語彙数は、文字の種類に相当し、上述では、σで示されている。このグラフでは、文書長が1024語、2048語、及び4096語の場合の実行時間を示している。 FIG. 11 is a diagram showing a comparison result of the execution time with respect to the number of words. In FIG. 11, the horizontal axis represents the number of vocabularies, and the vertical axis represents the execution time (msec). The vocabulary number corresponds to the type of character, and is indicated by σ in the above. This graph shows the execution time when the document length is 1024 words, 2048 words, and 4096 words.

図11より、本実施例及び関連技術とも、語彙数が増える程、実行時間が長くなっている。しかしながら、いずれの場合においても、本実施例が関連技術より実行時間が短い。特に、文書長が4096語の場合、語彙数が800語を超えた時点において、本実施例の実行時間の方が、関連技術の実行時間より約20%短い。 From FIG. 11, in both the present embodiment and the related art, the longer the vocabulary number, the longer the execution time. However, in any case, the execution time of this embodiment is shorter than that of the related art. In particular, when the document length is 4096 words, the execution time of this embodiment is about 20% shorter than the execution time of the related art when the number of vocabularies exceeds 800 words.

図12は、文書長に対する実行時間の比較結果を示す図である。図12中、横軸に文書長を示し、縦軸に実行時間(msec)を示す。このグラフでは、対象となる語彙数が256語、512語、及び1024語の場合の実行時間を示している。 FIG. 12 is a diagram showing the comparison result of the execution time with respect to the document length. In FIG. 12, the horizontal axis represents the document length and the vertical axis represents the execution time (msec). This graph shows the execution time when the number of target vocabularies is 256 words, 512 words, and 1024 words.

図12より、本実施例及び関連技術とも、文書長が増える程、実行時間が長くなっている。しかしながら、いずれの場合においても、本実施例が関連技術より実行時間が短い。特に、語彙数が1024語の場合、文書長が3500語付近において、本実施例の実行時間の方が、関連技術の実行時間より約20%短い。 From FIG. 12, in both the present embodiment and the related art, the longer the document length, the longer the execution time. However, in any case, the execution time of this embodiment is shorter than that of the related art. Particularly, when the vocabulary number is 1024 words, the execution time of this embodiment is about 20% shorter than the execution time of the related art when the document length is around 3500 words.

図13は、文書中の語彙数と処理時間の比較結果を示す図である。図13中、横軸に文書長を示し、左縦軸に実行時間(msec)を示し、右縦軸に語彙数を示す。右縦軸の語彙数は、文書の長さに応じた語彙数の統計値を示す。 FIG. 13 is a diagram showing a comparison result between the number of words in a document and the processing time. In FIG. 13, the horizontal axis indicates the document length, the left vertical axis indicates the execution time (msec), and the right vertical axis indicates the vocabulary number. The vocabulary number on the right vertical axis indicates the statistical value of the vocabulary number according to the length of the document.

図13より、語彙数は、文書長に比例して増加することが分かる。また、本実施例は、文書長が2000語程度までは、関連技術との実行時間の差は余りない。文書長が4000語に近付くころには、即ち、σが大きくなるほど、実行時間の差は約20%に及び、本実施例により高速化が実現されていることが分かる。この約20%の高速化は、畳み込みに掛る計算量を抑えたことに起因する。 From FIG. 13, it can be seen that the vocabulary number increases in proportion to the document length. Further, in the present embodiment, when the document length is up to about 2000 words, there is little difference in execution time from the related art. As the document length approaches 4000 words, that is, as σ increases, the difference in execution time reaches about 20%, and it can be seen that the speedup is realized by this embodiment. The speedup of about 20% is due to the fact that the calculation amount required for convolution is suppressed.

上述の発明者による実験結果から、本実施例では、文字の種類の数および文字列の長さが増加した場合においても、計算量を抑えることが示されたといえる。 From the above experimental results by the inventor, it can be said that the present embodiment shows that the calculation amount is suppressed even when the number of character types and the length of the character string increase.

上述した実施例において、ベクトル変換部61、離散フーリエ変換部62および要素乗算部63が第1変換部に相当し、要素加算部64が加算部に相当し、および逆離散フーリエ変換部65が第2変換部に相当する。 In the above-described embodiment, the vector transforming unit 61, the discrete Fourier transforming unit 62 and the element multiplying unit 63 correspond to the first transforming unit, the element adding unit 64 corresponds to the adding unit, and the inverse discrete Fourier transforming unit 65 corresponds to the first transforming unit. It corresponds to two conversion units.

本発明は、具体的に開示された実施例に限定されるものではなく、特許請求の範囲から逸脱することなく、主々の変形や変更が可能である。 The present invention is not limited to the specifically disclosed embodiments, and various modifications and changes can be made without departing from the scope of the claims.

以上の実施例を含む実施形態に関し、更に以下の付記を開示する。
(付記1)
複数の文書データに含まれる文字または文字列ごとに該複数の文書データをベクトル化した複数のベクトルを生成し、
前記複数のベクトルのそれぞれについてフーリエ変換した結果の要素ごとの積を算出し、
前記文字または文字列それぞれに対し、前記積を前記要素ごとに加算した合算ベクトルを生成し、
前記合算ベクトルより、フーリエ逆変換を用いて、前記複数の文書データ間の相関値を生成する、
処理をコンピュータに行わせる類似度算出プログラム。
(付記2)
前記コンピュータに、
前記複数の文書を、品詞、文字、フレーズ、又は空白を区切りとした単語のいずれかで分割し、分割した単語ごとに、前記複数の文書データの各ずれ位置における該単語との一致または不一致を前記要素の値として前記複数のベクトルを生成させることを特徴とする付記1記載の類似度算出プログラム。
(付記3)
前記要素は、前記複数の文書データ間のずれ位置に相当することを特徴とする付記1又は2記載の類似度算出プログラム。
(付記4)
前記積は、アダマール積であることを特徴とする付記1乃至3のいずれか1項記載の類似度算出プログラム。
(付記5)
複数の文書データに含まれる文字または文字列ごとに該複数の文書データをベクトル化した複数のベクトルを生成し、
前記複数のベクトルのそれぞれについてフーリエ変換した結果の要素ごとの積を算出し、
前記文字または文字列それぞれに対し、前記積を前記要素ごとに加算した合算ベクトルを生成し、
前記合算ベクトルより、フーリエ逆変換を用いて、前記複数の文書データ間の相関値を生成する、
処理をコンピュータが行う類似度算出方法。
(付記6)
複数の文書データに含まれる文字または文字列ごとに該複数の文書データをベクトル化した複数のベクトルを生成するベクトル変換部と、
前記複数のベクトルのそれぞれについてフーリエ変換した結果の要素ごとの積を算出する第1変換部と、
前記文字または文字列それぞれに対し、前記積を前記要素ごとに加算した合算ベクトルを生成する加算部と、
前記合算ベクトルより、フーリエ逆変換を用いて、前記複数の文書データ間の相関値を生成する第2変換部と、
を有する類似度算出装置。
The following supplementary notes will be further disclosed regarding the embodiments including the above-described examples.
(Appendix 1)
Generating a plurality of vectors obtained by vectorizing the plurality of document data for each character or character string included in the plurality of document data,
Calculating a product for each element of the result of Fourier transform for each of the plurality of vectors,
For each of the character or character string, generate a sum vector in which the product is added for each element,
From the sum vector, using the inverse Fourier transform, to generate a correlation value between the plurality of document data,
A similarity calculation program that causes a computer to perform processing.
(Appendix 2)
On the computer,
The plurality of documents are divided into any of words that are separated by a part of speech, a character, a phrase, or a space, and for each divided word, a match or a mismatch with the word at each shift position of the plurality of document data is determined. The similarity calculation program according to note 1, wherein the plurality of vectors are generated as the values of the elements.
(Appendix 3)
The similarity calculation program according to appendix 1 or 2, wherein the element corresponds to a shift position between the plurality of document data.
(Appendix 4)
The similarity calculation program according to any one of appendices 1 to 3, wherein the product is a Hadamard product.
(Appendix 5)
Generating a plurality of vectors obtained by vectorizing the plurality of document data for each character or character string included in the plurality of document data,
Calculating a product for each element of the result of Fourier transform for each of the plurality of vectors,
For each of the character or character string, generate a sum vector in which the product is added for each element,
From the sum vector, using the inverse Fourier transform, to generate a correlation value between the plurality of document data,
A similarity calculation method in which processing is performed by a computer.
(Appendix 6)
A vector conversion unit that generates a plurality of vectors by vectorizing the plurality of document data for each character or character string included in the plurality of document data;
A first conversion unit that calculates a product for each element of the result of Fourier transform for each of the plurality of vectors;
An addition unit that generates a summation vector in which the product is added for each of the elements for each of the character or the character string;
A second conversion unit that generates a correlation value between the plurality of pieces of document data from the combined vector by using a Fourier inverse transform;
A similarity calculation device having.

61 ベクトル変換部
62 離散フーリエ変換部
63 要素乗算部
64 要素加算部
65 逆離散フーリエ変換部
70 文書データ
71 ベクトルデータ
72 変換後ベクトルデータ
73 積ベクトルデータ
74 合算ベクトル
79 相関結果
61 vector conversion unit 62 discrete Fourier transform unit 63 element multiplication unit 64 element addition unit 65 inverse discrete Fourier transform unit 70 document data 71 vector data 72 post-transformation vector data 73 product vector data 74 summation vector 79 correlation result

Claims (5)

複数の文書データに含まれる文字または文字列ごとに該複数の文書データをベクトル化した複数のベクトルを生成し、
前記複数のベクトルのそれぞれについてフーリエ変換した結果の要素ごとの積を算出し、
前記文字または文字列それぞれに対し、前記積を前記要素ごとに加算した合算ベクトルを生成し、
前記合算ベクトルより、フーリエ逆変換を用いて、前記複数の文書データ間の相関値を生成する、
処理をコンピュータに行わせる類似度算出プログラム。
Generating a plurality of vectors obtained by vectorizing the plurality of document data for each character or character string included in the plurality of document data,
Calculating a product for each element of the result of Fourier transform for each of the plurality of vectors,
For each of the character or character string, generate a sum vector in which the product is added for each element,
From the sum vector, using the inverse Fourier transform, to generate a correlation value between the plurality of document data,
A similarity calculation program that causes a computer to perform processing.
前記コンピュータに、
前記複数の文書を、品詞、文字、フレーズ、又は空白を区切りとした単語のいずれかで分割し、分割した単語ごとに、前記複数の文書データの各ずれ位置における該単語との一致または不一致を前記要素の値として前記複数のベクトルを生成させることを特徴とする請求項1記載の類似度算出プログラム。
On the computer,
The plurality of documents are divided into any of words that are separated by a part of speech, a character, a phrase, or a space, and for each divided word, a match or a mismatch with the word at each shift position of the plurality of document data is determined. The similarity calculation program according to claim 1, wherein the plurality of vectors are generated as the values of the elements.
前記要素は、前記複数の文書データ間のずれ位置に相当することを特徴とする請求項1又は2記載の類似度算出プログラム。 The similarity calculation program according to claim 1, wherein the element corresponds to a shift position between the plurality of document data. 複数の文書データに含まれる文字または文字列ごとに該複数の文書データをベクトル化した複数のベクトルを生成し、
前記複数のベクトルのそれぞれについてフーリエ変換した結果の要素ごとの積を算出し、
前記文字または文字列それぞれに対し、前記積を前記要素ごとに加算した合算ベクトルを生成し、
前記合算ベクトルより、フーリエ逆変換を用いて、前記複数の文書データ間の相関値を生成する、
処理をコンピュータが行う類似度算出方法。
Generating a plurality of vectors obtained by vectorizing the plurality of document data for each character or character string included in the plurality of document data,
Calculating a product for each element of the result of Fourier transform for each of the plurality of vectors,
For each of the character or character string, generate a sum vector in which the product is added for each element,
From the sum vector, using the inverse Fourier transform, to generate a correlation value between the plurality of document data,
A similarity calculation method in which processing is performed by a computer.
複数の文書データに含まれる文字または文字列ごとに該複数の文書データをベクトル化した複数のベクトルを生成するベクトル変換部と、
前記複数のベクトルのそれぞれについてフーリエ変換した結果の要素ごとの積を算出する第1変換部と、
前記文字または文字列それぞれに対し、前記積を前記要素ごとに加算した合算ベクトルを生成する加算部と、
前記合算ベクトルより、フーリエ逆変換を用いて、前記複数の文書データ間の相関値を生成する第2変換部と、
を有する類似度算出装置。
A vector conversion unit that generates a plurality of vectors by vectorizing the plurality of document data for each character or character string included in the plurality of document data;
A first conversion unit that calculates a product for each element of the result of Fourier transform for each of the plurality of vectors;
An addition unit that generates a summation vector in which the product is added for each of the elements for each of the character or the character string;
A second conversion unit that generates a correlation value between the plurality of pieces of document data from the combined vector by using a Fourier inverse transform;
A similarity calculation device having.
JP2016229208A 2016-11-25 2016-11-25 Similarity calculation program, similarity calculation method, and similarity calculation device Active JP6740877B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016229208A JP6740877B2 (en) 2016-11-25 2016-11-25 Similarity calculation program, similarity calculation method, and similarity calculation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016229208A JP6740877B2 (en) 2016-11-25 2016-11-25 Similarity calculation program, similarity calculation method, and similarity calculation device

Publications (2)

Publication Number Publication Date
JP2018085051A JP2018085051A (en) 2018-05-31
JP6740877B2 true JP6740877B2 (en) 2020-08-19

Family

ID=62238488

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016229208A Active JP6740877B2 (en) 2016-11-25 2016-11-25 Similarity calculation program, similarity calculation method, and similarity calculation device

Country Status (1)

Country Link
JP (1) JP6740877B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7110745B2 (en) * 2018-06-15 2022-08-02 富士通株式会社 Evaluation program, evaluation method and information processing device

Also Published As

Publication number Publication date
JP2018085051A (en) 2018-05-31

Similar Documents

Publication Publication Date Title
CN110287961B (en) Chinese word segmentation method, electronic device and readable storage medium
US20210192204A1 (en) Method and system for assessing similarity of documents
US11080480B2 (en) Matrix generation program, matrix generation apparatus, and plagiarism detection program
CN110765785B (en) Chinese-English translation method based on neural network and related equipment thereof
US11693854B2 (en) Question responding apparatus, question responding method and program
JP5809381B1 (en) Natural language processing system, natural language processing method, and natural language processing program
US20180246856A1 (en) Analysis method and analysis device
US20220358361A1 (en) Generation apparatus, learning apparatus, generation method and program
WO2019093172A1 (en) Similarity index computation device, similarity search device, and similarity index computation program
US20230401426A1 (en) Prediction method, prediction apparatus and program
CN113722512A (en) Text retrieval method, device and equipment based on language model and storage medium
JP5441937B2 (en) Language model learning device, language model learning method, language analysis device, and program
JP2019204214A (en) Learning device, learning method, program and estimation device
WO2015145981A1 (en) Multilingual document-similarity-degree learning device, multilingual document-similarity-degree determination device, multilingual document-similarity-degree learning method, multilingual document-similarity-degree determination method, and storage medium
JP5973986B2 (en) Translation system, method, and program
JP6740877B2 (en) Similarity calculation program, similarity calculation method, and similarity calculation device
CN108701126B (en) Theme estimation device, theme estimation method, and storage medium
JP7388256B2 (en) Information processing device and information processing method
CN115563515B (en) Text similarity detection method, device, equipment and storage medium
Joshi et al. Language recognition using random indexing
JP5533272B2 (en) Data output device, data output method, and data output program
US20230306202A1 (en) Language processing apparatus, learning apparatus, language processing method, learning method and program
JP2010009237A (en) Multi-language similar document retrieval device, method and program, and computer-readable recording medium
JP5428199B2 (en) Parallel translation extraction apparatus and parallel translation extraction method
Sowmya Lakshmi et al. Automatic English to Kannada back-transliteration using combination-based approach

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190807

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200417

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200706

R150 Certificate of patent or registration of utility model

Ref document number: 6740877

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150