Sentence stem extraction method, device and readable storage medium based on dependency syntax

Obtaining the sentence backbone through dependency syntax analysis solves the problem of low sentence semantic recognition accuracy in the existing technology, achieves accurate recognition of sentences with the same semantics but different word information, and improves recognition accuracy and efficiency.

CN112069801BActive Publication Date: 2024-09-20WEBANK (CHINA)
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The accuracy of sentence semantic recognition in the existing technology is low, especially for sentences with the same semantics but different word information, it is difficult to accurately identify their semantic consistency.

Method used

The sentence backbone extraction method based on dependency syntax is used to obtain the sentence backbone through dependency syntax analysis, and eliminate non-sentence backbone parts that have little contribution to semantic recognition to improve the accuracy and efficiency of semantic recognition.

Benefits of technology

It improves the accuracy and calculation efficiency of sentence semantic recognition, and overcomes the difficulty in identifying sentences with the same semantics but different words when identifying word information in the existing technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112069801B
    Figure CN112069801B
Patent Text Reader

Abstract

The present application discloses a sentence stem extraction method, device and readable storage medium based on dependency syntax, wherein the sentence stem extraction method based on dependency syntax comprises: obtaining a sentence to be analyzed, and performing dependency syntax analysis on the sentence to be analyzed to obtain a dependency syntax analysis result, and then extracting a target sentence stem corresponding to the sentence to be analyzed based on the dependency syntax analysis result to perform semantic recognition on the sentence to be analyzed. The present application solves the technical problem of low accuracy in sentence semantic recognition.
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 sentence stem extraction method, device and readable storage medium 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 the dialogue system based on artificial intelligence, it is often necessary to correctly identify the semantics of sentences. At present, the semantic recognition of sentences is usually carried out through the word frequency algorithm retrieval method, that is, the semantic recognition of sentences is carried out based on the word information of the sentences, wherein the word information includes word frequency information and word order information, etc. However, for some sentences with the same semantics but different word information, for example, the semantics expressed by the three sentences such as "I like you", "I have liked you in the next class for a long time", and "I secretly like you" are all "I like you", but the word information of the three sentences is different, and thus the current semantic recognition method is difficult to accurately identify that these sentences have the same semantics, and thus the accuracy of the current sentence semantic recognition is still low. Summary of the invention

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

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

[0006] Obtaining a sentence to be analyzed, and performing dependency syntactic analysis on the sentence to be analyzed to obtain a dependency syntactic analysis result;

[0007] Based on the dependency syntactic analysis result, the target sentence trunk corresponding to the sentence to be analyzed is extracted to perform semantic recognition on the sentence to be analyzed.

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

[0009] A dependency syntactic analysis module, used to obtain a sentence to be analyzed, and perform dependency syntactic analysis on the sentence to be analyzed to obtain a dependency syntactic analysis result;

[0010] The sentence stem extraction module is used to extract the target sentence stem corresponding to the sentence to be analyzed based on the dependency syntactic analysis result, so as to perform semantic recognition on the sentence to be analyzed.

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

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

[0013] The present application provides a sentence stem extraction method, device and readable storage medium based on dependency syntax. Compared with the method of semantically identifying sentences based on word frequency information of sentences adopted in the prior art, the present application performs dependency syntax analysis on the sentence to be analyzed after obtaining the sentence to be analyzed, obtains the dependency syntax analysis result corresponding to the sentence to be analyzed, and then extracts the target sentence stem corresponding to the sentence to be analyzed based on the dependency syntax analysis result, thereby realizing the purpose of extracting the target sentence stem of the sentence to be analyzed based on the method of dependency syntax analysis. It should be noted that the non-sentence stem part other than the target sentence stem in the sentence to be analyzed has a small contribution to semantic recognition and interferes with semantic recognition, thereby realizing the method based on dependency syntax analysis to eliminate the sentence stem that interferes with semantic recognition in the sentence to be analyzed. The purpose of other non-sentence trunk parts with small contribution is to make the target sentence trunk closer to the real semantics of the sentence to be analyzed, and then based on the target sentence trunk, the sentence to be analyzed is semantically recognized, which can improve the accuracy of sentence semantic recognition. Moreover, since the target sentence trunk is more concise than the sentence to be analyzed, while improving the accuracy of semantic recognition, the amount of input data for semantic recognition is smaller, which can reduce the amount of calculation for semantic recognition and improve the calculation efficiency for semantic recognition. That is, the efficiency of semantic recognition is improved, and the problem that the prior art is based on the word information of the sentence, when performing semantic recognition on the sentence, it is difficult to accurately identify some sentences with the same semantics but different word information as having the same semantics, which leads to the technical defect of low accuracy of sentence semantic recognition, thereby improving the accuracy of sentence semantic recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] 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.

