Paraphrase recognition method, device and readable storage medium based on dependency syntax

Obtaining the dependency syntax information of a sentence through dependency syntax analysis solves the problem of low recognition accuracy of paraphrase sentences in the existing technology and achieves higher recognition accuracy.

CN112069798BActive Publication Date: 2024-09-27WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010962477.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-14
Publication Date
2024-09-27
Estimated Expiration
2040-09-14

AI Technical Summary

Technical Problem

The accuracy of paraphrase sentence recognition in the existing technology is low, mainly due to the loss of information during the sentence vectorization process, resulting in the inability to fully represent the sentence information of the sentence.

Method used

A method based on dependency syntax is used to obtain the sentence vector representation of the sentence to be recognized and perform dependency syntax analysis to obtain the dependency syntax information of the sentence to identify the paraphrase.

Benefits of technology

It improves the accuracy of paraphrase sentence recognition, ensures the integrity of sentence information, and overcomes the problem of information loss caused by sentence vectorization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112069798B
    Figure CN112069798B
Patent Text Reader

Abstract

The present application discloses a method, device and readable storage medium for paraphrase recognition based on dependency syntax, wherein the paraphrase recognition method based on dependency syntax comprises: obtaining a first sentence to be recognized and a second sentence to be recognized, generating a sentence vector representation corresponding to the first sentence to be recognized and the second sentence to be recognized, and then respectively performing dependency syntax analysis on the first sentence to be recognized and the second sentence to be recognized, obtaining a first dependency syntax analysis result corresponding to the first sentence to be recognized and a second dependency syntax analysis result corresponding to the second sentence to be recognized, and then performing paraphrase recognition on the first sentence to be recognized and the second sentence to be recognized based on the sentence vector representation, the first dependency syntax analysis result and the second dependency syntax analysis result, and obtaining a first paraphrase recognition result. The present application solves the technical problem of low paraphrase recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence in financial technology (Fintech), and in particular to a method, device and readable storage medium for recognizing paraphrases based on dependency syntax. Background Art

[0002] With the continuous development of financial technology, especially Internet technology finance, more and more technologies (such as distributed, blockchain, artificial intelligence, etc.) are applied in the financial field, but the financial industry also puts forward higher requirements on technology, such as higher requirements on the distribution of corresponding to-do items in the financial industry.

[0003] With the continuous development of computer software and artificial intelligence, the application fields of artificial intelligence are becoming more and more extensive. In artificial intelligence-based dialogue systems, it is often necessary to correctly identify paraphrases. A paraphrase is generally defined as whether the current sentence is a semantically correct repetition of the previous sentence. At present, the two sentences to be identified are usually vectorized to map each word in the sentence to a preset vector space, and a sentence vector composed of word vectors is obtained. The two sentence vectors are then compared to determine whether the two sentences to be identified are paraphrases. However, due to the loss of some sentence information when the sentence is vectorized, the sentence vector cannot fully represent the sentence information of the sentence, which leads to a low accuracy rate in paraphrase recognition. Summary of the invention

[0004] The main purpose of the present application is to provide a method, device and readable storage medium for paraphrase recognition based on dependency syntax, aiming to solve the technical problem of low accuracy of paraphrase recognition in the prior art.

[0005] To achieve the above-mentioned purpose, the present application provides a paraphrase sentence recognition method based on dependency syntax, the paraphrase sentence recognition method based on dependency syntax is applied to a paraphrase sentence recognition device based on dependency syntax, and the paraphrase sentence recognition method based on dependency syntax includes:

[0006] Acquire a first sentence to be recognized and a second sentence to be recognized, and generate a sentence vector representation corresponding to the first sentence to be recognized and the second sentence to be recognized;

[0007] Performing dependency syntactic analysis on the first sentence to be recognized to obtain a first dependency syntactic analysis result corresponding to the first sentence to be recognized;

[0008] Performing dependency syntactic analysis on the second sentence to be recognized to obtain a second dependency syntactic analysis result corresponding to the second sentence to be recognized;

[0009] Based on the sentence vector representation, the first dependency syntactic analysis result and the second dependency syntactic analysis result, paraphrase sentence recognition is performed on the first sentence to be recognized and the second sentence to be recognized to obtain a first paraphrase sentence recognition result.

[0010] The present application also provides a paraphrase sentence recognition device based on dependency syntax, wherein the paraphrase sentence recognition device based on dependency syntax is a virtual device, and the paraphrase sentence recognition device based on dependency syntax is applied to a paraphrase sentence recognition device based on dependency syntax, and the paraphrase sentence recognition device based on dependency syntax includes:

[0011] A generation module, used to obtain a first sentence to be recognized and a second sentence to be recognized, and generate a sentence vector representation corresponding to the first sentence to be recognized and the second sentence to be recognized;

[0012] A first dependency syntactic analysis module, configured to perform dependency syntactic analysis on the first sentence to be recognized, and obtain a first dependency syntactic analysis result corresponding to the first sentence to be recognized;

[0013] A second dependency syntactic analysis module, configured to perform dependency syntactic analysis on the second sentence to be recognized, and obtain a second dependency syntactic analysis result corresponding to the second sentence to be recognized;

[0014] A paraphrase sentence recognition module is used to perform paraphrase sentence recognition on the first sentence to be recognized and the second sentence to be recognized based on the sentence vector representation, the first dependency syntactic analysis result and the second dependency syntactic analysis result to obtain a first paraphrase sentence recognition result.

[0015] The present application also provides a paraphrase sentence recognition device based on dependency syntax, which is a physical device. The paraphrase sentence recognition device based on dependency syntax includes: a memory, a processor, and a program of the paraphrase sentence recognition method based on dependency syntax stored in the memory and executable on the processor. When the program of the paraphrase sentence recognition method based on dependency syntax is executed by the processor, the steps of the paraphrase sentence recognition method based on dependency syntax as described above can be implemented.

[0016] The present application also provides a readable storage medium, on which is stored a program for implementing a method for recognizing paraphrases based on dependency syntax. When the program for implementing a method for recognizing paraphrases based on dependency syntax is executed by a processor, the steps of the method for recognizing paraphrases based on dependency syntax as described above are implemented.

[0017] The present application provides a method, device and readable storage medium for paraphrase sentence recognition based on dependency syntax. Compared with the technical means adopted in the prior art for paraphrase sentence recognition based on sentence vectors obtained by sentence vectorization, the present application first generates a sentence vector representation corresponding to the first sentence to be recognized and the second sentence to be recognized after obtaining a first sentence to be recognized and a second sentence to be recognized, thereby achieving the purpose of obtaining sentence feature information of the sentence to be recognized, and then based on a preset dependency syntax model, performs dependency syntax analysis on the first sentence to be recognized and the second sentence to be recognized, respectively, obtains a first dependency syntax analysis result corresponding to the first sentence to be recognized and a second dependency syntax analysis result corresponding to the second sentence to be recognized, thereby achieving the purpose of obtaining dependency syntax information of the sentence to be recognized based on the method of dependency syntax analysis, wherein, when the sentence is vectorized in the prior art, part of the sentence information lost is the syntax of the sentence. Information, while the dependency syntactic information is sentence information with syntactic information, thereby ensuring that the syntactic information of the sentence will not be lost when extracting the sentence information of the sentence, so that the sentence information of the extracted sentence is more complete, and then based on the sentence vector representation, the first dependency syntactic analysis result and the second dependency syntactic analysis result, the first sentence to be recognized and the second sentence to be recognized are paraphrased to obtain a first paraphrase sentence recognition result, so as to achieve the purpose of paraphrasing the sentence to be recognized based on the sentence feature information and more complete sentence information corresponding to the sentence to be recognized, and overcome the technical defect that when performing paraphrase sentence recognition based on the sentence vector obtained by sentence vectorization in the prior art, part of the sentence information is lost when the sentence is vectorized, which makes the sentence vector unable to fully represent the sentence information of the sentence, thereby resulting in a low accuracy rate of paraphrase sentence recognition, and improves the accuracy of paraphrase sentence recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0020] Figure 1 This is a flowchart of the first embodiment of the method for recognizing paraphrases based on dependency syntax of the present application;

[0021] Figure 2 This is a flow chart of a second embodiment of the method for recognizing paraphrases based on dependency syntax of the present application;

[0022] Figure 3 A schematic diagram of the overall flow chart of performing paraphrase sentence recognition based on a preset dependency syntax model and a preset paraphrase sentence recognition model in the paraphrase sentence recognition method based on dependency syntax of the present application;

[0023] Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.

[0024] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0025] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0026] The present application embodiment provides a method for recognizing paraphrases based on dependency syntax. In the first embodiment of the method for recognizing paraphrases based on dependency syntax of the present application, referring to Figure 1 , the paraphrase sentence recognition method based on dependency syntax includes:

[0027] Step S10, obtaining a first sentence to be recognized and a second sentence to be recognized, and generating a sentence vector representation corresponding to the first sentence to be recognized and the second sentence to be recognized;

