An aspect-level sentiment analysis method and system based on commodity evaluation

By combining StanfordcoreNLP and BERT pre-trained models to extract syntactic dependency information, and using multi-head attention and graph convolutional networks for information fusion, the problem of insufficient utilization of syntactic dependency information in existing technologies is solved, the accuracy of aspect-level sentiment analysis is improved, and more comprehensive product evaluation information is provided.

CN116663566BActive Publication Date: 2026-02-10GUIZHOU UNIVERSITY OF FINANCE AND ECONOMICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310618152.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-29
Publication Date
2026-02-10
Estimated Expiration
2043-05-29

AI Technical Summary

Technical Problem

Existing aspect-level sentiment analysis methods fail to fully utilize potential syntactic dependencies when using syntactic dependency information, and the interaction between semantic and syntactic relations is insufficient, resulting in poor analysis performance.

Method used

By using StanfordcoreNLP to parse syntactic dependency information, combined with a BERT pre-trained model and BiLSTM to extract semantic and syntactic dependency information, a multi-head attention mechanism and graph convolutional network are used for information fusion, and interactive attention is used for information interaction. Three-layer graph convolutional operations are used to extract rich features.

Benefits of technology

It improves the accuracy of aspect-level sentiment analysis, enabling it to more effectively capture the sentiment polarity information of aspect words in product reviews, and providing more accurate decision support for users and merchants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116663566B_ABST
    Figure CN116663566B_ABST
Patent Text Reader

Abstract

The application provides an aspect-level sentiment analysis method and system based on commodity evaluation, uses multi-head attention to construct a probability attention matrix about semantic information and dependency type information, uses a pre-training model and uses a StanfordNLP tool to deeply analyze syntax dependency information of a sentence, fuses multi-scale syntax information, can more effectively capture context opinion words in the commodity evaluation text which have a significant relationship with aspect words, extracts information which is important to the sentiment polarity of aspect words, thereby providing more effective evaluation information for a user when the user browses commodities, providing comprehensive feedback information for a merchant, and helping the user and the merchant make decisions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Natural Language Processing (NLP), and more particularly to a method and system for aspect-level sentiment analysis based on product review text. Background Technology

[0002] In recent years, with the rapid development of internet technology, numerous internet products have emerged across various fields, demonstrating vigorous vitality and profoundly impacting people's daily lives. Examples include social media platforms like Weibo, forums, and blogs; e-commerce giants like Taobao, JD.com, and Suning.com; and news media outlets like Sina News and Sohu News. These platforms allow people to easily express their opinions and feelings online. Especially in e-commerce, product reviews are frequently left by users. From the user's perspective, most consumers check reviews before making a purchase, using them to aid their decision-making. Reviews not only provide accurate product information but also protect consumer interests. Therefore, effectively utilizing product reviews and conducting sentiment analysis can offer significant value to users. From a business perspective, review data contains crucial feedback, playing a key role in product updates and iterations. It also helps businesses understand user attitudes and behaviors, improve service levels, and leverage review information to adjust their sales strategies, enhance competitiveness, and ultimately gain greater consumer trust.

[0003] Sentiment analysis, also known as opinion mining, studies the emotions, attitudes, and opinions expressed by people in texts. Sentiment polarity is generally categorized into three types: positive, negative, and neutral. With the advancement of technology, society has placed higher demands on text sentiment analysis. Sentiment analysis has subsequently developed into three subfields. Scholars have subdivided sentiment analysis work into three levels based on the granularity of the sentiment object: document-level, sentence-level, and aspect-level. Document-level sentiment analysis assumes that an article or commentary has an opinion, and the opinion information of the article is a description of a single commentary entity. This task treats the entire article or commentary as the sentiment analysis object and analyzes the overall sentiment polarity of the document. Sentence-level sentiment analysis treats each sentence in the article or commentary as the sentiment analysis object and analyzes the overall sentiment polarity of the sentence. Traditional sentiment analysis mainly focuses on coarse-grained sentiment analysis at the document and sentence levels. However, coarse-grained sentiment analysis only assumes that the text contains only a single sentiment, such as positive or negative, and cannot identify the sentiment of texts containing multiple aspects.

[0004] Aspect-based sentiment analysis (ABSA) treats all aspects of a sentence as sentiment analysis objects, offering finer-grained analysis and thus belonging to the category of fine-grained sentiment analysis tasks. The purpose of aspect-based sentiment analysis is to determine the sentiment polarity of specific aspects within a sentence. For example, the sentence "The pizza is delicious, but the price is too expensive" has two specific aspects: "pizza" and "price." "Pizza" corresponds to a positive sentiment polarity, while "price" corresponds to a negative one. These specific aspects can be words or phrases; for ease of description, they are collectively referred to as aspect words.

