CN112966074A - Emotion analysis method and device, electronic equipment and storage medium - Google Patents

Emotion analysis method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112966074A
CN112966074A CN202110535102.3A CN202110535102A CN112966074A CN 112966074 A CN112966074 A CN 112966074A CN 202110535102 A CN202110535102 A CN 202110535102A CN 112966074 A CN112966074 A CN 112966074A
Authority
CN
China
Prior art keywords
information
semantic
graph
neural network
syntax
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.)
Granted
Application number
CN202110535102.3A
Other languages
Chinese (zh)
Other versions
CN112966074B (en
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.)
South China Normal University
Original Assignee
South China Normal University
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 South China Normal University filed Critical South China Normal University
Priority to CN202110535102.3A priority Critical patent/CN112966074B/en
Publication of CN112966074A publication Critical patent/CN112966074A/en
Application granted granted Critical
Publication of CN112966074B publication Critical patent/CN112966074B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • 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/044Recurrent networks, e.g. Hopfield 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/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/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (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 provides an emotion analysis method, an emotion analysis device, electronic equipment and a storage medium, wherein the method comprises the following steps: the method comprises the steps of obtaining a hidden state vector corresponding to a sentence to be subjected to emotion analysis through a bidirectional LSTM network, obtaining syntactic information of the sentence through a first graph convolution neural network model, obtaining semantic information of the sentence through a multi-head self-attention mechanism model and a second graph convolution neural network model, obtaining public information between a syntactic graph and a semantic graph through a shared graph convolution neural network model, splicing and fusing the syntactic information, the semantic information and the public information to obtain feature expression of a specific target, inputting the feature expression to a full-connection network for probability calculation to obtain an emotion analysis result of the specific target, fully extracting the semantic information in the semantic graph through the feature expression, considering the public information between the semantic information and the syntactic information, and improving the accuracy of emotion analysis.

Description

Emotion analysis method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of natural language processing technologies, and in particular, to an emotion analysis method and apparatus, an electronic device, and a storage medium.
Background
With the explosive growth of user-generated text on the internet, the automatic extraction of useful information from rich documents has received attention from the field of Natural Language Processing (NLP). Emotion analysis is one of important problems in the field of natural language processing, and the purpose of emotion analysis is to analyze subjective text with emotion colors. Generally, when performing emotion analysis based on a specific target, there are several steps such as obtaining word embedding, modeling syntactic information, extracting semantic information, where mining the most relevant opinion words plays a pivotal role.
In some technologies, attention mechanism is applied to connect the aspect words and the opinion words, and semantic information is extracted to perform emotion analysis on a specific target. However, limited by co-occurrence frequency or long-range word dependencies, attention mechanisms may assign incorrect weights to unrelated words. In some techniques, a graph-based neural network extracts syntax information from a dependency syntax tree. Although a dramatic improvement over attention-based models is achieved, there are also disadvantages: sentences have different sensitivities to syntactic and semantic information. Especially for those sentences that do not have a clear syntactic structure, this means that the syntactic information cannot help the model determine the emotional polarity of the sentence in some cases. In some techniques, syntactic information is extracted from dependency syntax trees based on a graph neural network and semantic information is extracted in conjunction with an attention mechanism, however, not all information on the dependency trees is meaningful and noise will be encoded by the graph neural network and secondary noise will be caused if the attention mechanism is used on this basis.
In the process of implementing the invention, the inventor finds that the technology at least has the following problems: semantic information is extracted through an attention mechanism, or syntax information is extracted from a dependency syntax tree based on a graph neural network, common information between the semantic information and the syntax information is not extracted, and the emotion analysis accuracy is reduced.
Disclosure of Invention
In order to solve the problems in the related art, embodiments of the present application provide an emotion analysis method, apparatus, electronic device, and storage medium, which have the advantage of improving emotion analysis accuracy.
According to a first aspect of embodiments of the present application, there is provided an emotion analysis method, including the steps of:
acquiring a word vector of a sentence to be subjected to emotion analysis, and inputting the word vector into a bidirectional LSTM neural network to obtain a hidden state vector corresponding to the word vector;
obtaining a dependency syntax tree corresponding to the sentence, and converting the dependency syntax tree into a syntax graph;
inputting the hidden state vector and the syntactic graph into a first graph convolution neural network model to obtain syntactic information of the sentence;
inputting the hidden state vector into a multi-head self-attention mechanism model to obtain a semantic graph, and inputting the hidden state vector and the semantic graph into a second graph convolution neural network model to obtain semantic information of the sentence;
inputting the hidden state vector, the syntactic graph and the semantic graph into a shared graph convolution neural network model to obtain common information between the syntactic graph and the semantic graph;
inputting the syntactic information, the semantic information and the public information into a mask model, averaging and pooling to obtain specific target information, and splicing and fusing the specific target information to obtain characteristic expression of a specific target;
and inputting the characteristic expression into a full-connection network for probability calculation to obtain an emotion analysis result of the specific target.
Further, the step of obtaining a word vector of a sentence to be subjected to emotion analysis, and inputting the word vector to a bidirectional LSTM network to obtain a hidden state vector corresponding to the word vector includes: converting each word in the sentence to be subjected to emotion analysis into a word vector according to the GloVe word embedding model; inputting the word vector into a bidirectional LSTM network to obtain a hidden state vector corresponding to the word vector; wherein the hidden state vector is represented as follows:
Figure 952011DEST_PATH_IMAGE001
Figure 116407DEST_PATH_IMAGE002
Figure 265629DEST_PATH_IMAGE003
wherein,
Figure 473756DEST_PATH_IMAGE004
representing the number of word vectors corresponding to the sentence to be subjected to emotion analysis,
Figure 193581DEST_PATH_IMAGE005
representing the number of word vectors corresponding to a specific target in the sentence to be subjected to emotion analysis,
Figure 410936DEST_PATH_IMAGE006
represents the hidden-state vector in question,
Figure 414664DEST_PATH_IMAGE007
representing a hidden state vector encoded in the forward direction,
Figure 75584DEST_PATH_IMAGE008
representing a hidden state vector coded in the backward direction,
Figure 531973DEST_PATH_IMAGE009
is the superscript representation of the sentence to be emotion analyzed,
Figure 553019DEST_PATH_IMAGE010
is a subscript representative of a particular target in the sentence to be emotion analyzed,
Figure 424635DEST_PATH_IMAGE011
the subscript indicating the 1 st specific target in the sentence to be subjected to emotion analysis indicates,
Figure 240144DEST_PATH_IMAGE012
representing the sentence to be subjected to emotion analysis
Figure 183830DEST_PATH_IMAGE005
The subscripts of the individual specific objects indicate,
Figure 742987DEST_PATH_IMAGE013
a hidden state vector representing a forward direction encoding corresponding to each of said word vectors,
Figure 206460DEST_PATH_IMAGE014
and representing the hidden state vector of the backward direction coding corresponding to each word vector.
Further, the step of inputting the hidden state vector and the syntax map into a first map convolution neural network model to obtain syntax information of the sentence comprises: obtaining a syntax adjacency matrix of the syntax diagram; wherein the syntactic adjacency matrix represents adjacency relationships of words in the syntactic graph; inputting the hidden state vector and the syntactic adjacency matrix into the first graph convolution neural network model to obtain syntactic information of the sentence; wherein the formula for obtaining the syntax information is as follows:
Figure 458450DEST_PATH_IMAGE015
Figure 889432DEST_PATH_IMAGE016
Figure 737433DEST_PATH_IMAGE017
wherein,
Figure 304681DEST_PATH_IMAGE006
represents the hidden-state vector in question,
Figure 461992DEST_PATH_IMAGE018
a first layer input representing the first graph convolution neural network model,
Figure 380270DEST_PATH_IMAGE019
is represented by
Figure 31962DEST_PATH_IMAGE018
,…,
Figure 719295DEST_PATH_IMAGE020
Formed by splicing "
Figure 47509DEST_PATH_IMAGE021
"means the number of splices,
Figure 206744DEST_PATH_IMAGE020
representing the first atlas convolutional neural network model
Figure 645816DEST_PATH_IMAGE022
The output of the layer is carried out,
Figure 453235DEST_PATH_IMAGE023
is a normalized adjacency matrix that is,
Figure 952349DEST_PATH_IMAGE024
is the syntactic adjacency matrix in question,
Figure 330372DEST_PATH_IMAGE025
is a matrix of units, and is,
Figure 573135DEST_PATH_IMAGE026
is a matrix of degrees and is,
Figure 235060DEST_PATH_IMAGE027
is the first graph convolution neural network model
Figure 921388DEST_PATH_IMAGE028
The learnable parameter matrix of a layer,
Figure 770395DEST_PATH_IMAGE029
it is shown that the activation function is,
Figure 82428DEST_PATH_IMAGE030
syntax information representing the sentence.
Further, the step of inputting the hidden state vector to a multi-head attention mechanism model to obtain a semantic graph, and inputting the hidden state vector and the semantic graph to a second graph convolution neural network model to obtain semantic information of the sentence includes: inputting the hidden state vector into a multi-head self-attention mechanism model to obtain an initial semantic adjacency matrix of the semantic graph; inputting the hidden state vector and the initial semantic adjacency matrix into an operational formula of the second graph convolution neural network model to obtain an output result of an initial layer of the second graph convolution neural network model; inputting the initial semantic adjacency matrix and the output result of the initial layer of the second graph convolution neural network model into a multi-head self-attention mechanism model updating formula to obtain an updated semantic adjacency matrix; repeatedly executing input operation on the updated semantic adjacency matrix and the output result of the initial layer of the second graph convolution neural network model until the output result of the output layer of the second graph convolution neural network model is obtained, and obtaining the semantic information of the sentence; wherein the formula for obtaining the initial semantic adjacency matrix of the semantic graph is as follows:
Figure 598859DEST_PATH_IMAGE031
Figure 190509DEST_PATH_IMAGE032
Figure 526812DEST_PATH_IMAGE033
Figure 376957DEST_PATH_IMAGE034
wherein,
Figure 495698DEST_PATH_IMAGE006
represents the hidden-state vector in question,
Figure 507516DEST_PATH_IMAGE035
as a first layer input to the second graph convolution neural network model,
Figure 596695DEST_PATH_IMAGE036
is the number of the heads of the multi-head self-attention,
Figure 719372DEST_PATH_IMAGE037
is the hidden state vector dimension for each of the bi-directional LSTM networks,
Figure 961128DEST_PATH_IMAGE038
is the dimension of the multi-head self-attention per head,
Figure 409427DEST_PATH_IMAGE039
is the first of the initial layer
Figure 985902DEST_PATH_IMAGE040
The self-attention matrix is used for self-attention,
Figure 663002DEST_PATH_IMAGE041
is the first layer in the initial layer of the multi-head self-attention mechanism model
Figure 8533DEST_PATH_IMAGE040
A first trainable parameter matrix corresponding to each self-attention moment array,
Figure 627733DEST_PATH_IMAGE042
is the first layer in the initial layer of the multi-head self-attention mechanism model
Figure 425925DEST_PATH_IMAGE040
A second trainable parameter matrix corresponding to the individual self-attention moment matrix,
Figure 172295DEST_PATH_IMAGE043
which represents the transpose of the matrix,
Figure 637911DEST_PATH_IMAGE044
representing the largest of the sorted matrices
Figure 162434DEST_PATH_IMAGE045
The number of the elements is one,
Figure 189865DEST_PATH_IMAGE046
is the initial semantic adjacency matrix;
wherein, the operation formula of the second graph convolution neural network model is as follows:
Figure 723614DEST_PATH_IMAGE047
wherein,
Figure 778158DEST_PATH_IMAGE048
is a normalized adjacency matrix that is,
Figure 489893DEST_PATH_IMAGE049
is a matrix of units, and is,
Figure 262677DEST_PATH_IMAGE050
is a matrix of degrees and is,
Figure 334538DEST_PATH_IMAGE051
is a learnable parameter matrix of a first layer of the second graph convolution neural network model,
Figure 509168DEST_PATH_IMAGE029
it is shown that the activation function is,
Figure 391804DEST_PATH_IMAGE052
representing an output result of the initial layer of the second graph convolution neural network model;
wherein, the multi-head self-attention mechanism model updating formula is as follows:
Figure 651884DEST_PATH_IMAGE053
Figure 527436DEST_PATH_IMAGE054
Figure 307305DEST_PATH_IMAGE055
Figure 610110DEST_PATH_IMAGE056
wherein,
Figure 91907DEST_PATH_IMAGE057
is formed by
Figure 505571DEST_PATH_IMAGE058
,…,
Figure 402595DEST_PATH_IMAGE059
Formed by splicing "
Figure 876302DEST_PATH_IMAGE021
"means the number of splices,
Figure 845395DEST_PATH_IMAGE059
representing the second atlas convolutional neural network model
Figure 813482DEST_PATH_IMAGE060
The output of the layer is carried out,
Figure 817210DEST_PATH_IMAGE061
is shown as
Figure 727397DEST_PATH_IMAGE028
Layer one
Figure 934519DEST_PATH_IMAGE040
The self-attention matrix is used for self-attention,
Figure 689985DEST_PATH_IMAGE062
is the first of the multi-head self-attention mechanism model
Figure 548220DEST_PATH_IMAGE028
In a layer of
Figure 363729DEST_PATH_IMAGE040
A first trainable parameter matrix corresponding to each self-attention moment array,
Figure 323726DEST_PATH_IMAGE063
is the first of the multi-head self-attention mechanism model
Figure 882883DEST_PATH_IMAGE028
In a layer of
Figure 861204DEST_PATH_IMAGE040
A second trainable parameter matrix corresponding to the individual self-attention moment matrix,
Figure 601276DEST_PATH_IMAGE043
which represents the transpose of the matrix,
Figure 32258DEST_PATH_IMAGE038
is the dimension of the multi-head self-attention per head,
Figure 129527DEST_PATH_IMAGE064
indicating the existence of
Figure 978665DEST_PATH_IMAGE064
The function is activated in such a way that,
Figure 401556DEST_PATH_IMAGE065
indicating the existence of
Figure 54254DEST_PATH_IMAGE065
The function of the function is that of the function,
Figure 705947DEST_PATH_IMAGE036
is the number of the heads of the multi-head self-attention,
Figure 658859DEST_PATH_IMAGE066
is an intermediate result of the updating of the semantic adjacency matrix,
Figure 252652DEST_PATH_IMAGE067
representing the largest of the sorted matrices
Figure 143378DEST_PATH_IMAGE045
The number of the elements is one,
Figure 582450DEST_PATH_IMAGE068
is the updated semantic adjacency matrix;
wherein, the formula for obtaining the output result of the output layer of the second graph convolution neural network model is as follows:
Figure 389869DEST_PATH_IMAGE069
wherein,
Figure 888983DEST_PATH_IMAGE070
is a normalized adjacency matrix that is,
Figure 795235DEST_PATH_IMAGE068
is the updated semantic adjacency matrix that is,
Figure 37997DEST_PATH_IMAGE049
is a matrix of units, and is,
Figure 434344DEST_PATH_IMAGE050
is a matrix of degrees and is,
Figure 120671DEST_PATH_IMAGE071
second graph convolution neural network model number one
Figure 500837DEST_PATH_IMAGE028
A learnable parametric matrix representation of the layer,
Figure 547290DEST_PATH_IMAGE072
it is shown that the activation function is,
Figure 548876DEST_PATH_IMAGE073
semantic information representing the sentence.
Further, the step of inputting the hidden state vector, the syntax diagram and the semantic diagram into a shared graph convolution neural network model, and obtaining common information between the syntax diagram and the semantic diagram comprises: inputting the hidden state vector and the syntactic graph into a shared graph convolution neural network model to obtain public information of the syntactic graph; inputting the hidden state vector and the semantic graph into a shared graph convolution neural network model to obtain public information of the semantic graph; inputting the public information of the syntactic graph and the public information of the semantic graph into a combined operation formula to obtain the public information between the syntactic graph and the semantic graph; wherein the public information formula for obtaining the syntax diagram is as follows:
Figure 389793DEST_PATH_IMAGE074
wherein,
Figure 257254DEST_PATH_IMAGE024
an adjacency matrix representing the syntax diagram,
Figure 592552DEST_PATH_IMAGE006
represents the hidden-state vector in question,
Figure 963490DEST_PATH_IMAGE075
a parameter matrix that represents a learnable model of the shared graph convolutional neural network,
Figure 240888DEST_PATH_IMAGE076
common information representing the syntax diagram is described,
Figure 330067DEST_PATH_IMAGE077
a syntax graph convolution module representing obtaining common information of the syntax graph from an adjacency matrix of the syntax graph, the hidden state vector, and a parameter matrix learnable by the shared graph convolution neural network model;
wherein, the public information formula for obtaining the semantic graph is as follows:
Figure 296204DEST_PATH_IMAGE078
wherein,
Figure 521649DEST_PATH_IMAGE079
an adjacency matrix representing the semantic graph,
Figure 969947DEST_PATH_IMAGE006
represents the hidden-state vector in question,
Figure 297155DEST_PATH_IMAGE080
express the languageThe common information of the sense graph is defined,
Figure 223522DEST_PATH_IMAGE081
a semantic graph convolution module for obtaining public information of the syntactic graph according to the adjacency matrix of the semantic graph, the hidden state vector and the parameter matrix which can be learnt by the shared graph convolution neural network model;
wherein, the combined operation formula is as follows:
Figure 834632DEST_PATH_IMAGE082
wherein,
Figure 938986DEST_PATH_IMAGE083
and
Figure 81385DEST_PATH_IMAGE084
is a matrix of parameters that can be learned,
Figure 811444DEST_PATH_IMAGE085
representing common information between the syntax diagram and the semantic diagram.
Further, the step of inputting the syntax information, the semantic information and the public information into a mask model to perform averaging and pooling to obtain specific target information, and performing splicing and fusion on the specific target information to obtain a feature expression of a specific target includes: inputting the syntax information, the semantic information and the public information into a mask model to perform average pooling to obtain syntax specific target information, semantic specific target information and public specific target information; splicing the syntax specific target information, the semantic specific target information and the public specific target information to obtain specific target representation; inputting the specific target representation into a multilayer neural network fusion formula to obtain the characteristic expression of the specific target; the obtaining of the syntax specific target information, the semantic specific target information and the common specific target information is formulated as follows:
Figure 11481DEST_PATH_IMAGE086
Figure 801582DEST_PATH_IMAGE087
Figure 834873DEST_PATH_IMAGE088
Figure 103043DEST_PATH_IMAGE089
wherein,
Figure 157587DEST_PATH_IMAGE090
is of said mask model
Figure 118590DEST_PATH_IMAGE091
The function of the function is that of the function,
Figure 642106DEST_PATH_IMAGE092
is a subscript representative of a particular target in the sentence to be emotion analyzed,
Figure 713967DEST_PATH_IMAGE093
is an index to a particular target and is,
Figure 888597DEST_PATH_IMAGE005
indicating the number of specific objects that are to be addressed,
Figure 505654DEST_PATH_IMAGE094
is the average pooling function of the received data,
Figure 500155DEST_PATH_IMAGE095
the syntax information is represented by a syntax table,
Figure 110128DEST_PATH_IMAGE085
representing common information between the syntax diagram and the semantic diagram,
Figure 139264DEST_PATH_IMAGE096
the semantic information is represented by a representation of the semantic information,
Figure 442069DEST_PATH_IMAGE097
represents the syntax-specific object information and the syntax-specific object information,
Figure 674598DEST_PATH_IMAGE098
representing the semantic specific object information in question,
Figure 88262DEST_PATH_IMAGE099
representing the common specific target information;
wherein, the characteristic expression formula for obtaining the specific target is as follows:
Figure 971904DEST_PATH_IMAGE100
wherein,
Figure 445611DEST_PATH_IMAGE101
representing a particular target representation "
Figure 168366DEST_PATH_IMAGE021
"denotes a splice;
wherein, the multilayer neural network fusion formula is as follows:
Figure 120142DEST_PATH_IMAGE102
wherein,
Figure 123870DEST_PATH_IMAGE103
a matrix of weights that can be learned is represented,
Figure 768478DEST_PATH_IMAGE104
a bias term is represented as a function of,
Figure 975599DEST_PATH_IMAGE029
presentation activation letterThe number of the first and second groups is,
Figure 731066DEST_PATH_IMAGE105
a characteristic expression representing the specific object.
Further, the step of inputting the feature expression of the specific target into a fully-connected network for probability calculation to obtain the emotion analysis result of the specific target includes: inputting said target-specific feature expression into a fully connected network
Figure 323721DEST_PATH_IMAGE064
Carrying out probability calculation by using a layer operation formula to obtain an emotion analysis result of the specific target; wherein,
Figure 155542DEST_PATH_IMAGE064
the layer operation formula is as follows:
Figure 99227DEST_PATH_IMAGE106
wherein,
Figure 658385DEST_PATH_IMAGE105
a feature expression representing the specific object,
Figure 371126DEST_PATH_IMAGE107
a matrix of weights that can be learned is represented,
Figure 842689DEST_PATH_IMAGE108
a bias term is represented as a function of,
Figure 273671DEST_PATH_IMAGE109
indicating the existence of
Figure 370940DEST_PATH_IMAGE110
The function is activated in such a way that,
Figure 203767DEST_PATH_IMAGE111
and representing the emotion analysis result.
According to a second aspect of embodiments of the present application, there is provided an emotion analysis apparatus including:
the hidden state acquisition module is used for acquiring a word vector of a sentence to be subjected to emotion analysis, and inputting the word vector into the bidirectional LSTM network to obtain a hidden state vector corresponding to the word vector;
the dependency syntax tree conversion module is used for acquiring a dependency syntax tree corresponding to the sentence and converting the dependency syntax tree into a syntax graph;
a syntax information obtaining module, configured to input the hidden state vector and the syntax map into a first map convolution neural network model, so as to obtain syntax information of the sentence;
a semantic information obtaining module, configured to input the hidden state vector to a multi-head attention mechanism model to obtain a semantic graph, and input the hidden state vector and the semantic graph to a second graph convolution neural network model to obtain semantic information of the sentence;
a public information obtaining module, configured to input the hidden state vector, the syntax diagram, and the semantic diagram into a shared diagram convolutional neural network model, and obtain public information between the syntax diagram and the semantic diagram;
the feature expression obtaining module is used for inputting the syntactic information, the semantic information and the public information into a mask model to obtain average pooling to obtain specific target information, and splicing and fusing the specific target information to obtain feature expression of a specific target;
and the emotion analysis module is used for inputting the characteristic expression to a full-connection network for probability calculation to obtain an emotion analysis result of the specific target.
According to a third aspect of embodiments of the present application, there is provided an electronic apparatus, including: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed to implement the emotion analysis method as described in any one of the above.
According to a fourth aspect of embodiments of the present application, there is provided a computer-readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, implementing the emotion analysis method as described in any one of the above.
The embodiment of the application obtains a word vector of a sentence to be subjected to emotion analysis, inputs the word vector into a bidirectional LSTM network to obtain a hidden state vector corresponding to the word vector, obtains a dependency syntax tree corresponding to the sentence, converts the dependency syntax tree into a syntax diagram, inputs the hidden state vector and the syntax diagram into a first diagram convolution neural network model to obtain syntax information of the sentence, inputs the hidden state vector into a multi-head self-attention mechanism model to obtain a semantic diagram, inputs the hidden state vector and the semantic diagram into a second diagram convolution neural network model to obtain semantic information of the sentence, inputs the hidden state vector, the syntax diagram and the semantic diagram into a shared diagram convolution neural network model to obtain common information between the syntax diagram and the semantic diagram, inputting the syntactic information, the semantic information and the public information into a mask model, averaging and pooling to obtain specific target information, splicing and fusing the specific target information to obtain a characteristic expression of the specific target, inputting the characteristic expression into a full-connection network for probability calculation to obtain an emotion analysis result of the specific target, fully extracting the semantic information in a semantic graph by the characteristic expression, considering the public information between the semantic information and the syntactic information, and improving the accuracy of emotion analysis.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
For a better understanding and practice, the invention is described in detail below with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the embodiments of the present application 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 application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow diagram of a sentiment analysis method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a step S110 of the emotion analyzing method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a step S130 of the emotion analysis method according to an embodiment of the present application;
FIG. 4 is a diagram of a syntactic dependency tree, provided in accordance with an embodiment of the present application;
FIG. 5 is a diagram of a syntactic adjacency matrix provided by one embodiment of the present application;
FIG. 6 is a flowchart illustrating a step S140 of the emotion analysis method according to an embodiment of the present application;
FIG. 7 is a flowchart illustrating a step S150 of the emotion analysis method according to an embodiment of the present application;
FIG. 8 is a flowchart illustrating a step S160 of the emotion analysis method according to an embodiment of the present application;
FIG. 9 is a schematic overall structure diagram of an emotion analysis model provided in an embodiment of the present application;
FIG. 10 is a schematic diagram of a second convolutional neural network model provided in an embodiment of the present application;
FIG. 11 is a schematic diagram of a shared graph convolution neural network model provided in accordance with an embodiment of the present application;
FIG. 12 is a block diagram schematically illustrating a structure of an emotion analyzing apparatus according to an embodiment of the present application;
fig. 13 is a block diagram illustrating a schematic structure of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that the embodiments described are only a few embodiments of the present application, and not all 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 application.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
In the description of the present application, it is to be understood that the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not necessarily used to describe a particular order or sequence, nor are they to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The word "if/if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination". Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Example 1
Referring to fig. 1, an emotion analysis method provided in the embodiment of the present application includes the following steps:
s110: obtaining a word vector of a sentence to be subjected to emotion analysis, and inputting the word vector into a bidirectional LSTM network to obtain a hidden state vector corresponding to the word vector.
Word embedding is a digital representation of words, which is to map a word into a high-dimensional vector to realize the representation of the word, and the vector is called a word vector. In the embodiment of the application, a word vector of a sentence to be subjected to emotion analysis is acquired, and the word vector is input to a bidirectional LSTM network to obtain a hidden state vector corresponding to the word vector. The bidirectional LSTM Network, namely a bidirectional Long Short Term Memory Network (Bi-LSTM), is one of the Recurrent Neural Networks, comprises a forward Recurrent Neural Network and a backward Recurrent Neural Network, and is more suitable for modeling time sequence data.
Referring to fig. 2, in an embodiment of the present application, the step S110 includes steps S111 to S112, which are as follows:
s111: and converting each word in the sentence to be subjected to emotion analysis into a word vector according to the GloVe word embedding model.
Global Vectors for Word representation is a Word representation tool based on global Word frequency statistics, which can represent a Word as a vector of real numbers, which captures some semantic properties between words. In the embodiment of the application, emotion analysis to be performed is acquired
Figure 843302DEST_PATH_IMAGE004
Sentence of (2)
Figure 761579DEST_PATH_IMAGE112
Including a specific target word
Figure 662539DEST_PATH_IMAGE113
Figure 84293DEST_PATH_IMAGE114
Respectively representing words in said sentence, together comprising
Figure 428818DEST_PATH_IMAGE004
The number of the individual words is,
Figure 834392DEST_PATH_IMAGE115
words respectively representing specific target words in the sentence, including
Figure 539042DEST_PATH_IMAGE005
The number of the individual words is,
Figure 97194DEST_PATH_IMAGE116
is a subscript representative of a particular target in the sentence to be emotion analyzed,
Figure 596308DEST_PATH_IMAGE011
the subscript indicating the 1 st specific target in the sentence to be subjected to emotion analysis indicates,
Figure 223599DEST_PATH_IMAGE012
representing the sentence to be subjected to emotion analysis
Figure 466361DEST_PATH_IMAGE005
The subscripts of the individual particular targets indicate. By looking up pre-trained word embedding matrices
Figure 613440DEST_PATH_IMAGE117
Initializing sentences
Figure 283456DEST_PATH_IMAGE118
Figure 663621DEST_PATH_IMAGE119
Is the size of the lexicon of words,
Figure 186439DEST_PATH_IMAGE120
and converting each word in the sentence to be subjected to emotion analysis into a word vector.
S112: and inputting the word vector into a bidirectional LSTM network to obtain a hidden state vector corresponding to the word vector.
In the embodiment of the application, the word vector is input to a bidirectional LSTM network to obtain a hidden state vector corresponding to the word vector. Wherein the hidden state vector is represented as follows:
Figure 234029DEST_PATH_IMAGE001
Figure 74947DEST_PATH_IMAGE121
Figure 427562DEST_PATH_IMAGE122
wherein,
Figure 12127DEST_PATH_IMAGE004
representing the number of word vectors corresponding to the sentence to be subjected to emotion analysis,
Figure 383065DEST_PATH_IMAGE005
representing the number of word vectors corresponding to a specific target in the sentence to be subjected to emotion analysis,
Figure 394884DEST_PATH_IMAGE006
represents the hidden-state vector in question,
Figure 969215DEST_PATH_IMAGE007
representing a hidden state vector encoded in the forward direction,
Figure 357471DEST_PATH_IMAGE008
a hidden state vector representing a backward direction encoding, c is a superscript representation of the sentence to be emotion analyzed,
Figure 582916DEST_PATH_IMAGE010
is a subscript representative of a particular target in the sentence to be emotion analyzed,
Figure 765636DEST_PATH_IMAGE011
to representThe subscript of the 1 st specific target in the sentence to be subjected to emotion analysis indicates,
Figure 76532DEST_PATH_IMAGE012
representing the sentence to be subjected to emotion analysis
Figure 753632DEST_PATH_IMAGE005
The subscripts of the individual specific objects indicate,
Figure 833583DEST_PATH_IMAGE013
a hidden state vector representing a forward direction encoding corresponding to each of said word vectors,
Figure 452783DEST_PATH_IMAGE014
and representing the hidden state vector of the backward direction coding corresponding to each word vector.
S120: and acquiring a dependency syntax tree corresponding to the sentence, and converting the dependency syntax tree into a syntax graph.
The dependency syntax tree represents the dependency relationship between words in a sentence. In the embodiment of the application, a Stanford parser is used for carrying out syntactic analysis on a sentence, the dependency syntax tree is generated, and the dependency syntax tree is converted into a syntax diagram
Figure 250975DEST_PATH_IMAGE123
. Wherein,
Figure 728837DEST_PATH_IMAGE024
is a adjacency matrix of the syntax diagram,
Figure 663294DEST_PATH_IMAGE006
is the hidden state vector.
S130: and inputting the hidden state vector and the syntactic graph into a first graph convolution neural network model to obtain syntactic information of the sentence.
Graph Convolutional neural network (GCN) is a Convolutional neural network capable of deep learning of Graph dataAnd the method is used for processing data of a graph structure type, wherein the graph structure is a topological structure and can also be called a non-Euclidean structure. In the embodiment of the application, the hidden state vector is used
Figure 453396DEST_PATH_IMAGE006
And the syntax map
Figure 738884DEST_PATH_IMAGE124
And inputting the data into a first graph convolution neural network model, integrating the syntax in the sentence, and obtaining the syntax information of the sentence.
Referring to fig. 3, in an embodiment of the present application, the step S130 includes steps S131 to S132 as follows:
s131: obtaining a syntax adjacency matrix of the syntax diagram; wherein the syntactic adjacency matrix represents adjacency relationships of words in the syntactic graph.
And obtaining an adjacency matrix corresponding to the words in the sentence to be subjected to emotion analysis according to the syntactic graph. Wherein the syntactic adjacency matrix represents adjacency relationships of words in the syntactic graph. Referring to fig. 4 and 5, fig. 4 is a schematic diagram of a syntactic dependency tree provided in an embodiment of the present application, and fig. 5 is a schematic diagram of a syntactic adjacency matrix provided in an embodiment of the present application. The syntactic dependency tree shown in FIG. 4 shows the dependency relationship of the words in the target sentence "it has a bad memory button a good battery life". FIG. 5 is a syntactic adjacency matrix corresponding to the syntactic dependency tree shown in FIG. 4. For two words with dependency relationship, the corresponding value in the syntactic adjacency matrix is 1, for two words without dependency relationship, the corresponding value in the syntactic adjacency matrix is 0, and the word have the dependency relationship by default.
S132: and inputting the hidden state vector and the syntactic adjacency matrix into the first graph convolution neural network model to obtain syntactic information of the sentence.
In this embodiment of the present application, the hidden state vector and the syntactic adjacency matrix are input into the first graph convolution neural network model to obtain an output result of a current layer, and the input operation is repeatedly performed until an output result of an output layer of the first graph convolution neural network model is obtained, so as to obtain the syntactic representation of the sentence. Wherein the formula for obtaining the syntax information is as follows:
Figure 757787DEST_PATH_IMAGE015
Figure 812330DEST_PATH_IMAGE016
Figure 38912DEST_PATH_IMAGE125
wherein,
Figure 296849DEST_PATH_IMAGE006
represents the hidden-state vector in question,
Figure 368711DEST_PATH_IMAGE018
a first layer input representing the first graph convolution neural network model,
Figure 543340DEST_PATH_IMAGE019
is represented by
Figure 675244DEST_PATH_IMAGE018
,…,
Figure 686056DEST_PATH_IMAGE020
Formed by splicing "
Figure 30450DEST_PATH_IMAGE021
"means the number of splices,
Figure 325165DEST_PATH_IMAGE020
representing the first atlas convolutional neural network model
Figure 362391DEST_PATH_IMAGE022
The output of the layer is carried out,
Figure 863430DEST_PATH_IMAGE023
is a normalized adjacency matrix that is,
Figure 277093DEST_PATH_IMAGE024
is the syntactic adjacency matrix in question,
Figure 160736DEST_PATH_IMAGE025
is a matrix of units, and is,
Figure 634442DEST_PATH_IMAGE026
is a matrix of degrees and is,
Figure 354268DEST_PATH_IMAGE027
is the first graph convolution neural network model
Figure 571623DEST_PATH_IMAGE028
The learnable parameter matrix of a layer,
Figure 575351DEST_PATH_IMAGE029
it is shown that the activation function is,
Figure 970691DEST_PATH_IMAGE030
syntax information representing the sentence.
S140: and inputting the hidden state vector into a multi-head self-attention mechanism model to obtain a semantic graph, and inputting the hidden state vector and the semantic graph into a second graph convolution neural network model to obtain semantic information of the sentence.
The nature of the attention mechanism comes from the human visual attention mechanism, which is applied to emotion analysis in order to enable more attention to be assigned to key words in the classification process. In particular, a sentence of text can be thought of as being composed of a series of<Key,Value>Data pair composition, a certain element Query is given at the moment, the similarity or correlation between the Query and each Key is calculated to obtain the weight coefficient of Value corresponding to each Key, and then the weight coefficient is obtained
Figure 427080DEST_PATH_IMAGE064
And after the function is normalized, carrying out weighted summation on the weight coefficient and the corresponding Value to obtain an attention result. In current research, Key and Value are often equal, i.e., Key is Value. In the embodiment of the application, the hidden state vector is input to a multi-head self-attention mechanism model to obtain a semantic graph, and the hidden state vector and the semantic graph are input to a second graph convolution neural network model to obtain semantic information of the sentence.
Referring to fig. 6, in an embodiment of the present application, the step S140 includes steps S141 to S144, which are as follows:
s141: and inputting the hidden state vector into a multi-head self-attention mechanism model to obtain an initial semantic adjacency matrix of the semantic graph.
In the embodiment of the application, the hidden state vector is input to a multi-head self-attention mechanism model to generate
Figure 182547DEST_PATH_IMAGE036
An attention matrix, which is used to enhance the robustness of the model
Figure 322672DEST_PATH_IMAGE036
The attention matrices are summed in an initialization phase and then used
Figure 138181DEST_PATH_IMAGE044
Choose the largest of them
Figure 81867DEST_PATH_IMAGE045
An element, thereby obtaining an initial semantic adjacency matrix of the semantic graph. Wherein the formula for obtaining the initial semantic adjacency matrix of the semantic graph is as follows:
Figure 375445DEST_PATH_IMAGE031
Figure 321142DEST_PATH_IMAGE032
Figure 307552DEST_PATH_IMAGE126
Figure 4113DEST_PATH_IMAGE127
wherein,
Figure 101382DEST_PATH_IMAGE006
represents the hidden-state vector in question,
Figure 481679DEST_PATH_IMAGE035
as a first layer input to the second graph convolution neural network model,
Figure 638991DEST_PATH_IMAGE036
is the number of the heads of the multi-head self-attention,
Figure 322649DEST_PATH_IMAGE037
is the hidden state vector dimension for each of the bi-directional LSTM networks,
Figure 223609DEST_PATH_IMAGE038
is the dimension of the multi-head self-attention per head,
Figure 458412DEST_PATH_IMAGE039
is the first of the initial layer
Figure 52204DEST_PATH_IMAGE040
The self-attention matrix is used for self-attention,
Figure 192199DEST_PATH_IMAGE041
is the first layer in the initial layer of the multi-head self-attention mechanism model
Figure 647582DEST_PATH_IMAGE040
A first trainable parameter matrix corresponding to each self-attention moment array,
Figure 251739DEST_PATH_IMAGE042
is the first layer in the initial layer of the multi-head self-attention mechanism model
Figure 501586DEST_PATH_IMAGE040
A second trainable parameter matrix corresponding to the individual self-attention moment matrix,
Figure 128876DEST_PATH_IMAGE043
which represents the transpose of the matrix,
Figure 106059DEST_PATH_IMAGE044
representing the largest of the sorted matrices
Figure 767985DEST_PATH_IMAGE045
The number of the elements is one,
Figure 451383DEST_PATH_IMAGE046
is the initial semantic adjacency matrix.
S142: and inputting the hidden state vector and the initial semantic adjacency matrix into an operation formula of the second graph convolution neural network model to obtain an output result of the initial layer of the second graph convolution neural network model.
In the embodiment of the application, the hidden state vector is used
Figure 565969DEST_PATH_IMAGE006
And the initial semantic adjacency matrix
Figure 346843DEST_PATH_IMAGE046
Inputting the result into an operation formula of the second graph convolution neural network model to obtain an output result of the initial layer of the second graph convolution neural network model
Figure 863275DEST_PATH_IMAGE052
. Wherein, the operation formula of the second graph convolution neural network model is as follows:
Figure 454925DEST_PATH_IMAGE128
wherein,
Figure 322387DEST_PATH_IMAGE048
is a normalized adjacency matrix that is,
Figure 906952DEST_PATH_IMAGE049
is a matrix of units, and is,
Figure 28623DEST_PATH_IMAGE050
is a matrix of degrees and is,
Figure 40441DEST_PATH_IMAGE051
is a learnable parameter matrix of a first layer of the second graph convolution neural network model,
Figure 864040DEST_PATH_IMAGE029
it is shown that the activation function is,
Figure 252296DEST_PATH_IMAGE052
and representing the output result of the initial layer of the second graph convolution neural network model.
S143: and inputting the initial semantic adjacency matrix and the output result of the initial layer of the second graph convolution neural network model into a multi-head self-attention mechanism model updating formula to obtain an updated semantic adjacency matrix.
In the embodiment of the application, the initial semantic adjacency matrix is used
Figure 228474DEST_PATH_IMAGE046
And the output result of the initial layer of the second graph convolution neural network model
Figure 411193DEST_PATH_IMAGE052
And inputting the data into a multi-head self-attention mechanism model updating formula to obtain an updated semantic adjacency matrix. Wherein, the multi-head self-attention mechanism model updating formula is as follows:
Figure 987668DEST_PATH_IMAGE053
Figure 914036DEST_PATH_IMAGE129
Figure 747650DEST_PATH_IMAGE130
Figure 366850DEST_PATH_IMAGE056
wherein,
Figure 165042DEST_PATH_IMAGE057
is formed by
Figure 629521DEST_PATH_IMAGE058
,…,
Figure 580290DEST_PATH_IMAGE059
Formed by splicing "
Figure 370392DEST_PATH_IMAGE021
"means the number of splices,
Figure 390301DEST_PATH_IMAGE059
representing the second atlas convolutional neural network model
Figure 924050DEST_PATH_IMAGE060
The output of the layer is carried out,
Figure 994905DEST_PATH_IMAGE061
is shown as
Figure 424750DEST_PATH_IMAGE028
Layer one
Figure 197534DEST_PATH_IMAGE040
The self-attention matrix is used for self-attention,
Figure 269395DEST_PATH_IMAGE062
is the first of the multi-head self-attention mechanism model
Figure 929177DEST_PATH_IMAGE028
In a layer of
Figure 61082DEST_PATH_IMAGE040
A first trainable parameter matrix corresponding to each self-attention moment array,
Figure 321162DEST_PATH_IMAGE063
is the first of the multi-head self-attention mechanism model
Figure 210096DEST_PATH_IMAGE028
In a layer of
Figure 504811DEST_PATH_IMAGE040
A second trainable parameter matrix corresponding to the individual self-attention moment matrix,
Figure 542037DEST_PATH_IMAGE043
which represents the transpose of the matrix,
Figure 289413DEST_PATH_IMAGE038
is the dimension of the multi-head self-attention per head,
Figure 453809DEST_PATH_IMAGE064
indicating the existence of
Figure 337452DEST_PATH_IMAGE064
The function is activated in such a way that,
Figure 545579DEST_PATH_IMAGE065
indicating the existence of
Figure 514672DEST_PATH_IMAGE065
The function of the function is that of the function,
Figure 482759DEST_PATH_IMAGE036
is the number of the heads of the multi-head self-attention,
Figure 955329DEST_PATH_IMAGE066
is an intermediate result of the updating of the semantic adjacency matrix,
Figure 599937DEST_PATH_IMAGE067
representing the largest of the sorted matrices
Figure 56326DEST_PATH_IMAGE045
The number of the elements is one,
Figure 562525DEST_PATH_IMAGE068
is the updated semantic adjacency matrix.
S144: and repeatedly executing input operation on the updated semantic adjacency matrix and the output result of the initial layer of the second graph convolution neural network model until the output result of the output layer of the second graph convolution neural network model is obtained, and obtaining the semantic information of the sentence.
In this embodiment of the application, the input operation is repeatedly executed on the updated semantic adjacency matrix and the output result of the initial layer of the second graph convolution neural network model until the output result of the output layer of the second graph convolution neural network model is obtained, and the semantic information of the sentence is obtained. Wherein, the formula for obtaining the output result of the output layer of the second graph convolution neural network model is as follows:
Figure 420759DEST_PATH_IMAGE131
wherein,
Figure 236269DEST_PATH_IMAGE070
is a normalized adjacency matrix that is,
Figure 914375DEST_PATH_IMAGE068
is the updated semantic adjacency matrix that is,
Figure 481055DEST_PATH_IMAGE049
is a matrix of units, and is,
Figure 193796DEST_PATH_IMAGE050
is a matrix of degrees and is,
Figure 180206DEST_PATH_IMAGE071
second graph convolution neural network model number one
Figure 611188DEST_PATH_IMAGE028
A learnable parametric matrix representation of the layer,
Figure 459189DEST_PATH_IMAGE072
it is shown that the activation function is,
Figure 26437DEST_PATH_IMAGE073
semantic information representing the sentence.
S150: and inputting the hidden state vector, the syntactic graph and the semantic graph into a shared graph convolution neural network model to obtain common information between the syntactic graph and the semantic graph.
Considering that the syntax information of the syntax diagram and the semantic information of the semantic diagram are not completely separated, the syntax and the semantics affect each other, and the semantics change as the syntax structure of the sentence changes. Therefore, extracting common information shared by the syntax diagram and the semantic diagram is advantageous for understanding the sentence. In the embodiment of the application, the hidden state vector, the syntactic graph and the semantic graph are input into a shared graph convolution neural network model, and common information between the syntactic graph and the semantic graph is obtained.
Referring to fig. 7, in an embodiment of the present application, the step S150 includes steps S151 to S153 as follows:
s151: and inputting the hidden state vector and the syntactic graph into the shared graph convolution neural network model to obtain the public information of the syntactic graph.
In this embodiment of the present application, the hidden state vector and the syntax map are input to the shared map convolutional neural network model, so as to obtain common information of the syntax map. Wherein the public information formula for obtaining the syntax diagram is as follows:
Figure 183748DEST_PATH_IMAGE074
wherein,
Figure 836447DEST_PATH_IMAGE024
an adjacency matrix representing the syntax diagram,
Figure 488139DEST_PATH_IMAGE006
represents the hidden-state vector in question,
Figure 175472DEST_PATH_IMAGE075
a parameter matrix that represents a learnable model of the shared graph convolutional neural network,
Figure 238106DEST_PATH_IMAGE076
common information representing the syntax diagram is described,
Figure 378100DEST_PATH_IMAGE077
a syntax graph convolution module to derive common information for the syntax graph from the adjacency matrix of the syntax graph, the hidden state vector, and a parameter matrix learnable by the shared graph convolution neural network model. The syntactic graph convolution module uses the formula of the syntactic information obtained in step S132, wherein the first graph is convolved with the neural network model
Figure 567904DEST_PATH_IMAGE028
Learnable parameter matrix of layers
Figure 109744DEST_PATH_IMAGE027
Replacing with a learnable parameter matrix of the shared graph convolutional neural network model
Figure 608859DEST_PATH_IMAGE075
And (4) finishing.
S152: and inputting the hidden state vector and the semantic graph into the shared graph convolution neural network model to obtain the public information of the semantic graph.
In the embodiment of the application, the hidden state vector and the semantic graph are input into the shared graph convolution neural network model to obtain the public information of the semantic graph. Wherein, the public information formula for obtaining the semantic graph is as follows:
Figure 236149DEST_PATH_IMAGE078
wherein,
Figure 226714DEST_PATH_IMAGE079
an adjacency matrix representing the semantic graph,
Figure 888640DEST_PATH_IMAGE006
represents the hidden-state vector in question,
Figure 558656DEST_PATH_IMAGE080
common information representing the semantic graph is provided,
Figure 407663DEST_PATH_IMAGE081
and the semantic graph convolution module is used for obtaining the public information of the syntactic graph according to the adjacency matrix of the semantic graph, the hidden state vector and the parameter matrix which can be learned by the shared graph convolution neural network model. The semantic graph convolution module uses the formula in the steps S141-S144, wherein the second graph is convolved with the neural network model
Figure 204849DEST_PATH_IMAGE028
Learnable parameter matrix of layers
Figure 455702DEST_PATH_IMAGE071
Replacing with a learnable parameter matrix of the shared graph convolutional neural network model
Figure 562198DEST_PATH_IMAGE075
And (4) finishing.
S153: and inputting the public information of the syntactic graph and the public information of the semantic graph into a combined operation formula to obtain the public information between the syntactic graph and the semantic graph.
In the embodiment of the application, the public information of the syntactic graph and the public information of the semantic graph are input into a combined operation formula to obtain the public information between the syntactic graph and the semantic graph. Wherein, the combined operation formula is as follows:
Figure 898501DEST_PATH_IMAGE132
wherein,
Figure 233799DEST_PATH_IMAGE083
and
Figure 604737DEST_PATH_IMAGE084
is a matrix of parameters that can be learned,
Figure 616556DEST_PATH_IMAGE085
representing common information between the syntax diagram and the semantic diagram.
S160: and inputting the syntactic information, the semantic information and the public information into a mask model, averaging and pooling to obtain specific target information, and splicing and fusing the specific target information to obtain the characteristic expression of the specific target.
In the embodiment of the application, the syntactic information, the semantic information and the public information are input into a mask model, and are averaged and pooled to obtain specific target information, and the specific target information is spliced and fused to obtain the feature expression of a specific target, so that the syntactic information, the semantic information and the public information thereof are adaptively fused, and further deep specific target information is obtained for next emotion analysis.
In one embodiment of the present application, since
Figure 705734DEST_PATH_IMAGE133
And
Figure 579144DEST_PATH_IMAGE076
are all clauses and expressions
Figure 70168DEST_PATH_IMAGE123
To study in middle school, in order to let
Figure 252887DEST_PATH_IMAGE076
More common information is captured. Therefore, will
Figure 563783DEST_PATH_IMAGE133
And
Figure 509392DEST_PATH_IMAGE076
the loss between is defined as
Figure 854923DEST_PATH_IMAGE134
. Also, in the same manner as above,
Figure 208544DEST_PATH_IMAGE135
and
Figure 741156DEST_PATH_IMAGE080
the loss between is defined as
Figure 221947DEST_PATH_IMAGE136
. Total specificity error
Figure 421984DEST_PATH_IMAGE137
The method comprises the following steps:
Figure 212086DEST_PATH_IMAGE138
in addition to this, the present invention is,
Figure 497574DEST_PATH_IMAGE076
and
Figure 782056DEST_PATH_IMAGE080
using constraints as output of the shared graph convolution neural network
Figure 571020DEST_PATH_IMAGE139
To enhance the similarity between them:
Figure 266444DEST_PATH_IMAGE140
the loss function of the final model is
Figure 304807DEST_PATH_IMAGE141
Wherein
Figure 127400DEST_PATH_IMAGE142
Is the number of emotion categories, including positive, negative and neutral,
Figure 770871DEST_PATH_IMAGE143
representing the probability of the jth sample of the jth real emotion class,
Figure 902775DEST_PATH_IMAGE144
representing the probability of the jth predicted emotion class for the ith sample,
Figure 897276DEST_PATH_IMAGE145
is the regularization weight parameter that is,
Figure 520631DEST_PATH_IMAGE146
and
Figure 284188DEST_PATH_IMAGE147
is a hyper-parameter which is the parameter,
Figure 586993DEST_PATH_IMAGE148
a trainable parameter matrix, including
Figure 68790DEST_PATH_IMAGE027
Figure 233186DEST_PATH_IMAGE071
Figure 116829DEST_PATH_IMAGE062
And
Figure 590535DEST_PATH_IMAGE063
and the like,
Figure 559628DEST_PATH_IMAGE149
to represent
Figure 527715DEST_PATH_IMAGE150
The square of the norm.
Referring to fig. 8, in an embodiment of the present application, the step S160 includes steps S161 to S163, which are as follows:
s161: and inputting the syntax information, the semantic information and the public information into a mask model to perform average pooling to obtain syntax specific target information, semantic specific target information and public specific target information.
In the embodiment of the application, the syntax information, the semantic information and the public information are input into a mask model to be averaged and pooled, and then the syntax specific target information, the semantic specific target information and the public specific target information are obtained. The obtaining of the syntax specific target information, the semantic specific target information and the common specific target information is formulated as follows:
Figure 265864DEST_PATH_IMAGE151
Figure 910472DEST_PATH_IMAGE152
Figure 632441DEST_PATH_IMAGE153
Figure 873060DEST_PATH_IMAGE154
wherein,
Figure 731295DEST_PATH_IMAGE155
is a function of the output of the mask model,
Figure 546804DEST_PATH_IMAGE092
is a subscript representative of a particular target in the sentence to be emotion analyzed,
Figure 490489DEST_PATH_IMAGE011
the subscript indicating the 1 st specific target in the sentence to be subjected to emotion analysis indicates,
Figure 80607DEST_PATH_IMAGE012
representing the sentence to be subjected to emotion analysis
Figure 793348DEST_PATH_IMAGE005
The subscripts of the individual specific objects indicate,
Figure 779758DEST_PATH_IMAGE156
is an index to a particular target and is,
Figure 695893DEST_PATH_IMAGE005
indicating the number of specific objects that are to be addressed,
Figure 58741DEST_PATH_IMAGE157
is the average pooling function of the received data,
Figure 891568DEST_PATH_IMAGE158
the syntax information is represented by a syntax table,
Figure 48880DEST_PATH_IMAGE085
representing common information between the syntax diagram and the semantic diagram,
Figure 717890DEST_PATH_IMAGE159
the semantic information is represented by a representation of the semantic information,
Figure 618850DEST_PATH_IMAGE097
represents the syntax-specific object information and the syntax-specific object information,
Figure 306183DEST_PATH_IMAGE098
representing the semantic specific object information in question,
Figure 385128DEST_PATH_IMAGE099
representing the common specific target information.
S162: and splicing the syntax specific target information, the semantic specific target information and the public specific target information to obtain specific target representation.
In the embodiment of the application, the syntax specific target information, the semantic specific target information and the public specific target information are spliced to obtain specific target representation. Wherein, the characteristic expression formula for obtaining the specific target is as follows:
Figure 525123DEST_PATH_IMAGE100
wherein,
Figure 964194DEST_PATH_IMAGE101
representing a particular target representation "
Figure 240455DEST_PATH_IMAGE021
"denotes a splice.
S163: and inputting the specific target representation into a multilayer neural network fusion formula to obtain the characteristic expression of the specific target.
A Multi-Layer neural network (MLP) is an artificial neural network of a forward structure that maps a set of input vectors to a set of output vectors. The multi-layer neural network can be regarded as a directed graph, and is composed of a plurality of node layers, and each layer is fully connected to the next layer. Each node, except the input nodes, is a neuron (or processing unit) with a nonlinear activation function. In the embodiment of the application, the specific target representation is input into a multi-layer neural network fusion formula, and the characteristic expression of the specific target is obtained. Wherein, the multilayer neural network fusion formula is as follows:
Figure 739569DEST_PATH_IMAGE160
wherein,
Figure 114662DEST_PATH_IMAGE103
a matrix of weights that can be learned is represented,
Figure 357425DEST_PATH_IMAGE104
a bias term is represented as a function of,
Figure 19350DEST_PATH_IMAGE029
it is shown that the activation function is,
Figure 440099DEST_PATH_IMAGE105
a characteristic expression representing the specific object.
S170: and inputting the characteristic expression into a full-connection network for probability calculation to obtain an emotion analysis result of the specific target.
In the embodiment of the application, the feature expression is input to a full-connection network for probability calculation, and the emotion analysis result of the specific target is obtained.
In an embodiment of the present application, step S170 includes S171, which is as follows:
s171: inputting said target-specific feature expression into a fully connected network
Figure 554685DEST_PATH_IMAGE064
And carrying out probability calculation by using a layer operation formula to obtain the emotion analysis result of the specific target.
In the embodiment of the application, the characteristic expression of the specific target is input into the full-connection networkCollaterals of stomach
Figure 601139DEST_PATH_IMAGE064
And carrying out probability calculation by using a layer operation formula to obtain the emotion analysis result of the specific target. Wherein,
Figure 851991DEST_PATH_IMAGE064
the layer operation formula is as follows:
Figure 443641DEST_PATH_IMAGE161
wherein,
Figure 45523DEST_PATH_IMAGE105
a feature expression representing the specific object,
Figure 630089DEST_PATH_IMAGE107
a matrix of weights that can be learned is represented,
Figure 1027DEST_PATH_IMAGE108
a bias term is represented as a function of,
Figure 763578DEST_PATH_IMAGE162
indicating the existence of
Figure 852757DEST_PATH_IMAGE163
The function is activated in such a way that,
Figure 975433DEST_PATH_IMAGE111
and representing the emotion analysis result.
Referring to fig. 9, fig. 10 and fig. 11, fig. 9 is a schematic diagram of an overall structure of an emotion analysis model according to an embodiment of the present invention, fig. 10 is a schematic diagram of a second convolutional neural network model according to an embodiment of the present invention, and fig. 11 is a schematic diagram of a shared convolutional neural network model according to an embodiment of the present invention. The emotion analysis model corresponds to the emotion analysis method proposed in the embodiment of the present application, for example: steps S110 to S170. Specifically, the model obtains a word vector of a sentence to be subjected to emotion analysis, inputs the word vector into a bidirectional LSTM network to obtain a hidden state vector corresponding to the word vector, obtains a dependency syntax tree corresponding to the sentence, converts the dependency syntax tree into a syntax diagram, inputs the hidden state vector and the syntax diagram into a first diagram convolution neural network model to obtain syntax information of the sentence, inputs the hidden state vector into a multi-head self-attention mechanism model to obtain a semantic diagram, inputs the hidden state vector and the semantic diagram into a second diagram convolution neural network model to obtain semantic information of the sentence, inputs the hidden state vector, the syntax diagram and the semantic diagram into a shared diagram convolution neural network model to obtain common information between the syntax diagram and the semantic diagram, inputting the syntactic information, the semantic information and the public information into a mask model, averaging and pooling to obtain specific target information, splicing and fusing the specific target information to obtain a characteristic expression of the specific target, inputting the characteristic expression into a full-connection network for probability calculation to obtain an emotion analysis result of the specific target, fully extracting the semantic information in a semantic graph by the characteristic expression, considering the public information between the semantic information and the syntactic information, and improving the accuracy of emotion analysis.
Example 2
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Please refer to fig. 12, which shows a schematic structural diagram of an emotion analyzing apparatus provided in an embodiment of the present application. The emotion analysis device 200 provided in the embodiment of the present application includes:
a hidden state obtaining module 210, configured to obtain a word vector of a sentence to be subjected to emotion analysis, and input the word vector to a bidirectional LSTM network to obtain a hidden state vector corresponding to the word vector;
a dependency syntax tree transformation module 220, configured to obtain a dependency syntax tree corresponding to the sentence, and transform the dependency syntax tree into a syntax diagram;
a syntax information obtaining module 230, configured to input the hidden state vector and the syntax map into a first map convolution neural network model, and obtain syntax information of the sentence;
a semantic information obtaining module 240, configured to input the hidden state vector to a multi-head self-attention mechanism model to obtain a semantic graph, and input the hidden state vector and the semantic graph to a second graph convolution neural network model to obtain semantic information of the sentence;
a public information obtaining module 250, configured to input the hidden state vector, the syntax diagram, and the semantic diagram into a shared diagram convolutional neural network model, and obtain public information between the syntax diagram and the semantic diagram;
a feature expression obtaining module 260, configured to input the syntax information, the semantic information, and the public information into a mask model to perform averaging and pooling to obtain specific target information, and perform splicing and fusion on the specific target information to obtain a feature expression of a specific target;
and the emotion analysis module 270 is configured to input the feature expression to a full-connection network for probability calculation, so as to obtain an emotion analysis result of the specific target.
The embodiment of the application obtains a word vector of a sentence to be subjected to emotion analysis, inputs the word vector into a bidirectional LSTM network to obtain a hidden state vector corresponding to the word vector, obtains a dependency syntax tree corresponding to the sentence, converts the dependency syntax tree into a syntax diagram, inputs the hidden state vector and the syntax diagram into a first diagram convolution neural network model to obtain syntax information of the sentence, inputs the hidden state vector into a multi-head self-attention mechanism model to obtain a semantic diagram, inputs the hidden state vector and the semantic diagram into a second diagram convolution neural network model to obtain semantic information of the sentence, inputs the hidden state vector, the syntax diagram and the semantic diagram into a shared diagram convolution neural network model to obtain common information between the syntax diagram and the semantic diagram, inputting the syntactic information, the semantic information and the public information into a mask model, averaging and pooling to obtain specific target information, splicing and fusing the specific target information to obtain a characteristic expression of the specific target, inputting the characteristic expression into a full-connection network for probability calculation to obtain an emotion analysis result of the specific target, fully extracting the semantic information in a semantic graph by the characteristic expression, considering the public information between the semantic information and the syntactic information, and improving the accuracy of emotion analysis.
Example 3
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the methods of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 13, the present application further provides an electronic device 8, a processor 80, a memory 81, and a computer program 82, such as an emotion analysis program, stored in the memory 81 and operable on the processor 80. The processor 80, when executing the computer program 82, implements the steps in the above-described embodiments of emotion analysis methods, such as the steps S110 to S170 shown in fig. 1. Alternatively, the processor 80, when executing the computer program 82, implements the functions of the modules/units in the above-described device embodiments, such as the functions of the modules 210 to 270 shown in fig. 8.
Illustratively, the computer program 82 may be partitioned into one or more modules/units that are stored in the memory 81 and executed by the processor 80 to implement the present invention. The one or more modules/units 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 82 in the emotion analysis apparatus 8. For example, the computer program 82 may be divided into a hidden state acquisition module, a dependency syntax tree conversion module, a syntax information acquisition module, a semantic information acquisition module, a public information acquisition module, a feature expression acquisition module, and an emotion analysis module, each of which functions as follows:
the hidden state acquisition module is used for acquiring a word vector of a sentence to be subjected to emotion analysis, and inputting the word vector into the bidirectional LSTM network to obtain a hidden state vector corresponding to the word vector;
the dependency syntax tree conversion module is used for acquiring a dependency syntax tree corresponding to the sentence and converting the dependency syntax tree into a syntax graph;
a syntax information obtaining module, configured to input the hidden state vector and the syntax map into a first map convolution neural network model, so as to obtain syntax information of the sentence;
a semantic information obtaining module, configured to input the hidden state vector to a multi-head attention mechanism model to obtain a semantic graph, and input the hidden state vector and the semantic graph to a second graph convolution neural network model to obtain semantic information of the sentence;
a public information obtaining module, configured to input the hidden state vector, the syntax diagram, and the semantic diagram into a shared diagram convolutional neural network model, and obtain public information between the syntax diagram and the semantic diagram;
the feature expression obtaining module is used for inputting the syntactic information, the semantic information and the public information into a mask model to obtain average pooling to obtain specific target information, and splicing and fusing the specific target information to obtain feature expression of a specific target;
and the emotion analysis module is used for inputting the characteristic expression to a full-connection network for probability calculation to obtain an emotion analysis result of the specific target.
The emotion analyzing apparatus 8 may include, but is not limited to, a processor 80 and a memory 81. Those skilled in the art will appreciate that FIG. 8 is merely an example of a particular target emotion classification device 8 based on attention coding and graph convolution networks, and does not constitute a limitation on emotion analysis device 8, and may include more or fewer components than those shown, or combine certain components, or different components, e.g., emotion analysis device 8 may also include input output devices, network access devices, buses, etc.
The Processor 80 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 device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 81 may be an internal storage unit of the emotion analyzing apparatus 8, such as a hard disk or a memory of the emotion analyzing apparatus 8. The memory 81 may also be an external storage device of the emotion analyzing apparatus 8, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the emotion analyzing apparatus 8. Further, the memory 81 may also include both an internal storage unit and an external storage device of the emotion analyzing device 8. The memory 81 is used to store the computer program and other programs and data required by the emotion analyzing apparatus. The memory 81 may also be used to temporarily store data that has been output or is to be output.
Example 4
The present application further provides a computer-readable storage medium, on which a computer program is stored, where the instructions are suitable for being loaded by a processor and executing the method steps of the foregoing illustrated embodiments, and specific execution processes may refer to specific descriptions shown in embodiment 1, which are not described herein again. The device where the storage medium is located can be an electronic device such as a personal computer, a notebook computer, a smart phone and a tablet computer.
For the apparatus embodiment, since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment for relevant points. The above-described device embodiments are merely illustrative, wherein the components described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart block or blocks and/or flowchart block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. An emotion analysis method, comprising:
acquiring a word vector of a sentence to be subjected to emotion analysis, and inputting the word vector into a bidirectional LSTM network to obtain a hidden state vector corresponding to the word vector;
obtaining a dependency syntax tree corresponding to the sentence, and converting the dependency syntax tree into a syntax graph;
inputting the hidden state vector and the syntactic graph into a first graph convolution neural network model to obtain syntactic information of the sentence;
inputting the hidden state vector into a multi-head self-attention mechanism model to obtain a semantic graph, and inputting the hidden state vector and the semantic graph into a second graph convolution neural network model to obtain semantic information of the sentence;
inputting the hidden state vector, the syntactic graph and the semantic graph into a shared graph convolution neural network model to obtain common information between the syntactic graph and the semantic graph;
inputting the syntactic information, the semantic information and the public information into a mask model, averaging and pooling to obtain specific target information, and splicing and fusing the specific target information to obtain characteristic expression of a specific target;
and inputting the characteristic expression into a full-connection network for probability calculation to obtain an emotion analysis result of the specific target.
2. The emotion analysis method of claim 1, wherein the step of obtaining a word vector of a sentence to be subjected to emotion analysis, inputting the word vector to a bidirectional LSTM network, and obtaining a hidden state vector corresponding to the word vector comprises:
converting each word in the sentence to be subjected to emotion analysis into a word vector according to the GloVe word embedding model;
inputting the word vector into a bidirectional LSTM network to obtain a hidden state vector corresponding to the word vector; wherein the hidden state vector is represented as follows:
Figure 576002DEST_PATH_IMAGE001
Figure 882480DEST_PATH_IMAGE002
Figure 762712DEST_PATH_IMAGE003
wherein,
Figure 669488DEST_PATH_IMAGE004
representing the number of word vectors corresponding to the sentence to be subjected to emotion analysis,
Figure 73793DEST_PATH_IMAGE005
representing the number of word vectors corresponding to a specific target in the sentence to be subjected to emotion analysis,
Figure 749625DEST_PATH_IMAGE006
represents the hidden-state vector in question,
Figure 331916DEST_PATH_IMAGE007
representing a hidden state vector encoded in the forward direction,
Figure 725988DEST_PATH_IMAGE008
representing a hidden state vector coded in the backward direction,
Figure 901361DEST_PATH_IMAGE009
is the superscript representation of the sentence to be emotion analyzed,
Figure 697279DEST_PATH_IMAGE010
is a subscript representative of a particular target in the sentence to be emotion analyzed,
Figure 450472DEST_PATH_IMAGE011
the subscript indicating the 1 st specific target in the sentence to be subjected to emotion analysis indicates,
Figure 49949DEST_PATH_IMAGE012
representing the sentence to be subjected to emotion analysis
Figure 546789DEST_PATH_IMAGE005
The subscripts of the individual specific objects indicate,
Figure 197214DEST_PATH_IMAGE013
a hidden state vector representing a forward direction encoding corresponding to each of said word vectors,
Figure 121307DEST_PATH_IMAGE014
and representing the hidden state vector of the backward direction coding corresponding to each word vector.
3. The emotion analysis method of claim 1, wherein the step of inputting the hidden state vector and the syntax map into a first graph convolution neural network model to obtain syntactic information of the sentence comprises:
obtaining a syntax adjacency matrix of the syntax diagram; wherein the syntactic adjacency matrix represents adjacency relationships of words in the syntactic graph;
inputting the hidden state vector and the syntactic adjacency matrix into the first graph convolution neural network model to obtain syntactic information of the sentence; wherein the formula for obtaining the syntax information is as follows:
Figure 240704DEST_PATH_IMAGE015
Figure 275656DEST_PATH_IMAGE016
Figure 515008DEST_PATH_IMAGE017
wherein,
Figure 610003DEST_PATH_IMAGE006
represents the hidden-state vector in question,
Figure 184072DEST_PATH_IMAGE018
a first layer input representing the first graph convolution neural network model,
Figure 288295DEST_PATH_IMAGE019
is represented by
Figure 913311DEST_PATH_IMAGE018
,…,
Figure 179207DEST_PATH_IMAGE020
Formed by splicing "
Figure 998828DEST_PATH_IMAGE021
"means the number of splices,
Figure 110003DEST_PATH_IMAGE020
represents the first diagramFirst of convolutional neural network model
Figure 589526DEST_PATH_IMAGE022
The output of the layer is carried out,
Figure 275591DEST_PATH_IMAGE023
is a normalized adjacency matrix that is,
Figure 840565DEST_PATH_IMAGE024
is the syntactic adjacency matrix in question,
Figure 755431DEST_PATH_IMAGE025
is a matrix of units, and is,
Figure 355040DEST_PATH_IMAGE026
is a matrix of degrees and is,
Figure 979051DEST_PATH_IMAGE027
is the first graph convolution neural network model
Figure 500162DEST_PATH_IMAGE028
The learnable parameter matrix of a layer,
Figure 484298DEST_PATH_IMAGE029
it is shown that the activation function is,
Figure 938413DEST_PATH_IMAGE030
syntax information representing the sentence.
4. The emotion analysis method of claim 1, wherein the step of inputting the hidden state vector to a multi-head self-attention mechanism model to obtain a semantic map, and inputting the hidden state vector and the semantic map to a second map convolution neural network model to obtain semantic information of the sentence comprises:
inputting the hidden state vector into a multi-head self-attention mechanism model to obtain an initial semantic adjacency matrix of the semantic graph;
inputting the hidden state vector and the initial semantic adjacency matrix into an operational formula of the second graph convolution neural network model to obtain an output result of an initial layer of the second graph convolution neural network model;
inputting the initial semantic adjacency matrix and the output result of the initial layer of the second graph convolution neural network model into a multi-head self-attention mechanism model updating formula to obtain an updated semantic adjacency matrix;
repeatedly executing input operation on the updated semantic adjacency matrix and the output result of the initial layer of the second graph convolution neural network model until the output result of the output layer of the second graph convolution neural network model is obtained, and obtaining the semantic information of the sentence; wherein the formula for obtaining the initial semantic adjacency matrix of the semantic graph is as follows:
Figure 966281DEST_PATH_IMAGE031
Figure 240268DEST_PATH_IMAGE032
Figure 762516DEST_PATH_IMAGE033
Figure 71137DEST_PATH_IMAGE034
wherein,
Figure 502862DEST_PATH_IMAGE006
represents the hidden-state vector in question,
Figure 529724DEST_PATH_IMAGE035
as a first layer input to the second graph convolution neural network model,
Figure 590084DEST_PATH_IMAGE036
is the number of the heads of the multi-head self-attention,
Figure 284371DEST_PATH_IMAGE037
is the hidden state vector dimension for each of the bi-directional LSTM networks,
Figure 654041DEST_PATH_IMAGE038
is the dimension of the multi-head self-attention per head,
Figure 637040DEST_PATH_IMAGE039
is the first of the initial layer
Figure 501091DEST_PATH_IMAGE040
The self-attention matrix is used for self-attention,
Figure 535037DEST_PATH_IMAGE041
is the first layer in the initial layer of the multi-head self-attention mechanism model
Figure 560762DEST_PATH_IMAGE040
A first trainable parameter matrix corresponding to each self-attention moment array,
Figure 296637DEST_PATH_IMAGE042
is the first layer in the initial layer of the multi-head self-attention mechanism model
Figure 964379DEST_PATH_IMAGE040
A second trainable parameter matrix corresponding to the individual self-attention moment matrix,
Figure 351367DEST_PATH_IMAGE043
which represents the transpose of the matrix,
Figure 813572DEST_PATH_IMAGE044
representing the largest of the sorted matrices
Figure 36743DEST_PATH_IMAGE045
The number of the elements is one,
Figure 508176DEST_PATH_IMAGE046
is the initial semantic adjacency matrix;
wherein, the operation formula of the second graph convolution neural network model is as follows:
Figure 988485DEST_PATH_IMAGE047
wherein,
Figure 621592DEST_PATH_IMAGE048
is a normalized adjacency matrix that is,
Figure 332059DEST_PATH_IMAGE049
is a matrix of units, and is,
Figure 590871DEST_PATH_IMAGE050
is a matrix of degrees and is,
Figure 437604DEST_PATH_IMAGE051
is a learnable parameter matrix of a first layer of the second graph convolution neural network model,
Figure 507191DEST_PATH_IMAGE029
it is shown that the activation function is,
Figure 439375DEST_PATH_IMAGE052
representing an output result of the initial layer of the second graph convolution neural network model;
wherein, the multi-head self-attention mechanism model updating formula is as follows:
Figure 3343DEST_PATH_IMAGE053
Figure 704583DEST_PATH_IMAGE054
Figure 945071DEST_PATH_IMAGE055
Figure 364551DEST_PATH_IMAGE056
wherein,
Figure 699586DEST_PATH_IMAGE057
is formed by
Figure 520912DEST_PATH_IMAGE058
,…,
Figure 932302DEST_PATH_IMAGE059
Formed by splicing "
Figure 839078DEST_PATH_IMAGE021
"means the number of splices,
Figure 741918DEST_PATH_IMAGE059
representing the second atlas convolutional neural network model
Figure 417750DEST_PATH_IMAGE060
The output of the layer is carried out,
Figure 41DEST_PATH_IMAGE061
is shown as
Figure 394114DEST_PATH_IMAGE028
Layer one
Figure 70951DEST_PATH_IMAGE040
The self-attention matrix is used for self-attention,
Figure 866869DEST_PATH_IMAGE062
is the first of the multi-head self-attention mechanism model
Figure 354482DEST_PATH_IMAGE028
In a layer of
Figure 986583DEST_PATH_IMAGE040
A first trainable parameter matrix corresponding to each self-attention moment array,
Figure 483423DEST_PATH_IMAGE063
is the first of the multi-head self-attention mechanism model
Figure 133848DEST_PATH_IMAGE028
In a layer of
Figure 57941DEST_PATH_IMAGE040
A second trainable parameter matrix corresponding to the individual self-attention moment matrix,
Figure 410294DEST_PATH_IMAGE043
which represents the transpose of the matrix,
Figure 179667DEST_PATH_IMAGE038
is the dimension of the multi-head self-attention per head,
Figure 950177DEST_PATH_IMAGE064
indicating the existence of
Figure 45172DEST_PATH_IMAGE064
The function is activated in such a way that,
Figure 400934DEST_PATH_IMAGE065
indicating the existence of
Figure 239577DEST_PATH_IMAGE065
The function of the function is that of the function,
Figure 864593DEST_PATH_IMAGE036
is the number of the heads of the multi-head self-attention,
Figure 130490DEST_PATH_IMAGE066
is an intermediate result of the updating of the semantic adjacency matrix,
Figure 457435DEST_PATH_IMAGE067
representing the largest of the sorted matrices
Figure 834189DEST_PATH_IMAGE045
The number of the elements is one,
Figure 48133DEST_PATH_IMAGE068
is the updated semantic adjacency matrix;
wherein, the formula for obtaining the output result of the output layer of the second graph convolution neural network model is as follows:
Figure 235663DEST_PATH_IMAGE069
wherein,
Figure 800637DEST_PATH_IMAGE070
is a normalized adjacency matrix that is,
Figure 981082DEST_PATH_IMAGE068
is the updated semantic adjacency matrix that is,
Figure 315112DEST_PATH_IMAGE049
is unit momentThe number of the arrays is determined,
Figure 172078DEST_PATH_IMAGE050
is a matrix of degrees and is,
Figure 224348DEST_PATH_IMAGE071
second graph convolution neural network model number one
Figure 208484DEST_PATH_IMAGE028
A learnable parametric matrix representation of the layer,
Figure 397020DEST_PATH_IMAGE072
it is shown that the activation function is,
Figure 923423DEST_PATH_IMAGE073
semantic information representing the sentence.
5. The emotion analysis method of claim 1, wherein the step of inputting the hidden state vector, the syntax map and the semantic map into a shared map convolutional neural network model, and obtaining common information between the syntax map and the semantic map comprises:
inputting the hidden state vector and the syntactic graph into a shared graph convolution neural network model to obtain public information of the syntactic graph;
inputting the hidden state vector and the semantic graph into a shared graph convolution neural network model to obtain public information of the semantic graph;
inputting the public information of the syntactic graph and the public information of the semantic graph into a combined operation formula to obtain the public information between the syntactic graph and the semantic graph;
wherein the public information formula for obtaining the syntax diagram is as follows:
Figure 462989DEST_PATH_IMAGE074
wherein,
Figure 719658DEST_PATH_IMAGE024
an adjacency matrix representing the syntax diagram,
Figure 28279DEST_PATH_IMAGE006
represents the hidden-state vector in question,
Figure 227048DEST_PATH_IMAGE075
a parameter matrix that represents a learnable model of the shared graph convolutional neural network,
Figure 253910DEST_PATH_IMAGE076
common information representing the syntax diagram is described,
Figure 314270DEST_PATH_IMAGE077
a syntax graph convolution module representing obtaining common information of the syntax graph from an adjacency matrix of the syntax graph, the hidden state vector, and a parameter matrix learnable by the shared graph convolution neural network model;
wherein, the public information formula for obtaining the semantic graph is as follows:
Figure 477398DEST_PATH_IMAGE078
wherein,
Figure 614112DEST_PATH_IMAGE079
an adjacency matrix representing the semantic graph,
Figure 862691DEST_PATH_IMAGE006
represents the hidden-state vector in question,
Figure 461163DEST_PATH_IMAGE080
common information representing the semantic graph is provided,
Figure 993644DEST_PATH_IMAGE081
a semantic graph convolution module for obtaining public information of the syntactic graph according to the adjacency matrix of the semantic graph, the hidden state vector and the parameter matrix which can be learnt by the shared graph convolution neural network model;
wherein, the combined operation formula is as follows:
Figure 550527DEST_PATH_IMAGE082
wherein,
Figure 286402DEST_PATH_IMAGE083
and
Figure 954144DEST_PATH_IMAGE084
is a matrix of parameters that can be learned,
Figure 91864DEST_PATH_IMAGE085
representing common information between the syntax diagram and the semantic diagram.
6. The emotion analysis method according to claim 1, wherein the step of inputting the syntactic information, the semantic information, and the public information into a mask model to perform averaging and pooling to obtain specific target information, and performing splicing and fusion on the specific target information to obtain the feature expression of a specific target includes:
inputting the syntax information, the semantic information and the public information into a mask model to perform average pooling to obtain syntax specific target information, semantic specific target information and public specific target information;
splicing the syntax specific target information, the semantic specific target information and the public specific target information to obtain specific target representation;
inputting the specific target representation into a multilayer neural network fusion formula to obtain the characteristic expression of the specific target;
the obtaining of the syntax specific target information, the semantic specific target information and the common specific target information is formulated as follows:
Figure 42153DEST_PATH_IMAGE086
Figure 265323DEST_PATH_IMAGE087
Figure 658128DEST_PATH_IMAGE088
Figure 650354DEST_PATH_IMAGE089
wherein,
Figure 549040DEST_PATH_IMAGE090
is a function of the output of the mask model,
Figure 10240DEST_PATH_IMAGE091
is a subscript representative of a particular target in the sentence to be emotion analyzed,
Figure 754205DEST_PATH_IMAGE011
the subscript indicating the 1 st specific target in the sentence to be subjected to emotion analysis indicates,
Figure 600938DEST_PATH_IMAGE012
representing the sentence to be subjected to emotion analysis
Figure 404946DEST_PATH_IMAGE005
The subscripts of the individual specific objects indicate,
Figure 851977DEST_PATH_IMAGE092
is an index to a particular target and is,
Figure 399633DEST_PATH_IMAGE005
indicating the number of specific objects that are to be addressed,
Figure 366452DEST_PATH_IMAGE093
is the average pooling function of the received data,
Figure 606940DEST_PATH_IMAGE094
the syntax information is represented by a syntax table,
Figure 774223DEST_PATH_IMAGE085
representing common information between the syntax diagram and the semantic diagram,
Figure 859991DEST_PATH_IMAGE095
the semantic information is represented by a representation of the semantic information,
Figure 681316DEST_PATH_IMAGE096
represents the syntax-specific object information and the syntax-specific object information,
Figure 341973DEST_PATH_IMAGE097
representing the semantic specific object information in question,
Figure 983170DEST_PATH_IMAGE098
representing the common specific target information;
wherein, the characteristic expression formula for obtaining the specific target is as follows:
Figure 872629DEST_PATH_IMAGE099
wherein,
Figure 814040DEST_PATH_IMAGE100
representing a particular target representation "
Figure 147064DEST_PATH_IMAGE021
"denotes a splice;
wherein, the multilayer neural network fusion formula is as follows:
Figure 275557DEST_PATH_IMAGE101
wherein,
Figure 968706DEST_PATH_IMAGE102
a matrix of weights that can be learned is represented,
Figure 748312DEST_PATH_IMAGE103
a bias term is represented as a function of,
Figure 501505DEST_PATH_IMAGE029
it is shown that the activation function is,
Figure 382873DEST_PATH_IMAGE104
a characteristic expression representing the specific object.
7. The emotion analysis method of claim 1, wherein the step of inputting the feature expression of the specific target into a fully-connected network for probability calculation to obtain the emotion analysis result of the specific target comprises:
inputting said target-specific feature expression into a fully connected network
Figure 879713DEST_PATH_IMAGE064
Carrying out probability calculation by using a layer operation formula to obtain an emotion analysis result of the specific target; wherein,
Figure 272081DEST_PATH_IMAGE064
the layer operation formula is as follows:
Figure 930595DEST_PATH_IMAGE105
wherein,
Figure 33680DEST_PATH_IMAGE104
a feature expression representing the specific object,
Figure 68633DEST_PATH_IMAGE106
a matrix of weights that can be learned is represented,
Figure 88410DEST_PATH_IMAGE107
a bias term is represented as a function of,
Figure 652247DEST_PATH_IMAGE108
indicating the existence of
Figure 508207DEST_PATH_IMAGE109
The function is activated in such a way that,
Figure 97583DEST_PATH_IMAGE110
and representing the emotion analysis result.
8. An emotion analysis device, comprising:
the hidden state acquisition module is used for acquiring a word vector of a sentence to be subjected to emotion analysis, and inputting the word vector into the bidirectional LSTM neural network to obtain a hidden state vector corresponding to the word vector;
the dependency syntax tree conversion module is used for acquiring a dependency syntax tree corresponding to the sentence and converting the dependency syntax tree into a syntax graph;
a syntax information obtaining module, configured to input the hidden state vector and the syntax map into a first map convolution neural network model, so as to obtain syntax information of the sentence;
a semantic information obtaining module, configured to input the hidden state vector to a multi-head attention mechanism model to obtain a semantic graph, and input the hidden state vector and the semantic graph to a second graph convolution neural network model to obtain semantic information of the sentence;
a public information obtaining module, configured to input the hidden state vector, the syntax diagram, and the semantic diagram into a shared diagram convolutional neural network model, and obtain public information between the syntax diagram and the semantic diagram;
the feature expression obtaining module is used for inputting the syntactic information, the semantic information and the public information into a mask model to obtain average pooling to obtain specific target information, and splicing and fusing the specific target information to obtain feature expression of a specific target;
and the emotion analysis module is used for inputting the characteristic expression to a full-connection network for probability calculation to obtain an emotion analysis result of the specific target.
9. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the sentiment analysis method of any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a sentiment analysis method according to any one of claims 1 to 7.
CN202110535102.3A 2021-05-17 2021-05-17 Emotion analysis method and device, electronic equipment and storage medium Active CN112966074B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110535102.3A CN112966074B (en) 2021-05-17 2021-05-17 Emotion analysis method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110535102.3A CN112966074B (en) 2021-05-17 2021-05-17 Emotion analysis method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112966074A true CN112966074A (en) 2021-06-15
CN112966074B CN112966074B (en) 2021-08-03

Family

ID=76279804

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110535102.3A Active CN112966074B (en) 2021-05-17 2021-05-17 Emotion analysis method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112966074B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113449110A (en) * 2021-08-30 2021-09-28 华南师范大学 Emotion classification method and device, storage medium and computer equipment
CN113571097A (en) * 2021-09-28 2021-10-29 之江实验室 Speaker self-adaptive multi-view dialogue emotion recognition method and system
CN113674767A (en) * 2021-10-09 2021-11-19 复旦大学 Depression state identification method based on multi-modal fusion
CN113765928A (en) * 2021-09-10 2021-12-07 湖南工商大学 Internet of things intrusion detection method, system, equipment and medium
CN113761941A (en) * 2021-11-09 2021-12-07 华南师范大学 Text emotion analysis method
CN114048730A (en) * 2021-11-05 2022-02-15 光大科技有限公司 Word segmentation and entity combined recognition model training method and device
CN115510226A (en) * 2022-09-02 2022-12-23 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) Emotion classification method based on graph neural network
CN115659951A (en) * 2022-12-26 2023-01-31 华南师范大学 Statement emotion analysis method, device and equipment based on label embedding
CN115712726A (en) * 2022-11-08 2023-02-24 华南师范大学 Emotion analysis method, device and equipment based on bigram embedding
CN115905524A (en) * 2022-11-07 2023-04-04 华南师范大学 Emotion analysis method, device and equipment integrating syntactic and semantic information
CN116029294A (en) * 2023-03-30 2023-04-28 华南师范大学 Term pairing method, device and equipment
CN116304748A (en) * 2023-05-17 2023-06-23 成都工业学院 Text similarity calculation method, system, equipment and medium
CN117171610A (en) * 2023-08-03 2023-12-05 江南大学 Knowledge enhancement-based aspect emotion triplet extraction method and system
CN117911161A (en) * 2024-01-25 2024-04-19 广东顺银产融投资有限公司 Project investment decision method, device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140056715A (en) * 2012-10-31 2014-05-12 에스케이플래닛 주식회사 An apparatus for opinion mining based on hierarchical categories and a method thereof
CN111259142A (en) * 2020-01-14 2020-06-09 华南师范大学 Specific target emotion classification method based on attention coding and graph convolution network
CN112528672A (en) * 2020-12-14 2021-03-19 北京邮电大学 Aspect-level emotion analysis method and device based on graph convolution neural network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140056715A (en) * 2012-10-31 2014-05-12 에스케이플래닛 주식회사 An apparatus for opinion mining based on hierarchical categories and a method thereof
CN111259142A (en) * 2020-01-14 2020-06-09 华南师范大学 Specific target emotion classification method based on attention coding and graph convolution network
CN112528672A (en) * 2020-12-14 2021-03-19 北京邮电大学 Aspect-level emotion analysis method and device based on graph convolution neural network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHANG,ZUFAN 等: "《Textual sentiment analysis via three different attention convolutional neural networks and cross-modality consistent regression》", 《ELSEVIER》 *

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113449110A (en) * 2021-08-30 2021-09-28 华南师范大学 Emotion classification method and device, storage medium and computer equipment
CN113765928B (en) * 2021-09-10 2023-03-24 湖南工商大学 Internet of things intrusion detection method, equipment and medium
CN113765928A (en) * 2021-09-10 2021-12-07 湖南工商大学 Internet of things intrusion detection method, system, equipment and medium
CN113571097A (en) * 2021-09-28 2021-10-29 之江实验室 Speaker self-adaptive multi-view dialogue emotion recognition method and system
CN113674767A (en) * 2021-10-09 2021-11-19 复旦大学 Depression state identification method based on multi-modal fusion
CN114048730A (en) * 2021-11-05 2022-02-15 光大科技有限公司 Word segmentation and entity combined recognition model training method and device
CN113761941A (en) * 2021-11-09 2021-12-07 华南师范大学 Text emotion analysis method
CN115510226A (en) * 2022-09-02 2022-12-23 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) Emotion classification method based on graph neural network
CN115510226B (en) * 2022-09-02 2023-11-10 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) Emotion classification method based on graph neural network
CN115905524A (en) * 2022-11-07 2023-04-04 华南师范大学 Emotion analysis method, device and equipment integrating syntactic and semantic information
CN115905524B (en) * 2022-11-07 2023-10-03 华南师范大学 Emotion analysis method, device and equipment integrating syntax and semantic information
CN115712726A (en) * 2022-11-08 2023-02-24 华南师范大学 Emotion analysis method, device and equipment based on bigram embedding
CN115712726B (en) * 2022-11-08 2023-09-12 华南师范大学 Emotion analysis method, device and equipment based on double word embedding
CN115659951A (en) * 2022-12-26 2023-01-31 华南师范大学 Statement emotion analysis method, device and equipment based on label embedding
CN116029294A (en) * 2023-03-30 2023-04-28 华南师范大学 Term pairing method, device and equipment
CN116304748A (en) * 2023-05-17 2023-06-23 成都工业学院 Text similarity calculation method, system, equipment and medium
CN116304748B (en) * 2023-05-17 2023-07-28 成都工业学院 Text similarity calculation method, system, equipment and medium
CN117171610A (en) * 2023-08-03 2023-12-05 江南大学 Knowledge enhancement-based aspect emotion triplet extraction method and system
CN117171610B (en) * 2023-08-03 2024-05-03 江南大学 Knowledge enhancement-based aspect emotion triplet extraction method and system
CN117911161A (en) * 2024-01-25 2024-04-19 广东顺银产融投资有限公司 Project investment decision method, device and storage medium
CN117911161B (en) * 2024-01-25 2024-06-21 广东顺银产融投资有限公司 Project investment decision method, device and storage medium