[0028] In this embodiment, a first sentence to be recognized and a second sentence to be recognized are obtained, and a sentence vector representation corresponding to the first sentence to be recognized and the second sentence to be recognized is generated. Specifically, a first sentence to be recognized and a second sentence to be recognized are obtained, and the first sentence to be recognized and the second sentence to be recognized are converted into a character string to be recognized in a preset data format, and then based on a preset coding value corresponding to the character string to be recognized, the character string to be recognized is converted into a corresponding coding segment to be recognized, and then the coding segment to be recognized is normalized to convert the length of the coding segment to be recognized to a preset length, and obtain the coding segment to be vectorized, wherein, in an practicable manner, the normalization process is as follows: If the length of the code segment to be identified is greater than the preset length, the code segment to be identified is truncated; if the length of the code segment to be identified is less than the preset length, 0 is padded to the code segment to be identified, and then the code segment to be vectorized is input into the preset vectorization model to map the code segment to the preset vector space to obtain a sentence vector representation, wherein the preset data format is [CLS]X1[SEP]X2[SEP], wherein X1 is the first sentence to be identified, X2 is the second sentence to be identified, [CLS] and [SEP] are both pre-set strings in the preset data format, and the preset vectorization model includes a BERT (Bidirectional Encoder Representations from Transformers) model.

[0029] Wherein, after the step of obtaining the first sentence to be recognized and the second sentence to be recognized, the method for recognizing a paraphrase based on dependency syntax further includes:

[0030] Step A10, removing meaningless words from the first sentence to be recognized and the second sentence to be recognized, and obtaining a first standard sentence corresponding to the first sentence to be recognized and a second standard sentence corresponding to the second sentence to be recognized;

[0031] In this embodiment, it should be noted that the meaningless words are words that have no influence on the semantics of the sentence, such as modal particles.

[0032] Step A20, determining whether the first standard sentence and the second standard sentence are consistent, if consistent, determining that the first sentence to be recognized and the second sentence to be recognized are paraphrases of each other, and obtaining a fourth paraphrase recognition result.

[0033] In this embodiment, it is determined whether the first standard sentence and the second standard sentence are consistent. If they are consistent, it is determined that the first sentence to be recognized and the second sentence to be recognized are paraphrases of each other, and a fourth paraphrase sentence recognition result is obtained. Specifically, it is determined whether the first standard sentence and the second standard sentence are completely consistent. If they are completely consistent, it is determined that the first sentence to be recognized and the second sentence to be recognized are paraphrases of each other, and the fourth paraphrase sentence recognition result is obtained, wherein the fourth paraphrase sentence recognition result is that the first sentence to be recognized and the second recognition sentence are completely consistent after removing meaningless words, so the first sentence to be recognized and the second sentence to be recognized are paraphrases of each other. If they are not completely consistent, steps S20 to S30 are executed.

[0034] Step S20, performing dependency syntactic analysis on the first sentence to be recognized, and obtaining a first dependency syntactic analysis result corresponding to the first sentence to be recognized;

[0035] In this embodiment, it should be noted that the method for paraphrase recognition based on dependency syntax is applied to a human-computer dialogue system, and the paraphrase recognition device based on dependency syntax includes a preset dependency syntax model, wherein the preset dependency syntax model is a pre-trained machine learning model for performing dependency syntax analysis on sentences, wherein the process of dependency syntax analysis is the process of parsing the syntactic information of the sentence, wherein the syntactic information includes sentence information and word component information, wherein the word component information includes word components corresponding to each first word to be recognized in the first sentence to be recognized, wherein the word components include subject, predicate, object and attributive, etc. For example, assuming the sentence is "Who am I", after dependency syntax analysis, the sentence information indicates that the sentence is a subject-predicate-object sentence, and the word component information indicates that "I" is the subject, "is" is the predicate, and "who" is the object.

[0036] Perform dependency syntactic analysis on the first sentence to be recognized to obtain a first dependency syntactic analysis result corresponding to the first sentence to be recognized. Specifically, input the first sentence to be recognized into a preset first dependency syntactic model, perform dependency relationship determination and dependency relationship type prediction on the first sentence to be recognized, respectively, so as to perform dependency syntactic analysis on the first sentence to be recognized to obtain a first dependency syntactic analysis result. It should be noted that the purpose of performing dependency relationship determination is to determine whether there is a dependency relationship between words, and the purpose of dependency relationship type prediction is to predict the type of pre-stored relationship, for example , assuming that the first sentence to be recognized is the sentence "ABC", where A, B and C are all words in the first sentence to be recognized, after performing dependency relationship determination, it can be determined that B depends on A, and C depends on B. After performing dependency relationship type prediction, it can be determined that the dependency relationship between A and B is a subject-predicate relationship, and the dependency relationship between B and C is a verb-object relationship. In one embodiment, the steps of performing dependency relationship determination and dependency relationship type prediction on the first sentence to be recognized respectively to perform dependency syntactic analysis on the first sentence to be recognized, and obtaining the first dependency syntactic analysis result include:

[0037] Dependency discrimination is performed on the first sentence to be recognized to obtain a first dependency discrimination result corresponding to the first sentence to be recognized, and dependency type prediction is performed on the first sentence to be recognized to obtain a first dependency type prediction result corresponding to the first sentence to be recognized, and then the first dependency discrimination result and the first dependency type prediction result are merged to obtain a first dependency type label between words in the first sentence to be recognized, wherein the first dependency type label is an identifier of the dependency type between words in the first sentence to be recognized, and then based on the first dependency type label, the sentence information and word component information of the first sentence to be recognized can be determined to obtain the first dependency syntactic analysis result, wherein the first dependency discrimination result can be represented by a vector, and the dependency discrimination result in vector form is a first dependency discrimination vector, and the first dependency type prediction result can be represented by a matrix, and the dependency type prediction result in matrix form is a first dependency A dependency type prediction probability matrix, wherein the first dependency relationship discrimination vector is a vector representation of the result obtained by performing dependency relationship discrimination on the first sentence to be recognized, and the first dependency relationship type prediction probability matrix is ​​a matrix representation of the result obtained by performing dependency relationship type prediction on the first sentence to be recognized, wherein the value on each bit position in the first dependency relationship type prediction probability matrix is ​​a first dependency relationship type probability prediction vector between one word and another word in the first sentence to be recognized, wherein the value on each bit position in the first dependency relationship type probability prediction vector is a probability value that the dependency relationship between one word and another word in the first sentence to be recognized belongs to a preset dependency relationship corresponding to the bit position, wherein the preset dependency relationship includes a subject-predicate relationship, a verb-object relationship, etc. For example, assuming that the dependency relationship type probability prediction vector between word A and word B is (0.1, 0.9), 0.1 indicates that the probability of subject-predicate relationship between word A and word B is 10%, and 0.9 indicates that the probability of verb-object relationship between word A and word B is 90%.

[0038] Step S30, performing dependency syntactic analysis on the second sentence to be recognized, and obtaining a second dependency syntactic analysis result corresponding to the second sentence to be recognized;

[0039] In this embodiment, dependency syntactic analysis is performed on the second sentence to be recognized to obtain a second dependency syntactic analysis result corresponding to the second sentence to be recognized. Specifically, the second sentence to be recognized is input into a preset second dependency syntactic model, and dependency relationship discrimination and dependency relationship type prediction are performed on the second sentence to be recognized, so as to perform dependency syntactic analysis on the second sentence to be recognized to obtain a second dependency syntactic analysis result. It should be noted that the purpose of performing dependency relationship discrimination is to determine whether there is a dependency relationship between words, and the purpose of dependency relationship type prediction is to predict the type of pre-stored relationship. In a feasible embodiment, the steps of performing dependency relationship discrimination and dependency relationship type prediction on the second sentence to be recognized, so as to perform dependency syntactic analysis on the second sentence to be recognized, and obtaining the second dependency syntactic analysis result include:

[0040] Dependency discrimination is performed on the second sentence to be recognized, and a second dependency discrimination result corresponding to the second sentence to be recognized is obtained; and dependency type prediction is performed on the second sentence to be recognized, and a second dependency type prediction result corresponding to the second sentence to be recognized is obtained; and then the second dependency discrimination result and the second dependency type prediction result are merged to obtain a second dependency type label between words in the second sentence to be recognized, wherein the second dependency type label is an identifier of the dependency type between words in the second sentence to be recognized, and then based on the second dependency type label, the sentence information and word component information of the second sentence to be recognized can be determined to obtain the second dependency syntactic analysis result, wherein the second dependency discrimination result can be represented by a vector, and the second dependency discrimination result in vector form can be represented by a second dependency type label. The result is a second dependency discriminant vector, the second dependency type prediction result can be represented by a matrix, and the second dependency type prediction result in matrix form is a second dependency type prediction probability matrix, wherein the second dependency discriminant vector is a vector representation of the result obtained by performing dependency discrimination on the second sentence to be recognized, and the second dependency type prediction probability matrix is ​​a matrix representation of the result obtained by performing dependency type prediction on the second sentence to be recognized, wherein the value of each bit in the second dependency type prediction probability matrix is ​​a second dependency type probability prediction vector between one word and another word in the first sentence to be recognized, wherein the value of each bit in the second dependency type probability prediction vector is a probability value that the dependency between one word and another word in the first sentence to be recognized belongs to the preset dependency corresponding to the bit.

[0041] The step of performing dependency syntactic analysis on the second sentence to be recognized to obtain a second dependency syntactic analysis result corresponding to the second sentence to be recognized comprises:

