Similarity evaluation device, similarity evaluation method, and program

The similarity evaluation device addresses the challenge of conceptual similarity evaluation by using morphological analysis to decompose and unify character strings, ensuring accurate similarity assessments without relying on distributed representation.

JP7564107B2Active Publication Date: 2024-10-08NIPPON TELEGRAPH & TELEPHONE CORP
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
JP2021538633
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2019-08-07
Publication Date
2024-10-08
Estimated Expiration
2039-08-07

AI Technical Summary

Technical Problem

Existing methods for evaluating similarity between character strings, such as number of matching characters, length of matching strings, edit distance, and distributed representation, often fail to accurately consider conceptual similarities, especially when target character strings are not included in the training data or have low frequency, leading to incorrect or unavailable similarity calculations.

Method used

A similarity evaluation device that includes a morphological analysis unit to analyze character strings and a similarity calculation unit to evaluate similarity based on morphological analysis results, without relying on distributed representation, by unifying terms with the same concept and decomposing strings into morphemes.

Benefits of technology

Enables accurate evaluation of similarity between character strings by considering concepts, even when distributed representation is unavailable, thereby improving the reliability of similarity calculations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007564107000008
    Figure 0007564107000008
  • Figure 0007564107000009
    Figure 0007564107000009
  • Figure 0007564107000010
    Figure 0007564107000010
Patent Text Reader

Abstract

The present invention evaluates similarity between character strings taking concept into account. A similarity evaluation device (1) accepts a first and a second character string as input and outputs similarity between the character strings. A term unification unit (11) replaces, using term unification data, the words included in the first and second character strings and having the same concept but differing in expression so that the expressions of the words are made the same. A morphological analysis unit (12) morphologically analyzes the first and second character strings. A concept deletion unit (13) deletes a prescribed morpheme from the morphological analysis results of the first and second character strings. A similarity calculation unit (14) obtains, as similarity, the number of morphemes included in both of the morphological analysis results of the first and second character strings.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a natural language processing technology, and more particularly to a technology for evaluating the similarity between character strings taking concepts into consideration. [Background technology]

[0002] There are several ways to evaluate the similarity between two strings: (A) the number of matching characters, (B) the length of the matching string, (C) the edit distance, and (D) the distance based on the distributed representation. It is also possible to combine these methods to evaluate the final similarity between two strings.

[0003] The problems with the four similarity measures (A), (B), (C), and (D) mentioned above will be explained using examples. In the following, {} (curly brackets) represent a set, and |{}| represents the number of elements in the set. As an example, let character string x be "NTT Advanced Technology Corporation," and character string set Y be {y0="NTT Data," y1="Baatechisudononro Corporation," y2="Advance Technology (NTT)," y3="Vance Technology Corporation," y4="Nippon Telegraph and Telephone West Corporation"}. Here, let the i-th character string in Y (0≦i≦|Y|-1(=4)) be y i Let x and y i The similarity of sim(x, y i ), and the set of strings in Y that are most similar to x is Y * Then, using methods (A), (B), (C), and (D), find Y that satisfies equation (1). * Think about finding.

[0004]

number

[0005] In this example, x="NTT Advanced Technology" and y2="Advance Technology (NTT)" are conceptually closest, so the similarity between these two character strings should be determined to be the highest.

[0006] The similarity calculated by "(A) number of matching characters" is sim A Let (·,·). The similarity between x and y0, …, y4 calculated using method (A) is as follows:

[0007] sim A (x, y0)=|{'N','T','T'}|=3 sim A (x, y1) = |{'ba', 'a', 'te', 'ku', 'ji', 'su', 'do', 'no', 'n', 'ro', 'stock', 'form', 'kai', 'sha'} | = 14 sim A (x, y2) = |{'A', 'Do', 'Ba', 'N', 'Su', 'Te', 'Ku', 'No', 'Ro', 'Ji', 'N', 'T', 'T'} | = 13 sim A (x, y3) = |{'ban', 'n', 'su', 'te', 'ku', 'no', 'ro', 'ji', 'stock', 'form', 'kai', 'sha'}| = 12 sim A (x, y4) = | {'stock', 'form', 'association', 'company'} | = 4

