A method, device, equipment and readable storage medium for obtaining semantic similarity
By acquiring corpus data and establishing a semantic model, combined with deep learning technology and genetic algorithms, the problem of low semantic similarity recognition rate in the existing technology is solved, semantic similarity calculation with high recognition rate is achieved, and satisfies the deep semantics of artificial intelligence. Understand the needs.
Patent Information
- Application Number
- CN201810866834.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-08-01
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2039-01-11
AI Technical Summary
Existing technologies have low recognition rates or are not suitable for application scenarios when identifying semantic similarities, making it difficult to meet the needs for deep semantic understanding based on contextual scenarios.
By acquiring corpus data, including context information and sentence information, a semantic model is established, using deep learning technologies such as multi-layer perceptrons and convolutional neural networks to extract core words and sentence vector information, and combining genetic algorithms to select core words for information combination and Training to achieve semantic similarity calculation with high recognition rate.
It achieves deep semantic understanding based on contextual information, has a high recognition rate, meets the new needs of artificial intelligence in fields such as question and answer systems, reduces manual intervention, simplifies the system creation process, and improves accuracy.
Smart Images

Figure CN110807329B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method, device, equipment and readable storage medium for obtaining semantic similarity. Background Art
[0002] With the development of computer and network technology, people can encounter text processing tasks, namely natural language processing (NLP), everywhere in their daily work and life; with the development of big data and artificial intelligence, especially the emergence of neural networks, people's demand for deep semantic understanding is increasing, and the research on semantic understanding based on contextual scenarios is even more urgent. One of the typical directions is the deep semantic similarity scenario based on contextual understanding.
[0003] The following are some examples:
[0004] A: Yes
[0005] B: I am from Beijing
[0006] C: I am from Nanjing
[0007] Intuitively, of the three statements above, B and C are more similar; however, based on the context, the result may change, for example:
[0008] Q: ...Are you from Beijing?
[0009] A: Yes
[0010] B: I am from Beijing
[0011] C: I am from Nanjing
[0012] Based on the context, the deeper meanings expressed by A and B are closer;
[0013] There are many patents and technical documents related to semantic similarity in the industry, but these solutions either have low recognition rates or are not suitable for application scenarios. Summary of the invention
[0014] This article aims to provide a method, device, equipment and readable storage medium for obtaining semantic similarity, which can perform deep semantic understanding based on contextual information, can mine deep semantic information based on big data information, has a high recognition rate, and meets the new needs of artificial intelligence.
[0015] The technical solutions adopted in this paper to solve the above technical problems are as follows:
[0016] According to one aspect of the present invention, a method for obtaining semantic similarity is provided, comprising:
[0017] Acquire corpus data, wherein the corpus data includes context information and sentence information;
[0018] Establishing a semantic model according to the context information and sentence information;
[0019] The similarity of the sentences with context information is obtained through the semantic model.
[0020] Optionally, before acquiring the corpus data, the step further includes:
[0021] A basic information database is established, wherein the basic information database includes: Chinese characters, numbers, letters and symbols.
[0022] Optionally, establishing a semantic model according to the context information and the sentence information includes:
[0023] Extracting core words from the context information;
[0024] Performing semantic mining on the sentence information according to the basic information database to obtain sentence vector information;
[0025] The core words and the vector information are combined, and a semantic model is obtained through multi-layer perceptron training.
[0026] Optionally, the extracting core words from the context information is specifically:
[0027] A genetic algorithm is used to select core words in the context information.
[0028] Optionally, performing semantic mining on the sentence information according to the basic information library to obtain sentence vector information includes:
[0029] Establishing a sentence matrix, wherein the sentence matrix includes the size of the basic information library and the maximum length of the sentence;
[0030] Vectorizing the sentence information;
[0031] The sentence information is feature extracted through a convolutional neural network, and three layers of convolution and pooling are performed;
[0032] Get vector information of the sentence.
[0033] Optionally, the combining of the core word and the vector information is specifically:
[0034] The core word and the vector information are spliced and combined by using a vector splicing method.
[0035] Optionally, the corpus data further includes annotation information, and the annotation information is similar or dissimilar.
[0036] According to another aspect of the present invention, a device for obtaining semantic similarity is provided, comprising:
[0037] A corpus acquisition module, used to acquire corpus data, wherein the corpus data includes context information and sentence information;
[0038] A model building module, used to build a semantic model according to the context information and sentence information;
[0039] The similarity acquisition module is used to obtain the similarity of sentences with context information through the semantic model.
[0040] According to another aspect of the present invention, an electronic device is provided, comprising a memory, a processor, and at least one application stored in the memory and configured to be executed by the processor, wherein the application is configured to execute the method for obtaining semantic similarity described above.
[0041] According to another aspect of the present invention, a readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method for obtaining semantic similarity described above is implemented.
[0042] A method, device, equipment and readable storage medium for obtaining semantic similarity according to an embodiment of the present invention, the method comprising: obtaining corpus data, the corpus data comprising context information and sentence information; establishing a semantic model according to the context information and sentence information; obtaining the similarity of sentences with context information through the semantic model; being able to perform deep semantic understanding according to the context information, being able to mine deep semantic information based on big data information, having a high recognition rate, and meeting new demands of artificial intelligence. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A flow chart of a method for obtaining semantic similarity provided in Embodiment 1 of the present invention;
[0044] Figure 2 A flow chart of another method for obtaining semantic similarity provided in the first embodiment of the present invention;
[0045] Figure 3 for Figure 1 A method flow chart of step S20;
[0046] Figure 4 for Figure 3 A method flow chart of step S22 in FIG.
[0047] Figure 5 This is an exemplary structural block diagram of an apparatus for obtaining semantic similarity provided in Embodiment 2 of the present invention.
[0048] The realization of the purpose, functional features and advantages of this article will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0049] In order to make the technical problems, technical solutions and beneficial effects to be solved by this article clearer and more understandable, this article is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain this article and are not used to limit this article.
[0050] Embodiment 1
[0051] like Figure 1 As shown, in this embodiment, a method for obtaining semantic similarity includes:
[0052] S10, obtaining corpus data, wherein the corpus data includes context information and sentence information;
[0053] S20, establishing a semantic model according to the context information and sentence information;
[0054] S30: Obtain similarity of sentences with context information through the semantic model.
[0055] In this embodiment, deep semantic understanding can be performed based on contextual information, and deep semantic information can be mined based on big data information. The recognition rate is high, meeting new demands for artificial intelligence.
[0056] In this embodiment, this case is mainly aimed at Chinese natural language services such as question-answering systems, expert systems, online customer service, mobile assistants, and personal assistants; this case focuses on the calculation of sentence similarity and has a wide range of usage scenarios; it makes full use of deep learning technology and the computing power of machines to reduce manual workload. During the system creation process, there is little manual intervention and there is no need to collect various dictionaries and other information. It is simple, fast, easy to implement, and has a high accuracy rate.
[0057] like Figure 2 As shown, in this embodiment, before obtaining the corpus data, the method further includes:
[0058] S01. Establish a basic information database, which includes Chinese characters, numbers, letters and symbols.
[0059] In this embodiment, the basic information database includes: 8000 Chinese characters, 1 Chinese character wildcard, 10 numbers, 27 English letters, 34 common symbols, and 1 symbol wildcard, a total of 8073.
[0060] Collection of commonly used Chinese characters: There are about 80,000 Chinese characters in total; there are about 3,500 commonly used Chinese characters; there are too many to collect all the Chinese characters, and there is no need; actual verification results show that collecting the 8,000 Chinese characters with the most occurrences is the most effective; this case uses about 10G data such as news corpus and financial corpus; count the number of occurrences of each character and select the 8,000 characters with the most occurrences; Chinese characters outside the 8,000 characters are numbered with Chinese character wildcards;
[0061] Number collection: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a total of 10 numbers;
[0062] Collection of letters: Convert all letters to lowercase, a, b, c, ..., z, a total of 27 letters;
[0063] Collection of commonly used symbols: Common symbols include:,'[]{}(), etc.; 34 commonly used symbols are selected, and the remaining symbols are numbered with symbol wildcards;
[0064] After collecting information such as Chinese characters, numbers, letters, and symbols (commonly used), the final basic information database is formed.
[0065] Then number them in the following format:
[0066] Number: Word
[0067] For example:
[0068] 0: Me
[0069] 1: Beauty
[0070] 2. Love
[0071] 3: Good
[0072] 4 of
[0073] 5 You ......
[0075] 35: Word 8001:0 8002:1 ......
[0079] 8036:a
[0080] 8037:b ......
[0082] 8101:%
[0083] 8101:& ......
[0085] etc.
[0086] Stored in the Chinese character file hanzi.txt.
[0087] In this embodiment, the format of the corpus data is as follows:
[0088] Contextual Information Statement Information ......Are you from Beijing? Yes ......Are you from Beijing? I am from Beijing ......Are you from Beijing? I am from Nanjing
[0089] In this embodiment, the corpus data further includes annotation information, and the annotation information is similar or dissimilar.
[0090] Annotate similar situations of sentences with context; each annotation occupies one line, two groups of sentences, the format is as follows:
[0091] Context A|Statement A|Context B|Statement B|Annotation result
[0092] The form is as follows:
[0093] Are you from Beijing? | I am from Beijing | Are you from Beijing? | Yes | Similar
[0094] Are you from Beijing? | I am from Beijing | Are you from Beijing? | I am from Nanjing | Not similar
[0095] There are two types of annotation results:
[0096] 1: Similar
[0097] 2: Not similar
[0098] The annotation results are stored in the data file data.txt;
[0099] In order to increase the number of data training samples, the order of AB can be swapped to increase the generalization ability of training, as follows:
[0100] Context B|Statement B|Context A|Statement A|Annotation result.
[0101] like Figure 3 As shown, in this embodiment, step S20 includes:
[0102] S21, extracting core words from the context information;
[0103] In this embodiment, there are many ways to select core words, which can be selected manually or by using a genetic algorithm commonly used in the industry; the main purpose is to select better core words to achieve better results;
[0104] The specific method of using genetic algorithm to select core words is as follows:
[0105] Randomly select N groups of words, each with M words, for example
[0106] Debit card bank finance loan credit card repayment interest rate...
[0107] Electronic bills bank finance loan credit card repayment interest rate...
[0108] Debit card bank finance electronic bill loan credit card repayment interest rate...
[0109] Bank card bank finance loan credit card electronic bill repayment interest rate...
[0110] Select two groups of words for inheritance (core word exchange), then select one word for mutation (exchange with the core word library), then check the effect after running, and retain the N groups with the best effect; repeat this cycle to achieve the best effect.
[0111] S22, performing semantic mining on the sentence information according to the basic information library to obtain sentence vector information;
[0112] In this embodiment, there are many ways and methods for deep semantic mining of short texts, but the best effect is CNN (convolutional neural network) feature extraction of word-based sentence information;
[0113] Therefore, the effect and performance are comprehensively considered, and the experimental data proves that the sentence is vectorized by word2vec, and CNN is used for feature extraction, followed by 3 layers of convolution and pooling, and finally the vector information of the sentence is obtained.
[0114] S23, combining the core words and the vector information, and obtaining a semantic model through multi-layer perceptron (MLP) training.
[0115] In this embodiment, the step S21 is specifically as follows:
[0116] A genetic algorithm is used to select core words in the context information.
[0117] For example, for the financial industry, the following core words can be extracted:
[0118] bank
[0119] finance
[0120] loan
[0121] credit card
[0122] Repayment
[0123] interest rate
[0124] etc.
[0125] For example, for the telecommunications industry, the following core words can be extracted:
[0126] Phone Charges
[0127] Monthly rent
[0128] cell phone
[0129] bill
[0130] flow
[0131] Short message
[0132] etc.
[0133] For example, for a general domain (usually the chat domain), the following information can be extracted:
[0134] travel
[0135] news
[0136] weather
[0137] etc.
[0138] After the core words are extracted, the core words are selected and numbered:
[0139] for example
[0140] 0: Bank
[0141] 1. Finance
[0142] 2. Loans ......
[0144] etc.
[0145] like Figure 4 As shown, in this embodiment, step S22 includes:
[0146] S221, establishing a sentence matrix, wherein the sentence matrix includes the size of the basic information library and the maximum length of the sentence;
[0147] S222, vectorizing the sentence information;
[0148] S223, extracting features from the sentence information through a convolutional neural network, and performing three-layer convolution and pooling;
[0149] S224. Obtain vector information of the statement.
[0150] In this embodiment, the semantic mining model is as follows (assuming that the size of the basic information base is 8500):
[0151] Sentence Matrix [8500x32]
[0152] Word2vec[256x32]
[0153] The first layer of convolution and pooling [128x16@32]
[0154] The second layer of convolution and pooling [56x8@16]
[0155] The third layer of convolution and pooling [32x4@8]
[0156] Final vector
[1024]
[0157] Among them, the sentence matrix [8500x32]: 8500 is the size of the basic information library; 32 is the maximum length of the sentence allowed; Word2vec [256x32]: 256 is the set length of word2vec; 32 is the maximum length of the sentence allowed; the first layer of convolution and pooling [128x16@32]: 128x16 is the size of the convolution, and the convolution window is 2x2; 32 is the number of channels; the second layer of convolution and pooling [56x8@16]: 56x8 is the size of the convolution, and the convolution window is 2x2; 16 is the number of channels; the third layer of convolution and pooling [32x4@8]: 32x4 is the size of the convolution, and the convolution window is 2x2; 8 is the number of channels; the final vector
[1024] : the result of arranging [32x4@8] in order, that is, converting the matrix into a vector.
[0158] For example, the representation of the sentence matrix [8500x32] has a length and width of 8500x32 respectively; assuming that the word numbers of the sentence "I love you" are 0, 2, and 5 respectively; then the matrix is as follows:
[0159] 1 0 0 0 0 0 0 0 ... 0 0 0 1 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 ... 0
[0160] Word2vec was performed on the sentence matrix 8500x32, and the word vector length was set to 256. Experimental data verified that the effect of the word vector with a length of 256 was moderate, the amount of calculation was not too large, and the accuracy was not too low.
[0161] Then perform 3 layers of convolution and pooling, the pooling window is 2x2, and the convolution window is 3x3; finally, perform vectorization to obtain a vector of length 1024.
[0162] In this embodiment, step S23 is specifically as follows:
[0163] The core word and the vector information are spliced and combined by using a vector splicing method.
[0164] The details are as follows:
[0165] A context information vector + B context vector + A sentence vector + B sentence vector
[0166] Then use Multi-layer Perceptron (MLP) to train the model, and finally use softmax for binary classification. MLP is a generalization of the perceptron, which overcomes the weakness of the perceptron that it cannot recognize linearly inseparable data.
[0167] Among them, MLP uses tanh activation function to achieve relatively good results. MLP performs two-layer perception training, with matrix sizes of 1024x256 and 256x2 respectively.
[0168] In this embodiment, the function of the semantic model is to calculate the similarity of sentences with context information, and the value thereof is the confidence of the similarity;
[0169] for example:
[0170] Q: Are you from Beijing? A: Yes
[0171] Q: Are you from Beijing? A: I am from Beijing
[0172] Similarity 0.87
[0173] For example:
[0174] Q: Are you from Beijing? A: I am from Nanjing
[0175] Q: Are you from Beijing? A: I am from Beijing
[0176] Similarity 0.52
[0177] Specifically, the interface of the semantic model is as follows:
[0178] Request Message
[0179] <xml>
[0180] <contexta> Are you from Beijing?< / contexta>
[0181] <contextb> Are you from Beijing?< / contextb>
[0182] <sentencea> Yes< / sentencea>
[0183] <sentenceb> I am from Beijing< / sentenceb>
[0184] < / xml>
[0185] Among them, context is context information, sentence is sentence;
[0186] Return message
[0187] <xml>
[0188] <per> 0.95< / per>
[0189] < / xml>
[0190] Among them, per is the returned result, that is, the confidence level of sentence similarity.
[0191] Embodiment 2
[0192] like Figure 5 As shown, in this embodiment, a device for obtaining semantic similarity includes:
[0193] A corpus acquisition module 10 is used to acquire corpus data, wherein the corpus data includes context information and sentence information;
[0194] A model building module 20, used to build a semantic model according to the context information and sentence information;
[0195] The similarity acquisition module 30 is used to obtain the similarity of the sentences with context information through the semantic model.
[0196] In this embodiment, deep semantic understanding can be performed based on contextual information, and deep semantic information can be mined based on big data information. The recognition rate is high, meeting new demands for artificial intelligence.
[0197] In this embodiment, this case is mainly aimed at Chinese natural language services such as question-answering systems, expert systems, online customer service, mobile assistants, and personal assistants; this case focuses on the calculation of sentence similarity and has a wide range of usage scenarios; it makes full use of deep learning technology and the computing power of machines to reduce manual workload. During the system creation process, there is little manual intervention and there is no need to collect various dictionaries and other information. It is simple, fast, easy to implement, and has a high accuracy rate.
[0198] In this embodiment, the format of the corpus data is as follows:
[0199] Contextual Information Statement Information ......Are you from Beijing? Yes ......Are you from Beijing? I am from Beijing ......Are you from Beijing? I am from Nanjing
[0200] In this embodiment, the corpus data further includes annotation information, and the annotation information is similar or dissimilar.
[0201] Annotate similar situations of sentences with context; each annotation occupies one line, two groups of sentences, the format is as follows:
[0202] Context A|Statement A|Context B|Statement B|Annotation result
[0203] The form is as follows:
[0204] Are you from Beijing? | I am from Beijing | Are you from Beijing? | Yes | Similar
[0205] Are you from Beijing? | I am from Beijing | Are you from Beijing? | I am from Nanjing | Not similar
[0206] There are two types of annotation results:
[0207] 1: Similar
[0208] 2: Not similar
[0209] The annotation results are stored in the data file data.txt;
[0210] In order to increase the number of data training samples, the order of AB can be swapped to increase the generalization ability of training, as follows:
[0211] Context B|Statement B|Context A|Statement A|Annotation result.
[0212] In this embodiment, there are many ways to select core words, which can be selected manually or by using a genetic algorithm commonly used in the industry; the main purpose is to select better core words to achieve better results;
[0213] The specific method of using genetic algorithm to select core words is as follows:
[0214] Randomly select N groups of words, each with M words, for example
[0215] Debit card bank finance loan credit card repayment interest rate...
[0216] Electronic bills bank finance loan credit card repayment interest rate...
[0217] Debit card bank finance electronic bill loan credit card repayment interest rate...
[0218] Bank card bank finance loan credit card electronic bill repayment interest rate...
[0219] Select two groups of words for inheritance (core word exchange), then select one word for mutation (exchange with the core word library), then check the effect after running, and retain the N groups with the best effect; repeat this cycle to achieve the best effect.
[0220] Embodiment 3
[0221] In this embodiment, an electronic device includes a memory, a processor, and at least one application stored in the memory and configured to be executed by the processor, wherein the application is configured to execute the method for obtaining semantic similarity described in Embodiment 1.
[0222] Embodiment 4
[0223] An embodiment of the present invention provides a readable storage medium having a computer program stored thereon. When the program is executed by a processor, the program implements any method embodiment described in the above method embodiments for obtaining semantic similarity.
[0224] It should be noted that the above-mentioned device, equipment and readable storage medium embodiments belong to the same concept as the method embodiments. The specific implementation process is detailed in the method embodiments, and the technical features in the method embodiments are correspondingly applicable in the device embodiments, which will not be repeated here.
[0225] A method, device, equipment and readable storage medium for obtaining semantic similarity according to an embodiment of the present invention, the method comprising: obtaining corpus data, the corpus data comprising context information and sentence information; establishing a semantic model according to the context information and sentence information; obtaining the similarity of sentences with context information through the semantic model; being able to perform deep semantic understanding according to the context information, being able to mine deep semantic information based on big data information, having a high recognition rate, and meeting new demands of artificial intelligence.
[0226] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0227] In hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0228] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the present invention is not limited thereby. Any modification, equivalent substitution and improvement made by those skilled in the art without departing from the scope and essence of the present invention shall be within the scope of the present invention.
Claims
1. A method for obtaining semantic similarity, characterized in that: include: Acquire corpus data, wherein the corpus data includes context information and sentence information; Establishing a semantic model according to the context information and sentence information; Obtaining similarity of sentences with context information through the semantic model; The establishing of a semantic model according to the context information and the sentence information comprises: Extracting core words from the context information; Perform semantic mining on the sentence information according to a basic information database to obtain sentence vector information, wherein the basic information database includes: Chinese characters, numbers, letters and symbols; The core words and the vector information are combined, and a semantic model is obtained through multi-layer perceptron training.
2. A method for obtaining semantic similarity according to claim 1, characterized in that: The step of obtaining the corpus data also includes: Establish a basic information database.
3. The method for obtaining semantic similarity according to claim 1, characterized in that: The core words extracted from the context information are specifically: A genetic algorithm is used to select core words in the context information.
4. The method for obtaining semantic similarity according to claim 1, characterized in that: The performing semantic mining on the sentence information according to the basic information library to obtain sentence vector information includes: Establishing a sentence matrix, wherein the sentence matrix includes the size of the basic information library and the maximum length of the sentence; Vectorizing the sentence information; The sentence information is feature extracted through a convolutional neural network, and three layers of convolution and pooling are performed; Get vector information of the sentence.
5. The method for obtaining semantic similarity according to claim 1, characterized in that: The information combination of the core word and the vector information is specifically as follows: The core word and the vector information are spliced and combined by using a vector splicing method.
6. The method for obtaining semantic similarity according to claim 1, characterized in that: The corpus data also includes annotation information, and the annotation information is similar or dissimilar.
7. A device for obtaining semantic similarity, characterized in that: include: A corpus acquisition module, used to acquire corpus data, wherein the corpus data includes context information and sentence information; A model building module, used to build a semantic model according to the context information and sentence information; A similarity acquisition module, used to obtain the similarity of sentences with context information through the semantic model; The establishing of a semantic model according to the context information and the sentence information comprises: Extracting core words from the context information; Perform semantic mining on the sentence information according to a basic information database to obtain sentence vector information, wherein the basic information database includes: Chinese characters, numbers, letters and symbols; The core words and the vector information are combined, and a semantic model is obtained through multi-layer perceptron training.
8. An electronic device comprising a memory, a processor, and at least one application stored in the memory and configured to be executed by the processor, characterized in that: The application is configured to execute the method for obtaining semantic similarity according to any one of claims 1 to 6.
9. A readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the method for obtaining semantic similarity as described in any one of claims 1 to 6 is implemented.