[0042] Step S31, vectorizing the second sentence to be recognized to obtain a second vectorized sentence;

[0043] In this embodiment, the second sentence to be recognized is vectorized to obtain a second vectorized sentence. Specifically, a second word to be recognized vector, a second part-of-speech vector to be recognized, and a second word to be recognized position vector are generated corresponding to each second word to be recognized in the second sentence to be recognized, wherein the second word to be recognized vector is an encoding vector representing the second word to be recognized, which is used to uniquely represent the second word to be recognized, the second part-of-speech vector to be recognized is an encoding vector representing the part of speech of the second word to be recognized, and the second word position vector to be recognized is an encoding vector representing the position of the second word to be recognized in the second sentence to be recognized, and then based on the second word vector to be recognized, the corresponding second part-of-speech vector to be recognized, and the corresponding second word position vector to be recognized, a second vectorized word corresponding to each second word to be recognized is generated, and then the matrix formed by each second vectorized word is used as the second vectorized sentence.

[0044] Step S32: performing dependency determination on the second vectorized sentence based on a preset second dependency determination model to obtain a second dependency determination result;

[0045] In this embodiment, it should be noted that the preset second dependency syntactic model includes a preset second dependency relationship discrimination model, wherein the preset second dependency relationship discrimination model is a machine learning model for determining whether there is a dependency relationship between words in the second sentence to be recognized.

[0046] Based on a preset second dependency discrimination model, dependency discrimination is performed on the second vectorized sentence to obtain a second dependency discrimination result. Specifically, the second vectorized sentence is input into the second dependency discrimination model, and dependency discrimination is performed on the second vectorized sentence to determine whether there is a dependency relationship between words in the second sentence to be recognized, and a second dependency discrimination result is obtained.

[0047] Step S33: Based on a preset second dependency type prediction model and the second dependency discrimination result, a dependency type prediction is performed on the second vectorized statement to obtain a second dependency type prediction result.

[0048] In this embodiment, it should be noted that the preset second dependency syntactic model includes a preset second dependency discriminant model, wherein the preset second dependency discriminant model is a machine learning model for predicting the type of dependency relationship between words in the second sentence to be recognized.

[0049] Based on the preset second dependency type prediction model and the second dependency discrimination result, the dependency type of the second vectorized sentence is predicted to obtain the second dependency type prediction result. Specifically, based on the preset second dependency type prediction model, the dependency type of the second vectorized sentence is predicted to obtain the second dependency type probability score matrix, wherein it should be noted that there is a second dependency type probability score vector on each bit in the second dependency type probability score matrix, wherein the value on each bit of the second dependency type probability score vector is the probability score of the preset dependency type. For example, assuming that the second dependency type probability score vector is (A, B, C), and the first bit of the second dependency type probability score vector corresponds to the subject-predicate relationship, the second bit corresponds to the verb-object relationship, and the third bit corresponds to the parallel relationship, then A is the probability score between the two words corresponding to the second dependency type probability score vector. The dependency relationship is the probability score of the subject-predicate relationship, B is the probability score that the dependency relationship between the two words corresponding to the second dependency relationship type probability score vector is the subject-predicate relationship, A is the probability score that the dependency relationship between the two words corresponding to the second dependency relationship type probability score vector is the subject-predicate relationship, and then based on the second dependency relationship discrimination result, each second target dependency relationship type probability score vector is selected in the second dependency relationship type probability score matrix, and then the dependency relationship type corresponding to the maximum value in each second target dependency relationship type probability score vector is used as the second target dependency relationship type, wherein each second target dependency relationship type is the dependency relationship type between words in the second sentence to be recognized, that is, the second dependency relationship type prediction result is obtained.

[0050] Step S34: determine the second dependency syntax analysis result based on the second dependency relationship type prediction result.

[0051] In this embodiment, based on the second dependency relationship type prediction result, the second dependency syntactic analysis result is determined. Specifically, based on the dependency relationship type between words in the second sentence to be recognized, the word components of each second word to be recognized in the second sentence to be recognized and the sentence pattern of the second sentence to be recognized are determined, and the word component information and the corresponding sentence pattern information of the second sentence to be recognized are obtained, and then the word component information and the sentence pattern information of the second sentence to be recognized are used together as the second dependency syntactic analysis result.

[0052] In addition, it should be noted that the preset first dependency syntactic model and the preset second dependency syntactic model may be the same model or may be set to different models.

[0053] Wherein, after the step of performing dependency syntactic analysis on the second sentence to be recognized to obtain a second dependency syntactic analysis result corresponding to the second sentence to be recognized, the dependency syntactic paraphrase sentence recognition method further includes:

[0054] Step B10, determining a first dependency vector corresponding to the first sentence to be recognized based on the first dependency syntactic analysis result;

[0055] In this embodiment, it should be noted that the first dependency syntactic analysis result includes word component information corresponding to the first sentence to be recognized.

[0056] Based on the first dependency syntactic analysis result, determine the first dependency vector corresponding to the first sentence to be recognized, specifically, extract word component information of the first sentence to be recognized from the first dependency syntactic analysis result, wherein the word component information of the first sentence to be recognized includes the first word components corresponding to each first word to be recognized in the first sentence to be recognized, and then based on each of the first word components and the preset word component arrangement order, concatenate the word vectors corresponding to each of the first words to be recognized to obtain the first dependency vector, wherein for the word components of the type that do not exist in each of the first word components, a 0 vector is added when concatenating the word vectors corresponding to each of the first words to be recognized, Among them, in an implementable method, the preset word components are arranged in the order of [subject, predicate, object, attributive, adverbial, complement, parallel component, left-attached component, right-attached component, independent component]. For example, assuming that the first sentence to be recognized is "Who am I", after dependency syntactic analysis, it is determined that the first word component corresponding to the first word to be recognized "I" is the subject, and the corresponding word vector is A, and the first word component corresponding to the first word to be recognized "is" is determined to be the predicate, and the corresponding word vector is B, and the first word component corresponding to the first word to be recognized "who" is determined to be the object, and the corresponding word vector is C, then the first dependency vector is (A, B, C, 0, 0, 0, 0, 0, 0, 0).

[0057] Step B20, determining a second dependency vector corresponding to the second sentence to be recognized based on the second dependency syntactic analysis result;

[0058] In this embodiment, based on the second dependency syntactic analysis result, the second dependency vector corresponding to the second sentence to be recognized is determined, specifically, the word component information of the second sentence to be recognized is extracted from the second dependency syntactic analysis result, wherein the word component information of the second sentence to be recognized includes the second word components corresponding to each second word to be recognized in the second sentence to be recognized, and then based on each second word component and the preset word component arrangement order, the word vectors corresponding to each second word to be recognized are spliced ​​to obtain the second dependency vector, wherein, for the word component of the type that does not exist in each second word component, a 0 vector is added when splicing the word vectors corresponding to each second word to be recognized.

[0059] Step B30: Based on the first dependency vector and the second dependency vector, perform paraphrase sentence recognition on the first sentence to be recognized and the second sentence to be recognized to obtain a second paraphrase sentence recognition result.

[0060] In this embodiment, based on the first dependency vector and the second dependency vector, the first sentence to be recognized and the second sentence to be recognized are paraphrased to obtain a second paraphrase sentence recognition result. Specifically, the first dependency vector and the second dependency vector are compared. If the first dependency vector and the second dependency vector are consistent, it is determined that the first sentence to be recognized and the second sentence to be recognized are paraphrases of each other, and a second paraphrase sentence recognition result is obtained, wherein the second paraphrase sentence recognition result is that since the first dependency vector corresponding to the first sentence to be recognized is consistent with the second dependency vector of the second sentence to be recognized, the first sentence to be recognized and the second sentence to be recognized are paraphrases of each other. If the first dependency vector and the second dependency vector are inconsistent, step S40 is executed.

[0061] The step of performing paraphrase sentence recognition on the first sentence to be recognized and the second sentence to be recognized based on the first dependency vector and the second dependency vector to obtain a second paraphrase sentence recognition result comprises:

[0062] Step B31, based on the first dependency vector and the second dependency vector, generating the same-word component phrases corresponding to the first sentence to be recognized and the second sentence to be recognized;

[0063] In this embodiment, it should be noted that the first dependency vector and the second dependency vector are vectors with the same number of bits, and the same positions of the first dependency vector and the second dependency vector correspond to the same word components. For example, assuming that the first bit of the first dependency vector corresponds to the subject, the first bit of the second dependency vector should also correspond to the subject.

[0064] Based on the first dependency vector and the second dependency vector, generate the same-word component phrases corresponding to the first sentence to be recognized and the second sentence to be recognized. Specifically, the word vectors at the same position in the first dependency vector and the second dependency vector are combined into the same-word component phrases. For example, assuming that the first dependency vector is (A, B, C) and the second dependency vector is (E, F, G), the same-word component phrases are (A, E), (B, F) and (C, G), respectively.

[0065] Step B32, determining whether the target words to be recognized corresponding to the same word component phrases are semantically consistent;