[0005] In recent years, deep learning has achieved remarkable results in the field of Natural Language Processing (NLP). Various neural network models have been applied to aspect-level sentiment analysis research. Researchers have used neural network models to obtain more comprehensive and deeper textual semantic features, significantly improving the accuracy and efficiency of aspect-level sentiment analysis. Using neural networks eliminates the need for cumbersome feature engineering, saving significant human resources. Due to the powerful feature extraction capabilities of deep neural networks, deep learning-based methods have gradually become a popular research approach in aspect-level sentiment analysis. Some researchers have used Long Short-Term Memory (LSTM) network models to model aspect words and their corresponding viewpoints. In 2017, TANG et al. used a two-layer LSTM model to encode features and then fused the hidden states of the two networks before inputting them into a classifier; however, the correlation established in this way was relatively weak. Subsequently, some researchers applied attention mechanisms to this task, significantly enhancing the model's performance. In 2018, MA et al. used attention mechanisms to learn contextual feature vectors for aspect words; however, due to the complexity of language, biases sometimes inevitably occur. In 2019, Zhang et al. applied Graph Convolutional Neural Networks (GCNs) to the ABSA task, which solved the problem that Attention cannot focus on long-range information. In 2020, Wang et al. used Graph Attention Networks combined with syntactic dependency information for the ABSA task and achieved good results. In 2021, Li et al. combined multi-head attention mechanisms with Graph Convolutional Neural Networks to fuse semantic and syntactic dependency information, making the model's input contain more targeted semantic and syntactic dependency information. However, the above-mentioned methods based on Graph Convolutional Neural Networks still have the following shortcomings when handling the ABSA task:

[0006] (1) When using a dependency parser to obtain the dependency information of a sentence, the potential syntactic dependency information is not fully utilized.

[0007] (2) The existing methods for utilizing the potential semantic and syntactic dependency information are not well designed, and the semantic and syntactic relationship of the text is not fully utilized. Furthermore, the connection between aspect words and opinion words is not given enough attention, and the interaction between contextual information and syntactic dependency information is insufficient, resulting in poor results.

[0008] Therefore, there is an urgent need for an aspect-level sentiment analysis method that can solve the above problems. Summary of the Invention

[0009] The purpose of this invention is to propose an aspect-level sentiment analysis method and system based on product review information, thereby solving the two problems mentioned above. Simultaneously, it can provide users browsing products with timely and comprehensive product review information, and provide merchants with comprehensive feedback information to assist users and merchants in making better decisions.

[0010] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0011] S1: Data Preprocessing and Preparation: Obtain product review text data, use Stanford Core NLP to parse the syntactic dependency information of the sentences, and then obtain the dependency matrix A of the product review text. rel Two types of syntactic dependency information: dependency type sequence;

[0012] S2: Feature Input: Use a BERT pre-trained model or a GloVe model to map word vectors to the contextual semantic information of the product review text; randomly initialize dependency-type word vectors and perform word embedding operations, then use BiLSTM to extract semantic information and syntactic dependency information respectively, to obtain the hidden vector representation H of the semantic information. c Hidden vector representation H of syntactic dependency information c1 ; H c The location and distance information are fused using an interactive attention mechanism, and then the fused H is concatenated. c and H c1 This yields the hidden vector representation H of the input;

[0013] S3: Semantic feature extraction and syntactic dependency feature extraction: Use a multi-head attention mechanism to calculate the attention score matrix A for the semantic information hidden vectors. sem And the attention score matrix A of the hidden vectors for syntactic dependency type information. type Then put A type and A rel The fusion process yields a dependency information matrix A containing richer information. syn Then A sem The H obtained in stage S2 is fed into the semantic information graph convolutional layer for semantic information feature extraction, A synThe H obtained in stage S2 is fed into the syntactic information graph convolutional layer for syntactic information feature extraction;

[0014] S4: Information Interaction: Using interactive attention to hide the contextual semantic information vectors at each layer in stage S3. Information hiding vector between syntactic dependency information Interaction enables semantic information to guide the learning of syntactic dependency information parameter updates, and syntactic dependency information to guide the learning of semantic information parameter updates. This is achieved through three layers of graph convolution operations, with interactive attention operations performed after each layer of graph convolution.

