CN113688627A - Word meaning role labeling method and system for intention recognition - Google Patents
Word meaning role labeling method and system for intention recognition Download PDFInfo
- Publication number
- CN113688627A CN113688627A CN202111069148.7A CN202111069148A CN113688627A CN 113688627 A CN113688627 A CN 113688627A CN 202111069148 A CN202111069148 A CN 202111069148A CN 113688627 A CN113688627 A CN 113688627A
- Authority
- CN
- China
- Prior art keywords
- sequence
- predicate
- context
- sentence
- word
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000002372 labelling Methods 0.000 title claims abstract description 78
- 239000013598 vector Substances 0.000 claims abstract description 106
- 230000002457 bidirectional effect Effects 0.000 claims abstract description 40
- 238000000034 method Methods 0.000 claims abstract description 31
- 238000000605 extraction Methods 0.000 claims description 12
- 238000006243 chemical reaction Methods 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 6
- 238000013135 deep learning Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/284—Lexical analysis, e.g. tokenisation or collocates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/211—Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Abstract
The invention discloses a method and a system for marking meaning and role for intention recognition, wherein the method comprises the following steps: inputting a sentence sequence, a predicate context and a predicate context area mark; expanding the predicate sequence and the predicate context into a sequence with the same length as the sentence sequence; converting the sentence sequence, the predicate context and the predicate context region mark into a word vector sequence; inputting the sentence sequence, the predicate context and the word vector sequence marked by the predicate context area into a bidirectional LSTM model; learning the feature representation of the input sequence through a bidirectional LSTM model to obtain a new feature representation sequence; inputting the new feature representation sequence into a conditional random field; and marking the new characteristic representation sequence through the conditional random field to obtain a marking result. The method can effectively realize automatic word meaning role labeling, and reduce the time and cost for constructing a word meaning labeling corpus in intention recognition.
Description
Technical Field
The invention relates to the technical field of intention recognition, in particular to a word meaning role labeling method and system for intention recognition.
Background
At present, the existing word meaning role labeling method firstly cuts out the words which can not become arguments from the sentences, then identifies all the arguments belonging to the predicate from the candidate arguments, labels the semantic roles for the identified arguments, and finally processes the labeling result to obtain the semantic role labeling result.
Therefore, the performance of the existing word meaning role labeling method depends on feature engineering, domain knowledge and a large amount of feature extraction work are needed, no feature can represent long-distance dependency, and heterogeneous resources cannot be introduced to solve the problem of insufficient data.
Therefore, how to effectively realize automatic word sense role labeling and reduce the time and cost for constructing a word sense labeling corpus in intention identification is an urgent problem to be solved.
Disclosure of Invention
In view of the above, the present invention provides a word sense role labeling method for intention recognition, which can effectively implement automatic word sense role labeling and reduce the time and cost for constructing a word sense labeling corpus in the intention recognition.
The invention provides a word meaning role labeling method for intention recognition, which comprises the following steps:
inputting a sentence sequence, a predicate context and a predicate context area mark;
expanding the predicate sequence and the predicate context into a sequence with the same length as the sentence sequence;
converting the sentence sequence, the predicate context and the predicate context region marks into a word vector sequence;
inputting the sentence sequence, the predicate context and the word vector sequence marked by the predicate context area into a bidirectional LSTM model;
learning the feature representation of the input sequence through the bidirectional LSTM model to obtain a new feature representation sequence;
inputting the new sequence of feature representations into a conditional random field;
and marking the new characteristic representation sequence through the conditional random field to obtain a marking result.
Preferably, the converting the sentence sequence, the predicate context, and the predicate context region tag into a word vector sequence includes:
and converting the sentence sequence, the predicate context and the predicate context region mark into a word vector sequence represented by a real vector through a word table word taking vector, wherein the sentence sequence and the predicate context share one word table.
Preferably, the labeling the new feature representation sequence through the conditional random field to obtain a labeling result includes:
and marking the new characteristic representation sequence by using the conditional random field as a supervision signal by using a marking sequence to obtain a marking result.
Preferably, the method further comprises:
and extracting n words before and after the predicate from the sentence to form a predicate context.
Preferably, the predicate context is represented in a one-hot manner.
A word sense character tagging system for intent recognition, comprising:
the first input module is used for inputting a sentence sequence, a predicate context and a predicate context area mark;
the extension module is used for extending the predicate sequence and the predicate context into a sequence with the same length as the sentence sequence;
the conversion module is used for converting the sentence sequence, the predicate context and the predicate context region mark into a word vector sequence;
the second input module is used for inputting the sentence sequence, the predicate context and the word vector sequence marked by the predicate context area into the bidirectional LSTM model;
the bidirectional LSTM model is used for learning the feature representation of the input sequence to obtain a new feature representation sequence;
a third input module for inputting said new sequence of feature representations into a conditional random field;
and the conditional random field is used for labeling the new characteristic representation sequence to obtain a labeling result.
Preferably, the conversion module is specifically configured to:
and converting the sentence sequence, the predicate context and the predicate context region mark into a word vector sequence represented by a real vector through a word table word taking vector, wherein the sentence sequence and the predicate context share one word table.
Preferably, said conditional random field is specifically used for:
and marking the new characteristic representation sequence by using the conditional random field as a supervision signal by using a marking sequence to obtain a marking result.
Preferably, the system further comprises:
and the extraction module is used for extracting n words before and after the predicate from the sentence to form the predicate context.
Preferably, the predicate context is represented in a one-hot manner.
In summary, the present invention discloses a method for labeling a sense role for intention identification, wherein when a sense role needs to be labeled, a sentence sequence, a predicate context and a predicate context area label are input; then expanding the predicate sequence and the predicate context into a sequence with the same length as the sentence sequence; converting the sentence sequence, the predicate context and the predicate context region mark into a word vector sequence; inputting the sentence sequence, the predicate context and the word vector sequence marked by the predicate context area into a bidirectional LSTM model; learning the feature representation of the input sequence through a bidirectional LSTM model to obtain a new feature representation sequence; inputting the new feature representation sequence into a conditional random field; and marking the new characteristic representation sequence through the conditional random field to obtain a marking result. The method can effectively realize automatic word meaning role labeling, and reduce the time and cost for constructing a word meaning labeling corpus in intention recognition.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of a method of an embodiment 1 of a word sense role labeling method for intention recognition according to the present invention;
FIG. 2 is a flowchart of a method of embodiment 2 of the word sense role labeling method for intention recognition disclosed in the present invention;
FIG. 3 is a flowchart of a method of embodiment 3 of the word sense character tagging method for intention recognition disclosed in the present invention;
FIG. 4 is a schematic structural diagram of an embodiment 1 of a word sense character tagging system for intention recognition according to the present disclosure;
FIG. 5 is a schematic structural diagram of an embodiment 2 of a word sense character tagging system for intention recognition according to the present invention;
fig. 6 is a schematic structural diagram of an embodiment 3 of a word sense character tagging system for intention recognition according to the present invention.
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.
As shown in fig. 1, which is a flowchart of an embodiment 1 of a word sense role tagging method for intention recognition disclosed in the present invention, the method may include the following steps:
s101, inputting a sentence sequence, a predicate context and a predicate context area mark;
word meaning role labeling: the method is a shallow semantic analysis technology, takes sentences as units, analyzes predicate-argument structures of the sentences, is derived from lattice grammar proposed in Fillmore (1968) on the theoretical basis, and does not deeply analyze semantic information contained in the sentences. Specifically, the task of word sense role labeling is to study the relationship between each component in a sentence and a predicate by taking the predicate of the sentence as a center, and describe the relationship between the components and the predicate by using a word sense role.
And (3) predicate: in a sentence, a predicate is a word that describes or judges a subject, usually a verb. In a sentence, the predicates indicate "what to do", "what to be", and "what to do", representing the core of a sentence.
Argument: in general, matching predicates in sentences is a noun called an argument.
When a meaning role needs to be labeled, firstly, a sentence sequence, a predicate context and a predicate context area label are input. For example, the input predicate is "set".
As the small segments of a plurality of words before and after the predicate can provide more abundant information and help to resolve ambiguity, the accuracy of word meaning role labeling can be further improved by extracting the context of the predicate.
S102, expanding the predicate sequence and the predicate context into a sequence with the same length as the sentence sequence;
and then expanding the predicate sequence and the predicate context to a sequence as long as the sentence sequence.
S103, converting the sentence sequence, the predicate context and the predicate context region mark into a word vector sequence;
and then, the sentence sequence, the predicate context and the predicate context area marks are converted, and the sentence sequence, the predicate context and the predicate context area marks are all converted into corresponding word vector sequences.
S104, inputting the sentence sequence, the predicate context and the word vector sequence marked by the predicate context area into a bidirectional LSTM model;
and then, taking a word vector sequence corresponding to the sentence sequence, a word vector sequence corresponding to the predicate context and a word vector sequence corresponding to the predicate context region mark as the input of the bidirectional LSTM model.
S105, learning the feature representation of the input sequence through a bidirectional LSTM model to obtain a new feature representation sequence;
and then, learning the feature representation of the word vector sequence corresponding to the input sentence sequence, the word vector sequence corresponding to the predicate context and the word vector sequence corresponding to the predicate context region mark through a bidirectional LSTM model to obtain a new feature representation sequence.
S106, inputting a new characteristic representation sequence into a conditional random field;
the resulting new signature representation sequence is then entered into the CRF (Conditional Random Field).
And S107, marking the new characteristic representation sequence through the conditional random field to obtain a marking result.
And finally, labeling the input new feature representation sequence through the CRF to obtain a labeling result.
To sum up, in the above embodiment, when a meaning role needs to be labeled, a sentence sequence, a predicate context, and a predicate context area label are first input; then expanding the predicate sequence and the predicate context into a sequence with the same length as the sentence sequence; converting the sentence sequence, the predicate context and the predicate context region mark into a word vector sequence; inputting the sentence sequence, the predicate context and the word vector sequence marked by the predicate context area into a bidirectional LSTM model; learning the feature representation of the input sequence through a bidirectional LSTM model to obtain a new feature representation sequence; inputting the new feature representation sequence into a conditional random field; and marking the new characteristic representation sequence through the conditional random field to obtain a marking result. The automatic word meaning role labeling can be effectively realized, and the time and the cost for constructing a word meaning labeling corpus in the intention recognition are reduced.
As shown in fig. 2, which is a flowchart of an embodiment 2 of a word sense role tagging method for intention recognition disclosed in the present invention, the method may include the following steps:
s201, inputting a sentence sequence, a predicate context and a predicate context area mark;
word meaning role labeling: the method is a shallow semantic analysis technology, takes sentences as units, analyzes predicate-argument structures of the sentences, is derived from lattice grammar proposed in Fillmore (1968) on the theoretical basis, and does not deeply analyze semantic information contained in the sentences. Specifically, the task of word sense role labeling is to study the relationship between each component in a sentence and a predicate by taking the predicate of the sentence as a center, and describe the relationship between the components and the predicate by using a word sense role.
And (3) predicate: in a sentence, a predicate is a word that describes or judges a subject, usually a verb. In a sentence, the predicates indicate "what to do", "what to be", and "what to do", representing the core of a sentence.
Argument: in general, matching predicates in sentences is a noun called an argument.
When a meaning role needs to be labeled, firstly, a sentence sequence, a predicate context and a predicate context area label are input. For example, the input predicate is "set".
As the small segments of a plurality of words before and after the predicate can provide more abundant information and help to resolve ambiguity, the accuracy of word meaning role labeling can be further improved by extracting the context of the predicate.
S202, expanding the predicate sequence and the predicate context into a sequence with the same length as the sentence sequence;
and then expanding the predicate sequence and the predicate context to a sequence as long as the sentence sequence.
S203, converting word vectors of the sentence sequence, the predicate context and the predicate context region marks into a word vector sequence represented by a real vector through a word table, wherein the sentence sequence and the predicate context share one word table;
and then, the sentence sequence, the predicate context and the predicate context area marks are converted, and the sentence sequence, the predicate context and the predicate context area marks are converted into a word vector sequence represented by a corresponding real vector through word extraction vectors of a word table. The sentence sequence and the predicate context share one word table, and the predicate sequence and the predicate context region are marked with respective unique word tables.
S204, inputting the sentence sequence, the predicate context and the word vector sequence marked by the predicate context area into a bidirectional LSTM model;
and then, taking a word vector sequence corresponding to the sentence sequence, a word vector sequence corresponding to the predicate context and a word vector sequence corresponding to the predicate context region mark as the input of the bidirectional LSTM model.
S205, learning the feature representation of the input sequence through a bidirectional LSTM model to obtain a new feature representation sequence;
and then, learning the feature representation of the word vector sequence corresponding to the input sentence sequence, the word vector sequence corresponding to the predicate context and the word vector sequence corresponding to the predicate context region mark through a bidirectional LSTM model to obtain a new feature representation sequence.
S206, inputting the new feature representation sequence into a conditional random field;
the resulting new signature representation sequence is then entered into the CRF (Conditional Random Field).
And S207, marking the new characteristic representation sequence by using the conditional random field as a supervision signal to obtain a marking result.
And finally, labeling the input new feature representation sequence by using the CRF as a supervision signal by using the labeling sequence to obtain a labeling result.
To sum up, on the basis of the above embodiments, the present embodiment can specifically convert a sentence sequence, a predicate context, and a predicate context area tag into a word vector sequence represented by a real vector through a word list extraction word vector; specifically, the new characteristic representation sequence can be labeled by taking the labeling sequence as a supervision signal through the conditional random field to obtain a labeling result.
As shown in fig. 3, which is a flowchart of an embodiment 3 of a word sense role tagging method for intention recognition disclosed in the present invention, the method may include the following steps:
s301, extracting n words before and after the predicate from the sentence to form a predicate context;
word meaning role labeling: the method is a shallow semantic analysis technology, takes sentences as units, analyzes predicate-argument structures of the sentences, is derived from lattice grammar proposed in Fillmore (1968) on the theoretical basis, and does not deeply analyze semantic information contained in the sentences. Specifically, the task of word sense role labeling is to study the relationship between each component in a sentence and a predicate by taking the predicate of the sentence as a center, and describe the relationship between the components and the predicate by using a word sense role.
And (3) predicate: in a sentence, a predicate is a word that describes or judges a subject, usually a verb. In a sentence, the predicates indicate "what to do", "what to be", and "what to do", representing the core of a sentence.
Argument: in general, matching predicates in sentences is a noun called an argument.
When a meaning role needs to be labeled, firstly, n words before and after a predicate are extracted from a sentence to form a predicate context.
As the small segments of a plurality of words before and after the predicate can provide more abundant information and help to resolve ambiguity, the accuracy of word meaning role labeling can be further improved by extracting the context of the predicate.
S302, inputting a sentence sequence, a predicate context and a predicate context area mark;
inputting a sentence sequence, a predicate context and a predicate context area mark. For example, the input predicate is "set".
Wherein, the predicate context area marks: a binary variable of 0-1 is introduced for each word in the sentence, indicating whether they are in the "predicate context" segment.
S303, expanding the predicate sequence and the predicate context into a sequence with the same length as the sentence sequence;
and then expanding the predicate sequence and the predicate context to a sequence as long as the sentence sequence.
S304, converting word vectors of a sentence sequence, a predicate context and a predicate context region mark through a word list into a word vector sequence represented by a real vector, wherein the sentence sequence and the predicate context share one word list;
and then, the sentence sequence, the predicate context and the predicate context area marks are converted, and the sentence sequence, the predicate context and the predicate context area marks are converted into a word vector sequence represented by a corresponding real vector through word extraction vectors of a word table. The sentence sequence and the predicate context share one word table, and the predicate sequence and the predicate context region are marked with respective unique word tables.
S305, inputting the sentence sequence, the predicate context and the word vector sequence marked by the predicate context area into a bidirectional LSTM model;
and then, taking a word vector sequence corresponding to the sentence sequence, a word vector sequence corresponding to the predicate context and a word vector sequence corresponding to the predicate context region mark as the input of the bidirectional LSTM model.
S306, learning the feature representation of the input sequence through a bidirectional LSTM model to obtain a new feature representation sequence;
and then, learning the feature representation of the word vector sequence corresponding to the input sentence sequence, the word vector sequence corresponding to the predicate context and the word vector sequence corresponding to the predicate context region mark through a bidirectional LSTM model to obtain a new feature representation sequence.
S307, inputting a new feature representation sequence into a conditional random field;
the resulting new signature representation sequence is then entered into the CRF (Conditional Random Field).
And S308, marking the new feature representation sequence by taking the marking sequence as a supervision signal through the conditional random field to obtain a marking result.
And finally, labeling the input new feature representation sequence by using the CRF as a supervision signal by using the labeling sequence to obtain a labeling result.
In conclusion, the invention solves the problems that the existing performance depends on the feature engineering, the field knowledge is needed and a large amount of feature extraction work is needed; the problem that no feature can represent long-distance dependency is solved; the problem that heterogeneous resources cannot be introduced to solve the problem of insufficient data is solved; by adopting a deep learning mode, automatic word meaning role labeling is realized, and the time and the cost for constructing a word meaning labeling corpus in intention recognition are reduced.
As shown in fig. 4, which is a schematic structural diagram of an embodiment 1 of a word sense role tagging system for intention recognition disclosed in the present invention, the system may include:
a first input module 401, configured to input a sentence sequence, a predicate context, and a predicate context area flag;
word meaning role labeling: the method is a shallow semantic analysis technology, takes sentences as units, analyzes predicate-argument structures of the sentences, is derived from lattice grammar proposed in Fillmore (1968) on the theoretical basis, and does not deeply analyze semantic information contained in the sentences. Specifically, the task of word sense role labeling is to study the relationship between each component in a sentence and a predicate by taking the predicate of the sentence as a center, and describe the relationship between the components and the predicate by using a word sense role.
And (3) predicate: in a sentence, a predicate is a word that describes or judges a subject, usually a verb. In a sentence, the predicates indicate "what to do", "what to be", and "what to do", representing the core of a sentence.
Argument: in general, matching predicates in sentences is a noun called an argument.
When a meaning role needs to be labeled, firstly, a sentence sequence, a predicate context and a predicate context area label are input. For example, the input predicate is "set".
As the small segments of a plurality of words before and after the predicate can provide more abundant information and help to resolve ambiguity, the accuracy of word meaning role labeling can be further improved by extracting the context of the predicate.
An expansion module 402 for expanding the predicate sequence and the predicate context into a sequence having the same length as the sentence sequence;
and then expanding the predicate sequence and the predicate context to a sequence as long as the sentence sequence.
A conversion module 403, configured to convert the sentence sequence, the predicate context, and the predicate context region tag into a word vector sequence;
and then, the sentence sequence, the predicate context and the predicate context area marks are converted, and the sentence sequence, the predicate context and the predicate context area marks are all converted into corresponding word vector sequences.
A second input module 404, configured to input the sentence sequence, the predicate context, and the word vector sequence marked by the predicate context area into the bidirectional LSTM model;
and then, taking a word vector sequence corresponding to the sentence sequence, a word vector sequence corresponding to the predicate context and a word vector sequence corresponding to the predicate context region mark as the input of the bidirectional LSTM model.
A bidirectional LSTM model 405 for learning the feature representation of the input sequence to obtain a new feature representation sequence;
and then, learning the feature representation of the word vector sequence corresponding to the input sentence sequence, the word vector sequence corresponding to the predicate context and the word vector sequence corresponding to the predicate context region mark through a bidirectional LSTM model to obtain a new feature representation sequence.
A third input module 406 for inputting the new sequence of feature representations into the conditional random field;
the resulting new signature representation sequence is then entered into the CRF (Conditional Random Field).
And the conditional random field 407 is used for labeling the new feature representation sequence to obtain a labeling result.
And finally, labeling the input new feature representation sequence through the CRF to obtain a labeling result.
To sum up, in the above embodiment, when a meaning role needs to be labeled, a sentence sequence, a predicate context, and a predicate context area label are first input; then expanding the predicate sequence and the predicate context into a sequence with the same length as the sentence sequence; converting the sentence sequence, the predicate context and the predicate context region mark into a word vector sequence; inputting the sentence sequence, the predicate context and the word vector sequence marked by the predicate context area into a bidirectional LSTM model; learning the feature representation of the input sequence through a bidirectional LSTM model to obtain a new feature representation sequence; inputting the new feature representation sequence into a conditional random field; and marking the new characteristic representation sequence through the conditional random field to obtain a marking result. The automatic word meaning role labeling can be effectively realized, and the time and the cost for constructing a word meaning labeling corpus in the intention recognition are reduced.
As shown in fig. 5, which is a schematic structural diagram of an embodiment 2 of a word sense character tagging system for intention recognition disclosed in the present invention, the system may include:
a first input module 501, configured to input a sentence sequence, a predicate context, and a predicate context area flag;
word meaning role labeling: the method is a shallow semantic analysis technology, takes sentences as units, analyzes predicate-argument structures of the sentences, is derived from lattice grammar proposed in Fillmore (1968) on the theoretical basis, and does not deeply analyze semantic information contained in the sentences. Specifically, the task of word sense role labeling is to study the relationship between each component in a sentence and a predicate by taking the predicate of the sentence as a center, and describe the relationship between the components and the predicate by using a word sense role.
And (3) predicate: in a sentence, a predicate is a word that describes or judges a subject, usually a verb. In a sentence, the predicates indicate "what to do", "what to be", and "what to do", representing the core of a sentence.
Argument: in general, matching predicates in sentences is a noun called an argument.
When a meaning role needs to be labeled, firstly, a sentence sequence, a predicate context and a predicate context area label are input. For example, the input predicate is "set".
As the small segments of a plurality of words before and after the predicate can provide more abundant information and help to resolve ambiguity, the accuracy of word meaning role labeling can be further improved by extracting the context of the predicate.
An expansion module 502 for expanding the predicate sequence and the predicate context into a sequence having the same length as the sentence sequence;
and then expanding the predicate sequence and the predicate context to a sequence as long as the sentence sequence.
A conversion module 503, configured to convert a sentence sequence, a predicate context, and a predicate context region tag into a word vector sequence represented by a real vector through a word-table word-fetching vector, where the sentence sequence and the predicate context share a word table;
and then, the sentence sequence, the predicate context and the predicate context area marks are converted, and the sentence sequence, the predicate context and the predicate context area marks are converted into a word vector sequence represented by a corresponding real vector through word extraction vectors of a word table. The sentence sequence and the predicate context share one word table, and the predicate sequence and the predicate context region are marked with respective unique word tables.
A second input module 504, configured to input a sentence sequence, a predicate context, and a word vector sequence labeled by a predicate context region into the bidirectional LSTM model;
and then, taking a word vector sequence corresponding to the sentence sequence, a word vector sequence corresponding to the predicate context and a word vector sequence corresponding to the predicate context region mark as the input of the bidirectional LSTM model.
A bidirectional LSTM model 505 for learning the feature representation of the input sequence to obtain a new feature representation sequence;
and then, learning the feature representation of the word vector sequence corresponding to the input sentence sequence, the word vector sequence corresponding to the predicate context and the word vector sequence corresponding to the predicate context region mark through a bidirectional LSTM model to obtain a new feature representation sequence.
A third input module 506 for inputting the new sequence of feature representations into the conditional random field;
the resulting new signature representation sequence is then entered into the CRF (Conditional Random Field).
And the conditional random field 507 is used for marking the new feature representation sequence by taking the marking sequence as a supervision signal to obtain a marking result.
And finally, labeling the input new feature representation sequence by using the CRF as a supervision signal by using the labeling sequence to obtain a labeling result.
To sum up, on the basis of the above embodiments, the present embodiment can specifically convert a sentence sequence, a predicate context, and a predicate context area tag into a word vector sequence represented by a real vector through a word list extraction word vector; specifically, the new characteristic representation sequence can be labeled by taking the labeling sequence as a supervision signal through the conditional random field to obtain a labeling result.
As shown in fig. 6, which is a schematic structural diagram of an embodiment 3 of the word sense character tagging system for intention recognition disclosed in the present invention, the system may include:
an extraction module 601, configured to extract n words before and after a predicate from a sentence to form a predicate context;
word meaning role labeling: the method is a shallow semantic analysis technology, takes sentences as units, analyzes predicate-argument structures of the sentences, is derived from lattice grammar proposed in Fillmore (1968) on the theoretical basis, and does not deeply analyze semantic information contained in the sentences. Specifically, the task of word sense role labeling is to study the relationship between each component in a sentence and a predicate by taking the predicate of the sentence as a center, and describe the relationship between the components and the predicate by using a word sense role.
And (3) predicate: in a sentence, a predicate is a word that describes or judges a subject, usually a verb. In a sentence, the predicates indicate "what to do", "what to be", and "what to do", representing the core of a sentence.
Argument: in general, matching predicates in sentences is a noun called an argument.
When a meaning role needs to be labeled, firstly, n words before and after a predicate are extracted from a sentence to form a predicate context.
As the small segments of a plurality of words before and after the predicate can provide more abundant information and help to resolve ambiguity, the accuracy of word meaning role labeling can be further improved by extracting the context of the predicate.
A first input module 602, configured to input a sentence sequence, a predicate context, and a predicate context area flag;
inputting a sentence sequence, a predicate context and a predicate context area mark. For example, the input predicate is "set".
Wherein, the predicate context area marks: a binary variable of 0-1 is introduced for each word in the sentence, indicating whether they are in the "predicate context" segment.
An expansion module 603 configured to expand the predicate sequence and the predicate context into a sequence having a length equal to that of the sentence sequence;
and then expanding the predicate sequence and the predicate context to a sequence as long as the sentence sequence.
A conversion module 604, configured to convert a sentence sequence, a predicate context, and a predicate context region tag into a word vector sequence represented by a real vector through a word-table word-fetching vector, where the sentence sequence and the predicate context share a word table;
and then, the sentence sequence, the predicate context and the predicate context area marks are converted, and the sentence sequence, the predicate context and the predicate context area marks are converted into a word vector sequence represented by a corresponding real vector through word extraction vectors of a word table. The sentence sequence and the predicate context share one word table, and the predicate sequence and the predicate context region are marked with respective unique word tables.
A second input module 605, configured to input the sentence sequence, the predicate context, and the word vector sequence marked by the predicate context area into the bidirectional LSTM model;
and then, taking a word vector sequence corresponding to the sentence sequence, a word vector sequence corresponding to the predicate context and a word vector sequence corresponding to the predicate context region mark as the input of the bidirectional LSTM model.
A bidirectional LSTM model 606 for learning the feature representation of the input sequence to obtain a new feature representation sequence;
and then, learning the feature representation of the word vector sequence corresponding to the input sentence sequence, the word vector sequence corresponding to the predicate context and the word vector sequence corresponding to the predicate context region mark through a bidirectional LSTM model to obtain a new feature representation sequence.
A third input module 607 for inputting the new feature representation sequence into the conditional random field;
the resulting new signature representation sequence is then entered into the CRF (Conditional Random Field).
And the conditional random field 608 is used for labeling the new feature representation sequence by taking the label sequence as a supervision signal to obtain a labeling result.
And finally, labeling the input new feature representation sequence by using the CRF as a supervision signal by using the labeling sequence to obtain a labeling result.
In conclusion, the invention solves the problems that the existing performance depends on the feature engineering, the field knowledge is needed and a large amount of feature extraction work is needed; the problem that no feature can represent long-distance dependency is solved; the problem that heterogeneous resources cannot be introduced to solve the problem of insufficient data is solved; by adopting a deep learning mode, automatic word meaning role labeling is realized, and the time and the cost for constructing a word meaning labeling corpus in intention recognition are reduced.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. A word sense character tagging method for intention recognition is characterized by comprising the following steps:
inputting a sentence sequence, a predicate context and a predicate context area mark;
expanding the predicate sequence and the predicate context into a sequence with the same length as the sentence sequence;
converting the sentence sequence, the predicate context and the predicate context region marks into a word vector sequence;
inputting the sentence sequence, the predicate context and the word vector sequence marked by the predicate context area into a bidirectional LSTM model;
learning the feature representation of the input sequence through the bidirectional LSTM model to obtain a new feature representation sequence;
inputting the new sequence of feature representations into a conditional random field;
and marking the new characteristic representation sequence through the conditional random field to obtain a marking result.
2. The method of claim 1, wherein converting the sentence sequence, predicate context, and predicate context region labels into a word vector sequence comprises:
and converting the sentence sequence, the predicate context and the predicate context region mark into a word vector sequence represented by a real vector through a word table word taking vector, wherein the sentence sequence and the predicate context share one word table.
3. The method of claim 1, wherein said labeling said new sequence of feature representations with said conditional random field to obtain a labeling result comprises:
and marking the new characteristic representation sequence by using the conditional random field as a supervision signal by using a marking sequence to obtain a marking result.
4. The method of claim 1, further comprising:
and extracting n words before and after the predicate from the sentence to form a predicate context.
5. The method according to claim 4, wherein the predicate context is represented in a one-hot manner.
6. A word sense character tagging system for intent recognition, comprising:
the first input module is used for inputting a sentence sequence, a predicate context and a predicate context area mark;
the extension module is used for extending the predicate sequence and the predicate context into a sequence with the same length as the sentence sequence;
the conversion module is used for converting the sentence sequence, the predicate context and the predicate context region mark into a word vector sequence;
the second input module is used for inputting the sentence sequence, the predicate context and the word vector sequence marked by the predicate context area into the bidirectional LSTM model;
the bidirectional LSTM model is used for learning the feature representation of the input sequence to obtain a new feature representation sequence;
a third input module for inputting said new sequence of feature representations into a conditional random field;
and the conditional random field is used for labeling the new characteristic representation sequence to obtain a labeling result.
7. The system of claim 6, wherein the conversion module is specifically configured to:
and converting the sentence sequence, the predicate context and the predicate context region mark into a word vector sequence represented by a real vector through a word table word taking vector, wherein the sentence sequence and the predicate context share one word table.
8. The system of claim 6, wherein the conditional random field is specifically configured to:
and marking the new characteristic representation sequence by using the conditional random field as a supervision signal by using a marking sequence to obtain a marking result.
9. The system of claim 6, further comprising:
and the extraction module is used for extracting n words before and after the predicate from the sentence to form the predicate context.
10. The system according to claim 9, wherein the predicate context is represented in a one-hot manner.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111069148.7A CN113688627A (en) | 2021-09-13 | 2021-09-13 | Word meaning role labeling method and system for intention recognition |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111069148.7A CN113688627A (en) | 2021-09-13 | 2021-09-13 | Word meaning role labeling method and system for intention recognition |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113688627A true CN113688627A (en) | 2021-11-23 |
Family
ID=78586133
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111069148.7A Pending CN113688627A (en) | 2021-09-13 | 2021-09-13 | Word meaning role labeling method and system for intention recognition |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113688627A (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107943860A (en) * | 2017-11-08 | 2018-04-20 | 北京奇艺世纪科技有限公司 | The recognition methods and device that the training method of model, text are intended to |
CN111222325A (en) * | 2019-12-30 | 2020-06-02 | 北京富通东方科技有限公司 | Medical semantic labeling method and system of bidirectional stack type recurrent neural network |
-
2021
- 2021-09-13 CN CN202111069148.7A patent/CN113688627A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107943860A (en) * | 2017-11-08 | 2018-04-20 | 北京奇艺世纪科技有限公司 | The recognition methods and device that the training method of model, text are intended to |
CN111222325A (en) * | 2019-12-30 | 2020-06-02 | 北京富通东方科技有限公司 | Medical semantic labeling method and system of bidirectional stack type recurrent neural network |
Non-Patent Citations (1)
Title |
---|
XINPING ZHENG: "Chinese Semantic Role Labeling with Hybrid Model", 《IN PROCEEDINGS OF 2019 2ND INTERNATIONAL CONFERENCE ON ALGORITHMS, COMPUTING AND ARTIFICIAL INTELLIGENCE (ACAI’19)》, pages 462 - 467 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107832229B (en) | NLP-based system test case automatic generation method | |
TWI636452B (en) | Method and system of voice recognition | |
KR102316063B1 (en) | Method and apparatus for identifying key phrase in audio data, device and medium | |
KR20110038474A (en) | Apparatus and method for detecting sentence boundaries | |
CN111079408B (en) | Language identification method, device, equipment and storage medium | |
CN116108857B (en) | Information extraction method, device, electronic equipment and storage medium | |
CN110825827A (en) | Entity relationship recognition model training method and device and entity relationship recognition method and device | |
CN112784009A (en) | Subject term mining method and device, electronic equipment and storage medium | |
CN111767714A (en) | Text smoothness determination method, device, equipment and medium | |
CN113220854B (en) | Intelligent dialogue method and device for machine reading and understanding | |
CN112541109B (en) | Answer abstract extraction method and device, electronic equipment, readable medium and product | |
CN113688627A (en) | Word meaning role labeling method and system for intention recognition | |
CN111104520A (en) | Figure entity linking method based on figure identity | |
KR101983477B1 (en) | Method and System for zero subject resolution in Korean using a paragraph-based pivotal entity identification | |
US20120197894A1 (en) | Apparatus and method for processing documents to extract expressions and descriptions | |
CN109558580B (en) | Text analysis method and device | |
CN114266240A (en) | Multi-intention identification method and device based on robot | |
Ali et al. | Urdu noun phrase chunking: HMM based approach | |
Pham et al. | Efficient knowledge acquisition for extracting temporal relations | |
CN108255817B (en) | Entity translation method based on web retrieval | |
CN113095082A (en) | Method, device, computer device and computer readable storage medium for text processing based on multitask model | |
CN111651164A (en) | Code identifier normalization method and device | |
CN111209752A (en) | Chinese extraction integrated unsupervised abstract method based on auxiliary information | |
Munir et al. | Dependency parsing using the URDU. KON-TB treebank | |
Kim et al. | Reliable automatic word spacing using a space insertion and correction model based on neural networks in Korean |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |