CN111639500A - Semantic role labeling method and device, computer equipment and storage medium - Google Patents

Semantic role labeling method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111639500A
CN111639500A CN202010329393.6A CN202010329393A CN111639500A CN 111639500 A CN111639500 A CN 111639500A CN 202010329393 A CN202010329393 A CN 202010329393A CN 111639500 A CN111639500 A CN 111639500A
Authority
CN
China
Prior art keywords
word
predicate
sentence
training
training sentence
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
Application number
CN202010329393.6A
Other languages
Chinese (zh)
Inventor
孙思
曹锋铭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Saiante Technology Service Co Ltd
Original Assignee
Ping An International Smart City Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202010329393.6A priority Critical patent/CN111639500A/en
Priority to PCT/CN2020/104963 priority patent/WO2021212681A1/en
Publication of CN111639500A publication Critical patent/CN111639500A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • G06F16/355Class or cluster creation or modification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/126Character encoding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Databases & Information Systems (AREA)
  • Machine Translation (AREA)

Abstract

The invention relates to a block chain technology, and provides a semantic role labeling method and related equipment, wherein the method uses a bidirectional long-short term memory network layer to perform feature extraction on a word vector sequence of a training sentence to obtain a first word feature vector sequence; performing feature extraction on the first word feature vector sequence by using an image convolution neural network layer according to a topological graph formed by predicate words and non-predicate words in a training sentence to obtain a second word feature vector sequence; classifying the training sentences by taking the second character feature vector sequence as the input of the conditional random field to obtain the prediction labels of the training sentences; adjusting parameters of a bidirectional long-short term memory network layer, a graph convolution neural network layer and a conditional random field according to the label and the prediction label of each predicate word and each non-predicate word of the training sentence to obtain a semantic role label model; and performing semantic role labeling on the to-be-labeled sentences by using the semantic role labeling model. Further, the present application relates to blockchain techniques, the prediction tags may be stored in blockchains.

Description

