Sentence sentiment analysis method and device, computer device, and storage medium

By constructing syntactic and semantic feature matrices through a dual-channel approach of syntax and semantics, and combining it with a multi-layer graph convolutional network, the noise and instability problems of the syntactic dependency tree are solved, achieving more accurate and stable sentence sentiment analysis.

CN117407523BActive Publication Date: 2025-10-10SHANGHAI MENGYOU CULTURAL COMMUNICATION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311216790.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-19
Publication Date
2025-10-10
Estimated Expiration
2043-09-19

AI Technical Summary

Technical Problem

Existing technologies fail to effectively address the noise and instability of syntactic dependency trees in sentence sentiment analysis, and ignore multivariate information, resulting in inaccurate sentiment analysis.

Method used

A syntactic and semantic dual-channel method is adopted to extract syntactic and semantic features for sentiment analysis by constructing a syntactic relationship adjacency matrix and a syntactic label score adjacency matrix, combining the semantic adjacency matrix and a multi-layer graph convolutional network.

Benefits of technology

It improves the accuracy and stability of sentence sentiment analysis, avoids noise interference, and comprehensively extracts global information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117407523B_ABST
    Figure CN117407523B_ABST
Patent Text Reader

Abstract

The application relates to the field of sentiment analysis, in particular to a sentence sentiment analysis method, which comprises the following steps: obtaining a to-be-analyzed sentence and a preset sentence sentiment analysis model; inputting the to-be-analyzed sentence into an encoding module to obtain a sentence-level feature representation and a word-level feature representation; constructing a syntax relationship adjacency matrix and a syntax label score adjacency matrix of the to-be-analyzed sentence; inputting the word-level feature representation into a semantic extraction module to construct a semantic adjacency matrix; inputting the word-level feature representation, the semantic adjacency matrix, the syntax relationship adjacency matrix, the syntax label score adjacency matrix and the syntax extraction module to obtain a syntax feature representation; and inputting the syntax feature representation and the sentence-level feature representation into a sentiment analysis module to obtain a sentiment analysis result of the to-be-analyzed sentence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of sentiment analysis, and in particular to a sentence sentiment analysis method, apparatus, computer equipment, and storage medium. Background Art

[0002] Aspect-level sentiment analysis (ABSA) is a fine-grained task for predicting the sentiment polarity of different aspect words within the same sentence. The main challenge is how to construct strong dependencies between aspect words and sentiment. Recently, graph neural networks (GNNs) have become a mainstream approach for extracting syntactic dependencies from syntactic dependency trees.

[0003] Currently, the bidirectional long short-term memory network (Bi-LSTM) is used to initialize the nodes (words) of the tree, and then the extracted syntactic feature embedding is further enhanced by stacking GCN. However, these methods do not solve the noise and instability of the dependency tree itself well, and they rely too much on single information modeling while ignoring the importance of multiple information, making it impossible to accurately perform sentiment analysis on sentences. Summary of the Invention

[0004] Based on this, the purpose of the present invention is to provide a sentence sentiment analysis method, device, computer equipment and storage medium, which utilizes syntactic and semantic dual channels to simultaneously consider syntactic and semantic information, improves the extraction of global information, avoids the introduction of too much irrelevant noise, and performs sentiment analysis on sentences more comprehensively, thereby improving the accuracy and stability of sentiment analysis of sentences.

[0005] In a first aspect, an embodiment of the present application provides a sentence sentiment analysis method, comprising the following steps:

[0006] Obtaining a sentence to be analyzed and a preset sentence sentiment analysis model, wherein the sentence to be analyzed includes a plurality of words, and the sentence sentiment analysis model includes an encoding module, a semantic extraction module, a syntax extraction module, and a sentiment analysis module;

[0007] Inputting the sentence to be analyzed into the encoding module to obtain sentence-level feature representation and word-level feature representation;

[0008] Constructing a syntactic relationship adjacency matrix and a syntactic label score adjacency matrix of the sentence to be analyzed, wherein the syntactic relationship adjacency matrix includes dependency relationship vectors between a plurality of words, and the syntactic label score adjacency matrix includes dependency type score vectors between a plurality of words;

[0009] Inputting the word-level feature representation into the semantic extraction module to construct a semantic adjacency matrix, wherein the semantic adjacency matrix includes semantic weight feature vectors between a plurality of words;

[0010] inputting the word-level feature representation, the semantic adjacency matrix, the syntactic relationship adjacency matrix, and the syntactic label score adjacency matrix into the syntax extraction module to obtain a syntactic feature representation;

[0011] inputting the syntactic feature representation and the sentence-level feature representation into the sentiment analysis module to obtain a sentiment analysis result of the sentence to be analyzed.

[0012] In a second aspect, an embodiment of the present application provides a sentence sentiment analysis device, comprising:

[0013] a obtaining module configured to obtain a sentence to be analyzed and a preset sentence sentiment analysis model, wherein the sentence to be analyzed comprises a plurality of words, and the sentence sentiment analysis model comprises an encoding module, a semantic extraction module, a syntax extraction module, and a sentiment analysis module;

[0014] the encoding module is configured to input the sentence to be analyzed into the encoding module to obtain a sentence-level feature representation and a word-level feature representation;

[0015] a matrix construction module configured to construct a syntactic relationship adjacency matrix and a syntactic label score adjacency matrix of the sentence to be analyzed, wherein the syntactic relationship adjacency matrix comprises a dependency relationship vector between a plurality of words, and the syntactic label score adjacency matrix comprises a dependency type score vector between a plurality of words;

[0016] the semantic extraction module is configured to input the word-level feature representation into the semantic extraction module to construct a semantic adjacency matrix, wherein the semantic adjacency matrix comprises a semantic weight feature vector between a plurality of words;