[0015] 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.

[0016] Figure 1 This is a flowchart of the first embodiment of the sentence stem extraction method based on dependency syntax of the present application;

[0017] Figure 2 A schematic diagram of a dependency tree corresponding to the sentence to be analyzed in the sentence trunk extraction method based on dependency syntax of this application;

[0018] Figure 3This is a flow chart of the second embodiment of the sentence stem extraction method based on dependency syntax of the present application;

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

[0020] 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

[0021] 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.

[0022] The present application embodiment provides a sentence stem extraction method based on dependency syntax. In the first embodiment of the sentence stem extraction method based on dependency syntax of the present application, referring to Figure 1 , the sentence stem extraction method based on dependency syntax includes:

[0023] Step S10, obtaining a sentence to be analyzed, and performing dependency syntactic analysis on the sentence to be analyzed to obtain a dependency syntactic analysis result;

[0024] In this embodiment, it should be noted that the sentence to be analyzed is a preprocessed sentence that needs to be subjected to dependency syntactic analysis, wherein the purpose of preprocessing is to remove background components that interfere with dependency syntactic analysis in the sentence to be analyzed, and the sentence stem extraction method based on dependency syntax is applied to a human-computer dialogue system, and the sentence to be analyzed is a preprocessed sentence that a user replies to during a human-computer dialogue, and the sentence stem extraction 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 the sentence, wherein the process of dependency syntax analysis is the process of parsing the syntactic information of the sentence, wherein the syntactic information includes sentence pattern information and word component information, for example, assuming that the sentence is "Who am I", then after dependency syntax analysis, the sentence pattern 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.

[0025] Obtain a sentence to be analyzed, and perform dependency syntactic analysis on the sentence to be analyzed to obtain a dependency syntactic analysis result. Specifically, obtain a sentence to be processed, wherein the sentence to be processed is a sentence collected in a human-computer dialogue system, and then pre-process the sentence to be processed to obtain a sentence to be analyzed, and then input the sentence to be analyzed into the preset dependency syntactic model, and perform dependency relationship discrimination and dependency relationship type prediction on the sentence to be analyzed respectively, so as to perform dependency syntactic analysis on the sentence to be analyzed to obtain a dependency syntactic analysis result. It should be noted that the purpose of performing dependency relationship discrimination is to discriminate the dependency relationship between words. The purpose of performing dependency relationship type prediction is to predict the type of dependency relationship. For example, assuming that the sentence to be analyzed is the sentence "ABC", where A, B and C are all words in the sentence to be analyzed, after performing dependency relationship discrimination, 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 practicable manner, the steps of performing dependency relationship discrimination and dependency relationship type prediction on the sentence to be analyzed to perform dependency syntactic analysis on the sentence to be analyzed and obtaining the dependency syntactic analysis result include:

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

[0027] The step of obtaining the statement to be analyzed includes:

[0028] Step S11, obtaining a sentence to be processed, and identifying background components in the sentence to be processed;

[0029] In this embodiment, a sentence to be processed is obtained, and background components in the sentence to be processed are identified. Specifically, the sentence to be processed is obtained, and the word position of each word to be processed in the sentence to be processed is determined, wherein the word position includes a prefix position, a mid-sentence position, and a suffix position. Then, based on the word position of each word to be processed, a corresponding preset position background word set is matched for each word to be analyzed. Then, based on the preset position background word set corresponding to each word to be analyzed, each background word is determined in each word to be analyzed, and each background word is used as the background component, wherein the preset position background word set includes a prefix position background word set, a mid-sentence position background word set, a background word set, and a background word set. and a suffix position background word set, wherein the prefix position background word set includes prefix position background words such as "also known as", "also known as", "for example", "for example", "I want to know", "I know", "I don't know", "I want to understand", "I want to understand", "I want to ask", "I want to ask", "May I ask", etc., the sentence position background word set includes sentence position background words such as "generally speaking", "wait a moment", "that", "please", etc., and the suffix position background word set includes suffix position background words such as "what's the matter", "do you know", "is that what you mean", "really", "is it", etc.