[0008] Therefore, we obtain equation (2).

[0009]

number

[0010] In this way, when the number of characters is considered, the arrangement of the characters is not taken into consideration at all, resulting in a conceptually incorrect similarity being calculated.

[0011] The similarity calculated by "(B) length of the matching string" is sim B Let (·,·). The similarity calculated for x and y0, …, y4 using method (B) is as follows:

[0012] sim B (x, y0)=|'NTT'|=3 sim B(x, y1)=|'Inc.'|=4 sim B (x, y2)=|'Advanced Technology'|=10 sim B (x, y3)=|'Vance Technology Co., Ltd.'|=12 sim B (x, y4)=|'Inc.'|=4

[0013] Therefore, we obtain equation (3).

[0014]

number

[0015] In this way, when considering the length of a character string, the concept of characters is not taken into consideration at all, and thus a conceptually incorrect similarity is calculated.

[0016] The similarity calculated by "(C) edit distance" is C Let (·,·). Edit distance is calculated based on the number of operations (insertion, deletion, substitution) required to change a string a into a string b, and the cost of each operation. In particular, the cost of each operation can vary depending on the case. Furthermore, the edit distance calculated differs depending on the order of the operations. For this reason, here we will look at an example of the minimum edit distance (= Levenshtein distance) when the costs of each operation are all the same. Also, since the smaller the "distance" value, the higher the similarity, we will use the sim C Let (·,·) be written as the inverse of the edit distance. The similarity between x and y0, …, y4 calculated using method (C) is as follows:

[0017] sim C (x, y0)=1 / 14 sim C (x, y1)=1 / 8 sim C (x, y2)=1 / 10 sim C (x, y3)=1 / 5 sim C (x, y4)=1 / 13

[0018] Therefore, we obtain equation (4).

[0019]

number

[0020] In the case of edit distance, even though "NTT" at the beginning of y1 and "NTT" near the end are the same concept, they are in different positions, so the operation is to delete the beginning "NTT" and insert the "NTT" near the end. This operation increases the distance, resulting in a conceptually incorrect similarity being calculated.

[0021] The similarity calculated by "(D) Distributed Representation Distance" is sim D Let (·,·). Known methods for evaluating distance using distributed representations include technologies called word2vec (see, for example, Non-Patent Document 1) and fastText (see, for example, Non-Patent Document 2). The features of each string are calculated from documents containing each string, and the features (=distributed representation) are stored in vector format. When evaluating the distance (=similarity) between two strings, the calculation is performed using the L2 norm or cosine similarity, which are well-known concepts of the vectors of the two strings. Of (A) to (D), (D) is the method that focuses most on the similarity between concepts. [Prior art documents] [Non-patent literature]

[0022] [Non-Patent Document 1] Tomas Mikolov, Kai Chen, Greg S. Corrado, and Jeffrey Dean, "Efficient estimation of word representations in vector space," arXiv:1301.3781,2013. [Non-Patent Document 2] Piotr Bojanowski, Edouard Grave, Armand Joulin, and Tomas Mikolov, "Enriching word vectors with subword information," Transactions of the Association for Computational Linguistics, Vol. 5, pp. 135-146, 2017. Summary of the Invention [Problem to be solved by the invention]

[0023] However, in the case of distance based on the distributed representation, if the target string is not included in the document data used to calculate the distributed representation (or if its frequency of occurrence is very low), the vector (=distributed representation) of that string cannot be calculated. Therefore, in some cases, the vector x, y0 may exist, but the vectors y1, y2, y3, y4 may not exist. In this case, sim D Only (x, y0) can be evaluated. In this way, the distance based on the distributed representation may not be able to calculate the similarity for all strings.

[0024] In view of the above technical problems, an object of the present invention is to evaluate the similarity between strings taking concepts into consideration without using distributed representations. [Means for solving the problem]

[0025] In order to solve the above problems, a similarity evaluation device of one embodiment of the present invention includes a morphological analysis unit that performs morphological analysis of a first character string and a second character string, and a similarity calculation unit that obtains the number of morphemes contained in both the result of the morphological analysis of the first character string and the result of the morphological analysis of the second character string as the similarity. Effect of the Invention