[0017] the syntax extraction module is configured to input the word-level feature representation, the semantic adjacency matrix, the syntactic relationship adjacency matrix, and the syntactic label score adjacency matrix into the syntax extraction module to obtain a syntactic feature representation;

[0018] the sentiment analysis module is configured to input the syntactic feature representation and the sentence-level feature representation into the sentiment analysis module to obtain a sentiment analysis result of the sentence to be analyzed.

[0019] In a third aspect, an embodiment of the present application provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor; when the computer program is executed by the processor, the steps of the sentence sentiment analysis method according to the first aspect are implemented.

[0020] In a fourth aspect, an embodiment of the present application provides a storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the sentence sentiment analysis method according to the first aspect are implemented.

[0021] In an embodiment of the present application, a sentence sentiment analysis method, apparatus, computer device, and storage medium are provided, which utilize syntactic and semantic dual channels to simultaneously consider syntactic and semantic information, thereby improving the extraction of global information, avoiding the introduction of excessive irrelevant noise, and performing more comprehensive sentiment analysis on sentences, thereby improving the accuracy and stability of the sentiment analysis of sentences.

[0022] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A flowchart of a sentence sentiment analysis method provided in one embodiment of the present application;

[0024] Figure 2 A schematic diagram of the process of S3 in the sentence sentiment analysis method provided in one embodiment of the present application;

[0025] Figure 3 A schematic diagram of the process of S4 in the sentence sentiment analysis method provided in one embodiment of the present application;

[0026] Figure 4 A flowchart of S5 in the sentence sentiment analysis method provided in one embodiment of the present application;

[0027] Figure 5 A schematic diagram of the process of S6 in the sentence sentiment analysis method provided in one embodiment of the present application;

[0028] Figure 6 A schematic diagram of the flow of S7 in the sentence sentiment analysis method provided in one embodiment of the present application;

[0029] Figure 7 A schematic diagram of the flow of S7 in the sentence sentiment analysis method provided in another embodiment of the present application;

[0030] Figure 8 A schematic diagram of the structure of a sentence sentiment analysis device provided in one embodiment of the present application;

[0031] Figure 9 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0032] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0033] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0034] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words "if" / "if" as used herein may be interpreted as "at the time of" or "when" or "in response to a determination."

[0035] See also Figure 1 , Figure 1 A flowchart of a sentence sentiment analysis method provided in one embodiment of the present application is provided, wherein the method comprises the following steps:

[0036] S1: Obtain the sentence to be analyzed and the preset sentence sentiment analysis model.

[0037] The execution subject of the sentence sentiment analysis method is an analysis device of the sentence sentiment analysis method (hereinafter referred to as the analysis device). In an optional embodiment, the analysis device can be a computer device, a server, or a server cluster composed of multiple computer devices.

[0038] In this embodiment, the analysis device may obtain a sentence to be analyzed input by a user, wherein the sentence to be analyzed includes a number of words and attribute words, and the sentence representation of the sentence to be analyzed is:

[0039] X=[w1,..,w a ,…,w a+m-1 ,…,w n ]

[0040] In the formula, X is a sentence representation of the sentence to be analyzed, including a vector w corresponding to n words n and a vector w corresponding to an attribute word composed of m-1 words a+m-1 .

[0041] The analysis device obtains a preset sentiment analysis model, wherein the sentence sentiment analysis model includes an encoding module, a semantic extraction module, a syntax extraction module, and a sentiment analysis module, the encoding module is configured to extract word embedding features of words in the sentence to be analyzed, the semantic extraction module is configured to extract semantic feature information of the extracted sentence to be analyzed, the syntax extraction module is configured to extract semantic feature information of the extracted sentence to be analyzed, and the sentiment analysis module is configured to perform sentiment analysis according to the obtained semantic feature information and syntax feature.

[0042] S2: input the sentence to be analyzed into the encoding module to obtain a sentence-level feature representation and a word-level feature representation.

[0043] The encoding module can use a BERT (Bidirectional Encoder Representation from Transformers) model or a GloVe model. In this embodiment, the analysis device inputs the sentence to be analyzed into the encoding module to obtain a sentence-level feature representation and a word-level feature representation, wherein the sentence-level feature representation embodies the context information of the sentence, and the word-level feature representation embodies the label information of the sentence, and the details are as follows:

[0044] {h CLS ,H X ,H A}=BERT(CLS,X,SEP,A,SEP)

[0045] In the formula, h CLS is a sentence-level feature representation, H X is a word-level feature representation, and H A is an attribute word-level feature representation, BERT() is a word embedding function, CLS and SEP are interval symbols in the BERT model, and A is an attribute word representation of the sentence to be analyzed, A=[w a ,…,w a+m-1 ].

[0046] S3: construct a syntax relationship adjacency matrix and a syntax tag score adjacency matrix of the sentence to be analyzed.

[0047] In this embodiment, the analysis device constructs a syntax relationship adjacency matrix A S and a syntax tag score adjacency matrix A LS, wherein the syntactic relationship adjacency matrix includes dependency relationship vectors between a number of words, and the syntactic label score adjacency matrix includes dependency type score vectors between a number of words.

[0048] See also Figure 2 , Figure 2 The flowchart of S3 in the sentence sentiment analysis method provided in one embodiment of the present application includes steps S31 to S33, which are specifically as follows:

[0049] S31: Constructing a dependency graph of the sentence to be analyzed.

[0050] In this embodiment, the analysis device obtains an initial dependency tree, which includes several nodes, and sets several words of the sentence to be analyzed on the nodes of the initial dependency tree respectively to construct a dependency graph of the sentence to be analyzed, wherein the dependency graph includes nodes corresponding to several words.

[0051] S32: Obtain dependency relationship information and dependency type information of the sentence to be analyzed.

