Intention understanding method fusing syntactic analysis and semantic role pruning

文档序号:1964135 发布日期:2021-12-14 浏览:17次 中文

阅读说明:本技术 一种融合句法分析和语义角色剪枝的意图理解方法 (Intention understanding method fusing syntactic analysis and semantic role pruning ) 是由 张丹 董晓飞 张学强 曹峰 于 2021-10-12 设计创作,主要内容包括:本发明涉及自然语言处理中的语义分析技术领域,且公开了一种融合句法分析和语义角色剪枝的意图理解方法,包括预处理模块、语义匹配模块与剪枝模块,根据句子成分剪枝和语义角色剪枝得到的文本与原输入文本联合编码建模,句子成分剪枝保留句子的主语、谓语、宾语等主要句子成分,语义角色剪枝保留句中的核心论元,包括施事、受事、范围、动作开始、动作结束及其他动词相关的论元角色,剪枝的作用是剔除非句子主要成分或核心论元的其他部分,凸显句子的主要语义。本发明其优点在于针对句子过长、描述词过多或用户存在多意图的输入句子进行强化语义;通过依存句法分析和语义角色标注标记表现句子语义的主要词语以联合输入编码的形式增强语义信息。(The invention relates to the technical field of semantic analysis in natural language processing, and discloses an intention understanding method integrating syntactic analysis and semantic role pruning, which comprises a preprocessing module, a semantic matching module and a pruning module, wherein the intention understanding method comprises the steps of jointly coding and modeling a text obtained by sentence component pruning and semantic role pruning and an original input text, the sentence component pruning reserves main sentence components such as a subject, a predicate and an object of a sentence, the semantic role pruning reserves core arguments in the sentence including events, subjects, ranges, action starts, action ends and other verb-related argument roles, and the pruning has the function of eliminating other parts which are not sentence main components or core arguments and highlighting main semantics of the sentence. The invention has the advantages that the semantics are strengthened aiming at the input sentences with too long sentences, too many description words or multiple intentions of the user; the main words expressing sentence semantics through dependency syntax analysis and semantic role labeling enhance semantic information in a form of joint input coding.)

1. An intention understanding method fusing syntactic analysis and semantic role pruning is characterized by comprising the following steps of: the system comprises a preprocessing module, a semantic matching module, semantic role pruning, sentence component pruning, a result output module and a pruning module, wherein the sentence component pruning comprises the following steps:

step 1: determining a central word;

step 2: determining a subject;

and step 3: determining an object;

the semantic role pruning comprises the following steps:

step 1: determining sentence predicates and marking;

step 2: determining core arguments, reserving the core arguments in the sentence, including the roles of the actors relevant to the construction, the subject, the scope, the action start, the action end and other verbs, and marking;

and step 3: and pruning other arguments which are not directly related to the predicates, such as time, place, purpose, degree and the like.

2. The method for understanding intent with fused syntactic analysis and semantic role pruning according to claim 1, wherein: the intention understanding system fusing syntactic analysis and semantic role pruning mainly comprises a preprocessing module, a pruning module, a semantic matching module and a result output module.

3. The method for understanding intent with fused syntactic analysis and semantic role pruning according to claim 1, wherein: and determining the central word to obtain a root node of the dependency syntax tree as an initial central word, judging whether a word which is dependent on the central word and is in an interlocking relationship exists or not, and if so, adding the word into the central word list.

4. The method for understanding intent with fused syntactic analysis and semantic role pruning according to claim 1, wherein: and the determined subject starts from the initial central word, and obtains words which depend on the initial central word and depend on the relationship as the main-meaning relationship, and the words are used as main words.

5. The method for understanding intent with fused syntactic analysis and semantic role pruning according to claim 1, wherein: and starting from the initial central word, obtaining words which depend on the initial central word and have the dependency relationship of the action guest relationship, using the words as guest words, judging whether the words which depend on the guest words and have the dependency relationship of the parallel relationship exist or not, and if the words exist, adding the words into the guest word list.