[0026] According to the present invention, it is possible to evaluate the similarity between character strings taking concepts into consideration without using distributed representations. [Brief description of the drawings]

[0027] [Figure 1] FIG. 1 is a diagram illustrating an example of a functional configuration of a similarity evaluation device. [Diagram 2] FIG. 2 is a diagram illustrating a processing procedure of the similarity evaluation method. [Diagram 3] FIG. 3 is a diagram illustrating an example of a functional configuration of a computer. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0028] Hereinafter, an embodiment of the present invention will be described in detail. In the drawings, components having the same functions are designated by the same reference numerals, and duplicated explanations will be omitted.

[0029] 1, the similarity evaluation device 1 of the embodiment includes a term unified data storage unit 10-1, a morphological analysis model storage unit 10-2, a term unification unit 11, a morphological analysis unit 12, and a similarity calculation unit 14. The similarity evaluation device 1 may further include a concept deletion unit 13. The similarity evaluation method of the embodiment is realized by the similarity evaluation device 1 performing the processes of each step illustrated in FIG.

[0030] The similarity evaluation device 1 is a special device configured by loading a special program into a publicly known or dedicated computer having, for example, a central processing unit (CPU), a main storage device (RAM), and the like. The similarity evaluation device 1 executes each process under the control of, for example, the central processing unit. Data input to the similarity evaluation device 1 and data obtained in each process are stored in, for example, the main storage device, and the data stored in the main storage device is read out to the central processing unit as necessary and used for other processes. At least a part of each processing unit of the similarity evaluation device 1 may be configured by hardware such as an integrated circuit. Each storage unit provided in the similarity evaluation device 1 can be configured by, for example, a main storage device such as a random access memory (RAM), an auxiliary storage device configured by a semiconductor memory element such as a hard disk, an optical disk, or a flash memory, or middleware such as a relational database or a key-value store.

[0031] The similarity evaluation device 1 is a device for evaluating a character string x and a set of character strings Y={y0, …, y |Y|-1} is input, and the similarity set S between string x and string set Y is calculated as follows: prop (x,y0), …, sim prop (x,y |Y|-1 )}, where sim prop (x,y i ) is a string x and a string y i ∈Y.

[0032] The term unified data storage unit 10-1 stores unified term data Z={z0, ..., z |Z|-1} is stored. Here, z i ∈Z is a set of strings with the same concept but different notations, and |Z| is the number of concepts in {x}∪Y.

[0033] The morphological analysis model storage unit 10-2 stores a morphological analysis model m. The morphological analysis model m is prepared in advance using a morphological analyzer such as MeCab (see Reference 1) or JUMAN (see Reference 2).

[0034] [Reference 1] “MeCab: Yet Another Part-of-Speech and Morphological Analyzer”, [online], [Retrieved July 29, 2020], Internet<URL: http: / / taku910.github.io / mecab / > [Reference 2] “JUMAN - KUROHASHI-KAWAHARA LAB”, [online], [searched on July 29, 2019], Internet<URL: http: / / nlp.ist.i.kyoto-u.ac.jp / index.php?JUMAN>

[0035] Hereinafter, with reference to FIG. 2, a similarity evaluation method executed by the similarity evaluation device 1 of the embodiment will be described.

[0036] In step S11, the term unification unit 11 compares the string x and all the strings y i When ∈Y includes terms that have different notations but have the same concept, the terms are unified using the term unification data Z stored in the term unification data storage unit 10-1, and the unified terminology strings x' and y' are generated. i ∈Y'. Note that Y and Y' are ordered sets (=lists), and y' i ∈Y' has y i The character string after term unification of ∈Y is stored. The term unification unit 11 outputs the term unified character string x′ and character string set Y′ to the morphological analysis unit 12.

[0037] The details of the processing of the terminology unification unit 11 are shown below. (i,0) Z i Let it be the 0th element of .