[0030] In addition, it should be noted that, in an implementable manner, the step of determining each background word in each word to be analyzed based on the preset position background word set corresponding to each word to be analyzed includes: performing the following steps for each word to be analyzed:

[0031] The word to be analyzed is compared with each preset background word in the preset position background word set corresponding to the word to be analyzed to determine whether there is a preset background word consistent with the word to be analyzed in the preset position background word set corresponding to the word to be analyzed. If so, the word to be analyzed is used as a background word. If not, the word to be analyzed is not a background word.

[0032] Step S12, removing the background component from the sentence to be processed to obtain the sentence to be analyzed.

[0033] In this embodiment, the background components are removed from the sentence to be processed to obtain the sentence to be analyzed. Specifically, the background components in the sentence to be processed are removed to eliminate the background components that interfere with the sentence trunk extraction process in the sentence to be processed, and then the part of the sentence to be processed other than the background components is used as the sentence to be analyzed to improve the accuracy of sentence trunk extraction.

[0034] Step S20: extracting the target sentence trunk corresponding to the sentence to be analyzed based on the dependency syntactic analysis result, so as to perform semantic recognition on the sentence to be analyzed.

[0035] In this embodiment, it should be noted that the dependency syntactic analysis result includes a dependency label prediction result, wherein the dependency type prediction result is the dependency type between words in the sentence to be analyzed, wherein the dependency type includes a subject-predicate relationship type, a verb-object relationship type, and a verb-complement structure type, etc.

[0036] Based on the dependency syntactic analysis result, a target sentence stem corresponding to the sentence to be analyzed is extracted to perform semantic recognition on the sentence to be analyzed. Specifically, based on the dependency type prediction result, the word components of each word to be analyzed in the sentence to be analyzed are determined, and then based on the part of speech of each word to be analyzed in the sentence to be analyzed and the word components of each word to be analyzed, the sentence pattern information of the sentence to be analyzed is determined, wherein the part of speech is the property of the word to be analyzed itself, for example, the part of speech includes verbs, names and quantifiers, etc., and the word components are the properties of the word to be analyzed in the sentence to be analyzed, for example, the word components include subjects, predicates and objects, etc., and then based on the sentence pattern information, a target core word is selected in the sentence to be analyzed, and then based on the dependency type prediction result, each target sentence stem word associated with the target core word is selected in the sentence to be analyzed, and then the target core word and each target sentence stem word form the target sentence stem, and then the target sentence stem is used as a model input of a preset sentence semantic recognition model to perform semantic recognition on the sentence to be analyzed.

[0037] The dependency syntactic analysis result includes a dependency relationship type prediction result.

[0038] The step of extracting the target sentence trunk corresponding to the sentence to be analyzed based on the dependency syntactic analysis result includes:

[0039] Step S21, determining sentence pattern information corresponding to the sentence to be analyzed based on the dependency relationship type prediction result;

[0040] In this embodiment, based on the prediction result of the dependency relationship type, the sentence pattern information corresponding to the sentence to be analyzed is determined. Specifically, based on the dependency relationship type between the words to be analyzed in the sentence to be analyzed, the word components of each word to be analyzed are determined, and then the part-of-speech of each word to be analyzed is obtained. Furthermore, based on the part-of-speech and word components of each word to be analyzed, the sentence pattern of the sentence to be analyzed is discriminated to determine the sentence pattern information of the sentence to be analyzed. Among them, the sentence pattern information is the identification information of the sentence pattern of the sentence to be analyzed. The sentence patterns of the sentence to be analyzed include verb-predicate sentences, noun-predicate sentences, adjective-predicate sentences, preposition-predicate sentences, serial verb sentences, double-object sentences, comparative sentences, passive sentences, ba-sentences, and pivotal sentences, etc. Among them, the verb-predicate sentence is a sentence with a verb as the predicate, the noun-predicate sentence is a sentence with a noun as the predicate, the adjective-predicate sentence is a sentence with an adjective as the predicate, the preposition-predicate sentence is a sentence with a preposition as the predicate, the serial verb sentence is a sentence with two consecutive verbs that do not dominate each other as the predicate, the double-object sentence is a sentence in which the dependency relationship type corresponding to the predicate includes both the indirect object relationship type and the verb-object relationship type, the comparative sentence is a sentence in which the adverbial of the predicate starts with "bi", the passive sentence is a sentence in which the adverbial of the predicate starts with "bei", the ba-sentence is a sentence in which the adverbial of the predicate starts with "ba", and the pivotal sentence is a sentence in which the dependency relationship type corresponding to the object is the pivotal type.