6. The method for understanding intent with fused syntactic analysis and semantic role pruning according to claim 1, wherein: and the semantic matching module inputs the sentence components, the semantic roles and the original sentences obtained after pruning into the semantic matching model together.

Technical Field

The invention relates to the technical field of semantic analysis in natural language processing, in particular to an intention understanding method integrating syntactic analysis and semantic role pruning.

Background

The intention understanding refers to accurately understanding the intention of a user from the perspective of semantics based on a user input text, at present, a common method for intention understanding is to match the user input with a standard question in a knowledge base through a semantic similarity model so as to determine the user semantics, but when the user input has too long sentences, too many description words or too many intentions of the user, the semantic similarity model is directly used for matching the user input text with the standard question in the knowledge base, so that the corresponding standard question is difficult to find in the knowledge base, and the intention of the user is difficult to determine, dependency syntax analysis and semantic role labeling are key bottom-layer technologies in natural language processing, the basic task of dependency syntax analysis is to identify the dependency relationship between words in the sentences, determine the syntax structure of the sentences, and the semantic label role mainly studies the relationship between each component in the sentences and predicates, and describing the relationship between the semantic characters by the semantic characters, carrying out syntactic structure analysis on a text input by a user through dependency syntactic analysis, determining the main structure of a sentence, marking the semantic characters to obtain the argument in the sentence, determining the argument roles of the affairs, the affairs and the like in the sentence, pruning through the syntactic relationship, removing redundant descriptors in the sentence, judging whether a plurality of intentions exist, inputting the result into a semantic similarity model, enhancing semantic information and further improving the accuracy of intention understanding.

Disclosure of Invention

Technical problem to be solved

Aiming at the defects of the prior art, the invention provides an intention understanding method integrating syntactic analysis and semantic role pruning, which has the advantages of strengthening semantics aiming at input sentences with too long sentences, too many description words or multiple intentions of users and strengthening semantic information in a form of joint input coding by using main words expressing the semantics of the sentences through dependency syntactic analysis and semantic role labeling, and solves the problem of difficult processing aiming at the sentences with too long sentences, too many description words or the multiple intentions of the users.

(II) technical scheme

In order to achieve the purpose, the invention provides the following technical scheme: an intention understanding method fusing syntactic analysis and semantic role pruning comprises a preprocessing module, a semantic matching module and a pruning module, wherein the pruning module comprises a pruning algorithm, and sentence component pruning comprises the following steps:

step 1: determining a central word;

step 2: determining a subject;

and step 3: determining an object;

semantic role pruning comprises the following steps:

step 1: determining sentence predicates and marking;

step 2: determining core arguments, reserving the core arguments in the sentence, including the roles of the actors relevant to the construction, the subject, the scope, the action start, the action end and other verbs, and marking;

and step 3: and pruning other arguments which are not directly related to the predicates, such as time, place, purpose, degree and the like.

Preferably, the intention understanding system fusing syntactic analysis and semantic role pruning mainly comprises a preprocessing module, a pruning module, a semantic matching module and a result output module.

Preferably, the determining the core word obtains a root node of the dependency syntax tree as an initial core word, determines whether there is a word which is dependent on the core word and has an interlocking relationship, and if so, adds the word into the core word list.

Preferably, the subject is determined so as to obtain, starting from the initial headword, a word that depends on the initial headword and on which the dependency relationship is the primary predicate relationship, as a main word.

Preferably, starting from the initial core word, obtaining a word depending on the initial core word and the dependency relationship being the motile-guest relationship, taking the word as the guest word, judging whether a word depending on the guest word and the dependency relationship being the parallel relationship exists, and if so, adding the word into the guest word list.

Preferably, the semantic matching module inputs the sentence components, semantic roles and original sentences obtained after pruning into the semantic matching model together.