[0066] In this embodiment, it is determined whether the target words to be recognized corresponding to each of the same word component phrases are semantically consistent. Specifically, it is determined whether the target words to be recognized corresponding to the two word vectors in each of the same word component phrases are all consistent or are synonyms. If the target words to be recognized corresponding to the two word vectors in each of the same word component phrases are all consistent or are synonyms, then it is determined that the semantics of the target words to be recognized corresponding to each of the same word component phrases are all consistent. If the target words to be recognized corresponding to the two word vectors in each of the same word component phrases are not consistent or are not synonyms, then it is determined that the semantics of the target words to be recognized corresponding to each of the same word component phrases are not consistent. In one feasible method, the step of determining whether the target words to be recognized corresponding to the two word vectors in each of the same word component phrases are all consistent or are synonyms includes:

[0067] For each of the two word vectors in the same word component phrase, the following steps are performed:

[0068] Calculate the word vector distance between the two word vectors in each of the same word component phrases. If the word vector distance is less than or equal to a preset distance threshold, it is determined that the target words to be recognized corresponding to the two word vectors in the same word component phrase are consistent or synonyms. If the word vector distance is greater than the preset distance threshold, it is determined that the target words to be recognized corresponding to the two word vectors in the same word component phrase are inconsistent or not synonyms.

[0069] Step B33, if the semantics are consistent, determining that the first sentence to be recognized and the second sentence to be recognized are paraphrases of each other, and obtaining a recognition result of the second paraphrase;

[0070] Step B34, if the semantics are not consistent, determining the semantically inconsistent target word components, and judging whether the target word components meet the preset repetition sentence word component conditions;

[0071] In this embodiment, if the semantics are not uniformly consistent, the semantically inconsistent target word component is determined, and it is judged whether the target word component meets the preset repetition sentence word component condition. Specifically, if the semantics are not uniformly consistent, the semantically inconsistent target word component is determined, and then it is judged whether the target word component is a subject or an object. If the target word component is neither a subject nor an object, step S40 is executed. If the target word component is a subject or an object, it is judged whether the second sentence to be recognized lacks a subject or an object compared to the first sentence to be recognized, or whether the subject and object of the second sentence to be recognized are exchanged compared to the first sentence to be recognized, or whether the subject or object of the second sentence to be recognized is exchanged between the first person pronoun and the second person pronoun. If so, it is judged that the target word component meets the preset repetition sentence word component condition. If not, it is judged that the target word component does not meet the preset repetition sentence word component condition.

[0072] Step B35: If the conditions are met, it is determined that the first sentence to be recognized and the second sentence to be recognized are paraphrases of each other, and a third paraphrase recognition result is obtained.

[0073] In this embodiment, it should be noted that the third paraphrase recognition result is that the first sentence to be recognized and the second sentence to be recognized are paraphrases of each other because the semantically inconsistent target word component meets the preset paraphrase component condition.

[0074] Step S40, based on the sentence vector representation, the first dependency syntactic analysis result and the second dependency syntactic analysis result, perform paraphrase sentence recognition on the first sentence to be recognized and the second sentence to be recognized to obtain a first paraphrase sentence recognition result.

[0075] In this embodiment, the first dependency parsing result includes a first dependency vector, and the second dependency parsing result includes a second dependency vector.

[0076] Based on the sentence vector representation, the first dependency syntactic analysis result and the second dependency syntactic analysis result, the first sentence to be recognized and the second sentence to be recognized are subjected to paraphrase sentence recognition to obtain a first paraphrase sentence recognition result. Specifically, based on a preset aggregation rule, the sentence vector representation, the first dependency vector and the second dependency vector are aggregated to obtain an aggregated vector, and the aggregated vector is input into a preset paraphrase sentence recognition model. The aggregated vector is subjected to a preset number of convolution and pooling processes and full connection to perform paraphrase sentence classification on the first sentence to be recognized and the second sentence to be recognized corresponding to the aggregated vector to obtain a paraphrase sentence classification vector, and the paraphrase sentence classification vector is used as the first paraphrase sentence recognition result, wherein the paraphrase sentence classification vector includes a first probability that the first sentence to be recognized and the second sentence to be recognized are paraphrases, and a second probability that the first sentence to be recognized and the second sentence to be recognized are not paraphrases, wherein the preset aggregation rule includes weighted average, summation and weighted summation, etc., and the preset paraphrase sentence recognition model is a pre-set machine recognition model for paraphrase sentence recognition.

[0077] The first dependency syntactic analysis result includes a first dependency vector, and the second dependency syntactic analysis result includes a second dependency vector.

[0078] The step of performing paraphrase sentence recognition on the first sentence to be recognized and the second sentence to be recognized based on the sentence vector representation, the first dependency syntactic analysis result, and the second dependency syntactic analysis result to obtain a first paraphrase sentence recognition result comprises:

[0079] Step S41, aggregating the sentence vector representation, the first dependency vector and the second dependency vector to obtain an aggregated vector;

[0080] In this embodiment, the sentence vector representation, the first dependency vector and the second dependency vector are aggregated to obtain an aggregated vector. Specifically, the sentence vector representation, the first dependency vector and the second dependency vector are spliced ​​to obtain a spliced ​​vector, and the spliced ​​vector is used as the aggregated vector.

[0081] Step S42, inputting the aggregated vector into a model hidden layer of a preset paraphrase recognition model to perform feature extraction on the aggregated vector to obtain a paraphrase feature representation vector;

[0082] In this embodiment, the aggregated vector is input into the model hidden layer of the preset paraphrase recognition model to perform feature extraction on the aggregated vector to obtain the paraphrase feature representation vector. Specifically, the aggregated vector is input from the model input layer of the preset paraphrase recognition model into the model hidden layer, and the aggregated vector is matrix-transformed to extract the first feature information supporting the paraphrase decision and the second feature information not supporting the paraphrase decision in the aggregated vector to obtain the paraphrase feature representation vector, wherein the model hidden layer can be set as a multi-layer perceptron, the paraphrase decision is the decision made by the preset paraphrase recognition model to determine whether the first sentence to be recognized and the second sentence to be recognized are paraphrases, and in an implementable method, the paraphrase feature representation vector is a 2-bit vector, wherein the value on one bit of the paraphrase feature representation vector is the first decision information vector, corresponding to the first feature information supporting the paraphrase decision, and the value on the other bit of the paraphrase feature representation vector is the second decision information vector, corresponding to the second feature information not supporting the paraphrase decision.

[0083] Step S43, inputting the paraphrase feature representation vector into the model output layer of the preset paraphrase recognition model to map the paraphrase feature representation vector into a paraphrase probability score vector;

[0084] In this embodiment, the paraphrase sentence feature representation vector is input into the model output layer of the preset paraphrase sentence recognition model to map the paraphrase sentence feature representation vector into a paraphrase sentence probability score vector. Specifically, the paraphrase sentence feature representation vector is input into the model output layer of the preset paraphrase sentence model, wherein the model output layer can be set to softmax, and then the first decision information vector and the second decision information vector in the paraphrase sentence feature representation vector are respectively mapped into numerical values ​​within a preset range, a first probability score corresponding to the first decision information vector and a second probability score corresponding to the second decision information vector are obtained, and the first probability score and the second probability score are combined into a paraphrase sentence probability score vector.

[0085] Step S44: generating the first paraphrase sentence recognition result based on the paraphrase sentence probability score vector.

[0086] In this embodiment, based on the paraphrase sentence probability score vector, the first paraphrase sentence recognition result is generated. Specifically, the first probability score and the second probability score are compared. If the first probability score is greater than the second probability score, the first probability score is compared with a preset probability score threshold. If the first probability score is greater than the preset probability score threshold, the first paraphrase sentence recognition result is determined to be that the first sentence to be recognized and the second sentence to be recognized are paraphrase sentences. If the first probability score is less than or equal to the preset probability score threshold, or the first probability score is less than or equal to the second probability score, the first paraphrase sentence recognition result is determined to be that the first sentence to be recognized and the second sentence to be recognized are not paraphrase sentences.

[0087] In addition, when it is necessary to explain, since the present embodiment performs paraphrase sentence recognition based on word components determined by dependency syntactic analysis, it can explain which word components in the first sentence to be recognized are semantically different from the second sentence to be recognized, resulting in the first sentence to be recognized and the second sentence to be recognized not being paraphrases, that is, it can explain that the first sentence to be recognized and the second sentence to be recognized are the originals of paraphrases, thereby improving the interpretability of paraphrase sentence recognition, thereby making the confidence of the paraphrase sentence recognition result higher.

[0088] The present embodiment provides a method for recognizing paraphrased sentences based on dependency syntax. Compared with the technical means adopted in the prior art for recognizing paraphrased sentences based on sentence vectors obtained by sentence vectorization, after obtaining a first sentence to be recognized and a second sentence to be recognized, the present embodiment first generates a sentence vector representation corresponding to the first sentence to be recognized and the second sentence to be recognized, thereby achieving the purpose of obtaining sentence feature information of the sentence to be recognized. Then, based on a preset dependency syntax model, dependency syntax analysis is performed on the first sentence to be recognized and the second sentence to be recognized, respectively, to obtain a first dependency syntax analysis result corresponding to the first sentence to be recognized and a second dependency syntax analysis result corresponding to the second sentence to be recognized, thereby achieving the purpose of obtaining dependency syntax information of the sentence to be recognized based on the method for dependency syntax analysis. In the prior art, when sentences are vectorized, part of the sentence information lost is the syntactic information of the sentence, and The dependency syntactic information is sentence information with syntactic information, which can ensure that the syntactic information of the sentence will not be lost when extracting the sentence information of the sentence, so that the sentence information of the extracted sentence is more complete, and then based on the sentence vector representation, the first dependency syntactic analysis result and the second dependency syntactic analysis result, the first sentence to be recognized and the second sentence to be recognized are paraphrased to obtain a first paraphrase recognition result, which can achieve the purpose of paraphrasing the sentence to be recognized based on the sentence feature information and more complete sentence information corresponding to the sentence to be recognized, and overcome the technical defect that when performing paraphrase sentence recognition based on the sentence vector obtained by sentence vectorization in the prior art, part of the sentence information is lost when the sentence is vectorized, which makes the sentence vector unable to fully represent the sentence information of the sentence, thereby resulting in a low accuracy rate of paraphrase recognition, and improves the accuracy of paraphrase recognition.