[0041] Step S22: Extract the target sentence backbone based on the sentence pattern information and the prediction result of the dependency relationship type.

[0042] In this embodiment, based on the sentence pattern information and the dependency relationship type prediction result, the target sentence stem is extracted. Specifically, based on the sentence pattern information, a target core word is selected from the words to be analyzed in the sentence to be analyzed, wherein the target core word is the word to be analyzed that serves as the core predicate. For example, assuming that the sentence pattern information indicates that the sentence to be analyzed is a verb predicate sentence, the verb on the predicate of the sentence to be analyzed is the target core word. Then, based on the preset word component priority level and the dependency relationship type between words in the sentence to be analyzed, each target sentence stem word corresponding to the target core word is selected, and then the dependency syntactic vector corresponding to the target core word and each target sentence stem word is constructed. The target sentence trunk, wherein the preset word component priority sentence is the word component that is preferentially extracted when extracting the sentence trunk, and it should be noted that in order to ensure that the semantics of the target sentence trunk are clear and the degree of conciseness is high, it is necessary to pre-set the number of extracted word components. For example, assuming that the pre-set extracted word components include subject, predicate and object, and the predicate is a verb, then based on the subject-predicate relationship type in the dependency relationship type, the subject corresponding to the target core word is determined as the target sentence trunk word, and based on the verb-object relationship type in the dependency relationship type, the subject corresponding to the target core word is determined as the target sentence trunk word, and then the target sentence trunk is composed of a subject, a predicate and an object.

[0043] In another embodiment, the step of extracting the target sentence trunk based on the sentence pattern information and the dependency type prediction result includes:

[0044] Based on the sentence pattern information, the dependency relationship type between words in the sentence to be analyzed, and the part of speech of each word to be analyzed in the sentence to be analyzed, a dependency tree corresponding to the sentence to be analyzed is generated, and then based on the preset word component priority and the dependency tree, the target sentence trunk is extracted, wherein the preset word component priority is the priority of the extracted word component in the sentence trunk extraction process. In an implementable manner, the sentence to be analyzed is "He was very disappointed and later took the civil servant examination for the Ministry of Finance several times", then as follows Figure 2 The figure shows a schematic diagram of the dependency tree corresponding to the sentence to be analyzed, wherein ROOT represents the sentence to be analyzed, m, a, u, r, nt, d, v, q and n are all part-of-speech labels, and ADV, RAD, ATT, HED, SBV, CMP and VOB are dependency type labels.

[0045] Wherein, the step of extracting the target sentence trunk based on the sentence pattern information and the dependency type prediction result comprises:

[0046] Step S221, determining the target core word corresponding to the sentence to be analyzed based on the sentence pattern information;

[0047] In this embodiment, based on the sentence pattern information, the target core word corresponding to the sentence to be analyzed is determined. Specifically, based on the sentence pattern information, the core predicate corresponding to the sentence to be analyzed is determined, wherein the core predicate is the predicate that determines the sentence pattern information of the sentence to be analyzed, and then the word to be analyzed corresponding to the core predicate is used as the target core word.

[0048] Step S222, determining each target sentence stem word corresponding to the target core word based on the preset word component priority and the dependency type prediction result;

[0049] In this embodiment, it should be noted that the preset word component priority is the priority of the extracted word components in the sentence trunk extraction process, and the preset word component priority includes a preset first priority, a preset second priority and a preset third priority, wherein, in an implementable manner, the word components corresponding to the preset first priority include subject, predicate, object, adverbial and complement, the word components corresponding to the preset second priority include attributives, and the word components corresponding to the preset third priority include other word components except the word components corresponding to the preset first priority and the preset second priority.