Compared with the prior art, the invention provides the intention understanding method integrating the syntactic analysis and the semantic role pruning, and the intention understanding method has the following beneficial effects:

1. when the method is used, a user inputs an information text, the information text is processed and output in preprocessing, the participle in the input sentence can be processed in three links of part of speech tagging, dependency grammar analysis and semantic role tagging, sentence components are analyzed by dependency syntax, a semantic role is obtained after semantic role tagging, wherein the sentence components and the semantic role are pruning parts, and the sentence processed by a pruning algorithm is subjected to semantic matching to finally output the intention of the user.

2. The invention relates to an intention understanding method integrating syntactic analysis and semantic role pruning, which comprises the steps of carrying out dependency syntactic analysis and semantic role labeling on a user input text, pruning an input sentence according to a syntactic structure and a semantic role, respectively obtaining sentence components and semantic roles for expressing sentence semantics, inputting the sentence components and the semantic roles into a semantic similarity model together with an original sentence for intention matching, and enhancing the semantic information of the sentence through the sentence components and the semantic roles so as to improve the accuracy of intention understanding, and has the advantages of strengthening the semantics aiming at the input sentence with too long sentence, too many description words or multiple intentions of a user; the main words expressing sentence semantics through dependency syntax analysis and semantic role labeling enhance semantic information in a form of joint input coding.

Drawings

FIG. 1 is a diagram of the system framework method for understanding the intent of merging syntactic analysis and semantic role pruning according to the present invention

Schematic representation.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

Referring to fig. 1, an intention understanding method for merging syntactic analysis and semantic role pruning includes a preprocessing module, a semantic matching module, and a pruning module, where the pruning module includes a pruning algorithm, and the sentence component pruning includes the following steps:

step 1: determining a central word, acquiring a root node of a dependency syntax tree as an initial central word, judging whether a word which depends on the central word and is in a linkage relation exists or not, and if so, adding the word into a central word list;

step 2: determining a subject, starting from the initial central word, acquiring words which depend on the initial central word and have a dependency relationship as a main-predicate relationship, taking the words as main words, judging whether words which depend on the main words and have a dependency relationship of a parallel relationship exist, and if the words exist, adding the words into a main word list;

and step 3: determining an object, starting from the initial central word, acquiring words which depend on the initial central word and depend on the relation of the initial central word and are in the action-guest relation, taking the words as guest words, judging whether words which depend on the guest words and have the parallel relation of the dependence relations exist or not, and if the words exist, adding the words into an object word list;

semantic role pruning comprises the following steps:

step 1: determining sentence predicates and marking;

step 2: determining core arguments, reserving the core arguments in the sentence, including the roles of the actors relevant to the construction, the subject, the scope, the action start, the action end and other verbs, and marking;

and step 3: and pruning other arguments which are not directly related to the predicates, such as time, place, purpose, degree and the like.

Semantic matching: the sentence components, semantic roles and the original sentences obtained after pruning are input into the semantic matching model together

And (4) outputting a result: and obtaining the user intention according to the standard question intention matched by the semantic matching result.

The working principle is as follows: when the intention understanding method integrating syntactic analysis and semantic role pruning is used, a user inputs an information text, the information text is processed and output in preprocessing, participles in the input sentences are processed in three links of part-of-speech tagging, dependency syntactic analysis and semantic role tagging, sentence components are analyzed by dependency syntactic, semantic role tagging is obtained after semantic role tagging processing, wherein the sentence components and the semantic roles are pruning parts, sentences processed by a pruning algorithm are subjected to semantic matching, and finally the intention of the user is output. The semantic information of the sentence is enhanced through the sentence components and the semantic roles so as to improve the accuracy of intention understanding, and the method has the advantages that the semantics is enhanced aiming at the input sentence with too long sentence, too many description words or multiple intentions of the user; the main words expressing sentence semantics through dependency syntax analysis and semantic role labeling enhance semantic information in a form of joint input coding.

Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

6页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种写作方法、装置及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!