[0015] S5: Sentiment Polarity Classification: Perform a mask averaging operation on the final hidden output after feature extraction and interaction, and then use softmax to perform the final sentiment prediction on the product review text.

[0016] Specifically, in step S1, before using word embeddings of syntactic dependency types, a corpus of dependency types, i.e., a vocabulary of dependency types, is first constructed; then, a dependency relation matrix A is constructed based on dependency parsing and syntactic analysis. rel At that time, the Stanford NLP parser was used.

[0017] Specifically, in step S2, the random initial dimension of the dependency type word vectors is set to 40 dimensions; the hidden layer dimensions of the BiLSTM used to extract semantic information and the hidden layer dimensions of the BiLSTM used to extract syntactic dependency information are set to 50 dimensions; a layer of BiLSTM is used to extract hidden features, and dropout is used in the above process to prevent the model from overfitting, wherein the dropout value of word embedding is set to 0.7, the dropout value of the BiLSTM model input is set to 0.1, and the dropout value of graph convolution is set to 0.1.

[0018] Specifically, after constructing the probabilistic attention matrix for semantic information and the probabilistic attention matrix for syntactic dependency information using a multi-head attention mechanism in step S3, both are standardized.

[0019] Specifically, in step S4, the two vector matrices involved in the interaction of semantic information and syntactic dependency information are dropped out to prevent overfitting after the interaction is completed, and are standardized after each interaction.

[0020] Specifically, in step S5, cross-entropy is used to calculate the loss value between the true label and the predicted label during the training phase, and the effectiveness of the model method is evaluated based on the prediction results during the testing phase.

[0021] This invention, through the aforementioned technical solution, constructs a probabilistic attention matrix for semantic and dependency type information using multi-head attention. It employs a pre-trained model and Stanford NLP tools to deeply analyze the syntactic dependency information of sentences, fusing multi-scale syntactic information. This solves the problems of insufficient extraction of semantic and syntactic information features by a single network, difficulty in focusing on words that have a significant impact on classification results, and ambiguous sentiment expression in short sentences. It can more effectively capture the following opinion words that are significantly related to the other party's words in product evaluation information, and extract information that is important for the sentiment polarity of the other party's words. Thus, it provides users with more effective evaluation information when browsing products, provides merchants with comprehensive feedback information, and helps users and merchants make decisions. Attached Figure Description

[0022] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation

[0023] This application is described in detail below. Examples of embodiments of this application are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar components or components having the same or similar functions throughout. Furthermore, detailed descriptions of known technologies that are unnecessary for the features of this application are omitted. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0024] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0025] The following is in conjunction with the appendix Figure 1 The present invention will provide a detailed explanation of how its technical solution addresses the aforementioned technical problems.

[0026] like Figure 1 As shown, the implementation process of the method of the present invention includes the following specific steps:

[0027] Step S1: Data preprocessing and preparation.

[0028] First, the product review text dataset is preprocessed to obtain information including part-of-speech tags, location information, and the start and end positions of aspect terms. Then, Stanford Core NLP is used to parse the syntactic dependency information of the sentences, obtaining a syntactic dependency tree, and further mining syntactic dependency information from it; at the same time, the positional distance of each word in the sentence relative to aspect terms is calculated.

[0029] Among them, dependency relation matrix A is constructed through syntactic dependency tree. rel The sequence of dependency types between words in the product review text (since the dependency types of a language are discrete and the total number of types is countable, a dictionary of dependency types for this language is stored to match the dependency types of sentences).

[0030] Simultaneously, the positional distance of each word relative to the aspect word in the linear structure of the sentence is calculated using the following formula:

[0031]

[0032] Where, p i It is the position weight of the i-th word, j s and j s+m These are the starting and ending indexes for the terms.

[0033] S2: Feature input.

[0034] The BERT pre-trained model is used to map word vectors to the contextual semantic information of the sentence, i.e., word vectors. Corresponding word embedding Where d represents the word vector dimension of BERT, with a value of 768. Dependency-type word vectors are randomly initialized and word embeddings are performed, with the initial random dimension set to 40. To prevent overfitting, dropout is used for word embeddings, with a value of 0.7.

[0035] A BiLSTM encoder is used to capture contextual semantic information and syntactic dependency information in sentences. The initial state vector of the text words under the word embedding of the BERT pre-trained model is h = {h1, h2, ... h}. n}, randomly initialize the dependency type vector h of word embeddings 1 ={h1, h2, ... h n} Contextual information is embedded into the BiLSTM to generate the hidden state vector. Where H c This represents the hidden state vector at time t. Similarly, dependency information is embedded into the BiLSTM to generate the hidden state vector.