[0050] Based on the preset word component priority and the dependency type prediction result, the target sentence stem words corresponding to the target core word are determined. Specifically, based on the dependency type between words in the sentence to be analyzed, the word components of each to-be-selected word corresponding to the target core word are determined, and then based on the number of layers of the preset word component priority, priority word components are selected from the word components of each to-be-selected word, and then the to-be-analyzed words corresponding to each of the priority word components are used as the target sentence stem words. It should be noted that the first layer of the preset word component priority is the preset first priority, the second layer of the preset component priority is the preset second priority, and the third layer of the preset word component is the preset third priority.

[0051] Step S223, generating the target sentence stem based on the sentence pattern information, the target core words and each target sentence stem word.

[0052] In this embodiment, based on the sentence pattern information, the target core word and each of the target sentence stem words, the target sentence stem is generated. Specifically, the word components and parts of speech of the target core word, as well as the word components and parts of speech of each of the target sentence stem words are obtained, and then based on the sentence pattern information, the target core word, the part of speech and word components of the target core word, each of the target sentence stem words and the part of speech and word components corresponding to each of the target sentence stem words, the target sentence stem is generated. In one practicable manner, assuming that the sentence to be analyzed is "He is very disappointed. Later, I took the civil service exam for the Department of Finance several times." The target sentence trunk is {sentence pattern: subject-predicate-object sentence, subject: [he, ATT: [very disappointed]], predicate: [take the exam, RAD: [got]], preposed object: [], object: [civil servant, ATT: Department of Finance]: COO: [], CMP: [several times], ADV: [later, again]}, where ATT is a label of the attributive-predicate relationship type, RAD is a label of the right-attached relationship type, COO is a label of the parallel relationship type, CMP is a label of the verb-complement structure type, and ADV is a label of the adverbial-predicate structure type.

[0053] In addition, it should be noted that since the sentence stem extraction is performed based on the sentence pattern information corresponding to the sentence to be parsed obtained through dependency syntactic analysis, the corresponding word components and the corresponding dependency relationship types between words, this embodiment can explain the reasons for the sentence stem extraction results, and the sentence stem extraction results are highly interpretable, and the confidence in the sentence stem extraction results is extremely high.

[0054] The present embodiment provides a sentence stem extraction method, device and readable storage medium based on dependency syntax. Compared with the method of semantically identifying a sentence based on word frequency information of a sentence adopted in the prior art, after obtaining the sentence to be analyzed, the present embodiment performs dependency syntax analysis on the sentence to be analyzed to obtain the dependency syntax analysis result corresponding to the sentence to be analyzed, and then extracts the target sentence stem corresponding to the sentence to be analyzed based on the dependency syntax analysis result, thereby realizing the purpose of extracting the target sentence stem of the sentence to be analyzed based on the method of dependency syntax analysis. It should be noted that the non-sentence stem part other than the target sentence stem in the sentence to be analyzed has a small contribution to semantic recognition and interferes with semantic recognition, thereby realizing the method based on dependency syntax analysis to eliminate the contribution to semantic recognition in the sentence to be analyzed. The purpose of the non-sentence trunk part with small contribution is to make the target sentence trunk after removing the semantic interference words closer to the real semantics of the sentence to be analyzed, and then based on the target sentence trunk, the sentence to be analyzed is semantically recognized, which can improve the accuracy of sentence semantic recognition. Moreover, since the target sentence trunk is more concise than the sentence to be analyzed, while improving the accuracy of semantic recognition, the amount of input data during semantic recognition is smaller, which can reduce the amount of calculation during semantic recognition and improve the calculation efficiency during semantic recognition. That is, the efficiency of semantic recognition is improved, and the technical defect that the prior art performs semantic recognition on sentences based on the word information of the sentences, and it is difficult to accurately recognize that some sentences with the same semantics but different word information have the same semantics, which leads to low accuracy of sentence semantic recognition, is overcome.

[0055] Further, refer to Figure 3 Based on the first embodiment of the present application, in another embodiment of the present application, the dependency syntax analysis result includes a dependency relationship type prediction result,