Semantic role labeling method and device, computer equipment and storage medium
Technical Field
The invention relates to a block chain technology, in particular to a semantic role labeling method, a semantic role labeling device, computer equipment and a computer readable storage medium.
Background
The semantic role labeling is to analyze the relationship between each component in a sentence and a predicate by taking the predicate of the sentence as a center, and the general structure is 'predicate-argument', and the semantic roles are used for describing the structural relationship. Semantic role labeling is an important intermediate step of many natural language understanding tasks (such as information extraction, chapter analysis, deep question answering and the like), and the accuracy of semantic role labeling affects the effect of downstream natural semantic understanding tasks. How to improve the accuracy of semantic role labeling becomes an urgent problem to be solved.
Disclosure of Invention
In view of the above, it is desirable to provide a semantic role labeling method, apparatus, computer device and computer readable storage medium, which can predict a computer state according to a historical state of the computer.
A first aspect of the present application provides a semantic role labeling method, where the method includes:
acquiring a training sentence, predicate words and non-predicate words in the training sentence, and label labels of each predicate word and each non-predicate word of the training sentence;
generating a word vector sequence of the training sentence, wherein words in the training sentence correspond to word vectors in the word vector sequence one by one;
extracting the features of the word vector sequence by using a bidirectional long and short term memory network layer to obtain a first word feature vector sequence of the training sentence;
performing feature extraction on the first word feature vector sequence by using a graph convolution neural network layer according to a topological graph formed by predicate words and non-predicate words in the training sentence to obtain a second word feature vector sequence of the training sentence;
classifying the training sentences by taking the second character feature vector sequence as the input of the conditional random field to obtain a prediction label of the training sentences;
adjusting parameters of the bidirectional long-short term memory network layer, the graph convolution neural network layer and the conditional random field according to the label of each predicate word and each non-predicate word of the training sentence and the prediction label to obtain a semantic role label model;
and taking a sentence to be annotated and a predicate word and a non-predicate word of the sentence to be annotated as input, and performing semantic role annotation on the sentence to be annotated by using the semantic role annotation model.
In another possible implementation, the annotation tag of the non-predicate is a semantic relationship between the non-predicate and the predicate, and the annotation tag of the non-predicate includes an event, a scope, an action start, an action end, and/or others.
In another possible implementation manner, the generating the word vector sequence of the training sentence includes:
obtaining a position vector of each word of the training sentence;
generating a coding vector for each word using the trained word embedding model;
and splicing the position vector and the coding vector of each word to obtain a word vector of the word.
In another possible implementation manner, the performing, by the graph-based convolutional neural network layer, feature extraction on the first word feature vector sequence according to a topological graph formed by predicate words and non-predicate words in the training sentence includes:
taking the predicate words and the non-predicate words in the training sentences as nodes of the topological graph, and connecting each predicate byte point and each non-predicate node in the topological graph;
inputting the first word feature vector sequence into the convolutional neural network layer, wherein the output of the vth neuron of the kth neuron sublayer in the convolutional neural network layer is determined according to the following formula:
Figure BDA0002464400710000021
wherein σ is an activation function, N (v) is a set of nodes connected with node v in the topological graph, and WL(u,v)For the parameter value between the v neuron of the k neuron sub-layer and the u neuron of the k-1 neuron sub-layer in the graph convolution neural network layer, WL(u,v)Is the weight of the edge between node v and node u in the topology,
Figure BDA0002464400710000022
the u-th neuron of the k-1 th neuron sublayer, bL(u,v)Is a parameter of the vth neuron of the kth neuron sublayer.
In another possible implementation manner, the weight of an edge between the node v and the node u in the topology is 1.
In another possible implementation manner, the classifying the training sentence by using the second word feature vector sequence as an input of the conditional random field includes:
the score for each tag sequence of the training sentence may be determined according to the following formula:
Figure BDA0002464400710000031
wherein x is the second word feature vector sequence, y1,y2,…yVThe label sequences of the 1 st to V th words in the training sentence, Z (x) is a normalization factor, h is an activation function, and g is a constraint function;
and determining the label sequence with the highest score as the predicted label of the training sentence.
In another possible implementation, if there is a node u in the set of nodes connected to the node V in the topology map, the node W is adjustedL(u,v),WL(u,v)Convolving the vth neuron and the kth neuron of the kth neuron sublayer in the neural network layer with the graph-1 parameter between the u-th neurons of a sub-layer of neurons.
A second aspect of the present application provides a semantic role labeling apparatus, the apparatus comprising:
the acquiring module is used for acquiring a training sentence, predicate words and non-predicate words in the training sentence and label labels of each predicate word and non-predicate word of the training sentence;
the generating module is used for generating a word vector sequence of the training sentence, wherein words in the training sentence correspond to word vectors in the word vector sequence one by one;
the first extraction module is used for extracting the characteristics of the word vector sequence by using a bidirectional long-short term memory network layer to obtain a first word characteristic vector sequence of the training sentence;
the second extraction module is used for performing feature extraction on the first word feature vector sequence according to a topological graph formed by predicate words and non-predicate words in the training sentence by using a graph convolution neural network layer to obtain a second word feature vector sequence of the training sentence;
the classification module is used for classifying the training sentences by taking the second character feature vector sequence as the input of the conditional random field to obtain the prediction labels of the training sentences;
the adjusting module is used for adjusting parameters of the bidirectional long-short term memory network layer, the graph convolution neural network layer and the conditional random field according to each predicate word and label of a non-predicate word of the training sentence and the prediction label to obtain a semantic role labeling model;
and the marking module is used for performing semantic role marking on the sentence to be marked by using the sentence to be marked and the predicate word and the non-predicate word of the sentence to be marked as input through the semantic role marking model.
In another possible implementation, the annotation tag of the non-predicate is a semantic relationship between the non-predicate and the predicate, and the annotation tag of the non-predicate includes an event, a scope, an action start, an action end, and/or others.
In another possible implementation manner, the generating the word vector sequence of the training sentence includes:
obtaining a position vector of each word of the training sentence;
generating a coding vector for each word using the trained word embedding model;
and splicing the position vector and the coding vector of each word to obtain a word vector of the word.
In another possible implementation manner, the performing, by the graph-based convolutional neural network layer, feature extraction on the first word feature vector sequence according to a topological graph formed by predicate words and non-predicate words in the training sentence includes:
taking the predicate words and the non-predicate words in the training sentences as nodes of the topological graph, and connecting each predicate byte point and each non-predicate node in the topological graph;
inputting the first word feature vector sequence into the convolutional neural network layer, wherein the output of the vth neuron of the kth neuron sublayer in the convolutional neural network layer is determined according to the following formula:
Figure BDA0002464400710000041
wherein σ is an activation function, N (v) is a set of nodes connected with node v in the topological graph, and WL(u,v)For the parameter value between the v neuron of the k neuron sub-layer and the u neuron of the k-1 neuron sub-layer in the graph convolution neural network layer, WL(u,v)Is the weight of the edge between node v and node u in the topology,
Figure BDA0002464400710000042
the u-th neuron of the k-1 th neuron sublayer, bL(u,v)Is a parameter of the vth neuron of the kth neuron sublayer.
In another possible implementation manner, the weight of an edge between the node v and the node u in the topology is 1.
In another possible implementation manner, the classifying the training sentence by using the second word feature vector sequence as an input of the conditional random field includes:
the score for each tag sequence of the training sentence may be determined according to the following formula:
Figure BDA0002464400710000051
wherein x is the second word feature vector sequence, y1,y2,…yVThe label sequences of the 1 st to V th words in the training sentence, Z (x) is a normalization factor, h is an activation function, and g is a constraint function;
and determining the label sequence with the highest score as the predicted label of the training sentence.
A third aspect of the application provides a computer device comprising a processor for implementing the semantic role tagging method when executing a computer program stored in a memory.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the semantic role labeling method.
According to the invention, the graph convolution neural network layer is connected on the basis of the bidirectional long and short term memory network layer, after the bidirectional long and short term memory network layer captures the information of adjacent characters, the direct connection is established for the characters far away from each other in the sentence by utilizing the attribute of the graph convolution neural network layer, the problem of information loss of long and difficult sentences in semantic character marking is avoided, and the accuracy of semantic character marking is improved.
Drawings
Fig. 1 is a flowchart of a semantic role labeling method according to an embodiment of the present invention.
Fig. 2 is a structural diagram of a semantic role labeling apparatus according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of a computer device provided by an embodiment of the present invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a detailed description of the present invention will be given below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth to provide a thorough understanding of the present invention, and the described embodiments are merely a subset of the embodiments of the present invention, rather than a complete embodiment. 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.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
Preferably, the semantic role labeling method is applied to one or more computer devices. The computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
Example one
Fig. 1 is a flowchart of a semantic role labeling method according to an embodiment of the present invention. The semantic role labeling method is applied to computer equipment and is used for performing role labeling on characters in sentences.
As shown in fig. 1, the semantic role labeling method includes:
101, acquiring a training sentence, a predicate word and a non-predicate word in the training sentence, and a label of each predicate word and non-predicate word of the training sentence.
In a specific embodiment, a web crawler may be used to crawl web pages from a network and use a parser to parse the web pages to obtain a training sentence set, and a training sentence is selected from the training sentence set. A plurality of training sentences input by a user may be received, the plurality of training sentences input by the user may be determined as a set of training sentences, and one training sentence may be selected from the set of training sentences.
In a specific embodiment, the annotation tag of the non-predicate is the semantic relationship between the non-predicate and the predicate, and the annotation tag of the non-predicate includes event, scope, action start, action end, and/or others.
For example, a training sentence is "Xiaoming meets Xiaohong", and the label of each word in the training sentence is "B-a 1", "E-a 1", "B-V", "E-V", "B-a 2" or "E-a 2" in sequence, wherein a1 represents an event, a2 represents an event, V represents a predicate word, B represents a start word of a word, and E represents an end word of a word (if I exists, I can represent a middle word of a word); the predicate words in the training sentence are "meet" and "meet", and the non-predicate words in the training sentence are "small", "bright", "small", and "red".
In another embodiment, the method for labeling the training sentence may adopt a BIEO labeling method or a BIO labeling method.
And 102, generating a word vector sequence of the training sentence, wherein the words in the training sentence correspond to the word vectors in the word vector sequence one by one.
In a specific embodiment, the generating the word vector sequence of the training sentence includes:
obtaining a position vector of each word of the training sentence; generating a coding vector for each word using the trained word embedding model; and splicing the position vector and the coding vector of each word to obtain a word vector of the word.
For example, a training sentence is "Xiaoming encounters Small Red", where the "Small" position vector is "00001" and the "Small" code vector is "00010" (the code vector for each word can uniquely identify the word in the dictionary set), and the position vector and code vector for the "Small" word are concatenated to yield the word vector "0000100010" for the "Small" word.
And 103, extracting the features of the word vector sequence by using a bidirectional long-short term memory network layer to obtain a first word feature vector sequence of the training sentence.
The word vector sequence may be input into a forward LSTM layer of the bidirectional long and short term memory network layer in a word order, and then the output of the forward LSTM layer may be input into a reverse LSTM layer of the bidirectional long and short term memory network layer. And performing semantic feature extraction based on context information on the word vector sequence.
For example, the output of forward LSTM at time t can be calculated as
Figure BDA0002464400710000071
Wherein, UtIs a word vector at time t. The output of the backward LSTM at time t can be calculated as
Figure BDA0002464400710000072
Figure BDA0002464400710000073
Wherein, UtIs a word vector at time t.
And 104, performing feature extraction on the first word feature vector sequence according to a topological graph formed by predicate words and non-predicate words in the training sentence by using a graph convolution neural network layer to obtain a second word feature vector sequence of the training sentence.
In a specific embodiment, the performing, by the graph convolutional neural network layer, feature extraction on the first word feature vector sequence according to a topological graph formed by predicate words and non-predicate words in the training sentence includes:
taking the predicate words and the non-predicate words in the training sentences as nodes of the topological graph, and connecting each predicate byte point and each non-predicate node in the topological graph;
inputting the first word feature vector sequence into the convolutional neural network layer, wherein the output of the vth neuron of the kth neuron sublayer in the convolutional neural network layer is determined according to the following formula:
Figure BDA0002464400710000081
wherein σ is an activation function, N (v) is a set of nodes connected with node v in the topological graph, and WL(u,v)For the parameter value between the v neuron of the k neuron sub-layer and the u neuron of the k-1 neuron sub-layer in the graph convolution neural network layer, WL(u,v)Is the weight of the edge between node v and node u in the topology,
Figure BDA0002464400710000082
the u-th neuron of the k-1 th neuron sublayer, bL(u,v)Is a parameter of the vth neuron of the kth neuron sublayer.
The vth neuron of each neuron sublayer corresponds to the node v in the topological graph one by one.
In another embodiment, the weight of the edge between the node v and the node u in the topology map may be 1.
And the output of the vth neuron of the kth neuron sub-layer is used as input by the vth neuron of the kth neuron sub-layer, the output of the vth neuron of the kth neuron sub-layer is calculated according to the topological graph and the parameter of the vth neuron of the kth neuron sub-layer, the graph convolution neural network layer comprises K neuron sub-layers, each neuron sub-layer comprises V neurons, the neurons of each neuron sub-layer correspond to words in the training sentence in word sequence one-to-one mode, K is the number of preset neuron sub-layers, and V is the number of preset neurons of each layer.
And 105, classifying the training sentences by taking the second character feature vector sequence as the input of the conditional random field to obtain the prediction labels of the training sentences.
In a specific embodiment, the classifying the training sentence by using the second word feature vector sequence as the input of the conditional random field includes:
the score for each tag sequence of the training sentence may be determined according to the following formula:
Figure BDA0002464400710000091
wherein x is the second word feature vector sequence, y1,y2,…yVThe label sequences of the 1 st to V th words in the training sentence, Z (x) is a normalization factor, h is an activation function, and g is a constraint function;
and determining the label sequence with the highest score as the predicted label of the training sentence.
For example, a training sentence is "Xiaoming encounters Small Red", and the two tag sequences of the training sentence are "B-A1E-A1B-V E-V B-A2E-A2" (tag sequence one), "B-A1E-A1B-V B-A2E-V E-A2" (tag sequence two). And determining scores of a label sequence I and a label sequence II of the training sentence as num1 and num2 respectively according to the second word feature vector sequence of the training sentence through the formula, wherein num1 is greater than num2, and determining the label sequence I as the prediction label of the training sentence.
It is emphasized that the prediction tag may also be stored in a node of a block chain in order to further ensure the privacy and security of the prediction tag.
And 106, adjusting parameters of the bidirectional long-short term memory network layer, the graph convolution neural network layer and the conditional random field according to the label of each predicate word and each non-predicate word of the training sentence and the prediction label to obtain a semantic role label model.
The semantic role labeling model is formed by sequentially connecting the bidirectional long-short term memory network layer, the graph convolution neural network layer and the conditional random field. And the parameter adjustment of the semantic role labeling model is to perform iterative adjustment on the parameters of the semantic role labeling model through a back propagation algorithm according to each predicate word, labeling label of non-predicate word and the prediction label of the training sentence. Until the iteration times reach the preset times or the convergence condition of the loss function is met. After iterative adjustment, the semantic role labeling model is adapted to semantic role labeling.
Parameters of the bidirectional long-short term memory network layer, the graph convolution neural network layer and the conditional random field can be adjusted according to the label of each predicate and non-predicate word of the training sentence and the prediction label, so as to reduce a difference between the prediction label and the identification label, and enable the prediction label to approach the label of each predicate and non-predicate word of the training sentence.
In one embodiment, when adjusting the graph convolutional neural network layer, if there is a node u in the set of nodes connected to the node V in the topological graph, W is adjustedL(u,v),WL(u,v)And (3) accumulating parameters between the v neuron of the kth neuron sub-layer and the u neuron of the kth neuron sub-layer in the neural network layer for the graph. That is, in the process of adjusting the convolutional neural network layer, parameters between the vth neuron of the kth neuron sublayer and the uth neuron of the k-1 neuron sublayer in the convolutional neural network layer may be updated, and a node v corresponding to the vth neuron of the kth neuron sublayer in the convolutional neural network layer is connected to a node u corresponding to the uth neuron of the k-1 neuron sublayer in the topological graph.
And 107, taking a sentence to be annotated and a predicate word and a non-predicate word of the sentence to be annotated as input, and performing semantic role annotation on the sentence to be annotated by using the semantic role annotation model.
The method comprises the steps of receiving a sentence to be annotated input by a user, annotating a predicate word of the sentence to be annotated by using a part-of-speech analysis tool, and determining the remaining unmarked words as non-predicate words.
And taking a sentence to be annotated and a predicate word and a non-predicate word of the sentence to be annotated as input, generating a word vector sequence of the sentence to be annotated, inputting the word vector sequence of the sentence to be annotated into the semantic role annotation model, and performing semantic role annotation on the sentence to be annotated by using the semantic role annotation model to obtain an annotation result of the sentence to be annotated.
For example, one to-be-annotated sentence is "Xiaoming yesterday meets with reddish brown in the park", and the annotation result of the to-be-annotated sentence is "B-A1E-A1B-A3E-A3B-A4I-A4E-A4B-V E-V B-A5B-A2E-A2". Where A3 is the range, A4 is the other, and A5 is the end of the operation.
In another embodiment, the execution sequence of some steps may be changed, some steps may be added, or some steps may be omitted, according to different requirements. And exchanging and executing the sequence of extracting the first word characteristic vector sequence of the training sentence and the sequence of extracting the characteristics of the first word characteristic vector sequence.
The method comprises the steps of performing role labeling on characters in sentences, connecting a graph convolution neural network layer on the basis of a bidirectional long and short term memory network layer, and after information of adjacent characters is captured by the bidirectional long and short term memory network layer, establishing direct connection for characters far away from each other in sentences by utilizing the attribute of the graph convolution neural network layer, so that the problem of information loss of long and difficult sentences in semantic role labeling is avoided, and the accuracy of semantic role labeling is improved.
Example two
Fig. 2 is a structural diagram of a semantic role labeling apparatus according to a second embodiment of the present invention. The semantic role labeling device 20 is applied to a computer device. The semantic character labeling device 20 is used for performing character labeling on characters in the sentence.
As shown in fig. 2, the semantic character labeling apparatus 20 may include an obtaining module 201, a generating module 202, a first extracting module 203, a second extracting module 204, a classifying module 205, an adjusting module 206, and a labeling module 207.
An obtaining module 201, configured to obtain a training sentence, a predicate word and a non-predicate word in the training sentence, and a label of each predicate word and non-predicate word of the training sentence.
In a specific embodiment, a web crawler may be used to crawl web pages from a network and use a parser to parse the web pages to obtain a training sentence set, and a training sentence is selected from the training sentence set. A plurality of training sentences input by a user may be received, the plurality of training sentences input by the user may be determined as a set of training sentences, and one training sentence may be selected from the set of training sentences.
In a specific embodiment, the annotation tag of the non-predicate is the semantic relationship between the non-predicate and the predicate, and the annotation tag of the non-predicate includes event, scope, action start, action end, and/or others.
For example, a training sentence is "Xiaoming meets Xiaohong", and the label of each word in the training sentence is "B-a 1", "E-a 1", "B-V", "E-V", "B-a 2" or "E-a 2" in sequence, wherein a1 represents an event, a2 represents an event, V represents a predicate word, B represents a start word of a word, and E represents an end word of a word (if I exists, I can represent a middle word of a word); the predicate words in the training sentence are "meet" and "meet", and the non-predicate words in the training sentence are "small", "bright", "small", and "red".
In another embodiment, the method for labeling the training sentence may adopt a BIEO labeling method or a BIO labeling method.
A generating module 202, configured to generate a word vector sequence of the training sentence, where words in the training sentence correspond to word vectors in the word vector sequence one to one.
In a specific embodiment, the generating the word vector sequence of the training sentence includes:
obtaining a position vector of each word of the training sentence; generating a coding vector for each word using the trained word embedding model; and splicing the position vector and the coding vector of each word to obtain a word vector of the word.
For example, a training sentence is "Xiaoming encounters Small Red", where the "Small" position vector is "00001" and the "Small" code vector is "00010" (the code vector for each word can uniquely identify the word in the dictionary set), and the position vector and code vector for the "Small" word are concatenated to yield the word vector "0000100010" for the "Small" word.
The first extraction module 203 is configured to perform feature extraction on the word vector sequence by using a bidirectional long-short term memory network layer to obtain a first word feature vector sequence of the training sentence.
The word vector sequence may be input into a forward LSTM layer of the bidirectional long and short term memory network layer in a word order, and then the output of the forward LSTM layer may be input into a reverse LSTM layer of the bidirectional long and short term memory network layer. And performing semantic feature extraction based on context information on the word vector sequence.
For example, the output of forward LSTM at time t can be calculated as
Figure BDA0002464400710000121
Wherein, UtIs a word vector at time t. The output of the backward LSTM at time t can be calculated as
Figure BDA0002464400710000122
Figure BDA0002464400710000123
Wherein, UtIs a word vector at time t.
And a second extraction module 204, configured to perform feature extraction on the first word feature vector sequence according to a topological graph formed by predicate words and non-predicate words in the training sentence by using a graph convolution neural network layer, so as to obtain a second word feature vector sequence of the training sentence.
In a specific embodiment, the performing, by the graph convolutional neural network layer, feature extraction on the first word feature vector sequence according to a topological graph formed by predicate words and non-predicate words in the training sentence includes:
taking the predicate words and the non-predicate words in the training sentences as nodes of the topological graph, and connecting each predicate byte point and each non-predicate node in the topological graph;
inputting the first word feature vector sequence into the convolutional neural network layer, wherein the output of the vth neuron of the kth neuron sublayer in the convolutional neural network layer is determined according to the following formula:
Figure BDA0002464400710000124
wherein σ is an activation function, N (v) is a set of nodes connected with node v in the topological graph, and WL(u,v)For the parameter value between the v neuron of the k neuron sub-layer and the u neuron of the k-1 neuron sub-layer in the graph convolution neural network layer, WL(u,v)Is the weight of the edge between node v and node u in the topology,
Figure BDA0002464400710000125
the u-th neuron of the k-1 th neuron sublayer, bL(u,v)Is a parameter of the vth neuron of the kth neuron sublayer.
The vth neuron of each neuron sublayer corresponds to the node v in the topological graph one by one.
In another embodiment, the weight of the edge between the node v and the node u in the topology map may be 1.
And the output of the vth neuron of the kth neuron sub-layer is used as input by the vth neuron of the kth neuron sub-layer, the output of the vth neuron of the kth neuron sub-layer is calculated according to the topological graph and the parameter of the vth neuron of the kth neuron sub-layer, the graph convolution neural network layer comprises K neuron sub-layers, each neuron sub-layer comprises V neurons, the neurons of each neuron sub-layer correspond to words in the training sentence in word sequence one-to-one mode, K is the number of preset neuron sub-layers, and V is the number of preset neurons of each layer.
A classification module 205, configured to classify the training sentence with the second word feature vector sequence as an input of the conditional random field, so as to obtain a prediction label of the training sentence.
In a specific embodiment, the classifying the training sentence by using the second word feature vector sequence as the input of the conditional random field includes:
the score for each tag sequence of the training sentence may be determined according to the following formula:
Figure BDA0002464400710000131
wherein x is the second word feature vector sequence, y1,y2,…yVThe label sequences of the 1 st to V th words in the training sentence, Z (x) is a normalization factor, h is an activation function, and g is a constraint function;
and determining the label sequence with the highest score as the predicted label of the training sentence.
For example, a training sentence is "Xiaoming encounters Small Red", and the two tag sequences of the training sentence are "B-A1E-A1B-V E-V B-A2E-A2" (tag sequence one), "B-A1E-A1B-V B-A2E-V E-A2" (tag sequence two). And determining scores of a label sequence I and a label sequence II of the training sentence as num1 and num2 respectively according to the second word feature vector sequence of the training sentence through the formula, wherein num1 is greater than num2, and determining the label sequence I as the prediction label of the training sentence.
It is emphasized that the prediction tag may also be stored in a node of a block chain in order to further ensure the privacy and security of the prediction tag.
And an adjusting module 206, configured to adjust parameters of the bidirectional long-term and short-term memory network layer, the graph convolutional neural network layer, and the conditional random field according to each predicate word of the training sentence, a label of a non-predicate word, and the prediction label, so as to obtain a semantic role labeling model.
The semantic role labeling model is formed by sequentially connecting the bidirectional long-short term memory network layer, the graph convolution neural network layer and the conditional random field. And the parameter adjustment of the semantic role labeling model is to perform iterative adjustment on the parameters of the semantic role labeling model through a back propagation algorithm according to each predicate word, labeling label of non-predicate word and the prediction label of the training sentence. Until the iteration times reach the preset times or the convergence condition of the loss function is met. After iterative adjustment, the semantic role labeling model is adapted to semantic role labeling.
Parameters of the bidirectional long-short term memory network layer, the graph convolution neural network layer and the conditional random field can be adjusted according to the label of each predicate and non-predicate word of the training sentence and the prediction label, so as to reduce a difference between the prediction label and the identification label, and enable the prediction label to approach the label of each predicate and non-predicate word of the training sentence.
In one embodiment, when adjusting the graph convolutional neural network layer, if there is a node u in the set of nodes connected to the node V in the topological graph, W is adjustedL(u,v),WL(u,v)And (3) accumulating parameters between the v neuron of the kth neuron sub-layer and the u neuron of the kth neuron sub-layer in the neural network layer for the graph. That is, in the process of adjusting the convolutional neural network layer, parameters between the vth neuron of the kth neuron sublayer and the uth neuron of the k-1 neuron sublayer in the convolutional neural network layer may be updated, and a node v corresponding to the vth neuron of the kth neuron sublayer in the convolutional neural network layer is connected to a node u corresponding to the uth neuron of the k-1 neuron sublayer in the topological graph.
And the labeling module 207 is used for performing semantic role labeling on the sentence to be labeled by using the sentence to be labeled and the predicate word and the non-predicate word of the sentence to be labeled as input through the semantic role labeling model.
The method comprises the steps of receiving a sentence to be annotated input by a user, annotating a predicate word of the sentence to be annotated by using a part-of-speech analysis tool, and determining the remaining unmarked words as non-predicate words.
And taking a sentence to be annotated and a predicate word and a non-predicate word of the sentence to be annotated as input, generating a word vector sequence of the sentence to be annotated, inputting the word vector sequence of the sentence to be annotated into the semantic role annotation model, and performing semantic role annotation on the sentence to be annotated by using the semantic role annotation model to obtain an annotation result of the sentence to be annotated.
For example, one to-be-annotated sentence is "Xiaoming yesterday meets with reddish brown in the park", and the annotation result of the to-be-annotated sentence is "B-A1E-A1B-A3E-A3B-A4I-A4E-A4B-V E-V B-A5B-A2E-A2". Where A3 is the range, A4 is the other, and A5 is the end of the operation.
In another embodiment, the execution sequence of some steps may be changed, some steps may be added, or some steps may be omitted, according to different requirements. And exchanging and executing the sequence of extracting the first word characteristic vector sequence of the training sentence and the sequence of extracting the characteristics of the first word characteristic vector sequence.
The semantic character labeling device 20 in the second embodiment performs character labeling on characters in sentences, and after information of adjacent characters is captured by the bidirectional long and short term memory network layer by connecting the graph convolution neural network layer to the bidirectional long and short term memory network layer, direct connection is established for characters far away from each other in sentences by using the attribute of the graph convolution neural network layer, so that the problem of information loss of long and difficult sentences in semantic character labeling is avoided, and the accuracy of semantic character labeling is improved.
EXAMPLE III
The present embodiment provides a computer-readable storage medium, which stores thereon a computer program, and when the computer program is executed by a processor, the computer program implements the steps in the semantic role labeling method embodiment, for example, the steps 101 and 107 shown in fig. 1:
101, acquiring a training sentence, predicate words and non-predicate words in the training sentence, and label labels of each predicate word and non-predicate word of the training sentence;
102, generating a word vector sequence of the training sentence, wherein words in the training sentence correspond to word vectors in the word vector sequence one by one;
103, extracting the features of the word vector sequence by using a bidirectional long and short term memory network layer to obtain a first word feature vector sequence of the training sentence;
104, performing feature extraction on the first word feature vector sequence according to a topological graph formed by predicate words and non-predicate words in the training sentence by using a graph convolution neural network layer to obtain a second word feature vector sequence of the training sentence;
105, classifying the training sentences by taking the second character feature vector sequence as the input of the conditional random field to obtain a prediction label of the training sentences;
106, adjusting parameters of the bidirectional long-short term memory network layer, the graph convolution neural network layer and the conditional random field according to the label of each predicate word and each non-predicate word of the training sentence and the prediction label to obtain a semantic role label model;
and 107, taking a sentence to be annotated and a predicate word and a non-predicate word of the sentence to be annotated as input, and performing semantic role annotation on the sentence to be annotated by using the semantic role annotation model.
Alternatively, the computer program, when executed by the processor, implements the functions of the modules in the above device embodiments, for example, the module 201 and 207 in fig. 2:
an obtaining module 201, configured to obtain a training sentence, predicate words and non-predicate words in the training sentence, and label labels of each predicate word and non-predicate word of the training sentence;
a generating module 202, configured to generate a word vector sequence of the training sentence, where words in the training sentence correspond to word vectors in the word vector sequence one to one;
a first extraction module 203, configured to perform feature extraction on the word vector sequence by using a bidirectional long and short term memory network layer to obtain a first word feature vector sequence of the training sentence;
a second extraction module 204, configured to perform feature extraction on the first word feature vector sequence according to a topological graph formed by predicate words and non-predicate words in the training sentence by using a graph convolution neural network layer, so as to obtain a second word feature vector sequence of the training sentence;
a classification module 205, configured to classify the training sentence with the second word feature vector sequence as an input of the conditional random field, so as to obtain a prediction tag of the training sentence;
an adjusting module 206, configured to adjust parameters of the bidirectional long-term and short-term memory network layer, the graph convolutional neural network layer, and the conditional random field according to each predicate word of the training sentence, a label of a non-predicate word, and the prediction label, so as to obtain a semantic role label model;
and the labeling module 207 is used for performing semantic role labeling on the sentence to be labeled by using the sentence to be labeled and the predicate word and the non-predicate word of the sentence to be labeled as input through the semantic role labeling model.
Example four
Fig. 3 is a schematic diagram of a computer device according to a third embodiment of the present invention. The computer device 30 comprises a memory 301, a processor 302 and a computer program 303, such as a semantic role tagging program, stored in the memory 301 and executable on the processor 302. The processor 302, when executing the computer program 303, implements the steps in the above semantic role labeling method embodiment, such as 101-107 shown in fig. 1:
101, acquiring a training sentence, predicate words and non-predicate words in the training sentence, and label labels of each predicate word and non-predicate word of the training sentence;
102, generating a word vector sequence of the training sentence, wherein words in the training sentence correspond to word vectors in the word vector sequence one by one;
103, extracting the features of the word vector sequence by using a bidirectional long and short term memory network layer to obtain a first word feature vector sequence of the training sentence;
104, performing feature extraction on the first word feature vector sequence according to a topological graph formed by predicate words and non-predicate words in the training sentence by using a graph convolution neural network layer to obtain a second word feature vector sequence of the training sentence;
105, classifying the training sentences by taking the second character feature vector sequence as the input of the conditional random field to obtain a prediction label of the training sentences;
106, adjusting parameters of the bidirectional long-short term memory network layer, the graph convolution neural network layer and the conditional random field according to the label of each predicate word and each non-predicate word of the training sentence and the prediction label to obtain a semantic role label model;
and 107, taking a sentence to be annotated and a predicate word and a non-predicate word of the sentence to be annotated as input, and performing semantic role annotation on the sentence to be annotated by using the semantic role annotation model.
Alternatively, the computer program, when executed by the processor, implements the functions of the modules in the above device embodiments, for example, the module 201 and 207 in fig. 2:
an obtaining module 201, configured to obtain a training sentence, predicate words and non-predicate words in the training sentence, and label labels of each predicate word and non-predicate word of the training sentence;
a generating module 202, configured to generate a word vector sequence of the training sentence, where words in the training sentence correspond to word vectors in the word vector sequence one to one;
a first extraction module 203, configured to perform feature extraction on the word vector sequence by using a bidirectional long and short term memory network layer to obtain a first word feature vector sequence of the training sentence;
a second extraction module 204, configured to perform feature extraction on the first word feature vector sequence according to a topological graph formed by predicate words and non-predicate words in the training sentence by using a graph convolution neural network layer, so as to obtain a second word feature vector sequence of the training sentence;
a classification module 205, configured to classify the training sentence with the second word feature vector sequence as an input of the conditional random field, so as to obtain a prediction tag of the training sentence;
an adjusting module 206, configured to adjust parameters of the bidirectional long-term and short-term memory network layer, the graph convolutional neural network layer, and the conditional random field according to each predicate word of the training sentence, a label of a non-predicate word, and the prediction label, so as to obtain a semantic role label model;
and the labeling module 207 is used for performing semantic role labeling on the sentence to be labeled by using the sentence to be labeled and the predicate word and the non-predicate word of the sentence to be labeled as input through the semantic role labeling model.
Illustratively, the computer program 303 may be partitioned into one or more modules that are stored in the memory 301 and executed by the processor 302 to perform the present method. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 303 in the computer device 30. For example, the computer program 303 may be divided into the obtaining module 201, the generating module 202, the first extracting module 203, the second extracting module 204, the classifying module 205, the adjusting module 206, and the labeling module 207 in fig. 2, where specific functions of each module are described in embodiment two.
Those skilled in the art will appreciate that the schematic diagram 3 is merely an example of the computer device 30 and does not constitute a limitation of the computer device 30, and may include more or less components than those shown, or combine certain components, or different components, for example, the computer device 30 may also include input and output devices, network access devices, buses, etc.
The Processor 302 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor 302 may be any conventional processor or the like, the processor 302 being the control center for the computer device 30 and connecting the various parts of the overall computer device 30 using various interfaces and lines.
The memory 301 may be used to store the computer program 303, and the processor 302 may implement various functions of the computer device 30 by running or executing the computer program or module stored in the memory 301 and calling data stored in the memory 301. The memory 301 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the computer device 30, and the like. Further, the memory 301 may include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other non-volatile solid state storage device.
The modules integrated by the computer device 30 may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
Further, the computer usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware form, and can also be realized in a form of hardware and a software functional module.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned. Furthermore, it is to be understood that the word "comprising" does not exclude other modules or steps, and the singular does not exclude the plural. A plurality of modules or means recited in the system claims may also be implemented by one module or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A semantic role labeling method, characterized in that the method comprises:
acquiring a training sentence, predicate words and non-predicate words in the training sentence, and label labels of each predicate word and each non-predicate word of the training sentence;
generating a word vector sequence of the training sentence, wherein words in the training sentence correspond to word vectors in the word vector sequence one by one;
extracting the features of the word vector sequence by using a bidirectional long and short term memory network layer to obtain a first word feature vector sequence of the training sentence;
performing feature extraction on the first word feature vector sequence by using a graph convolution neural network layer according to a topological graph formed by predicate words and non-predicate words in the training sentence to obtain a second word feature vector sequence of the training sentence;
classifying the training sentences by taking the second character feature vector sequence as the input of the conditional random field to obtain a prediction label of the training sentences;
adjusting parameters of the bidirectional long-short term memory network layer, the graph convolution neural network layer and the conditional random field according to the label of each predicate word and each non-predicate word of the training sentence and the prediction label to obtain a semantic role label model;
and taking a sentence to be annotated and a predicate word and a non-predicate word of the sentence to be annotated as input, and performing semantic role annotation on the sentence to be annotated by using the semantic role annotation model.
2. The method of claim 1, wherein the annotation tag for the non-predicate word is a semantic relationship of the non-predicate word to the predicate, the annotation tag for the non-predicate word comprising an event, a scope, an action start, an action end, and/or others.
3. The method of claim 1, wherein the generating the sequence of word vectors for the training sentence comprises:
obtaining a position vector of each word of the training sentence;
generating a coding vector for each word using the trained word embedding model;
and splicing the position vector and the coding vector of each word to obtain a word vector of the word.
4. The method of claim 1, wherein the characterizing the first word feature vector sequence according to the topology graph composed of predicate words and non-predicate words in the training sentence by the graph convolutional neural network layer comprises:
taking the predicate words and the non-predicate words in the training sentences as nodes of the topological graph, and connecting each predicate byte point and each non-predicate node in the topological graph;
inputting the first word feature vector sequence into the convolutional neural network layer, wherein the output of the vth neuron of the kth neuron sublayer in the convolutional neural network layer is determined according to the following formula:
Figure FDA0002464400700000021
wherein σ is an activation function, N (v) is a set of nodes connected with node v in the topological graph, and WL(u,v)For the parameter value between the v neuron of the k neuron sub-layer and the u neuron of the k-1 neuron sub-layer in the graph convolution neural network layer, WL(u,v)Is the weight of the edge between node v and node u in the topology,
Figure FDA0002464400700000022
the u-th neuron of the k-1 th neuron sublayer, bL(u,v)Is a parameter of the vth neuron of the kth neuron sublayer.
5. The method of claim 4, wherein the weight of an edge between node v and node u in the topology graph is 1.
6. The method of claim 1, wherein said classifying the training sentence with the second sequence of word feature vectors as an input of a conditional random field comprises:
the score for each tag sequence of the training sentence may be determined according to the following formula:
Figure FDA0002464400700000023
wherein x is the second word feature vector sequence, y1,y2,...yVIs the 1 st to the 1 st in the training sentenceThe label sequence of the V th word, Z (x) is a normalization factor, h is an activation function, and g is a constraint function;
and determining the label sequence with the highest score as the predicted label of the training sentence.
7. Method according to any of claims 1-6, characterized in that if there is a node u in the set of nodes connected to node V in the topology graph, W is adjustedL(u,v),WL(u,v)And (3) accumulating parameters between the v neuron of the kth neuron sub-layer and the u neuron of the kth neuron sub-layer in the neural network layer for the graph.
8. A semantic role labeling apparatus, the apparatus comprising:
the acquiring module is used for acquiring a training sentence, predicate words and non-predicate words in the training sentence and label labels of each predicate word and non-predicate word of the training sentence;
the generating module is used for generating a word vector sequence of the training sentence, wherein words in the training sentence correspond to word vectors in the word vector sequence one by one;
the first extraction module is used for extracting the characteristics of the word vector sequence by using a bidirectional long-short term memory network layer to obtain a first word characteristic vector sequence of the training sentence;
the second extraction module is used for performing feature extraction on the first word feature vector sequence according to a topological graph formed by predicate words and non-predicate words in the training sentence by using a graph convolution neural network layer to obtain a second word feature vector sequence of the training sentence;
the classification module is used for classifying the training sentences by taking the second character feature vector sequence as the input of the conditional random field to obtain the prediction labels of the training sentences;
the adjusting module is used for adjusting parameters of the bidirectional long-short term memory network layer, the graph convolution neural network layer and the conditional random field according to each predicate word and label of a non-predicate word of the training sentence and the prediction label to obtain a semantic role labeling model;
and the marking module is used for performing semantic role marking on the sentence to be marked by using the sentence to be marked and the predicate word and the non-predicate word of the sentence to be marked as input through the semantic role marking model.
9. A computer device, characterized in that the computer device comprises a processor for executing a computer program stored in a memory for implementing the semantic role tagging method according to any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the semantic role tagging method according to any one of claims 1 to 7.
CN202010329393.6A 2020-04-23 2020-04-23 Semantic role labeling method and device, computer equipment and storage medium Pending CN111639500A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010329393.6A CN111639500A (en) 2020-04-23 2020-04-23 Semantic role labeling method and device, computer equipment and storage medium
PCT/CN2020/104963 WO2021212681A1 (en) 2020-04-23 2020-07-27 Semantic role annotation method and apparatus, and computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010329393.6A CN111639500A (en) 2020-04-23 2020-04-23 Semantic role labeling method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111639500A true CN111639500A (en) 2020-09-08