[0052] In this embodiment, the analysis device uses the spacy toolkit to perform dependency analysis on the sentence to be analyzed to obtain dependency relationship information and dependency type information of the sentence to be analyzed, wherein the dependency relationship information is used to indicate the dependency relationship between words in the sentence to be analyzed, and the dependency type information is used to indicate the dependency type between words in the sentence to be analyzed.

[0053] S33: According to the dependency relationship information and dependency type label information of the sentence to be analyzed, the dependency graph of the sentence to be analyzed is converted into a syntactic relationship adjacency matrix and a syntactic type adjacency matrix respectively; according to the syntactic type adjacency matrix and a preset matrix conversion algorithm, the syntactic label score adjacency matrix is ​​obtained.

[0054] In this embodiment, for the syntactic relationship adjacency matrix, the analysis device converts the dependency graph of the sentence to be analyzed into a syntactic relationship adjacency matrix A according to the dependency relationship information of the sentence to be analyzed. S , wherein the value of the dependency vector in the syntactic relationship adjacency matrix is ​​1 or 0, 1 indicates that there is a dependency relationship between the corresponding words, and 0 indicates that there is no dependency relationship between the corresponding words.

[0055] For the syntactic relationship adjacency matrix, the analysis device forms a dictionary R of all dependency types in the corpus according to the preset corpus. The dictionary R can map the dependency types between each word in the dependency type information to the corresponding index numbers, construct the dependency type label information of the sentence to be analyzed, and convert the dependency graph of the sentence to be analyzed into the syntactic type adjacency matrix A according to the dependency type label information of the sentence to be analyzed. L , wherein the syntactic type adjacency matrix includes dependency type vectors between a number of words.

[0056] The analysis device maps the syntactic labels to a unified feature space through the syntactic type adjacency matrix and the preset matrix conversion algorithm, and uses the parameter matrix to learn the importance scores of different labels in the feature space to construct the syntactic label score adjacency matrix A. LS , wherein the matrix conversion algorithm is:

[0057] A LS =emb(A L )W L W S

[0058] Where A LS is the syntactic tag score adjacency matrix, emb() is the mapping function, A L is the syntactic type adjacency matrix, W L is the first weight parameter matrix, W s is the second weight parameter matrix.

[0059] S4: Input the word-level feature representation into the semantic extraction module to construct a semantic adjacency matrix.

[0060] In this embodiment, the analysis device inputs the word-level feature representation into the semantic extraction module to construct a semantic adjacency matrix, wherein the semantic adjacency matrix includes semantic weight feature vectors between a number of words.

[0061] See also Figure 3 , Figure 3 The flowchart of S4 in the sentence sentiment analysis method provided in one embodiment of the present application includes steps S41 to S42, which are specifically as follows:

[0062] S41: Construct a multi-head self-attention feature representation based on the word-level feature representation and the preset multi-head self-attention algorithm.

[0063] The multi-head self-attention algorithm is:

[0064]

[0065] Where, head i is the attention score of the i-th attention head, H X is the word-level feature representation, W i 1 is the first weight parameter matrix of the i-th attention head, W i 2 is the second weight parameter matrix of the i-th attention head, T is the transpose symbol, d head is the dimension parameter.

[0066] Since the same syntactic relationship type has different importance in different contexts, in this embodiment, the analysis device constructs a multi-head self-attention feature representation based on the word-level feature representation and a preset multi-head self-attention algorithm, wherein the multi-head self-attention feature representation includes feature vectors of several attention heads.

[0067] S42: Construct the semantic adjacency matrix according to the multi-head self-attention feature representation and the preset semantic adjacency matrix construction algorithm.

[0068] The semantic adjacency matrix construction algorithm is:

[0069] A W =Norn(Concat(head1,head2,…,head h )·W head )

[0070] Where A W is the semantic adjacency matrix, Norn() is the normalization function, Concat() is the concatenation function, head h is the attention score of the h-th attention head, W head is the third weight parameter matrix of the semantic extraction module.

[0071] In this embodiment, the analysis device uses the multi-head self-attention feature representation and a preset semantic adjacency matrix construction algorithm to learn word-level feature representations using a multi-head attention mechanism, fully considers the semantic relationship between words, constructs a semantic adjacency matrix based on the attention scores of each attention head, and weights the attention scores to varying degrees based on different semantic information to obtain semantic weight feature vectors between each word and construct the semantic adjacency matrix. This allows for better extraction of the semantic information of the sentence to be analyzed, thereby more accurately performing sentiment analysis on the sentence to be analyzed.

[0072] S5: Input the word-level feature representation, semantic adjacency matrix, syntactic relationship adjacency matrix and syntactic label score adjacency matrix into the syntax extraction module to obtain syntactic feature representation.

[0073] In this embodiment, the analysis device inputs the word-level feature representation, the semantic adjacency matrix, the syntactic relationship adjacency matrix, and the syntactic tag score adjacency matrix into the syntax extraction module to obtain the syntactic feature representation.

[0074] The syntax extraction module includes a multi-layer graph convolutional network; see Figure 4 , Figure 4 The flowchart of S5 in the sentence sentiment analysis method provided in one embodiment of the present application includes steps S51 to S52, which are specifically as follows:

[0075] S51: Constructing a global information adjacency matrix according to the semantic adjacency matrix, the syntactic relationship adjacency matrix, the syntactic label score adjacency matrix and a preset matrix fusion algorithm.

[0076] The matrix fusion algorithm is:

[0077] A WL =A S ⊙A W ⊙A LS

[0078] Where A WL is the global information adjacency matrix, A S is the syntactic relation adjacency matrix, A LS Score adjacency matrix for syntactic labels.

[0079] In this embodiment, the analysis device constructs a global information adjacency matrix based on the semantic adjacency matrix, the syntactic relationship adjacency matrix, the syntactic tag score adjacency matrix and a preset matrix fusion algorithm, wherein the global information adjacency matrix includes global information feature vectors between several words.