[0036] Where H c and H c1It is obtained by concatenating the forward LSTM hidden vector and the backward LSTM hidden vector, and the dimension of the LSTM hidden layer is set to 50. To prevent the model from overfitting, dropout is used for each LSTM with a value of 0.1.

[0037] To ensure that the vectors fed into the graph convolutional network simultaneously contain both semantic and syntactic dependency information of the sentence, the H vectors obtained in step 2 are concatenated. c and H c1 , denoted as H.

[0038] Fuse location and distance information and stitch H c and H c1 The method is as follows:

[0039]

[0040] Where F is the position weight function, p i H is the position weight of the i-th word. c H is a context-hidden vector representation that includes location information. c1 It is a hidden vector representation of dependency relationships.

[0041] S3: Semantic feature extraction and syntactic dependency feature extraction.

[0042] The attention score matrix A for the semantic information hidden vector is obtained using a multi-head attention mechanism. sem And the attention score matrix A of the hidden vectors for syntactic dependency type information. type Then put A type and A rel The fusion process yields a dependency information matrix A containing richer information. syn Then A sem The H obtained in stage S2 is fed into the semantic information graph convolutional layer for semantic information feature extraction, A syn The H obtained from stage S2 is fed into the syntactic information graph convolutional layer for syntactic information feature extraction. To prevent overfitting, dropout is used in the graph convolution with a value set to 0.1.

[0043] The specific steps and modules used are as follows:

[0044] S31: Use multi-head attention to extract semantic information hidden features and syntactic dependency information hidden features respectively, and construct probabilistic attention matrices for semantic information and syntactic dependency information. Taking the construction of the probabilistic attention matrix for semantic information using multi-head attention as an example, use attention to calculate the probabilistic attention matrix for semantic information for each head. Then sum the average values ​​of all heads. The final semantic information probabilistic attention matrix A is obtained.sem The specific formula is shown below:

[0045]

[0046]

[0047]

[0048] in, and Both are learnable parameter matrices, H c It is the hidden vector representation of the contextual semantic information in the S2 stage, d head It represents the number of heads in multi-head attention, d lstm It is H c Dimensions.

[0049] Similarly, we can obtain the probabilistic attention matrix A for syntactic dependency types. type .

[0050] S32: To obtain richer syntactic dependency information, the dependency matrix A obtained in step S1 is... rel And the probabilistic attention matrix A of the syntactic dependency type that was just obtained type The probabilistic attention matrix A is fused to obtain richer syntactic dependency information. syn The specific formula is as follows:

[0051] A syn =W type A type +A rel

[0052] Among them, W type It is a learnable parameter matrix.

[0053] Then, the LN normalization function is used to normalize A. syn and A sem .

[0054] S33: Semantic Information Graph Convolution and Syntactic Dependency Information Graph Convolution. Based on the previous work in S1, S2, and S3, we have initially obtained the hidden state vector H combining semantic information and syntactic dependency type information, and the probabilistic attention matrix A of semantic information. sem The probabilistic attention matrix A for syntactic dependency information syn Then H and A sem The semantic information is fed into a graph convolutional layer to obtain semantic information. The intermediate hidden states h of the features are then extracted through graph convolution. sem H and A syn The syntactic dependency information is fed into a graph convolutional layer to obtain syntactic dependency information. The intermediate hidden state h of the feature is then extracted through graph convolution.syn The specific formulas for the two graph convolution operations are shown below:

[0055]

[0056]

[0057] in, and These are the probabilistic attention matrices for semantic information and the probabilistic attention matrices for syntactic dependency information, respectively. and It is a learnable parameter matrix. and It is a bias parameter. It is h i The upper-level neighbor nodes are hidden. It is an activation function.

[0058] S4: Information Interaction Phase: Using interactive attention to hide the contextual semantic information vectors at each layer in the S3 phase. Information hiding vector between syntactic dependency information Interaction enables semantic information to guide the learning of syntactic dependency information parameters, and syntactic dependency information to guide the learning of semantic information parameters. This is achieved through three layers of graph convolution, with interactive attention operations performed after each layer. The specific interactive attention formula is as follows:

[0059]

[0060]

[0061] Where LN is the standardization function, It is the semantic hidden vector representation after interaction, C sem It is the hidden vector information after using interactive attention to interact with semantic and dependency information, Q syn , V sem Both are learnable parameter matrices, where d represents the number of channels.