[0056] The step of performing dependency syntactic analysis on the sentence to be analyzed to obtain a dependency syntactic analysis result comprises:

[0057] Step A10, vectorizing the statement to be analyzed to obtain a vectorized statement;

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

[0059] The sentence to be analyzed includes at least one word to be analyzed, and the vectorized sentence includes at least one vectorized word.

[0060] The step of vectorizing the statement to be analyzed to obtain a vectorized statement comprises:

[0061] Step A11, obtaining a word vector to be analyzed, a corresponding part-of-speech vector to be analyzed, and a corresponding word position vector to be analyzed corresponding to the word to be analyzed;

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

[0063] Step A12: Generate the vectorized word based on the word vector to be analyzed, the part-of-speech vector to be analyzed and the word position vector to be analyzed.

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

[0065]

[0066] Among them, X i is the vectorized word, E w is the word vector to be analyzed, E tis the part-of-speech vector to be analyzed, E p is the position vector of the word to be analyzed, It is the concatenation operation between vectors.

[0067] Step A20, based on a preset dependency determination model, performing dependency determination on the vectorized sentence to obtain a dependency determination result;

[0068] In this embodiment, it should be noted that the preset dependency syntax model includes a preset dependency relationship discrimination model, wherein the preset dependency relationship discrimination model is a machine learning model used to determine whether there is a dependency relationship between words in the sentence to be analyzed.

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

[0070] The preset 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.

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

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

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

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

[0075] Step A22, 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;

[0076] 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.

[0077] Step A23: 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;

[0078] 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.

[0079] Step A24: Determine the dependency judgment result based on the dependency score matrix.

[0080] In this embodiment, based on the dependency score matrix, the dependency judgment result is determined, specifically based on the preset maximum spanning tree algorithm, the maximum probability score and the maximum probability score that meet 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 the corresponding target probability scores is used as the dependency judgment result, wherein the preset score selection condition includes a one-to-one correspondence between the words to be analyzed corresponding to each target probability score and the words to be analyzed in the sentence to be analyzed, 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 attached to word a, the target probability score B represents the probability score of word c 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.

[0081] Step A30, based on a preset dependency type prediction model and the dependency identification result, performing dependency type prediction on the vectorized statement to obtain the dependency type prediction result;

[0082] In this embodiment, the preset dependency syntax model includes a preset dependency relationship type prediction model, wherein the preset dependency relationship type prediction model is a machine learning model for predicting the dependency relationship type between words in the sentence to be analyzed.

[0083] Based on the preset dependency type prediction model and the dependency discrimination result, the dependency type prediction is performed on the vectorized sentence to obtain the dependency type prediction result. Specifically, based on the preset dependency type prediction model, the dependency type prediction is performed on the 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 the 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 dependency discrimination 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 sentence to be analyzed is obtained, that is, the dependency relationship type prediction result is obtained.

[0084] Wherein, the dependency relationship determination result includes a dependency relationship vector,

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

[0086] Step A31, based on the preset dependency type prediction model, predict the dependency type of the vectorized sentence to obtain a dependency type probability score matrix;

[0087] In this embodiment, it should be noted that the preset 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.

[0088] Based on the preset dependency type prediction model, the dependency type of the vectorized sentence is predicted to obtain a dependency type probability score matrix. Specifically, the vectorized sentence is input into a second feature extraction model, and feature extraction is performed on the 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.

[0089] Step A32: Fusing the dependency type probability score matrix and the dependency vector to obtain the dependency type prediction result.

[0090] In this embodiment, the dependency type probability score matrix and the dependency vector are fused to obtain the 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 dependency type probability vectors are respectively calculated in each of the dependency types. The maximum probability value in the type probability 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 dependency type prediction result, wherein the preset probability selection condition includes a one-to-one correspondence between the words to be analyzed corresponding to each selected maximum dependency type probability and each word to be analyzed in the sentence to be analyzed. For example, assuming that the sentence to be analyzed is ABC, the preset probability selection condition is that the number of selected maximum dependency type probabilities is 2, and the words to be analyzed corresponding to each maximum dependency type probability can constitute the sentence to be analyzed ABC.

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

[0092] Step B10, 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;

[0093] 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.

[0094] 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.