[0080] S52: Input the word-level feature representation and the global information adjacency matrix into the multi-layer graph convolutional network, and obtain the syntactic feature representation according to a preset syntactic feature algorithm.

[0081] The syntactic feature algorithm is:

[0082]

[0083] Where, is the word-level feature vector of the i-th word output by the l-th layer of the multi-layer graph convolutional network, σ() is the activation function, is the global information feature vector between the i-th word and the j-th word, is the weight parameter matrix of the lth layer of the multi-layer graph convolutional network, is the syntactic feature vector of the jth word output by the lth layer of the multi-layer graph convolutional network, is the bias parameter of the lth layer of the multi-layer graph convolutional network.

[0084] In this embodiment, the analysis device inputs the word-level feature representation and the global information adjacency matrix into the multi-layer graph convolutional network and, based on a preset syntactic feature algorithm, obtains the syntactic feature representation, which includes syntactic feature vectors for a number of words. This fully utilizes two different types of information in dependency syntactic relationships: connecting edges and relationship types, to more comprehensively extract the syntactic features of sentences for sentiment analysis, thereby improving the accuracy and stability of sentiment analysis.

[0085] S6: Input the syntactic feature representation and the sentence-level feature representation into the sentiment analysis module to obtain a sentiment analysis result of the sentence to be analyzed.

[0086] In this embodiment, the analysis device inputs the syntactic feature representation and the sentence-level feature representation into the sentiment analysis module to obtain a sentiment analysis result of the sentence to be analyzed.

[0087] See also Figure 5 , Figure 5 The flowchart of S6 in the sentence sentiment analysis method provided in one embodiment of the present application includes steps S61 to S62, which are specifically as follows:

[0088] S61: performing pooling processing on the syntactic feature representation to obtain a pooled syntactic feature representation, and obtaining a spliced ​​feature representation based on the pooled syntactic feature representation, a sentence-level feature representation, and a preset splicing algorithm.

[0089] The splicing algorithm is:

[0090]

[0091] Where, is the splicing feature representation, h out is the syntactic feature representation after the pooling process, h cls It is a sentence-level feature representation.

[0092] In this embodiment, the analysis device performs pooling processing on the syntactic feature representation to obtain the pooled syntactic feature representation, and obtains the spliced ​​feature representation based on the pooled syntactic feature representation, the sentence feature representation and a preset splicing algorithm.

[0093] S62: According to the splicing feature representation and the preset sentiment analysis algorithm, obtain the sentiment classification polarity probability distribution vector, obtain the sentiment polarity corresponding to the dimension with the largest probability according to the sentiment classification polarity probability distribution vector, and use the sentiment polarity as the sentiment analysis result of the sentence to be analyzed.

[0094] The sentiment analysis algorithm is:

[0095]

[0096] Where y is the probability distribution vector of the sentiment classification polarity, softmax() is the normalized activation function, and W o is the weight parameter matrix of the sentiment analysis module, b o is the bias parameter of the sentiment analysis module.

[0097] In this embodiment, the analysis device obtains a sentiment classification polarity probability distribution vector based on the splicing feature representation and a preset sentiment analysis algorithm, obtains the sentiment polarity corresponding to the dimension with the highest probability based on the sentiment classification polarity probability distribution vector, and uses the sentiment polarity as the sentiment analysis result of the sentence to be analyzed. Specifically, when y = [y positive, y negative, y neutral] = [0.1, 0.7, 0.2] is calculated, the highest probability is y negative, and the sentiment polarity corresponding to the dimension with the highest probability is negative, and the sentiment polarity is used as the sentiment analysis result of the sentence to be analyzed.

[0098] In an optional embodiment, the method further includes step S7: training the sentence sentiment analysis model. Figure 6 , Figure 6 The flowchart of S7 in the sentence sentiment analysis method provided in one embodiment of the present application includes steps S71 to S74, which are specifically as follows:

[0099] S71: Obtain a training sentence set and sentence emotion label data of the training sentence set.

[0100] In this embodiment, the analysis device obtains a training sentence set and sentence emotion label data of the training sentence set, wherein the training sentence set includes several training sentences, the training sentences include sample sentences and enhanced sentences corresponding to the sample sentences, and the sample sentences and enhanced sentences each include several words; the sentence emotion label data includes the emotion polarity of each of the training sentences.

[0101] Specifically, the analysis device can obtain several training sentences input by the user, and generate sentences with the same sentiment polarity as each of the training sentences through data enhancement methods such as synonym replacement and random noise insertion, as the enhanced sentences, wherein synonym replacement refers to randomly extracting some words from the sentence and replacing them with synonyms in WordNet, and noise insertion refers to adding additional information such as other attribute words and neutral sentiment words to the sentence.

[0102] S72: Input the training sentence set into the sentence encoding module in the sentence sentiment analysis model to be trained to obtain sentence feature representations and sentence-level feature representations of several training sentences.

[0103] In this embodiment, the analysis device inputs the training sentence set into the sentence encoding module in the sentence sentiment analysis model to be trained to obtain sentence feature representations and sentence-level feature representations of several of the training sentences. For specific embodiments, please refer to the specific content of step S2, which will not be repeated here.

[0104] S73: Constructing a plurality of comparison sentence sets of the training sentences according to the sentence sentiment label data, and obtaining a sentence-level feature representation set corresponding to each comparison sentence set of the training sentences.

[0105] In this embodiment, the analysis device combines other training sentences with the same emotional polarity as the training sentence according to the sentence emotional label data to construct a comparison sentence set of several training sentences, wherein the comparison sentence set is:

[0106] P all =[P1,P2,…,P 2k ], P i ={p:p∈I,(y p =y i )∧(p≠i)}