[0062] Similarly, the formula for interactive attention that uses semantic information to guide interactive information for syntactic dependency information is as follows:

[0063]

[0064]

[0065] Where LN is the standardization function, It is the information hiding vector between the syntactic dependencies after interaction, C synIt is the hidden vector information after using interactive attention to interact with dependency information and semantic information, Q sem , V syn Both are learnable parameter matrices, where d represents the number of channels.

[0066] Although the interaction of dependency type information and context information before model input integrates context and dependency information, further information exchange is needed during the graph convolution process at each layer to guide the graph convolutional neural network to learn semantic and syntactic information simultaneously.

[0067] H syn′ =softmax(H syn W1(H sem ) T )H sem

[0068] H sem′ =softmax(H sem W2(H syn ) T )H syn

[0069] Where W1 and W2 are learnable weight matrices, H syn and H sem These are the outputs from syntax graph convolution and semantic graph convolution, respectively.

[0070] S5: Sentiment Polarity Classification Stage: The final hidden output after feature extraction and interaction is subjected to a mask averaging operation of aspect terms, followed by softmax to perform final sentiment prediction on the product review text. The specific formula for the aspect term mask averaging operation is shown below:

[0071]

[0072] After three layers of graph convolution and interaction information in step S4, and finally after aspect masking, the hidden vector h is obtained. Then, the aspect-level sentiment polarity classification of the product evaluation text is obtained as P = SoftMax(Wh + b), where W is the learnable parameter matrix and b is the bias parameter.

[0073] Furthermore, this invention also includes an aspect-level sentiment analysis system based on product evaluation, which mainly comprises four parts: a semantic module, a syntactic dependency module, an information fusion and interaction module, and a sentiment polarity output module. The semantic module is further divided into a word embedding layer, an encoding layer, and a semantic information graph convolutional layer; the syntactic dependency module is divided into a syntactic parsing layer, an encoding layer, and a syntactic dependency information graph convolutional layer.

[0074] Semantic module: Word embedding layer, which mainly uses high-dimensional numerical vectors to represent each word segmentation token in a sentence, here BERT is used for word vector representation; Encoding layer, which uses BiLSTM to calculate hidden features of contextual semantic information; Semantic information graph convolution layer, which performs graph convolution operation on the hidden vectors that fuse the contextual semantic information of linear structure positional distance, the hidden vectors of tree structure syntactic dependency type information, and the probability matrix of contextual hidden vectors.

[0075] Syntactic Dependency Module: The syntactic parsing layer uses Stanford NLP to parse the syntactic dependency information of a sentence to obtain syntactic dependency information containing dependency relations and dependency types; the encoding layer randomly initializes word vectors for dependency types and uses BiLSTM to compute hidden features of dependency type information; the syntactic dependency information graph convolution layer performs graph convolution operations on the hidden vectors that fuse linear structural positional distances, tree-structured syntactic dependency type information, and the probability matrix of syntactic dependency relation types.

[0076] Information fusion and interaction module: During graph convolution, interactive attention is used to fully interact semantic information and syntactic dependency information;

[0077] Sentiment polarity output module: Performs a mask averaging operation on aspect words on the final hidden output after feature extraction and interaction, and then performs softmax for final sentiment prediction.

[0078] Although the present invention has been described with reference to the present preferred embodiments, those skilled in the art should understand that the above preferred embodiments are only used to explain and illustrate the technical solutions of the present invention, and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, variations, improvements, etc., made within the spirit and principle scope of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A method for aspect-level sentiment analysis based on product reviews, characterized in that, The following steps are adopted: S1: Data Preprocessing and Preparation: Obtain product review text data, use Stanford Core NLP to parse the syntactic dependency information of the sentences, and then obtain the dependency matrix A of the product review text. rel Two types of syntactic dependency information: dependency type sequence; S2: Feature Input: Use a BERT pre-trained model or a GloVe model to map word vectors to the contextual semantic information of the product review text; randomly initialize dependency-type word vectors and perform word embedding operations, then use BiLSTM to extract semantic information and syntactic dependency information respectively, to obtain the hidden vector representation H of the semantic information. c Hidden vector representation H of syntactic dependency information c1 ; H c The location and distance information are fused using an interactive attention mechanism, and then the fused H is concatenated. c and H c1 This yields the hidden vector representation H of the input; S3: Semantic feature extraction and syntactic dependency feature extraction: Use a multi-head attention mechanism to calculate the attention score matrix A for the semantic information hidden vectors. sem And the attention score matrix A of the hidden vectors for syntactic dependency type information. type Then put A type and A rel The fusion process yields a dependency information matrix A containing richer information. syn Then A sem The H obtained in stage S2 is fed into the semantic information graph convolutional layer for semantic information feature extraction, A syn The H obtained in stage S2 is fed into the syntactic information graph convolutional layer for syntactic information feature extraction; S4: Information Interaction: Using interactive attention to hide the contextual semantic information vectors at each layer in stage S3. Information hiding vector between syntactic dependency information Interaction enables semantic information to guide the learning of syntactic dependency information parameter updates, and syntactic dependency information to guide the learning of semantic information parameter updates. This is achieved through three layers of graph convolution operations, with interactive attention operations performed after each layer of graph convolution. S5: Sentiment Polarity Classification: Perform a mask averaging operation on the final hidden output after feature extraction and interaction, and then use softmax to perform the final sentiment prediction on the product review text.