[0089] Further, refer to Figure 2 Based on the first embodiment of the present application, in another embodiment of the present application, the step of performing dependency syntactic analysis on the first sentence to be recognized and obtaining a first dependency syntactic analysis result corresponding to the first sentence to be recognized includes:

[0090] Step S21, vectorizing the first sentence to be recognized to obtain a first vectorized sentence;

[0091] In this embodiment, the first sentence to be recognized is vectorized to obtain a first vectorized sentence. Specifically, a word vector to be recognized, a part-of-speech vector to be recognized and a word position vector to be recognized are generated corresponding to each word to be recognized in the first sentence to be recognized, wherein the word vector to be recognized is a coding vector representing the word to be recognized, which is used to uniquely represent the word to be recognized, the part-of-speech vector to be recognized is a coding vector representing the part of speech of the word to be recognized, and the word position vector to be recognized is a coding vector representing the position of the word to be recognized in the first sentence to be recognized, and then based on the word vector to be recognized, the corresponding part-of-speech vector to be recognized and the corresponding word position vector to be recognized corresponding to each word to be recognized, a vectorized word corresponding to each word to be recognized is generated, and then the matrix composed of each vectorized word is used as the first vectorized sentence.

[0092] The first sentence to be recognized includes at least one word to be recognized, and the first vectorized sentence includes at least one vectorized word.

[0093] The step of vectorizing the first sentence to be recognized to obtain a first vectorized sentence includes:

[0094] Step S211, obtaining a word vector to be recognized, a part-of-speech vector to be recognized, and a position vector to be recognized corresponding to the word to be recognized;

[0095] In this embodiment, the word to be recognized vector, the corresponding part-of-speech vector and the corresponding word to be recognized position vector corresponding to the word to be recognized are obtained. Specifically, based on a preset word vector generation model, the word to be recognized is mapped to a preset vector space, the word to be recognized vector corresponding to the word to be recognized is obtained, and the corresponding part-of-speech vector to be recognized is matched for the word to be recognized. Furthermore, based on the position of the word to be recognized in the first sentence to be recognized, the word to be recognized position vector corresponding to the word to be recognized is generated.

[0096] Step S212, generating the vectorized word based on the word vector to be recognized, the part-of-speech vector to be recognized and the word position vector to be recognized.

[0097] In this embodiment, the vectorized word is generated based on the word vector to be recognized, the part-of-speech vector to be recognized, and the word position vector to be recognized. Specifically, the word to be recognized, the part-of-speech vector to be recognized, and the word position vector to be recognized are input into a preset vectorized word calculation formula to obtain the vectorized word, wherein the preset vectorized word calculation formula is as follows:

[0098]

[0099] Among them, X i is the vectorized word, E wis the word vector to be recognized, E t is the part-of-speech vector to be identified, E p is the position vector of the word to be recognized, It is the concatenation operation between vectors.

[0100] Step S22: performing dependency determination on the first vectorized sentence based on the dependency determination model to obtain a first dependency determination result;

[0101] In this embodiment, it should be noted that the dependency relationship determination model is a machine learning model used to determine whether there is a dependency relationship between words in the first sentence to be recognized.

[0102] Based on the dependency discrimination model, dependency discrimination is performed on the first vectorized sentence to obtain a first dependency discrimination result. Specifically, the first vectorized sentence is input into the dependency discrimination model, and dependency discrimination is performed on the first vectorized sentence to determine whether there is a dependency relationship between words in the first sentence to be recognized, and a first dependency discrimination result is obtained.

[0103] The dependency relationship discrimination model includes a first feature extraction model, a first fully connected network, a second fully connected network and a first dual affine transformation network.

[0104] The step of performing dependency determination on the first vectorized sentence based on the dependency determination model to obtain a first dependency determination result includes:

[0105] Step S221, performing feature extraction on the first vectorized sentence based on the first feature extraction model to obtain a first feature extraction result;

[0106] In this embodiment, it should be noted that the first feature extraction model is a neural network that extracts features from the first vectorized sentence, and the first feature extraction model includes a Transformer model, an RNN network, a CNN network, and the like.

[0107] Based on the first feature extraction model, feature extraction is performed on the first vectorized statement to obtain a first feature extraction result. Specifically, the first vectorized statement is input into the first feature extraction model, feature extraction is performed on the first vectorized statement to obtain a first feature extraction matrix, and the first feature extraction matrix is ​​used as the first feature extraction result.

[0108] Step S222, based on the first fully connected network and the second fully connected network, respectively fully connect the first feature extraction result to obtain a first sentence vector and a second sentence vector;

[0109] In this embodiment, based on the first fully connected network and the second fully connected network, the first feature extraction result is fully connected respectively to obtain a first sentence vector and a second sentence vector. Specifically, the first feature extraction matrix is ​​input into the first fully connected network, the first feature extraction matrix is ​​fully connected to obtain a first sentence vector, and the first feature extraction matrix is ​​input into the second fully connected network, the first feature extraction matrix is ​​fully connected to obtain a second sentence vector. It should be noted that the first sentence vector includes at least a prefix vector, which is used to represent the representation vector of the dependent word in the dependency relationship, and the second sentence vector includes at least a suffix vector, which is used to represent the representation vector of the dependent word in the dependency relationship. For example, assuming that word A depends on word B, the word representation vector corresponding to word B is the prefix vector, and the word representation vector corresponding to word A is the suffix vector.

[0110] Step S223: Based on the first double affine transformation network, perform double affine transformation on the first sentence vector and the second sentence vector to obtain a dependency score matrix;

[0111] In this embodiment, based on the first double affine transformation network, the first sentence vector and the second sentence vector are subjected to double affine transformation to obtain a dependency score matrix. Specifically, the first sentence vector and the second sentence vector are input into the first double affine transformation network, and the first sentence vector and the second sentence vector are subjected to double affine transformation to calculate the probability score that there is a dependency relationship between each prefix vector in the first sentence vector and each suffix vector in the second sentence vector, so as to obtain the dependency score matrix, wherein the dependency score matrix is ​​a score matrix composed of the probability scores that there is a dependency relationship between each prefix vector and each suffix vector.

[0112] Step S224: determining the first dependency determination result based on the dependency score matrix.

[0113] In this embodiment, based on the dependency score matrix, the first dependency judgment result is determined, specifically based on the preset maximum spanning tree algorithm, the maximum probability score and that meets the preset score selection condition are selected in the dependency score matrix, and the dependency vector composed of the vectorized words corresponding to the dependency relationship corresponding to the maximum probability score and each corresponding target probability score is used as the first dependency judgment result, wherein the preset score selection condition includes a one-to-one correspondence between the words to be recognized corresponding to each target probability score and the words to be recognized in the first sentence to be recognized, etc. For example, assuming that each of the target probability scores is A and B, wherein the target probability score A represents the probability score of word b being attached to word a, the target probability score B represents the probability score of word c being attached to word b, and the vectorized word corresponding to word a is vector X, the vectorized word corresponding to word b is vector Y, and the vectorized word corresponding to word c is vector Z, and then the dependency vector is a vector (X, 1, 0, 0, 1, Y, 1, 0, 0, 1, Z), wherein (1, 0, 0, 1) indicates that there is a dependency relationship between words.

[0114] Step S23: performing dependency type prediction on the first vectorized statement based on the dependency type prediction model and the first dependency discrimination result to obtain a first dependency type prediction result;

[0115] In this embodiment, based on the dependency type prediction model and the first dependency discrimination result, the dependency type prediction is performed on the first vectorized sentence to obtain a first dependency type prediction result. Specifically, based on the dependency type prediction model, the dependency type prediction is performed on the first vectorized sentence to obtain a dependency type probability score matrix, wherein it should be noted that there is a dependency type probability score vector on each bit in the dependency type probability score matrix, wherein the value on each bit of the dependency type probability score vector is the probability score of a preset dependency type. For example, assuming that the dependency type probability score vector is (A, B, C), and the first bit of the dependency type probability score vector corresponds to the subject-predicate relationship, and the second bit corresponds to the verb. Object relationship, the third position corresponds to a parallel relationship, then A is the probability score that the dependency relationship between the two words corresponding to the dependency relationship type probability score vector is a subject-predicate relationship, B is the probability score that the dependency relationship between the two words corresponding to the dependency relationship type probability score vector is a verb-object relationship, and A is the probability score that the dependency relationship between the two words corresponding to the dependency relationship type probability score vector is a subject-predicate relationship, and then based on the first dependency judgment result, each target dependency relationship type probability score vector is selected in the dependency relationship type probability score matrix, and then the dependency relationship type corresponding to the maximum value in each target dependency relationship type probability score vector is used as the target dependency relationship type, and then the dependency relationship type between the words of the first sentence to be recognized is obtained, that is, the first dependency relationship type prediction result is obtained.