[0107] Where, P all is the total set of contrasting sentences, P 2k is the comparison sentence set of the 2kth training sentence, P i is the comparison sentence set of the i-th training sentence, p represents the comparison sentence in the comparison sentence set, I is the index set of the training sentence I = [1, 2, ..., 2k], y p Indicates the sentiment polarity of the contrasting sentences in the contrasting sentence set, y i is the sentiment polarity of the i-th training sentence.

[0108] The analysis device constructs a sentence-level feature representation set corresponding to a comparison sentence set of each of the training sentences based on the sentence-level feature representations of several of the training sentences, wherein the comparison sentence set includes several comparison sentences, and the comparison sentences are other training sentences with the same emotional polarity as the training sentences, and the sentence-level feature representation set includes the sentence-level feature representations of several of the comparison sentences.

[0109] S74: Training the sentence sentiment analysis model according to a sentence-level feature representation set corresponding to a comparison sentence set of several training sentences and a preset first loss function.

[0110] The first loss function is:

[0111]

[0112] Where, L ECL is the first loss value, 2k is the number of training sentences, P i is the comparison sentence set of the i-th training sentence, p represents the comparison sentence in the comparison sentence set, k∈I / i, I is the index set of training sentences I=[1,2,…,2k], I / i represents the index set after removing the i-th training sentence in I, is the sentence-level feature representation of the i-th training sentence, is the sentence-level feature representation of the p-th contrast sentence in the contrast sentence set, is the sentence-level feature representation of the kth comparison sentence in the comparison sentence set, and τ is the first temperature coefficient.

[0113] In this embodiment, the analysis device trains the sentence sentiment analysis model based on a sentence feature representation set corresponding to a comparison sentence set of several training sentences and a preset first loss function, thereby enhancing the ability of the sentence sentiment analysis model to extract sentence-level feature representations of rich semantic information, enabling it to bring sentence-level feature representations of the same sentiment polarity closer together, and distinguish sentence-level feature representations of different sentiment polarities from each other, thereby improving the utilization of contextual information and label information, and improving the accuracy of sentence sentiment analysis of the sentence sentiment analysis model.

[0114] See also Figure 7 , Figure 7 The flowchart of S7 in the sentence sentiment analysis method provided in another embodiment of the present application further includes steps S75 to S78, which are specifically as follows:

[0115] S75: Constructing a syntactic relationship adjacency matrix and a syntactic type adjacency matrix for each of the training sentences, and obtaining a plurality of training word pairs according to the dependency relationship vectors between words in the syntactic relationship adjacency matrix for each of the training sentences.

[0116] In this embodiment, the analysis device constructs a syntactic relationship adjacency matrix and a syntactic label score adjacency matrix for each of the training sentences. For specific embodiments, reference may be made to the specific contents of steps S31 to S32, which will not be repeated here.

[0117] The analysis device uses the dependency vector between words in the syntactic relationship adjacency matrix of each training sentence as the training word pair if the value of the dependency vector is 1, and obtains several training word pairs, wherein the training word pairs are word pairs with dependency relationships.

[0118] S76: Constructing a comparison word pair set for each of the training word pairs according to the dependency type vectors between words in the syntactic type adjacency matrix of each of the training sentences.

[0119] In this embodiment, the analysis device combines word pairs with the same dependency type vectors according to the dependency type vectors between words in the syntactic type adjacency matrix of each of the training sentences, and constructs a comparison word pair set for each of the training word pairs, wherein the comparison word pair set includes several comparison word pairs, and the comparison word pairs are other training word pairs with the same dependency type as the training word pairs.

[0120] S77: Based on the word-level feature representation of each of the training sentences, obtain the word-level feature representation of several of the training word pairs; based on the word-level feature representation of each of the training word pairs and a preset semantic feature algorithm, obtain the semantic feature representation of each of the training word pairs.

[0121] The semantic feature algorithm is:

[0122]

[0123] Where g i is the semantic feature representation of the i-th training word pair, X i ′[1]、X i ′[2] are the word-level feature vectors of the first and second words in the i-th training word pair, are the third weight parameter matrix, the fourth weight parameter matrix and the fifth weight parameter matrix, b cl is the second bias parameter.

[0124] In this embodiment, the analysis device obtains word-level feature representations of several training word pairs based on the word-level feature representations of each training sentence, and obtains semantic feature representations of each training word pair based on the word-level feature representations of each training word pair and a preset semantic feature algorithm, so that the word-level feature representations of the training word pairs are mapped into higher-level semantic feature representations as training data, so that it can make full use of the semantic information in the sentence and improve the accuracy of training.

[0125] S78: Based on the semantic feature representation of each of the training word pairs, construct the semantic feature representation of each of the contrasting word pairs in the contrasting word pair set of each of the training word pairs, and train the sentence sentiment analysis model based on the semantic feature representation of each of the contrasting word pairs and a preset second loss function.

[0126] The second loss function is:

[0127]

[0128] Where, L Lcl is the second loss value, K′ is the number of training word pairs, P i ′ is the contrast word pair set of the i-th training word pair, p′ represents the contrast word pair in the contrast word pair set, I′ is the index set of training word pairs I′=[1,2,…,K′], I′ / i represents the index set after removing the i-th training word pair in I′, g p ′ is the semantic feature representation of the p′th contrasting word pair in the contrasting word pair set, g k ′ is the semantic feature representation of the k′th contrasting word pair in the contrasting word pair set, τ ′ is the second temperature coefficient.

[0129] In this embodiment, the analysis device trains the sentence sentiment analysis model based on the semantic feature representations of the words in each of the training word pairs and the corresponding comparison word pair set, and a preset second loss function. By mapping the word-level feature representations of the training word pairs into higher-level semantic feature representations for training the sentence sentiment analysis model, the sentence sentiment analysis model is trained to improve its ability to understand different types of labels in dependency syntactic relationships, thereby improving the accuracy of the sentence sentiment analysis performed by the sentence sentiment analysis model.