Family

ID=72331819

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010329393.6A Pending CN111639500A (en) 2020-04-23 2020-04-23 Semantic role labeling method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN111639500A (en)
WO (1) WO2021212681A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113849647A (en) * 2021-09-28 2021-12-28 平安科技(深圳)有限公司 Conversation identity recognition method, device, equipment and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113868322B (en) * 2021-12-03 2022-03-29 杭州未名信科科技有限公司 Semantic structure analysis method, device and equipment, virtualization system and medium
CN116257800B (en) * 2023-05-12 2023-08-25 智慧眼科技股份有限公司 Labeling method and system for training samples
CN117436459B (en) * 2023-12-20 2024-05-31 商飞智能技术有限公司 Verb-verb semantic relationship identification method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108717409A (en) * 2018-05-16 2018-10-30 联动优势科技有限公司 A kind of sequence labelling method and device
CN110110086A (en) * 2019-05-13 2019-08-09 湖南星汉数智科技有限公司 A kind of Chinese Semantic Role Labeling method, apparatus, computer installation and computer readable storage medium
CN110459282A (en) * 2019-07-11 2019-11-15 新华三大数据技术有限公司 Sequence labelling model training method, electronic health record processing method and relevant apparatus
CN110472062A (en) * 2019-07-11 2019-11-19 新华三大数据技术有限公司 The method and device of identification name entity
CN110765265A (en) * 2019-09-06 2020-02-07 平安科技(深圳)有限公司 Information classification extraction method and device, computer equipment and storage medium
CN111160035A (en) * 2019-12-31 2020-05-15 北京明朝万达科技股份有限公司 Text corpus processing method and device
CN111241209A (en) * 2020-01-03 2020-06-05 北京百度网讯科技有限公司 Method and apparatus for generating information

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10387575B1 (en) * 2019-01-30 2019-08-20 Babylon Partners Limited Semantic graph traversal for recognition of inferred clauses within natural language inputs

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108717409A (en) * 2018-05-16 2018-10-30 联动优势科技有限公司 A kind of sequence labelling method and device
CN110110086A (en) * 2019-05-13 2019-08-09 湖南星汉数智科技有限公司 A kind of Chinese Semantic Role Labeling method, apparatus, computer installation and computer readable storage medium
CN110459282A (en) * 2019-07-11 2019-11-15 新华三大数据技术有限公司 Sequence labelling model training method, electronic health record processing method and relevant apparatus
CN110472062A (en) * 2019-07-11 2019-11-19 新华三大数据技术有限公司 The method and device of identification name entity
CN110765265A (en) * 2019-09-06 2020-02-07 平安科技(深圳)有限公司 Information classification extraction method and device, computer equipment and storage medium
CN111160035A (en) * 2019-12-31 2020-05-15 北京明朝万达科技股份有限公司 Text corpus processing method and device
CN111241209A (en) * 2020-01-03 2020-06-05 北京百度网讯科技有限公司 Method and apparatus for generating information

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DIEGO MARCHEGGIANI 等: "Graph Convolutions over Constituent Trees for Syntax-Aware Semantic Role Labeling", 《HTTPS://ARXIV.ORG/ABS/1909.09814V1》, pages 1 - 11 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113849647A (en) * 2021-09-28 2021-12-28 平安科技(深圳)有限公司 Conversation identity recognition method, device, equipment and storage medium
CN113849647B (en) * 2021-09-28 2024-05-31 平安科技(深圳)有限公司 Dialogue identity recognition method, device, equipment and storage medium