[0116] Wherein, the first dependency determination result includes a dependency vector,

[0117] The step of performing dependency type prediction on the first vectorized statement based on the dependency type prediction model and the first dependency discrimination result to obtain the first dependency type prediction result comprises:

[0118] Step S231: Based on the dependency type prediction model, predict the dependency type of the first vectorized sentence to obtain a dependency type probability score matrix;

[0119] In this embodiment, it should be noted that the dependency type prediction model includes a second feature extraction model, a third fully connected network, a fourth fully connected network and a second dual affine transformation network.

[0120] Based on the dependency type prediction model, the dependency type of the first vectorized sentence is predicted to obtain a dependency type probability score matrix. Specifically, the first vectorized sentence is input into a second feature extraction model, and feature extraction is performed on the first vectorized sentence to obtain a second feature extraction matrix. The second feature extraction matrix is ​​respectively input into a third fully connected network and a fourth fully connected network to obtain a third sentence vector and a fourth sentence vector corresponding to the second feature extraction matrix. The third sentence vector and the fourth sentence vector are input into a second double affine transformation network, and double affine transformation is performed on the third sentence vector and the fourth sentence vector to obtain the dependency type probability score matrix.

[0121] Step S232: The dependency type probability score matrix and the dependency vector are merged to obtain the first dependency type prediction result.

[0122] In this embodiment, the dependency type probability score matrix and the dependency vector are fused to obtain the first dependency type prediction result. Specifically, based on a preset fusion rule, each dependency type probability score vector in the dependency type probability score matrix is ​​fused with the dependency vector to obtain a dependency type probability vector corresponding to each dependency type probability score vector, wherein the preset fusion rule includes weighted averaging, splicing, summing, etc., and the value on each bit of the dependency type probability vector is the probability of a preset dependency type, and the preset dependency types include subject-predicate relationship type, verb-object relationship type, and parallel relationship type, etc., and then the probability of each dependency type probability score vector is calculated based on the preset fusion rule. The maximum probability value in the rate vector is selected as the target dependency type probability, and then the dependency type corresponding to each maximum dependency type probability that meets the preset probability selection condition is determined among each of the target dependency type probabilities, and the dependency type corresponding to each maximum dependency type probability is used as the first dependency type prediction result, wherein the preset probability selection condition includes a one-to-one correspondence between the words to be recognized corresponding to the selected maximum dependency type probabilities and the words to be recognized in the first sentence to be recognized. For example, assuming that the first sentence to be recognized is ABC, the preset probability selection condition is that the number of the selected maximum dependency type probabilities is 2, and the words to be recognized corresponding to the maximum dependency type probabilities can constitute the first sentence to be recognized ABC.

[0123] Step S24: determine the first dependency syntax analysis result based on the first dependency relationship type prediction result.

[0124] In this embodiment, based on the first dependency relationship type prediction result, the first dependency syntactic analysis result is determined. Specifically, based on the dependency relationship type between words in the first sentence to be recognized, the word components of each word to be recognized in the first sentence to be recognized and the sentence pattern of the first sentence to be recognized are determined, and the word component information and the corresponding sentence pattern information corresponding to the first sentence to be recognized are obtained, and then the word component information and the sentence pattern information of the first sentence to be recognized are used together as the first dependency syntactic analysis result. For example, assuming that the first sentence to be recognized is ABC, wherein the dependency relationship type between word A and word B is a subject-predicate relationship type, and the dependency relationship type between word B and word C is a verb-object relationship type, then it can be determined that the sentence pattern of the first sentence to be recognized is a subject-predicate sentence pattern, the word component corresponding to word A is the subject, the word component corresponding to word B is the predicate, and the word component corresponding to word C is the object.

[0125] In addition, it should be noted that, in one embodiment, the preset dependency syntax model can be trained based on the following steps:

[0126] Step C10, obtaining training data and a dependency syntactic model to be trained, wherein the training data includes training sentences and preset dependency type labels corresponding to the training sentences;

[0127] In this embodiment, it should be noted that the preset dependency type label is an identifier of the dependency relationship type between words in the pre-labeled training sentence, and the dependency syntactic model to be trained is an untrained dependency syntactic model.

[0128] Acquire training data and a dependency syntactic model to be trained, wherein the training data includes training sentences and preset dependency type labels corresponding to the training sentences. Specifically, acquire a labeled dependency syntactic analysis data set and a dependency syntactic model to be trained, collect the dependency syntactic analysis data set, and manually annotate the dependency syntactic analysis data set to obtain a manually annotated dependency syntactic analysis data set, and then merge the annotated dependency syntactic analysis data set and the manually annotated dependency syntactic analysis data set to obtain a training data set, so as to expand the number of training samples corresponding to the dependency syntactic model to be trained.

[0129] Step C20, inputting the training data into the dependency syntax model to be trained to perform dependency syntax analysis on the training sentence to obtain a type training prediction label;

[0130] In this embodiment, it should be noted that the training data at least includes a training sentence.

[0131] The training data is input into the dependency syntax model to be trained to perform dependency syntax analysis on the training sentences to obtain type training prediction labels. Specifically, based on the vectorization network in the dependency syntax model to be trained, the training sentences are vectorized to obtain vectorized training sentences. Then, based on the dependency discrimination model in the dependency syntax model to be trained, dependency discrimination is performed on the vectorized training sentences to obtain training dependency vectors. Then, based on the dependency type prediction model in the dependency syntax model to be trained, dependency type prediction is performed on the vectorized training sentences to obtain a training dependency type probability score matrix. Then, the training dependency vector and the training dependency type probability score matrix are combined to determine a type training prediction label, wherein the type training prediction label is an identifier of the dependency type corresponding to the training sentence.

[0132] Step C30, calculating a dependency syntax model error based on the type training prediction label and the preset dependency type label;

[0133] In this embodiment, based on the type training prediction label and the preset dependency type label, the dependency syntax model error is calculated. Specifically, the distance between the type training prediction label and the preset dependency type label is calculated to obtain the dependency syntax model error.

[0134] Step C40: Based on the dependency syntax model error, the dependency syntax model to be trained is updated until the dependency syntax model to be trained meets a preset update end condition, and the dependency syntax model to be trained is used as the preset dependency syntax model.

[0135] In this embodiment, based on the dependency syntax model error, the dependency syntax model to be trained is updated until the dependency syntax model to be trained meets the preset update end condition, and the dependency syntax model to be trained is used as the preset dependency syntax model. Specifically, based on the dependency syntax model error, gradient information is calculated, and the model parameters of the dependency syntax model to be trained are updated according to the gradient information by back propagation to obtain the updated dependency syntax model to be trained, and then it is determined whether the updated dependency syntax model to be trained meets the preset update end condition. If so, the updated dependency syntax model to be trained is used as the preset dependency syntax model. If not, the training sentences are re-acquired to re-train and update the model parameters of the updated dependency syntax model to be trained until the updated dependency syntax model to be trained meets the preset update end condition, wherein the preset update end condition includes reaching the maximum number of iterations and the convergence of the loss function.

[0136] Furthermore, based on the trained preset dependency syntactic model, the preset paraphrase sentence recognition model can be trained. Specifically, paraphrase sentence training data and a paraphrase sentence recognition model to be trained are obtained, wherein the paraphrase sentence training sentence includes a first training sentence to be recognized, a second training sentence to be recognized and a sentence label, wherein the sentence label is an identifier of whether the first training sentence to be recognized and the second training sentence to be recognized are paraphrase sentences, and the paraphrase sentence training data can be represented by a vector. For example, assuming that the paraphrase sentence training data is a vector (X1, X2, Y), then X1 is the first paraphrase sentence training sentence, X2 is the second paraphrase sentence training sentence, and Y is the sentence label, and then a training sentence vector representation corresponding to the first training sentence to be recognized and the second training sentence to be recognized is generated, and based on the preset dependency syntactic model, the first training sentence to be recognized is respectively trained. The sentence and the second training sentence to be recognized are subjected to dependency syntactic analysis to obtain a first training dependency vector corresponding to the first training sentence to be recognized and a second training dependency vector corresponding to the second training sentence to be recognized, and then the training sentence vector representation, the first training dependency vector and the second training dependency vector are aggregated and input into the paraphrase sentence recognition model to be trained to obtain an output paraphrase sentence recognition label, and then based on the output paraphrase sentence recognition label and the sentence label, the paraphrase sentence recognition model error is calculated, and based on the paraphrase sentence recognition model error, the paraphrase sentence recognition model to be trained is updated until the paraphrase sentence recognition model to be trained meets the preset training end condition, and the paraphrase sentence recognition model to be trained is used as the preset paraphrase sentence recognition model, wherein the preset training end condition includes the convergence of the loss function and the model reaching the maximum number of iterations, etc., wherein, if Figure 3 The figure shows a schematic diagram of the overall flow chart for performing paraphrase sentence recognition based on a preset dependency syntax model and a preset paraphrase sentence recognition model, wherein the threshold is the preset probability score threshold, and the process of judging whether they are completely consistent is the process of judging whether the first standard sentence and the second standard sentence are consistent. If the words are completely consistent and the words corresponding to each word component are consistent or synonymous, then it is considered that the target words to be recognized corresponding to each of the same word component phrases are semantically consistent, and if the inconsistent word component is the subject or object and is only missing or the first-person pronoun and the second-person pronoun are interchanged, then the target word component meets the preset paraphrase sentence word component conditions.

[0137] This implementation provides a dependency syntactic analysis method based on machine learning. First, the first sentence to be recognized is vectorized to obtain a first vectorized sentence. Then, based on the dependency discrimination model, the first vectorized sentence is subjected to dependency discrimination to obtain a first dependency discrimination result, thereby achieving the purpose of determining whether there is a dependency relationship between words in the first sentence to be recognized. Then, based on the dependency type prediction model and the first dependency discrimination result, the first vectorized sentence is subjected to dependency type prediction to obtain a first dependency type prediction result, thereby achieving the purpose of predicting the dependency type between words in the first sentence to be recognized. Moreover, since the dependency type is predicted based on the predicted relationship discrimination result, the situation where the probability of the existence of a dependency relationship between words is extremely low but the probability of predicting various types of preset dependency relationships between words is high is avoided, thereby improving the accuracy of dependency type prediction and thereby improving the accuracy of dependency syntactic analysis. , and then based on the first dependency relationship type prediction result, the dependency syntactic information corresponding to the first sentence to be recognized can be determined, wherein the dependency syntactic information is sentence information with syntactic information, and then it can be ensured that the syntactic information of the sentence will not be lost when extracting the sentence information of the sentence, so that the sentence information of the extracted sentence is more complete, and then based on the sentence vector representation, the first dependency syntactic analysis result and the second dependency syntactic analysis result, the first sentence to be recognized and the second sentence to be recognized are paraphrased to obtain the first paraphrase sentence recognition result, which can achieve the purpose of paraphrasing the sentence to be recognized based on the sentence feature information and more complete sentence information corresponding to the sentence to be recognized, and lays the foundation for overcoming the technical defect that when performing paraphrase sentence recognition based on the sentence vector obtained by sentence vectorization in the prior art, due to the loss of part of the sentence information when performing sentence vectorization, the sentence vector cannot fully represent the sentence information of the sentence, thereby resulting in a low accuracy rate of paraphrase sentence recognition.

[0138] Reference Figure 4 , Figure 4 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.

[0139] like Figure 4 As shown, the paraphrase sentence recognition device based on dependency syntax may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0140] Optionally, the paraphrase sentence recognition device based on dependency syntax may also include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, etc. The rectangular user interface may include a display screen (Display), an input submodule such as a keyboard (Keyboard), and the optional rectangular user interface may also include a standard wired interface and a wireless interface. The network interface may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).

[0141] Those skilled in the art will understand that Figure 4 The structure of the paraphrase sentence recognition device based on dependency syntax shown in the figure does not constitute a limitation on the paraphrase sentence recognition device based on dependency syntax, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0142] like Figure 4 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, and a paraphrase recognition program based on dependency syntax. The operating system is a program that manages and controls the hardware and software resources of the paraphrase recognition device based on dependency syntax, and supports the operation of the paraphrase recognition program based on dependency syntax and other software and / or programs. The network communication module is used to realize the communication between the components inside the memory 1005, and the communication with other hardware and software in the paraphrase recognition system based on dependency syntax.

[0143] exist Figure 4 In the paraphrase sentence recognition device based on dependency syntax shown, the processor 1001 is used to execute the paraphrase sentence recognition program based on dependency syntax stored in the memory 1005 to implement the steps of any of the above-mentioned paraphrase sentence recognition methods based on dependency syntax.

[0144] The specific implementation of the paraphrase sentence recognition device based on dependency syntax in the present application is basically the same as the various embodiments of the paraphrase sentence recognition method based on dependency syntax described above, and will not be repeated here.

[0145] The embodiment of the present application further provides a paraphrase sentence recognition device based on dependency syntax, wherein the paraphrase sentence recognition device based on dependency syntax is applied to a paraphrase sentence recognition device based on dependency syntax, and the paraphrase sentence recognition device based on dependency syntax includes:

[0146] A generation module, used to obtain a first sentence to be recognized and a second sentence to be recognized, and generate a sentence vector representation corresponding to the first sentence to be recognized and the second sentence to be recognized;

[0147] A first dependency syntactic analysis module, configured to perform dependency syntactic analysis on the first sentence to be recognized, and obtain a first dependency syntactic analysis result corresponding to the first sentence to be recognized;

[0148] A second dependency syntactic analysis module, configured to perform dependency syntactic analysis on the second sentence to be recognized, and obtain a second dependency syntactic analysis result corresponding to the second sentence to be recognized;

[0149] A paraphrase sentence recognition module is used to perform paraphrase sentence recognition on the first sentence to be recognized and the second sentence to be recognized based on the sentence vector representation, the first dependency syntactic analysis result and the second dependency syntactic analysis result to obtain a first paraphrase sentence recognition result.

[0150] Optionally, the first dependency syntax analysis module includes:

[0151] A first vectorization unit, used to vectorize the first sentence to be recognized to obtain a first vectorized sentence;

[0152] A first dependency determination unit, configured to perform dependency determination on the first vectorized sentence based on the dependency determination model to obtain a first dependency determination result;

[0153] a first dependency type prediction unit, configured to perform dependency type prediction on the first vectorized statement based on the dependency type prediction model and the first dependency discrimination result, to obtain a first dependency type prediction result;

[0154] The first determining unit is used to determine the first dependency syntactic analysis result based on the first dependency relationship type prediction result.

[0155] Optionally, the second dependency syntax analysis module includes:

[0156] A second vectorization unit, used for vectorizing the second sentence to be recognized to obtain a second vectorized sentence;

[0157] A second dependency determination unit, configured to perform dependency determination on the second vectorized sentence based on a preset second dependency determination model to obtain a second dependency determination result;

[0158] a second dependency type prediction unit, configured to perform dependency type prediction on the second vectorized statement based on a preset second dependency type prediction model and the second dependency discrimination result, to obtain a second dependency type prediction result;

[0159] The second determining unit is used to determine the second dependency syntactic analysis result based on the second dependency relationship type prediction result.

[0160] Optionally, the first dependency determination unit includes:

[0161] a feature extraction subunit, configured to perform feature extraction on the first vectorized sentence based on the first feature extraction model to obtain a first feature extraction result;

[0162] A fully connected subunit, configured to fully connect the first feature extraction result based on the first fully connected network and the second fully connected network, respectively, to obtain a first sentence vector and a second sentence vector;

[0163] A double affine transformation subunit, configured to perform a double affine transformation on the first sentence vector and the second sentence vector based on the first double affine transformation network to obtain a dependency score matrix;

[0164] A determination subunit is used to determine the first dependency judgment result based on the dependency score matrix.

[0165] Optionally, the first dependency type prediction unit includes:

[0166] A dependency type prediction subunit, configured to perform dependency type prediction on the first vectorized sentence based on the dependency type prediction model to obtain a dependency type probability score matrix;

[0167] A fusion subunit is used to fuse the dependency type probability score matrix and the dependency vector to obtain the first dependency type prediction result.

[0168] Optionally, the first vectorization unit includes:

[0169] An acquisition subunit, used to acquire a word vector to be recognized, a corresponding part-of-speech vector to be recognized, and a corresponding word position vector to be recognized corresponding to the word to be recognized;

[0170] A generating subunit is used to generate the vectorized word based on the word vector to be recognized, the part-of-speech vector to be recognized and the word position vector to be recognized.

[0171] Optionally, the paraphrase sentence recognition module includes:

[0172] an aggregation unit, configured to aggregate the sentence vector representation, the first dependency vector, and the second dependency vector to obtain an aggregated vector;

[0173] A feature extraction unit, used for inputting the aggregated vector into a model hidden layer of a preset paraphrase recognition model to extract features from the aggregated vector to obtain a paraphrase feature representation vector;

[0174] A mapping unit, used for inputting the paraphrase feature representation vector into a model output layer of the preset paraphrase recognition model to map the paraphrase feature representation vector into a paraphrase probability score vector;

[0175] The first generating unit is used to generate the first paraphrase sentence recognition result based on the paraphrase sentence probability score vector.

[0176] Optionally, the apparatus for identifying paraphrases based on dependency syntax further comprises:

[0177] A first determination module, configured to determine a first dependency vector corresponding to the first sentence to be recognized based on the first dependency syntactic analysis result;

[0178] A second determination module, configured to determine a second dependency vector corresponding to the second sentence to be recognized based on the second dependency syntactic analysis result;

[0179] The recognition module is used to perform paraphrase sentence recognition on the first sentence to be recognized and the second sentence to be recognized based on the first dependency vector and the second dependency vector to obtain a second paraphrase sentence recognition result.

[0180] Optionally, the identification module includes:

[0181] A second generating unit, configured to generate, based on the first dependency vector and the second dependency vector, respective common word component phrases corresponding to the first sentence to be recognized and the second sentence to be recognized;