[0130] Please refer to Figure 8 , Figure 8 This is a schematic diagram of the structure of a sentence sentiment analysis device provided in one embodiment of the present application. The device can implement all or part of the sentence sentiment analysis device through software, hardware, or a combination of both. The device 9 includes:

[0131] An acquisition module 81 is configured to obtain a sentence to be analyzed and a preset sentence sentiment analysis model, wherein the sentence to be analyzed includes a plurality of words, and the sentence sentiment analysis model includes an encoding module, a semantic extraction module, a syntax extraction module, and a sentiment analysis module;

[0132] An encoding module 82 is configured to input the sentence to be analyzed into the encoding module to obtain sentence-level feature representation and word-level feature representation;

[0133] A matrix construction module 83 is used to construct a syntactic relationship adjacency matrix and a syntactic label score adjacency matrix of the sentence to be analyzed, wherein the syntactic relationship adjacency matrix includes dependency relationship vectors between a plurality of words, and the syntactic label score adjacency matrix includes dependency type score vectors between a plurality of words;

[0134] A semantic extraction module 84 is configured to input the word-level feature representation into the semantic extraction module to construct a semantic adjacency matrix, wherein the semantic adjacency matrix includes semantic weight feature vectors between a plurality of words;

[0135] A syntax extraction module 85 is configured to input the word-level feature representation, the semantic adjacency matrix, the syntactic relationship adjacency matrix, and the syntactic label score adjacency matrix into the syntax extraction module to obtain a syntactic feature representation;

[0136] The sentiment analysis module 86 is used to input the syntactic feature representation and the sentence-level feature representation into the sentiment analysis module to obtain the sentiment analysis result of the sentence to be analyzed.

[0137] In the embodiment of the present application, the sentence to be analyzed and a preset sentence sentiment analysis model are obtained by the acquisition module, wherein the sentence to be analyzed includes a plurality of words, and the sentence sentiment analysis model includes an encoding module, a semantic extraction module, a syntax extraction module and a sentiment analysis module; the sentence to be analyzed is input into the encoding module by the encoding module to obtain sentence-level feature representation and word-level feature representation; the syntax relationship adjacency matrix and the syntax label score adjacency matrix of the sentence to be analyzed are constructed by the matrix construction module, wherein the syntax relationship adjacency matrix includes a dependency relationship vector between a plurality of words, and the syntax label score adjacency matrix includes a dependency type score vector between a plurality of words; the word-level feature representation is input into the semantic extraction module by the semantic extraction module to construct a semantic adjacency matrix, wherein the semantic adjacency matrix includes a semantic weight feature vector between a plurality of words; the word-level feature representation, the semantic adjacency matrix, the syntax relationship adjacency matrix and the syntax label score adjacency matrix are input into the syntax extraction module by the syntax extraction module to obtain syntax feature representation; and the syntax feature representation and the sentence-level feature representation are input into the sentiment analysis module by the sentiment analysis module to obtain the sentiment analysis result of the sentence to be analyzed. The syntax and semantic dual channels are used to simultaneously consider syntax and semantic information, improve the extraction of global information, avoid the introduction of too much irrelevant noise, more comprehensively perform sentiment analysis on the sentence, and thus improve the accuracy and stability of the sentiment analysis of the sentence.

[0138] Please refer to Figure 9 , Figure 9 The structural schematic diagram of the computer device provided in an embodiment of the present application includes a processor 91, a memory 92, and a computer program 93 stored in the memory 92 and executable on the processor 91; the computer device can store a plurality of instructions, the instructions are suitable for being loaded by the processor 91 and executing the method steps shown in the above Figures 1 to 7 , and the specific execution process can be referred to the specific description shown in Figures 1 to 7 , which will not be described here in detail.

[0139] The processor 91 can include one or more processing cores. The processor 91 connects various parts within the server by running or executing instructions, programs, code sets or instruction sets stored in the memory 92, and calling data in the memory 92, to perform various functions and process data of the sentence sentiment analysis device 8. Optionally, the processor 91 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programable logic array (PLA). The processor 91 can be integrated with one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU is mainly used to process operating systems, user interfaces, and application programs; the GPU is used to render and draw the content to be displayed on the touch display screen; and the modem is used to process wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 91, but can be realized by a separate chip.

[0140] The memory 92 can include a random access memory (RAM) and a read-only memory (ROM). Optionally, the memory 92 includes a non-transitory computer-readable storage medium. The memory 92 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 92 can include a program storage area and a data storage area, wherein the program storage area can store instructions for implementing an operating system, instructions for at least one function (such as touch instructions, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area can store data involved in the above-mentioned various method embodiments, etc. The memory 92 can also be at least one storage device located away from the above-mentioned processor 91.

[0141] The embodiments of the present application also provide a storage medium, which can store a plurality of instructions. The instructions are suitable for being loaded and executed by a processor to perform the above-mentioned method steps. Figures 1 to 7 The specific execution process can be referred to the specific description of the above-mentioned method steps, and will not be described here. Figures 1 to 7

[0142] ​Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0143] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0144] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraint algorithm of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0145] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0146] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0147] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.

[0148] The integrated module / unit, if realized in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. The computer program can implement the steps of each method embodiment when executed by a processor. The computer program includes computer program code, which can be in the form of source code, object code, an executable file, or some intermediate form.

[0149] The present application is not limited to the above-described embodiments, and various modifications or changes can be made to the present application without departing from the spirit and scope of the present application. Therefore, it is intended that the present application include all such modifications and changes that fall within the scope of the claims and their equivalents.

Claims