Also Published As

Publication number Publication date
CN112966074B (en) 2021-08-03

Similar Documents

Publication Publication Date Title
CN112966074B (en) Emotion analysis method and device, electronic equipment and storage medium
CN111259142B (en) Specific target emotion classification method based on attention coding and graph convolution network
CN112084331B (en) Text processing and model training method and device, computer equipment and storage medium
CN107516110B (en) Medical question-answer semantic clustering method based on integrated convolutional coding
CN110532353B (en) Text entity matching method, system and device based on deep learning
CN111061843A (en) Knowledge graph guided false news detection method
CN112749274B (en) Chinese text classification method based on attention mechanism and interference word deletion
CN109214006B (en) Natural language reasoning method for image enhanced hierarchical semantic representation
CN110659742A (en) Method and device for acquiring sequence representation vector of user behavior sequence
CN110619044A (en) Emotion analysis method, system, storage medium and equipment
CN112861522B (en) Aspect-level emotion analysis method, system and model based on dual-attention mechanism
CN111460783B (en) Data processing method and device, computer equipment and storage medium
CN114443899A (en) Video classification method, device, equipment and medium
CN118113855B (en) Ship test training scene question answering method, system, equipment and medium
Ciaburro et al. Python Machine Learning Cookbook: Over 100 recipes to progress from smart data analytics to deep learning using real-world datasets
CN116975350A (en) Image-text retrieval method, device, equipment and storage medium
CN112749737A (en) Image classification method and device, electronic equipment and storage medium
CN116150367A (en) Emotion analysis method and system based on aspects
CN116561272A (en) Open domain visual language question-answering method and device, electronic equipment and storage medium
CN111611796A (en) Hypernym determination method and device for hyponym, electronic device and storage medium
CN115186085A (en) Reply content processing method and interaction method of media content interaction content
CN115758159B (en) Zero sample text position detection method based on mixed contrast learning and generation type data enhancement
Kalangi et al. Sentiment Analysis using Machine Learning
CN117009516A (en) Converter station fault strategy model training method, pushing method and device
Wakchaure et al. A scheme of answer selection in community question answering using machine learning techniques

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
GR01 Patent grant
GR01 Patent grant