[0038] Algorithm 1: Terminology unification part Input: string x, string set Y, unified terminology data Z Output: unified terminology x', Y' 1: for i∈[0, |Z|-1] do 2: if x∈z i then 3: x'←z (i,0) 4: end if 5: end for 6: Create Y' with elements of the same size as Y (where ∀i∈[0, |Y'|-1], y' i ∈Y' is null) 7: for i∈[0, |Y|-1] do 8: for j∈[0, |Z|-1] do 9: if y i ∈z j then 10: y' i ←z (i,0) 11: end if 12: end for 13: end for 14: return x', Y'

[0039] For example, the term unified data z i Z i ={"NTT","Nippon Telegraph and Telephone Corporation"}. In this case, x and y i If ∈Y contains the string "Nippon Telegraph and Telephone Corporation", then the string "Nippon Telegraph and Telephone Corporation" is a string z (i,0) ="NTT".

[0040] In step S12, the morphological analysis unit 12 analyzes the character string x' and all character strings y' i ∈Y', the morpheme analysis model m stored in the morpheme analysis model storage unit 10-2 is used to decompose the character string x' into morphemes, and the morpheme analysis result x" of the character string x' and the character string y' i ∈Y's morphological analysis result y" i∈Y", where Y' and Y" are ordered sets (=lists), and y" i ∈Y" has y' i The result of morphological analysis of ∈Y′ is stored. The morphological analysis unit 12 outputs the morphological analysis result x″ and the morphological analysis result set Y″ to the similarity calculation unit 14.

[0041] The details of the process of the morphological analysis unit 12 are given below. Here, the morphological analysis model is expressed as a function "m: character string -> set of character strings".

[0042] Algorithm 2: Morphological analysis part Input: A term-unified string x', a set of strings Y', a morphological analysis model m Output: morpheme-decomposed x", Y". 1: x"=m(x') 2: Create Y" with elements of the same size as Y' (where ∀i∈[0, |Y"|-1], y" i ∈Y" is the empty set) 3: for i∈[0, |Y'|-1] do 4: y" i ←m(y' i ) 5: end for 6: return x", Y"

[0043] For example, if the character string x is "NTT Advanced Technology Corporation," then m(x) is the morpheme (≒ concept) set of x, m(x) = {"NTT," "Advance," "Technology," "Corporation"}. Note that the way in which morphemes are divided depends on the algorithm of the morphological analyzer and the data set used to calculate the morphological analysis model.

[0044] In step S14, the similarity calculation unit 14 compares the morphological analysis result x" and the morphological analysis result y" i For all pairs of ∈Y", the similarity sim prop (x,y i)∈S. The similarity calculation unit 14 outputs the similarity set S as the output of the similarity evaluation device 1.

[0045] The details of the process of the similarity calculation unit 14 are shown below. i is the i-th element of x" and y" (i,j) Yes" i Let be the jth element of .

[0046] Algorithm 3: Similarity calculation part Input: String x, set of strings Y, decomposed into morphemes x" and Y". Output: A similarity vector S whose elements correspond to elements of Y 1: Create a set S with elements that correspond to the elements of Y (where s i ∈S(i∈[0, |S|-1]) is initially set to 0) 2: for i∈[0, |x"|-1] do 3: for j∈[0, |Y"|-1] do 4: for k∈[0, |y" j |-1] do 5: if x" i =y" (j,k) then 6: s j =s j +1 7: end if 8: end for 9: end for 10: end for 11: return S

[0047] For example, if x"={"NTT", "Advance", "Technology", "Inc."} and y"0={"NTT", "Data"}, then y"0 and x" only have "NTT" in common. Therefore, in this case, the similarity between x" and y"0 is s0=1.

[0048] [Modifications] For example, if the concept of the character string to be the subject of similarity evaluation can be predicted in advance (for example, if it is known to be a "company name" as in the above example), measuring similarity using a word that expresses that concept (for example, "Company name" in the above example) will be ineffective or counterproductive. When a concept that is ineffective or causes a counterproductive effect is known in advance, it is advisable to delete that concept from the morphological analysis results.

[0049] In this case, the similarity evaluation device 1 further includes a concept deletion unit 13. The concept deletion unit 13 deletes the morphological analysis result x" and the morphological analysis result y" output by the morphological analysis unit 12. i A predetermined concept (=morpheme) is deleted from ∈Y″ and the result is output to the similarity calculation unit 14.

[0050] [Specific examples] The process flow will be specifically illustrated using the above example.

[0051] The character string x input to the similarity evaluation device 1 is “NTT Advance Technology Corporation,” and the set of character strings Y is {y0="NTT Data," y1="BaaTechnologyNonRo Corporation," y2="Advance Technology (NTT)," y3="Vance Technology Corporation," y4="Nippon Telegraph and Telephone West Corporation"}.

[0052] Through processing by the terminology unification unit 11, the character string x becomes x'="NTT Advanced Technology Corporation," and the set of character strings Y becomes Y'={y'0="NTT Data," y'1="BaaTechjisdononro Corporation," y'2="Advance Technology (NTT)," y'3="Vance Technology Corporation," y'4="West NTT"}.

[0053] As a result of processing by the morphological analysis unit 12, the character string x' becomes x" = {"NTT", "Advance", "Technology", "Co., Ltd."}, and the character string set Y' becomes Y" = {y"0 = {"NTT", "Data"}, y"1 = {"BaaTechjisdononro", "Co., Ltd."}, y"2 = {"Advance", "Technology", "(", "NTT",")"}, y"3 = {"Vance Technology", "Co., Ltd."}, y"4 = {"Nishi", "NTT"}}.

[0054] The similarity calculation unit 13 processes x and each y i The similarity of ∈Y is as follows:

[0055] sim prop (x, y0)=1 sim prop (x, y1)=1 sim prop (x, y2)=3 sim prop (x, y3)=1 sim prop (x, y4)=1

[0056] From the above, it can be seen that x and y2 are evaluated to have the highest similarity, and it can be said that it is possible to evaluate the similarity between strings while taking concepts into account without using distributed representations.

[0057] [Application example] The above specific example shows an extreme example to make the processing procedure easier to understand, but here we will show an example where the effects of the invention are demonstrated by applying it to an actual service. Suppose an organization A wants to categorize the products it handles. Also, assume that another organization B has already categorized the products it handles. Consider a situation in which organization A refers to organization B's categorization and categorizes the products it handles.

[0058] The data on products handled by Organization A is represented as x1, …, x3 in Table 1. Note that “XXX”, “△△△”, “◆◆◆”, “◇◇◇”, etc. are proper nouns such as manufacturer names.

[0059] [Table 1]

[0060] The categorized data held by organization B is Y in Table 2. 11 , …, Y 16 , Y 21 , …, Y 25 , Y 31 , …, Y 36 Let us assume that.

[0061] [Table 2]

[0062] If the data of organization A shown in Table 1 is character string x and the data of organization B shown in Table 2 is character string set Y, the similarity calculated by the present invention is as follows: Note that sim(·,·) is the similarity calculated by the present invention, and the character strings in curly brackets are morphemes that are common to the two character strings.

[0063] sim(x1, Y 11 )=|{}|=0 sim(x1, Y 12 )=|{}|=0 sim(x1, Y 13 )=|{}|=0 ... sim(x3, Y 34 )=|{"furniture"}|=1 sim(x3, Y 35 )=|{"storage","wagon"}|=2 sim(x3, Y 36 )=|{"◆◆◆", "◇◇◇", "closet", "storage", "rack", "casters", "with", "width"}|=8

[0064] Table 3 shows the results of replacing a string in Y with a string in x for pairs of strings in x and Y that have high similarity. For example, the product x3 handled by organization A is replaced with the product Y handled by organization B. 36Because of the high similarity with the product Y 36 By replacing with x3, Y for x3 31 , …, Y 35 As a result, organization A was able to refer to the categorization held by organization B and appropriately categorize the products it handles.

[0065] [Table 3]

[0066] [Key points of the invention] In the conventional similarity evaluation between character strings, it is not possible to evaluate the similarity taking into account the concept without using a distributed representation. In addition, especially when the frequency of occurrence is not high, such as in the case of proper nouns, it may not be possible to calculate the distributed representation of all character strings to be evaluated for similarity. For this reason, it has been a challenge to evaluate the similarity taking into account the concept without using a distributed representation. According to the present invention, since the similarity can be calculated from the result of morphological analysis, it is possible to evaluate the similarity taking into account the concept without using a distributed representation. In particular, since the arrangement of morphemes is often meaningless in proper nouns, it is possible to appropriately evaluate the similarity by configuring a similarity focusing on the frequency of occurrence.

[0067] Although the embodiments of the present invention have been described above, the specific configuration is not limited to these embodiments, and it goes without saying that the present invention includes appropriate design changes and the like within the scope of the gist of the present invention. The various processes described in the embodiments are not only executed in chronological order according to the order described, but may also be executed in parallel or individually depending on the processing capacity of the device executing the processes or as necessary.

[0068] [Programs, recording media] When the various processing functions of each device described in the above embodiment are realized by a computer, the processing contents of the functions that each device should have are described by a program. Then, the various processing functions of each device are realized on the computer by loading this program into the storage unit 1020 of the computer shown in Fig. 3 and operating the control unit 1010, input unit 1030, output unit 1040, etc.

[0069] The program describing the processing contents can be recorded on a computer-readable recording medium, which may be, for example, a magnetic recording device, an optical disk, a magneto-optical recording medium, a semiconductor memory, or any other type of recording medium.

[0070] The program may be distributed, for example, by selling, transferring, lending, etc. portable recording media such as DVDs and CD-ROMs on which the program is recorded. Furthermore, the program may be distributed by storing the program in a storage device of a server computer and transferring the program from the server computer to other computers via a network.

[0071] A computer that executes such a program, for example, first stores the program recorded on a portable recording medium or the program transferred from a server computer in its own storage device. Then, when executing a process, the computer reads the program stored in its own storage device and executes a process according to the read program. As another execution form of the program, the computer may directly read the program from the portable recording medium and execute a process according to the program, or may execute a process according to the received program each time a program is transferred from the server computer to the computer. The server computer may not transfer the program to the computer, but may execute the above-mentioned process by a so-called ASP (Application Service Provider) type service that realizes the processing function only by issuing an execution instruction and obtaining the result. Note that the program in this embodiment includes information used for processing by an electronic computer that is equivalent to a program (data that is not a direct instruction to the computer but has a nature that specifies the processing of the computer, etc.).

[0072] In addition, in this embodiment, the present device is configured by executing a specific program on a computer, but at least a part of the processing contents may be realized by hardware.

Claims

1. a morphological analysis unit that performs morphological analysis on the first character string and the second character string; a similarity calculation unit that obtains a number of morphemes included in both a result of the morpheme analysis of the first character string and a result of the morpheme analysis of the second character string as a similarity taking into consideration a concept; A similarity evaluation device comprising: moreover, a storage unit for storing unified terminology data that groups together a plurality of words having the same concept but different spellings; a term unification unit that replaces words having the same concept but different spellings included in the first character string and the second character string using the term unification data before the morphological analysis is performed by the morphological analysis unit, so that the words have the same spellings; a concept deleting unit that deletes, from the result of the morpheme analysis of the first character string and the result of the morpheme analysis of the second character string, morphemes that represent predetermined concepts for which it is known that measuring the degree of similarity is ineffective or counterproductive; A similarity evaluation device comprising:

2. a morphological analysis unit performing a morphological analysis on the first character string and the second character string; a similarity calculation unit obtains, as a similarity taking into consideration a concept, the number of morphemes included in both the result of the morphological analysis of the first character string and the result of the morphological analysis of the second character string; A similarity assessment method, comprising: moreover, The storage unit stores unified terminology data that groups together a plurality of words that have the same concept but different spellings, a term unification unit, using the term unification data before the morphological analysis unit executes the morphological analysis, replaces words that are the same in concept but have different spellings included in the first character string and the second character string so that they have the same spelling; a concept deletion unit deletes, from the result of the morpheme analysis of the first character string and the result of the morpheme analysis of the second character string, morphemes representing predetermined concepts for which it is known that measuring the similarity is ineffective or counterproductive; Similarity assessment methods.

3. A program for causing a computer to function as the similarity evaluation device according to claim 1.

Citation Information

Patent Citations

  • Information management device

    JP2003058535A

  • Document summary system and method, computer-readable storage medium storing program, and program

    JP2006059082A

  • E-mail receiver and method of receiving e-mail, e-mail transmitter and e-mail transmission method, mail transmission server

    JP2010056682A

  • Patent application evaluation device

    JP2010231564A

  • Association program, association method, and information processor

    JP2014041451A