1. A sentence sentiment analysis method, characterized in that: The following steps are involved: Obtaining a sentence to be analyzed and a preset sentence sentiment analysis model, wherein the sentence to be analyzed includes a plurality of words, and the sentence sentiment analysis model includes an encoding module, a semantic extraction module, a syntax extraction module, and a sentiment analysis module; Inputting the sentence to be analyzed into the encoding module to obtain sentence-level feature representation and word-level feature representation; Constructing a syntactic relationship adjacency matrix and a syntactic label score adjacency matrix of the sentence to be analyzed, wherein the syntactic relationship adjacency matrix includes dependency relationship vectors between a plurality of words, and the syntactic label score adjacency matrix includes dependency type score vectors between a plurality of words; Inputting the word-level feature representation into the semantic extraction module to construct a semantic adjacency matrix, wherein the semantic adjacency matrix includes semantic weight feature vectors between a plurality of words; Inputting the word-level feature representation, the semantic adjacency matrix, the syntactic relationship adjacency matrix, and the syntactic label score adjacency matrix into the syntax extraction module to obtain a syntactic feature representation; The syntactic feature representation and the sentence-level feature representation are input into the sentiment analysis module to obtain the sentiment analysis result of the sentence to be analyzed.

2. The sentence sentiment analysis method according to claim 1, characterized in that The step of constructing a syntactic relationship adjacency matrix and a syntactic label score adjacency matrix of the sentence to be analyzed comprises the following steps: Constructing a dependency graph of the sentence to be analyzed, wherein the dependency graph includes nodes corresponding to a plurality of words; Obtaining dependency relationship information and dependency type information of the sentence to be analyzed, wherein the dependency relationship information is used to indicate the dependency relationship between words in the sentence to be analyzed, and the dependency type information is used to indicate the dependency type between words in the sentence to be analyzed; According to the dependency relationship information and dependency type label information of the sentence to be analyzed, the dependency graph of the sentence to be analyzed is converted into a syntactic relationship adjacency matrix and a syntactic type adjacency matrix respectively. According to the syntactic type adjacency matrix and a preset matrix conversion algorithm, the syntactic label score adjacency matrix is ​​obtained, wherein the matrix conversion algorithm is: A LS =emb(A L )W L W S Where A LS is the syntactic tag score adjacency matrix, emb() is the mapping function, A L is the syntactic type adjacency matrix, W L is the first weight parameter matrix, W s is the second weight parameter matrix.

3. The sentence sentiment analysis method according to claim 2, characterized in that The step of inputting the word-level feature representation into the semantic extraction module to construct a semantic adjacency matrix comprises the following steps: According to the word-level feature representation and the preset multi-head self-attention algorithm, a multi-head self-attention feature representation is constructed, wherein the multi-head self-attention feature representation includes feature vectors of several attention heads, and the multi-head self-attention algorithm is: Where, head i is the attention score of the i-th attention head, H X is the word-level feature representation, is the first weight parameter matrix of the i-th attention head, is the second weight parameter matrix of the i-th attention head, T is the transpose symbol, d head is the dimension parameter; The semantic adjacency matrix is ​​constructed according to the multi-head self-attention feature representation and the preset semantic adjacency matrix construction algorithm, wherein the semantic adjacency matrix construction algorithm is: A W =Norn(Concat(head1,head2,…,head h )·W head ) Where A W is the semantic adjacency matrix, Norn() is the normalization function, Concat() is the concatenation function, head h is the attention score of the h-th attention head, W head is the third weight parameter matrix of the semantic extraction module.

4. The sentence sentiment analysis method according to claim 3, characterized in that: The syntax extraction module includes a multi-layer graph convolutional network; The word-level feature representation, the semantic adjacency matrix, the syntactic relationship adjacency matrix, and the syntactic label score adjacency matrix are input into the syntax extraction module to obtain the syntactic feature representation, comprising the steps of: A global information adjacency matrix is ​​constructed based on the semantic adjacency matrix, the syntactic relationship adjacency matrix, the syntactic label score adjacency matrix, and a preset matrix fusion algorithm, wherein the global information adjacency matrix includes global information feature vectors between a plurality of words, and the matrix fusion algorithm is: A WL =A S ⊙A W ⊙A LS Where A WL is the global information adjacency matrix, A S is the syntactic relation adjacency matrix, A LS Score adjacency matrix for syntactic labels; The word-level feature representation and the global information adjacency matrix are input into the multi-layer graph convolutional network, and the syntactic feature representation is obtained according to a preset syntactic feature algorithm, wherein the syntactic feature representation includes syntactic feature vectors of several words, and the syntactic feature algorithm is: Where, is the word-level feature vector of the i-th word output by the l-th layer of the multi-layer graph convolutional network, σ() is the activation function, is the global information feature vector between the i-th word and the j-th word, is the weight parameter matrix of the lth layer of the multi-layer graph convolutional network is the syntactic feature vector of the jth word output by the lth layer of the multi-layer graph convolutional network, is the bias parameter of the lth layer of the multi-layer graph convolutional network.

5. The sentence sentiment analysis method according to claim 4, characterized in that The step of inputting the syntactic feature representation and the sentence-level feature representation into the sentiment analysis module to obtain the sentiment analysis result of the sentence to be analyzed comprises the following steps: The syntactic feature representation is pooled to obtain a pooled syntactic feature representation, and a spliced ​​feature representation is obtained according to the pooled syntactic feature representation, the sentence-level feature representation, and a preset splicing algorithm, wherein the splicing algorithm is: Where, is the splicing feature representation, h out is the syntactic feature representation after the pooling process, h cls It is a sentence-level feature representation; According to the splicing feature representation and the preset sentiment analysis algorithm, a sentiment classification polarity probability distribution vector is obtained. According to the sentiment classification polarity probability distribution vector, the sentiment polarity corresponding to the dimension with the maximum probability is obtained, and the sentiment polarity is used as the sentiment analysis result of the sentence to be analyzed, wherein the sentiment analysis algorithm is: Where y is the probability distribution vector of the sentiment classification polarity, softmax() is the normalized activation function, and W o is the weight parameter matrix of the sentiment analysis module, b o is the bias parameter of the sentiment analysis module.