2. The aspect-level sentiment analysis method based on product reviews according to claim 1, characterized in that, In step S1, before using word embeddings of syntactic dependency types, a corpus of dependency types is first constructed, i.e., a vocabulary of dependency types; then, a dependency relation matrix A is constructed based on dependency parsing and syntactic analysis. rel At that time, the Stanford NLP parser was used.

3. The aspect-level sentiment analysis method based on product reviews according to claim 1, characterized in that, In step S2, the initial dimension of the randomly initialized dependency-type word vectors is set to 40; the hidden layer dimensions of the BiLSTM used to extract semantic information and the hidden layer dimensions of the BiLSTM used to extract syntactic dependency information are set to 50; a BiLSTM layer is used to extract hidden features, and dropout is used to prevent the model from overfitting. The dropout value of the word embedding is set to 0.7, the dropout value of the BiLSTM model input is set to 0.1, and the dropout value of the graph convolution is set to 0.

1.

4. The aspect-level sentiment analysis method based on product reviews according to claim 1, characterized in that, After constructing the attention score matrix of the semantic information hiding vector and the attention score matrix of the syntactic dependency type information hiding vector using the multi-head attention mechanism in step S3, both are standardized.

5. The aspect-level sentiment analysis method based on product reviews according to claim 1, characterized in that, In step S4, the two vector matrices involved in the interaction of semantic information and syntactic dependency information are dropped out to prevent overfitting after the interaction is completed, and standardized after each interaction.

6. The aspect-level sentiment analysis method based on product reviews according to claim 1, characterized in that, In step S5, cross-entropy is used to calculate the loss value between the true label and the predicted label during the training phase, and the effectiveness of the model method is evaluated based on the prediction results during the testing phase.

7. An aspect-level sentiment analysis system based on product reviews, characterized in that, include: The system consists of four main parts: a semantic module, a syntactic dependency module, an information fusion and interaction module, and a sentiment polarity output module. The semantic module includes a word embedding layer, an encoding layer, and a semantic information graph convolutional layer; the syntactic dependency module includes a syntactic parsing layer, an encoding layer, and a syntactic dependency information graph convolutional layer. Semantic module: word embedding layer, which mainly uses high-dimensional numerical vectors to represent each word segmentation token in a sentence, and uses BERT to represent word vectors; The encoding layer uses BiLSTM to compute hidden features of contextual semantic information; The semantic information graph convolutional layer performs graph convolution operations on the hidden vectors that fuse the contextual semantic information of linear structural positional distance, the hidden vectors of tree structure syntactic dependency type information, and the attention score matrix of the context hidden vectors. Syntactic Dependency Module: The syntactic parsing layer uses Stanford NLP to parse the syntactic dependency information of sentences to obtain syntactic dependency information containing dependency relationships and dependency types; The encoding layer randomly initializes word vectors of dependency types and uses BiLSTM to compute hidden features of dependency type information. The syntactic dependency information graph convolutional layer performs graph convolution operations on the hidden vectors that fuse the contextual semantic information of linear structural positional distance, the tree-structured syntactic dependency type information, and the attention score matrix of syntactic dependency relation type. Information fusion and interaction module: During graph convolution, interactive attention is used to fully interact semantic information and syntactic dependency information; Sentiment polarity output module: Performs a mask averaging operation on aspect words on the final hidden output after feature extraction and interaction, and then performs softmax for final sentiment prediction.

Citation Information

Patent Citations

  • Aspect-level sentiment analysis method and device based on syntax and graph convolutional network

    CN114417823A

  • Aspect-based sentiment analysis

    US20220318520A1