[0095] Step B20, 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;

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

[0097] 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 preset 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 preset 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.

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

[0099] 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.

[0100] Step B40: 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.

[0101] 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.

[0102] 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 training 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 a 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 loss function convergence and the model reaching a maximum number of iterations.

[0103] This implementation provides a dependency syntactic analysis method based on machine learning. First, the sentence to be analyzed is vectorized to obtain a vectorized sentence. Then, based on a preset dependency discrimination model, dependency discrimination is performed on the vectorized sentence to obtain a dependency discrimination result, thereby achieving the purpose of determining whether there is a dependency relationship between words in the sentence to be analyzed. Then, based on a preset dependency type prediction model and the dependency discrimination result, dependency type prediction is performed on the vectorized sentence to obtain the dependency type prediction result, thereby achieving the purpose of predicting the dependency type between words in the sentence to be analyzed. 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. , thereby improving the accuracy of dependency syntactic analysis, and then based on the dependency relationship type prediction result, the target sentence trunk corresponding to the sentence to be analyzed can be extracted to perform semantic recognition on the sentence to be analyzed, wherein it should be noted that the non-sentence trunk parts other than the target sentence trunk in the sentence to be analyzed contribute less to semantic recognition and interfere with semantic recognition, thereby realizing the method based on dependency syntactic analysis, and the purpose of removing the non-sentence trunk parts with little contribution to semantic recognition in the sentence to be analyzed is achieved, so that the target sentence trunk is closer to the real semantics of the sentence to be analyzed, thereby improving the accuracy of sentence semantic recognition, and laying a foundation for overcoming the technical defect that in the prior art, when performing semantic recognition on sentences based on the word information of sentences, it is difficult to accurately identify some sentences with the same semantics but different word information as having the same semantics, which leads to low accuracy of sentence semantic recognition.

[0104] 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.

[0105] like Figure 4 As shown, the sentence trunk extraction 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 optionally be a storage device independent of the aforementioned processor 1001.

[0106] Optionally, the sentence trunk extraction 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).

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

[0108] like Figure 4 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, and a sentence stem extraction program based on dependency syntax. The operating system is a program that manages and controls the hardware and software resources of the sentence stem extraction device based on dependency syntax, and supports the operation of the sentence stem extraction 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 sentence stem extraction system based on dependency syntax.

[0109] exist Figure 4 In the dependency syntax-based sentence stem extraction device shown, the processor 1001 is used to execute the dependency syntax-based sentence stem extraction program stored in the memory 1005 to implement the steps of any of the dependency syntax-based sentence stem extraction methods described above.

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

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

[0112] A dependency syntactic analysis module, used to obtain a sentence to be analyzed, and perform dependency syntactic analysis on the sentence to be analyzed to obtain a dependency syntactic analysis result;

[0113] The sentence stem extraction module is used to extract the target sentence stem corresponding to the sentence to be analyzed based on the dependency syntactic analysis result, so as to perform semantic recognition on the sentence to be analyzed.

[0114] Optionally, the sentence trunk extraction module includes:

[0115] A determination unit, configured to determine sentence pattern information corresponding to the sentence to be analyzed based on the dependency relationship type prediction result;

[0116] An extraction unit is used to extract the target sentence trunk based on the sentence pattern information and the dependency type prediction result.

[0117] Optionally, the extraction unit includes:

[0118] A first determination subunit is used to determine the target core word corresponding to the sentence to be analyzed based on the sentence pattern information;

[0119] A second determination subunit is used to determine each target sentence stem word corresponding to the target core word based on a preset word component priority and the dependency relationship type prediction result;

[0120] The first generating subunit is used to generate the target sentence stem based on the sentence pattern information, the target core word and each target sentence stem word.

[0121] Optionally, the dependency syntax analysis module includes:

[0122] A vectorization unit, used for vectorizing the statement to be analyzed to obtain a vectorized statement;

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

[0124] A dependency type prediction unit is used to perform dependency type prediction on the vectorized statement based on a preset dependency type prediction model and the dependency discrimination result to obtain the dependency type prediction result.

[0125] Optionally, the dependency determination unit includes:

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

[0127] 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;

[0128] 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;

[0129] The third determining subunit is used to determine the dependency judgment result based on the dependency score matrix.

