Aspect-Level Text Sentiment Classification System Based on Dual Graph Convolutional Neural Network
Through the dual graph convolution neural network processing of view-level text, the problem of not being able to identify the emotional polarity of different view-level words in the prior art is solved, and a more efficient and reliable view-level text sentiment analysis is achieved.
Patent Information
- Application Number
- CN202211634722.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-19
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2042-12-19
AI Technical Summary
Existing document-level and sentence-level sentiment analyses cannot accurately identify the emotional polarity of words in a text, resulting in the inability to provide a comprehensive and in-depth analysis.
The perspective-level text emotion classification system based on the dual graph convolution neural network is adopted, and the emotional categories of viewpoint text is identified through text preprocessing, text semantics and syntactic information acquisition, attention coding, related semantics and dependent syntactic graph convolution neural network processing is combined with bidirectional mapping and emotion category output modules.
It improves the efficiency and reliability of text emotion recognition, can accurately identify the emotional polarity of words of different perspectives, and provides more comprehensive and in-depth analysis.
Smart Images

Figure CN115858788B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of document sentiment analysis and opinion mining, and particularly to a perspective-level text sentiment classification system based on a dual graph convolutional neural network. Background Art
[0002] In the past, the objects of sentiment analysis mainly focused on sentences or documents and achieved good results. However, in real application scenarios, the simple use of sentiment (positive, negative, and neutral) of a piece of text cannot accurately express the true sentiment of the text. Taking the comment "The food in this restaurant is very delicious, but the service is not considerate" as an example, this comment is generally a description of the restaurant. However, from the document-level or sentence-level sentiment analysis, the sentiment polarity of the comment cannot be judged. Therefore, fine-grained sentiment analysis has gradually attracted wide attention and become one of the research hotspots. Perspective-level text sentiment analysis aims to study the sentiment polarity (such as positive, negative, and neutral) of a review text regarding a given perspective word. For example, Figure 1 , there are two perspective words "salmon" and "waiter" in the text. The sentiment polarity shown by this text for the perspective word "salmon" is positive, while the sentiment polarity shown for the perspective word "waiter" is negative. Perspective-level text sentiment analysis can accurately capture the sentiment information of users in different aspects and can provide a more comprehensive and in-depth analysis than document-level or sentence-level sentiment analysis. This research can be widely applied in fields such as product pricing, competitive intelligence, stock market prediction, etc., and has important theoretical research significance and practical application value. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a perspective-level text sentiment classification system based on a dual graph convolutional neural network, which can perform feature processing on perspective-level text, extract semantic features and syntactic features from the text, and then through multi-layer graph convolutional neural networks for two different tasks, finally identify the sentiment category of the text in the target field.
[0004] To achieve the above purpose, the present invention adopts the following technical solutions:
[0005] A perspective-level text sentiment classification system based on a dual graph convolutional neural network, including a text preprocessing module for performing feature processing on perspective-level text;
[0006] A text semantic information acquisition module for capturing the bidirectional semantic dependency relationship of the text;
[0007] An attention encoding module for capturing the global internal correlation of the text word sequence and generating a text semantic relationship graph;
[0008] The relevant semantic graph convolutional neural network module applies GCN to the text semantic graph to model the sentence structure, which is used to capture highly relevant semantic information in the text.
[0009] The text syntactic information acquisition module is used to capture text information based on dependency syntax.
[0010] The dependency syntax graph convolutional neural network module directly applies GCN to the sentence dependency tree to model the sentence structure, and can propagate the syntactic dependency information of the context from the opinion word to the perspective word.
[0011] The bidirectional mapping module is used to exchange the relevant features between the semantic GCN and the syntactic GCN information.
[0012] The sentiment category output module uses a classification function to obtain the final sentiment classification result.
[0013] Furthermore, the text preprocessing module performs feature extraction on the perspective-level text to obtain an initial text vector, specifically:
[0014] (1) Segment the source text.
[0015] (2) Convert the text data from text form to vector form through Glove.
[0016] (3) Use the Stanford syntactic analyzer to perform dependency syntactic analysis and part-of-speech tagging on the sentences in the document.
[0017] (4) Concatenate the word embedding vector obtained through Glove, the part-of-speech tag embedding vector, and the position embedding vector as the initial text vector.
[0018] Furthermore, the attention encoding module uses the multi-head self-attention mechanism to capture the global internal correlation of the text word sequence, and generates a semantic score relationship graph through the semantic feature vector output by the text semantic information acquisition module.
[0019] Furthermore, the multi-head self-attention mechanism uses two independent multi-head attention mechanism modules MHA adj and MHA sem , specifically:
[0020] Calculate the output H of the multi-head self-attention mechanism through the following formula sem and the semantic f relationship graph A sem :
[0021] H sem = MHA sem (H * , H * );
[0022] Asem = MHA adj (H * , H * )
[0023]
[0024]
[0025] In the formula, H * represents the output of the BiLSTM, represents vector connection, represents the output of the i-th attention head, W mh represents the weight parameter matrix to be learned;
[0026] The output of the attention head is calculated by the following formula:
[0027] Attention(k, q) = softmax(f s (k, q));
[0028]
[0029] In the formula, f s represents the scoring function for learning the semantic correlation between k i and q j , W q and W k represent the weight parameter matrices to be learned.
[0030] Furthermore, the relevant semantic graph convolutional neural network module applies GCN to the text semantic graph to model the sentence structure, aggregates the relevant semantic information near the perspective word to the perspective word, and captures the semantic information highly relevant to the perspective word, specifically as follows:
[0031] The calculation formula for updating a single node embedding is as follows:
[0032]
[0033] Among them,
[0034] c i = 1 / d i ;
[0035]
[0036] In the formula, A ij represents the weighted adjacency matrix of the sentence, d i represents the degree of node i, c i represents the normalization constant, represents the ReLU activation function, Denote the hidden vector representation of node j in the k-th layer of GCN as \(h_j^{(k)}\), and \(W^{(k)}\) (k) represents the weight parameter matrix to be learned in the k-th layer of GCN, and \(b^{(k)}\) (k) represents the weight parameter vector to be learned in the k-th layer of GCN;
[0037] The initial input of GCN is the output vector of the attention encoding module, denote the final output of node i in the k-th layer, and obtain the final vector representation \(H^{(k)}\) through GCN sem , and the calculation formula is as follows:
[0038]
[0039] Furthermore, the text syntactic information acquisition module captures the syntactic information in the text by using the neuron order information in the ON-LSTM neural network. The ON-LSTM neural network is improved based on the LSTM neural network. For to \(c_t\) t in the update process, the update process of \(c_t\) in the t-th neuron is as follows: t
[0040]
[0041]
[0042] \(w_t\) t = g t ⊙ i t ;
[0043]
[0044] In the formula, \(W^{(k)}\) g , \(U^{(k)}\) g , \(W^{(k)}\) i , \(U^{(k)}\) i , \(w_t\) t represent the weight parameter matrices to be learned in this neural network, \(b^{(k)}\) g , \(b_t\) i represent the weight parameter vectors to be learned in this neural network, \(x_t\) t represents the input of the current neuron cell, and \(h_{t-1}\) t-1 represents the output of the previous cell, is defined as follows:
[0045]
[0046] Finally, obtain the output \(H^{(k)}\) ~ .
[0047] Furthermore, the dependency syntactic graph convolutional neural network module applies GCN to the sentence dependency tree to model the sentence structure, aggregates the syntactic information near the perspective word to the perspective word, and captures the text-level information. Specifically:
[0048] The update calculation formula for a single node embedding is as follows:
[0049]
[0050] In the formula represents the adjacency matrix of the dependency tree, represents the output vector of the previous module. The dependency tree G of any sentence can be represented as an n*n adjacency matrix If there is an edge from node i to node j, then Otherwise Furthermore, each word is set to be adjacent to itself, that is Finally, the final vector representation H is obtained syn :
[0051]
[0052] Furthermore, the bidirectional mapping module projects the dependency syntactic vector into the relevant semantic vector space, projects the relevant semantic vector into the dependency syntactic vector space, exchanges the effective features of the syntactic GCN and semantic GCN modules, and then masks the hidden state vectors of non-perspective words, and retains the information in the perspective word vector through average pooling operation.
[0053] Furthermore, the bidirectional mapping module captures H by mutually projecting the dependency syntactic vector space and the relevant semantic vector space syn and H sem The similar effective features in the output representations of the two GCN modules are updated by the following algorithm:
[0054]
[0055]
[0056] In the formula, W1 and W2 represent the weight parameter matrices to be learned by the neural network, and two output matrices are obtained:
[0057]
[0058]
[0059] Select to mask the hidden state vectors of non-perspective words, and the calculation formula is as follows:
[0060] h i = 0 1≤i<t,t+m≤i≤n;
[0061]
[0062]
[0063] In the formula, t represents the position of the perspective word, m represents the length of the perspective word, and n represents the sentence length;
[0064] Then, through the average pooling operation, most of the information in the perspective word vector is retained and the two vectors are concatenated to obtain the final vector representation h a , and the calculation formula is as follows:
[0065]
[0066]
[0067] h a = g(h sem , h syn );
[0068] In the formula, g(·) represents the vector concatenation function, and f(·) represents the average pooling function.
[0069] Furthermore, the emotion category output module uses the softmax function to process the obtained text emotion feature representation, and takes the category with the highest probability as the emotion category prediction value of the text representation. The calculation formula is as follows:
[0070] y = softmax(W o h a + b o );
[0071] In the formula, y represents the emotion category prediction value, W o represents the weight parameter matrix to be learned, and b o represents the weight parameter vector to be learned.
[0072] The present invention has the following beneficial effects compared with the prior art:
[0073] The present invention can perform feature extraction on perspective-level texts, extract semantic features and syntactic features from the texts, and then identify the emotion category of the target domain text through multi-layer graph convolutional neural networks for two different tasks, which can effectively improve the efficiency and reliability of text recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 is an example in the background art of the present invention;
[0075] Figure 2 is an example diagram of dependency syntactic analysis in an embodiment of the present invention;
[0076] Figure 3 This is the schematic diagram of the system architecture of the present invention. Detailed implementation manners
[0077] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0078] Please refer to Figure 3 , the present invention provides a perspective-level text sentiment classification system based on a dual graph convolutional neural network, including
[0079] A text preprocessing module for performing feature processing on perspective-level text;
[0080] A text semantic information acquisition module for capturing the bidirectional semantic dependency relationship of the text;
[0081] An attention encoding module for capturing the global internal correlation of the text word sequence and generating a text semantic relationship graph;
[0082] A related semantic graph convolutional neural network module that applies GCN to the text semantic graph to model the sentence structure for capturing highly relevant semantic information in the text
[0083] A text syntactic information acquisition module for capturing text information based on dependency syntax;
[0084] A dependency syntax graph convolutional neural network module that directly applies GCN to the sentence dependency tree to model the sentence structure, and can spread the syntactic dependency information of the context from the opinion word to the perspective word;
[0085] A bidirectional mapping module for exchanging relevant features between semantic GCN and syntactic GCN information;
[0086] An emotion category output module that uses a classification function to obtain the final emotion classification result.
[0087] In this embodiment, preferably, each module is specifically as follows:
[0088] 1) Text preprocessing module
[0089] First, describe how the text preprocessing module obtains the initial text vector.
[0090] Since the input data of the neural network is generally a vector for end-to-end training of the model, it is necessary to vectorize the text data. For the convenience of data processing and analysis, in the data preprocessing module of the present invention, we first tokenize the source text; then, convert the text data from text form to vector form through Glove.
[0091] Then, the Stanford syntactic analyzer is used to perform dependency syntactic analysis on the sentences in the document and conduct part-of-speech tagging. Dependency syntactic analysis analyzes the words in a sentence according to the dependency relationship, and there is a certain domination (head) and dominated relationship between any two words in the sentence. The relationships between these words progress layer by layer according to the dependency relationship until the root node. Since the relationships between words are directed, the result of syntactic analysis is a directed dependency relationship graph. Part-of-speech tagging is the process of tagging each word in the word segmentation result with a correct part of speech, that is, determining whether each word is a noun, verb, adjective or other part of speech. Because words of different parts of speech contribute differently to the semantic meaning of the text. As Figure 2 shown is the result obtained by dependency syntactic analysis. The root of the tree is food, and the tags above the sentence are part-of-speech tags. For example, the adjective dreadful contributes more to the text semantics than the determiner the. The connection lines indicate the existence of a dependency relationship between words. It is generally considered that a context word closer to the perspective word should be more important than a context word farther away and play a greater role in perspective-level sentiment classification. Traditional methods usually generate position information based on the relative distance from the context word to the perspective, while the present invention obtains the position information between words according to the dependency tree. It can be seen that the distance between the perspective word service and the opinion word dreadful is very close, and the distance between the perspective word food and the opinion word great is also very close. Therefore, this tree structure is not likely to confuse the contributions of different opinion words to their corresponding perspective words, which is beneficial to perspective-level text sentiment classification. Finally, the word embedding vector obtained by Glove is concatenated with the part-of-speech tag embedding vector and the position embedding vector as the initial text vector.
[0092] 2) Text semantic information acquisition module
[0093] The following describes how the text semantic information acquisition module processes the data obtained from the previous module.
[0094] This module uses BiLSTM to extract semantic features from the text, solves the problem that the long short-term memory network (LSTM) cannot encode information from back to front, and thus better captures bidirectional semantic dependencies. The BiLSTM model is parameterized by an input gate, a forget gate, and an output gate to control the information flow in the recursive operation. For the sake of brevity, the technical details of BiLSTM are omitted below, and these details can be found in many related works. The brief operation description is as follows:
[0095]
[0096]
[0097] Where and are the word vectors wi The forward hidden state and the backward hidden state. H * is a sequence of hidden vectors, where n represents the sentence length.
[0098] 3) Attention Encoding Module
[0099] When using BiLSTM to model the text word sequence, due to the excessive length of the text sequence, it may have problems such as shortsightedness and cannot fully capture the global effective information. The multi-head attention mechanism allows the model to learn relevant information in different representation subspaces, and the self-attention mechanism is better at capturing the internal correlations of data or features. Therefore, this module adopts the multi-head self-attention mechanism to capture the global internal correlations of the text word sequence and generates a semantic score relationship graph through the semantic feature vectors output by BiLSTM. It should be noted that two independent multi-head attention mechanism modules MHA adj and MHA sem .
[0100] Specifically, the output H of the multi-head self-attention mechanism and the semantic f relationship graph A are calculated through the following formula sem and the semantic f relationship graph A sem :
[0101] H sem = MHA sem (H * , H * );
[0102] A sem = MHA adj (H * , H * )
[0103]
[0104]
[0105] In the formula, H * represents the output of BiLSTM, represents vector concatenation, represents the output of the i-th attention head, and W mh represents the weight parameter matrix to be learned;
[0106] The output of the attention head is calculated through the following formula:
[0107] Attention(k, q) = softmax(f s (k, q));
[0108]
[0109] In the formula, fs Score function representing the semantic relevance between learning k i and q j where W q and W k represent the weight parameter matrices to be learned.
[0110] 4) Related semantic graph convolutional neural network module
[0111] The related semantic graph convolutional neural network module applies GCN to the semantic relationship graph to model the sentence structure, and can aggregate the related semantic information near the perspective word to the perspective word, capturing the semantic information highly relevant to the perspective word. The semantic relationship tree can be interpreted as an undirected weighted graph G with n nodes, where the nodes represent the words in the sentence and the edges represent the weighted related paths between the words in the graph. The nodes of the semantic relationship tree in this module are the output vectors of the previous module, the attention encoding module. This structure enables GCN to directly operate on the graph to simulate the semantic relevance existing between words.
[0112] The semantic related tree G of any sentence can be represented as an n*n weighted adjacency matrix A. If there is no edge from node i to node j, then A ij = 0, otherwise A ij = v, where v represents the weight value. Furthermore, each word is set to be adjacent to itself, that is, A ii = 1. The weighted adjacency matrix is a two-dimensional symmetric matrix, and the lengths of the rows and columns are the length of the sentence.
[0113] GCN can effectively utilize the dependency path to transform and propagate the information on the path, and update the node embedding by aggregating the propagated information. In such an operation, GCN only considers the first-order neighborhood of the nodes when modeling their embeddings. However, k consecutive GCN operations result in the propagation of information within the k-order neighborhood. The update calculation formula for a single node embedding is shown as follows:
[0114]
[0115] where
[0116] c i = 1 / d i ;
[0117]
[0118] In the formula, A ij represents the weighted adjacency matrix of the sentence, d i represents the degree of node i, c i represents the normalization constant, represents the ReLU activation function, represents the hidden vector representation of node j in the k-th layer of GCN, W(k) denotes the weight parameter matrix to be learned for the k-th layer GCN, b (k) denotes the weight parameter vector to be learned for the k-th layer GCN. Note that the initial input of GCN is the output vector of the attention encoding module, denotes the final output of node i at the k-th layer, and the final vector representation H obtained through GCN sem , and the calculation formula is as follows:
[0119]
[0120] 5) Text syntactic information acquisition module
[0121] This module solves the disorder in the individual long short-term memory network (LSTM) neurons, that is, the positions of the elements in the vector in the neurons have no rules. In other words, neither LSTM nor ordinary neural networks use the order information of neurons. ON-LSTM sorts the neurons and uses this sequence to represent some specific structures, such as text syntactic structure information. For the sake of simplicity, the parts of ON-LSTM that are the same as the technical details of LSTM are omitted below. The difference from LSTM lies in to c t the update process of, c in the t-th neuron t The update process is as follows:
[0122]
[0123]
[0124] w t = g t ⊙ i t ;
[0125]
[0126] In the formula, W g , U g , W i , U i , w t denote the weight parameter matrices to be learned for this neural network, b g , b i denote the weight parameter vectors to be learned for this neural network, x t denotes the input of the current neuron cell, h t-1 denotes the output of the previous cell, is defined as follows:
[0127]
[0128] Finally, the output H is obtained~ :
[0129]
[0130] In the formula, represents the vector output of the i-th neuron in the ON-LSTM neural network.
[0131] 6) Dependency Syntactic Graph Convolutional Neural Network Module
[0132] It is basically the same as the related semantic graph convolutional neural network module. This module directly applies GCN to the sentence dependency tree to model the sentence structure, and propagates context and dependency information from the opinion word to the perspective word. The calculation formula for updating the embedding of a single node is as follows:
[0133]
[0134] The difference is that in the formula represents the adjacency matrix of the dependency tree, represents the output vector of the previous module. The dependency tree G of any sentence can be represented as an n*n adjacency matrix If there is an edge from node i to node j, then Otherwise Furthermore, each word is set to be adjacent to itself, that is Finally, the final vector representation H is obtained syn :
[0135]
[0136] 7) Bidirectional Mapping Module
[0137] This module captures the similar effective features in the H syn and H sem output representations of the two GCN modules by mutually projecting the dependency syntactic vector space and the related semantic vector space. The update algorithm is as follows:
[0138]
[0139]
[0140] In the formula, W1 and W2 represent the weight parameter matrices to be learned by this neural network, and two output matrices are obtained:
[0141]
[0142]
[0143] When extracting the final text sentiment feature representation for the classification task, we choose to mask the hidden state vectors of non-perspective words because the knowledge information near the perspective words has been aggregated to the perspective words through the above GCN module. Selecting other parts may add unnecessary noise. The calculation formula is as follows:
[0144] h i = 0 1 ≤ i < t, t + m ≤ i ≤ n;
[0145]
[0146]
[0147] In the formula, t represents the position of the perspective word, m represents the length of the perspective word, and n represents the sentence length.
[0148] Then, through the average pooling operation, most of the information in the perspective word vector is retained and the two vectors are concatenated to obtain the final vector representation h a , and the calculation formula is as follows:
[0149]
[0150]
[0151] h a = g(h sem , h syn );
[0152] In the formula, g(·) represents the vector concatenation function, and f(·) represents the average pooling function.
[0153] 8) Sentiment category output module
[0154] This module uses the softmax function to process the obtained perspective-level text sentiment feature representation h a , and takes the category with the highest probability as the sentiment category prediction value corresponding to the text representation. The calculation formula is as follows:
[0155] y = softmax(W o h a + b o );
[0156] In the formula, y represents the sentiment category prediction value, W o represents the weight parameter matrix to be learned, and b o represents the weight parameter vector to be learned.
[0157] The above are only the preferred embodiments of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention shall fall within the scope covered by the present invention.
Claims
1. A perspective-level text sentiment classification system based on a dual graph convolutional neural network, characterized in that including a text preprocessing module for featureizing perspective-level text; a text semantic information acquisition module for capturing the bidirectional semantic dependency relationship of text; an attention encoding module for capturing the global internal correlation of the text word sequence and generating a text semantic relationship graph; a related semantic graph convolutional neural network module that applies GCN to the text semantic graph to model the sentence structure for capturing highly relevant semantic information in the text a text syntactic information acquisition module for capturing text information based on dependency syntax; a dependency syntax graph convolutional neural network module that directly applies GCN to the sentence dependency tree to model the sentence structure, and can propagate the syntactic dependency information of the context from the opinion word to the perspective word; a bidirectional mapping module for exchanging the relevant features between the semantic GCN and syntactic GCN information; an emotion category output module that obtains the final emotion classification result using a classification function; The related semantic graph convolutional neural network module applies GCN to the text semantic graph to model the sentence structure, aggregates the relevant semantic information near the perspective word to the perspective word, and captures the semantic information highly relevant to the perspective word, specifically as follows: The calculation formula for updating the single-node embedding is as follows: where, c i = 1 / d i ; where, A ij represents the weighted adjacency matrix of the sentence, d i represents the degree of node i, c i represents the normalization constant, represents the ReLU activation function, represents the hidden vector representation of node j in the k-th layer GCN, W (k) represents the weight parameter matrix to be learned in the k-th layer GCN, b (k) represents the weight parameter vector to be learned in the k-th layer GCN; Initial input of GCN is the output vector of the attention encoding module, which represents the final output of node i at the k-th layer, and obtains the final vector representation H obtained through GCN sem , and the calculation formula is as follows: The dependency syntax graph convolutional neural network module applies GCN to the sentence dependency tree to model the sentence structure, aggregates the syntactic information near the perspective word to the perspective word, and captures the text-level information, specifically: The calculation formula for updating the single-node embedding is as follows: where represents the adjacency matrix of the dependency tree, and the dependency tree G of any sentence can be represented as an n*n adjacency matrix if there is an edge from node i to node j, then otherwise Furthermore, each word is set to be adjacent to itself, that is Finally, the final vector representation H is obtained syn : The bidirectional mapping module projects the dependency syntax vector into the relevant semantic vector space, projects the relevant semantic vector into the dependency syntax vector space, exchanges the effective features of the syntactic GCN and semantic GCN modules, then masks the hidden state vectors of non-perspective words, and retains the information in the perspective word vector through average pooling operation; The bidirectional mapping module captures the similar valid features in the output representations of the two GCN modules, H syn and H sem by mutually projecting the dependency syntactic vector space and the related semantic vector space. The update algorithm is as follows: In the formula, W1 and W2 represent the weight parameter matrices to be learned by the neural network, and two output matrices are obtained: Select to mask the hidden state vectors of non-perspective words, and the calculation formula is as follows: h i = 0 for 1 ≤ i < t, t + m ≤ i ≤ n; In the formula, t represents the position of the perspective word, m represents the length of the perspective word, and n represents the sentence length; Then, through the average pooling operation, most of the information in the perspective word vectors is retained and the two vectors are concatenated to obtain the final vector representation h a , and the calculation formula is as follows: h a = g(h sem , h syn ); In the formula, g(·) represents the vector concatenation function, and f(·) represents the average pooling function.
2. The perspective-level text sentiment classification system based on a dual graph convolutional neural network according to claim 1, characterized in that The text preprocessing module performs featureization processing on the perspective-level text to obtain an initial text vector, specifically: (1) Segment the source text; (2) Convert the text data from text form to vector form through Glove; (3) Use Stanford's syntactic analyzer to perform dependency syntax analysis and part-of-speech tagging on the sentences in the document; (4) Concatenate the word embedding vector obtained through Glove, the part-of-speech tag embedding vector, and the position embedding vector as the initial text vector.
3. The perspective-level text sentiment classification system based on a dual graph convolutional neural network according to claim 1, characterized in that, The attention encoding module uses a multi-head self-attention mechanism to capture the global internal correlation of the text word sequence, and generates a semantic score relationship graph through the semantic feature vector output by the text semantic information acquisition module.
4. The perspective-level text sentiment classification system based on a dual graph convolutional neural network according to claim 3, characterized in that The multi-head self-attention mechanism uses two independent multi-head attention mechanism modules MHA adj and MHA sem , specifically: Calculate the output \(H\) of the multi-head self-attention mechanism through the following formula sem And the semantic f relationship graph A sem : H sem = MHA sem (H * , H * ); A sem = MHA adj (H * , H * ) where, H * represents the output of the BiLSTM, represents vector concatenation, represents the output of the i-th attention head, and W mh represents the weight parameter matrix to be learned; Calculate the output of the attention head through the following formula: Attention(k,q) = softmax(f s (k,q)) where f s represents the scoring function for the semantic relevance between k i and q j , and W q and W k represent the weight parameter matrices to be learned.
5. The perspective-level text sentiment classification system based on the dual graph convolutional neural network according to claim 1, characterized in that The text syntactic information acquisition module uses the neuron sequence information in the ON-LSTM neural network to capture the syntactic information in the text. The ON-LSTM neural network is improved based on the LSTM neural network and for to c t the update process, the update process of c t in the t-th neuron is as follows: w t = g t ⊙ i t ; Wherein, W g , U g , W i , U i , w t represent the weight parameter matrices to be learned by the neural network, b g , b i represent the weight parameter vectors to be learned by the neural network, x t represents the input of the current neuron cell, h t-1 represents the output of the previous cell, is defined as follows: Finally obtain the output In the formula, represents the vector output of the i-th neuron in the ON-LSTM neural network.
6. The perspective-level text sentiment classification system based on a dual graph convolutional neural network according to claim 1, wherein The described emotion category output module uses the softmax function to process the obtained text emotion feature representation, and takes the category with the highest probability as the emotion category prediction value of this text representation. The calculation formula is as follows: y = softmax(W o h a + b o ); where y represents the predicted value of the emotion category, and W o represents the weight parameter matrix to be learned, and b o represents the weight parameter vector to be learned.
Citation Information
Patent Citations
Multi-head attention memory network for short text sentiment classification
CN112784532A
Graph convolutional network relationship extraction method based on multi-dependency relationship representation mechanism
CN113239186A