6. The sentence sentiment analysis method according to claim 5, characterized in that: The method further comprises the steps of: training the sentence sentiment analysis model, wherein the training of the sentence sentiment analysis model comprises the steps of: Obtaining a training sentence set and sentence emotion label data of the training sentence set, wherein the training sentence set includes a plurality of training sentences, the training sentences include sample sentences and enhanced sentences corresponding to the sample sentences, the sample sentences and the enhanced sentences each include a plurality of words; the sentence emotion label data includes the emotion polarity of each of the training sentences; Inputting the training sentence set into a sentence encoding module in a sentence sentiment analysis model to be trained to obtain sentence-level feature representations and word-level feature representations of a plurality of the training sentences; According to the sentence sentiment label data, constructing a plurality of comparison sentence sets of the training sentences, and obtaining a sentence-level feature representation set corresponding to each comparison sentence set of the training sentences, wherein the comparison sentence set includes a plurality of comparison sentences, each of which is other training sentences having the same sentiment polarity as the training sentence, and the sentence-level feature representation set includes sentence-level feature representations of the plurality of comparison sentences; The sentence sentiment analysis model is trained according to a sentence-level feature representation set corresponding to a comparison sentence set of a plurality of the training sentences and a preset first loss function, wherein the first loss function is: Where, L ECL is the first loss value, 2k is the number of training sentences, P i is the comparison sentence set of the i-th training sentence, p represents the comparison sentence in the comparison sentence set, k∈I / i, I is the index set of training sentences I=[1,2,…,2k], I / i represents the index set after removing the i-th training sentence in I, is the sentence-level feature representation of the i-th training sentence, is the sentence-level feature representation of the p-th contrast sentence in the contrast sentence set, is the sentence-level feature representation of the kth comparison sentence in the comparison sentence set, and τ is the first temperature coefficient.

7. The sentence sentiment analysis method according to claim 6, characterized in that The training of the sentence sentiment analysis model comprises the steps of: Constructing a syntactic relationship adjacency matrix and a syntactic type adjacency matrix for each of the training sentences, and obtaining a plurality of training word pairs according to dependency relationship vectors between words in the syntactic relationship adjacency matrix of each of the training sentences, wherein the training word pairs are word pairs with dependency relationships; Constructing a comparison word pair set for each of the training word pairs according to the dependency type vectors between words in the syntactic type adjacency matrix of each of the training sentences, wherein the comparison word pair set includes a plurality of comparison word pairs, each of which is another training word pair having the same dependency type as the training word pair; According to the word-level feature representation of each training sentence, word-level feature representations of several training word pairs are obtained; according to the word-level feature representation of each training word pair and a preset semantic feature algorithm, semantic feature representations of each training word pair are obtained, wherein the word-level feature representation includes word-level feature vectors of several words, and the semantic feature algorithm is: Where g i is the semantic feature representation of the i-th training word pair, X′ i [1] X′ i [2] are the word-level feature vectors of the first and second words in the i-th training word pair, are the third weight parameter matrix, the fourth weight parameter matrix and the fifth weight parameter matrix, b cl is the second bias parameter; According to the semantic feature representation of each of the training word pairs, the semantic feature representation of each of the contrasting word pairs in the contrasting word pair set of each of the training word pairs is constructed, and the sentence sentiment analysis model is trained according to the semantic feature representation of each of the contrasting word pairs and a preset second loss function, wherein the second loss function is: Where, L Lcl is the second loss value, K′ is the number of training word pairs, P i ′ is the contrast word pair set of the i-th training word pair, p′ represents the contrast word pair in the contrast word pair set, k′∈I′ / i, I′ is the index set of training word pairs I′=[1,2,…,K′], I′ / i represents the index set after removing the i-th training word pair in I′, g p′ is the semantic feature representation of the p′th contrasting word pair in the contrasting word pair set, g k′ is the semantic feature representation of the k′th contrasting word pair in the contrasting word pair set, and τ′ is the second temperature coefficient.

8. A sentence sentiment analysis device, characterized in that: include: An acquisition module is used to obtain a sentence to be analyzed and a preset sentence sentiment analysis model, wherein the sentence to be analyzed includes a number of words, and the sentence sentiment analysis model includes an encoding module, a semantic extraction module, a syntax extraction module, and a sentiment analysis module; An encoding module, configured to input the sentence to be analyzed into the encoding module to obtain sentence-level feature representation and word-level feature representation; A matrix construction module, configured to construct a syntactic relationship adjacency matrix and a syntactic label score adjacency matrix of the sentence to be analyzed, wherein the syntactic relationship adjacency matrix includes dependency relationship vectors between a plurality of words, and the syntactic label score adjacency matrix includes dependency type score vectors between a plurality of words; A semantic extraction module, configured to input the word-level feature representation into the semantic extraction module to construct a semantic adjacency matrix, wherein the semantic adjacency matrix includes semantic weight feature vectors between a plurality of words; A syntax extraction module, configured to input the word-level feature representation, the semantic adjacency matrix, the syntactic relationship adjacency matrix, and the syntactic label score adjacency matrix into the syntax extraction module to obtain a syntactic feature representation; The sentiment analysis module is used to input the syntactic feature representation and the sentence-level feature representation into the sentiment analysis module to obtain the sentiment analysis result of the sentence to be analyzed.

9. A computer device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor; when the computer program is executed by the processor, the steps of the sentence sentiment analysis method according to any one of claims 1 to 7 are implemented.

10. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the steps of the sentence sentiment analysis method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Aspect sentiment analysis method, model and medium

    CN115168576A

  • Knowledge enhancement-based dual-channel sentiment analysis method, device and equipment

    CN115204183A