[0130] Optionally, the dependency type prediction unit includes:

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

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

[0133] Optionally, the vectorization unit includes:

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

[0135] The second generating subunit is used to generate the vectorized word based on the word vector to be analyzed, the part-of-speech vector to be analyzed and the word position vector to be analyzed.

[0136] Optionally, the dependency syntax analysis module further includes:

[0137] An acquisition unit, used for acquiring a sentence to be processed and identifying background components in the sentence to be processed;

[0138] The removal unit is used to remove the background component from the sentence to be processed to obtain the sentence to be analyzed.

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

[0140] 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 sentence stem extraction methods.

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

[0142] 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 sentence stem extraction method based on dependency syntax, characterized in that: The sentence stem extraction method based on dependency syntax includes: Obtaining a sentence to be analyzed, and performing dependency syntactic analysis on the sentence to be analyzed to obtain a dependency syntactic analysis result; Based on the dependency syntactic analysis result, extracting the target sentence trunk corresponding to the sentence to be analyzed, so as to perform semantic recognition on the sentence to be analyzed; The dependency syntactic analysis result includes a dependency relationship type prediction result, and the step of performing dependency syntactic analysis on the sentence to be analyzed to obtain the dependency syntactic analysis result includes: Vectorizing the statement to be analyzed to obtain a vectorized statement; Based on a preset dependency determination model, performing dependency determination on the vectorized sentence to obtain a dependency determination result; Based on a preset dependency type prediction model and the dependency identification result, predict the dependency type of the vectorized statement to obtain the dependency type prediction result; The preset 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. The step of performing dependency determination on the vectorized sentence based on a preset dependency determination model to obtain a dependency determination result includes: Based on the first feature extraction model, perform feature extraction on the 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 dependency determination result is determined.

2. The sentence stem extraction method based on dependency syntax as claimed in claim 1, characterized in that: The dependency syntactic analysis result includes a dependency relationship type prediction result, The step of extracting the target sentence trunk corresponding to the sentence to be analyzed based on the dependency syntactic analysis result includes: Determining sentence pattern information corresponding to the sentence to be analyzed based on the dependency relationship type prediction result; Based on the sentence pattern information and the dependency type prediction result, the target sentence trunk is extracted.

3. The sentence stem extraction method based on dependency syntax as claimed in claim 2, characterized in that: The step of extracting the target sentence trunk based on the sentence pattern information and the dependency type prediction result comprises: Based on the sentence pattern information, determining the target core word corresponding to the sentence to be analyzed; Determine the target sentence stem words corresponding to the target core words based on the preset word component priorities and the dependency type prediction results; The target sentence stem is generated based on the sentence pattern information, the target core word and each of the target sentence stem words.

4. The sentence stem extraction method based on dependency syntax as claimed in claim 1, characterized in that: The dependency determination result includes a dependency vector, The step of performing dependency type prediction on the vectorized statement based on the preset dependency type prediction model and the dependency discrimination result to obtain the dependency type prediction result comprises: Based on the preset dependency type prediction model, predict the dependency type of the 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 dependency type prediction result.

5. The sentence stem extraction method based on dependency syntax as claimed in claim 1, characterized in that: The sentence to be analyzed includes at least one word to be analyzed, and the vectorized sentence includes at least one vectorized word. The step of vectorizing the statement to be analyzed to obtain a vectorized statement comprises: Obtain a word vector to be analyzed, a corresponding part-of-speech vector to be analyzed, and a corresponding word position vector to be analyzed corresponding to the word to be analyzed; The vectorized word is generated based on the word vector to be analyzed, the part-of-speech vector to be analyzed and the word position vector to be analyzed.

6. The sentence stem extraction method based on dependency syntax as claimed in claim 1, characterized in that: The step of obtaining the statement to be analyzed includes: Acquire a sentence to be processed, and identify background components in the sentence to be processed; The background component is removed from the sentence to be processed to obtain the sentence to be analyzed.

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

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

Citation Information

Patent Citations

  • Method and system for processing user search terms

    CN103020311A

  • Topic analysis method and device and storage medium

    CN110874531A

  • Grammar compiling methods, semantic parsing methods, devices, computer storage media, and apparatuses

    US20160124936A1