Also Published As

Publication number Publication date
WO2021212681A1 (en) 2021-10-28

Similar Documents

Publication Publication Date Title
CN111177569B (en) Recommendation processing method, device and equipment based on artificial intelligence
US20230195773A1 (en) Text classification method, apparatus and computer-readable storage medium
CN111639500A (en) Semantic role labeling method and device, computer equipment and storage medium
WO2021051574A1 (en) English text sequence labelling method and system, and computer device
WO2022048363A1 (en) Website classification method and apparatus, computer device, and storage medium
CN111738016A (en) Multi-intention recognition method and related equipment
WO2022174496A1 (en) Data annotation method and apparatus based on generative model, and device and storage medium
CN110334186A (en) Data query method, apparatus, computer equipment and computer readable storage medium
CN110866107A (en) Method and device for generating material corpus, computer equipment and storage medium
CN112287069A (en) Information retrieval method and device based on voice semantics and computer equipment
CN113935314A (en) Abstract extraction method, device, terminal equipment and medium based on heteromorphic graph network
CN113723077B (en) Sentence vector generation method and device based on bidirectional characterization model and computer equipment
CN113360654B (en) Text classification method, apparatus, electronic device and readable storage medium
CN112036439B (en) Dependency relationship classification method and related equipment
WO2022073341A1 (en) Disease entity matching method and apparatus based on voice semantics, and computer device
CN111767720B (en) Title generation method, computer and readable storage medium
CN111968624A (en) Data construction method and device, electronic equipment and storage medium
CN113627186B (en) Entity relation detection method based on artificial intelligence and related equipment
CN115358817A (en) Intelligent product recommendation method, device, equipment and medium based on social data
CN115510188A (en) Text keyword association method, device, equipment and storage medium
CN112529743B (en) Contract element extraction method, device, electronic equipment and medium
CN114398482A (en) Dictionary construction method and device, electronic equipment and storage medium
CN114417891A (en) Reply sentence determination method and device based on rough semantics and electronic equipment
CN114281934A (en) Text recognition method, device, equipment and storage medium
CN112989801B (en) Sequence labeling method, device and equipment

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210202

Address after: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant after: Shenzhen saiante Technology Service Co.,Ltd.

Address before: 518000 1st-34th floor, Qianhai free trade building, 3048 Mawan Xinghai Avenue, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong

Applicant before: Ping An International Smart City Technology Co.,Ltd.