[0182] The first judgment unit is used to judge whether the target words to be recognized corresponding to the same word component phrases are semantically consistent;

[0183] A first determination unit is configured to determine that the first sentence to be recognized and the second sentence to be recognized are paraphrases of each other if the semantics are consistent, and obtain a recognition result of the second paraphrase;

[0184] A second judgment unit is used to determine the semantically inconsistent target word component if the semantics are not consistent, and judge whether the target word component meets the preset repetition sentence word component condition;

[0185] The second determination unit is configured to determine that the first sentence to be recognized and the second sentence to be recognized are paraphrases of each other if the condition is satisfied, and obtain a third paraphrase recognition result.

[0186] The specific implementation of the paraphrase sentence recognition device based on dependency syntax of the present application is basically the same as the various embodiments of the paraphrase sentence recognition method based on dependency syntax described above, and will not be repeated here.

[0187] An embodiment of the present application provides a readable storage medium, and the readable storage medium stores one or more programs, and the one or more programs can also be executed by one or more processors to implement the steps of any of the above-mentioned dependency syntax-based paraphrase sentence recognition methods.

[0188] The specific implementation of the readable storage medium of the present application is basically the same as the embodiments of the above-mentioned paraphrase sentence recognition method based on dependency syntax, and will not be repeated here.

[0189] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.

Claims

1. A method for recognizing paraphrases based on dependency syntax, characterized in that: The paraphrase sentence recognition method based on dependency syntax includes: Acquire a first sentence to be recognized and a second sentence to be recognized, and generate a sentence vector representation corresponding to the first sentence to be recognized and the second sentence to be recognized; Performing dependency syntactic analysis on the first sentence to be recognized to obtain a first dependency syntactic analysis result corresponding to the first sentence to be recognized; Performing dependency syntactic analysis on the second sentence to be recognized to obtain a second dependency syntactic analysis result corresponding to the second sentence to be recognized; Based on the sentence vector representation, the first dependency syntactic analysis result, and the second dependency syntactic analysis result, performing paraphrase sentence recognition on the first sentence to be recognized and the second sentence to be recognized to obtain a first paraphrase sentence recognition result; The step of performing dependency syntactic analysis on the first sentence to be recognized to obtain a first dependency syntactic analysis result corresponding to the first sentence to be recognized includes: Vectorizing the first sentence to be recognized to obtain a first vectorized sentence; Based on a preset first dependency relationship discrimination model, performing dependency relationship discrimination on the first vectorized sentence to obtain a first dependency relationship discrimination result; Based on a preset first dependency type prediction model and the first dependency discrimination result, predicting the dependency type of the first vectorized statement to obtain a first dependency type prediction result; Determining the first dependency syntax analysis result based on the first dependency relationship type prediction result; The first dependency discriminant model includes a first feature extraction model, a first fully connected network, a second fully connected network and a first bi-affine transformation network. The step of performing dependency discriminant on the first vectorized sentence based on the preset first dependency discriminant model to obtain a first dependency discriminant result includes: Based on the first feature extraction model, perform feature extraction on the first vectorized sentence to obtain a first feature extraction result; Based on the first fully connected network and the second fully connected network, fully connect the first feature extraction result respectively to obtain a first sentence vector and a second sentence vector; Based on the first double affine transformation network, performing double affine transformation on the first sentence vector and the second sentence vector to obtain a dependency score matrix; Based on the dependency score matrix, the first dependency determination result is determined.

2. The method for recognizing paraphrases based on dependency syntax as claimed in claim 1, characterized in that: The step of performing dependency syntactic analysis on the second sentence to be recognized to obtain a second dependency syntactic analysis result corresponding to the second sentence to be recognized includes: Vectorizing the second sentence to be recognized to obtain a second vectorized sentence; Based on a preset second dependency relationship discrimination model, performing dependency relationship discrimination on the second vectorized sentence to obtain a second dependency relationship discrimination result; Based on a preset second dependency type prediction model and the second dependency discrimination result, predicting the dependency type of the second vectorized statement to obtain a second dependency type prediction result; Based on the second dependency relationship type prediction result, determine the second dependency syntax analysis result.

3. The method for recognizing paraphrases based on dependency syntax as claimed in claim 1, characterized in that: The first dependency determination result includes a dependency vector, The step of performing dependency type prediction on the first vectorized statement based on the dependency type prediction model and the first dependency discrimination result to obtain the first dependency type prediction result comprises: Based on the dependency type prediction model, predict the dependency type of the first vectorized sentence to obtain a dependency type probability score matrix; The dependency type probability score matrix and the dependency vector are merged to obtain the first dependency type prediction result.

4. The method for recognizing paraphrases based on dependency syntax as claimed in claim 1, characterized in that: The first sentence to be recognized includes at least one word to be recognized, and the first vectorized sentence includes at least one vectorized word. The step of vectorizing the first sentence to be recognized to obtain a first vectorized sentence includes: Obtaining a word vector to be recognized, a corresponding part-of-speech vector to be recognized, and a corresponding word position vector to be recognized corresponding to the word to be recognized; The vectorized word is generated based on the word vector to be recognized, the part-of-speech vector to be recognized and the word position vector to be recognized.

5. The method for recognizing paraphrases based on dependency syntax as claimed in claim 1, characterized in that: The first dependency parsing result includes a first dependency vector, and the second dependency parsing result includes a second dependency vector. The step of performing paraphrase sentence recognition on the first sentence to be recognized and the second sentence to be recognized based on the sentence vector representation, the first dependency syntactic analysis result, and the second dependency syntactic analysis result to obtain a first paraphrase sentence recognition result comprises: Aggregating the sentence vector representation, the first dependency vector, and the second dependency vector to obtain an aggregated vector; Inputting the aggregated vector into a model hidden layer of a preset paraphrase recognition model to perform feature extraction on the aggregated vector to obtain a paraphrase feature representation vector; Inputting the paraphrase sentence feature representation vector into the model output layer of the preset paraphrase sentence recognition model to map the paraphrase sentence feature representation vector into a paraphrase sentence probability score vector; Based on the paraphrase probability score vector, the first paraphrase recognition result is generated.

6. The method for recognizing paraphrases based on dependency syntax as claimed in claim 1, characterized in that: After the step of performing dependency syntactic analysis on the second sentence to be recognized to obtain a second dependency syntactic analysis result corresponding to the second sentence to be recognized, the dependency syntactic paraphrase sentence recognition method further includes: Determining a first dependency vector corresponding to the first sentence to be recognized based on the first dependency syntactic analysis result; Determining a second dependency vector corresponding to the second sentence to be recognized based on the second dependency syntactic analysis result; Based on the first dependency vector and the second dependency vector, paraphrase sentence recognition is performed on the first sentence to be recognized and the second sentence to be recognized to obtain a second paraphrase sentence recognition result.

7. The method for recognizing paraphrases based on dependency syntax as claimed in claim 6, characterized in that: The step of performing paraphrase sentence recognition on the first sentence to be recognized and the second sentence to be recognized based on the first dependency vector and the second dependency vector to obtain a second paraphrase sentence recognition result comprises: Based on the first dependency vector and the second dependency vector, generating the same-word component phrases corresponding to the first sentence to be recognized and the second sentence to be recognized; Determine whether the target words to be recognized corresponding to the same word component phrases are semantically consistent; If the semantics are consistent, determining that the first sentence to be recognized and the second sentence to be recognized are paraphrases of each other, and obtaining a recognition result of the second paraphrase; If the semantics are not consistent, determining the semantically inconsistent target word component, and judging whether the target word component meets the preset repetition sentence word component condition; If so, it is determined that the first sentence to be recognized and the second sentence to be recognized are paraphrases of each other, and a third paraphrase recognition result is obtained.

8. The method for recognizing paraphrases based on dependency syntax as claimed in claim 1, characterized in that: After the step of obtaining the first sentence to be recognized and the second sentence to be recognized, the method for recognizing a paraphrase based on dependency syntax further includes: Removing meaningless words from the first sentence to be recognized and the second sentence to be recognized to obtain a first standard sentence corresponding to the first sentence to be recognized and a second standard sentence corresponding to the second sentence to be recognized; It is determined whether the first standard sentence and the second standard sentence are consistent. If they are consistent, it is determined that the first sentence to be recognized and the second sentence to be recognized are paraphrases of each other, and a fourth paraphrase sentence recognition result is obtained.

9. A paraphrase sentence recognition device based on dependency syntax, characterized in that: The paraphrase recognition device based on dependency syntax includes: a memory, a processor, and a program stored in the memory for implementing the paraphrase recognition method based on dependency syntax. The memory is used to store a program for implementing a paraphrase sentence recognition method based on dependency syntax; The processor is used to execute a program for implementing the method for paraphrase recognition based on dependency syntax, so as to implement the steps of the method for paraphrase recognition based on dependency syntax as claimed in any one of claims 1 to 8.

10. A readable storage medium, characterized in that: The readable storage medium stores a program for implementing a method for recognizing a paraphrase based on dependency syntax, and the program for implementing a method for recognizing a paraphrase based on dependency syntax is executed by a processor to implement the steps of the method for recognizing a paraphrase based on dependency syntax as described in any one of claims 1 to 8.