A fine-grained text sentiment extraction method and related products
By extracting semantic features at the character and word levels and analyzing bidirectional two-dimensional matrices, the problem of deep semantic information and element overlap in fine-grained sentiment extraction is solved, thereby improving the accuracy and efficiency of sentiment analysis.
Patent Information
- Application Number
- CN202210815895.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-12
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-07-12
AI Technical Summary
Existing fine-grained sentiment extraction techniques cannot uncover the deep semantic information of text and cannot effectively solve the problem of overlapping elements.
By extracting semantic features at the character and word levels, BILSTM and CNN networks are used to extract character-level and word-level semantic vectors respectively. By combining dimensionality reduction linear layers and nonlinear functions, a bidirectional two-dimensional matrix is constructed to perform sentiment dependency analysis and obtain sentiment dependency information at the span level.
It enables the mining of deep semantic information, solves the problem of element overlap, improves the accuracy of sentiment analysis, and reduces training parameters and power consumption.
Smart Images

Figure CN115204180B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, specifically to a fine-grained text sentiment extraction method and related products. Background Technology
[0002] With the rapid development and popularization of the big data era, online information is becoming increasingly abundant. Consequently, the quality of the information is uneven, leading to a growing demand for network quality management, monitoring, and information filtering. The subjective biases expressed in online information have also received widespread attention. Therefore, it is particularly important to analyze users' emotional biases from massive amounts of data quickly and with stable quality.
[0003] Currently, sentiment extraction technology plays a vital role in various fields. For product decision-makers, it can analyze various user reviews to help businesses understand the differences in how different products are perceived by users, thereby assisting them in iterating and updating products and optimizing user service experiences.
[0004] Fine-grained sentiment extraction is an aspect-based approach that aims to extract all opinion information and sentiment tendencies expressed within each aspect. Its task can be defined as (aspect, opinion, sentiment). Currently, most sentiment extraction techniques utilize only a single feature. While using a single feature can achieve good sentiment classification results, its expressive power is often limited, failing to uncover deeper semantic information from the text. Secondly, current methods largely cannot address the problem of overlapping elements. For example, in the sentence "This restaurant has a great atmosphere and great food!", the extracted triples should be (restaurant atmosphere, great, positive) and (food, great, positive). This triple contains the repeated opinion element "great," which current techniques cannot effectively extract.
[0005] In view of the above, this application is hereby submitted. Summary of the Invention
[0006] The technical problem to be solved by this invention is that existing fine-grained sentiment extraction techniques cannot uncover the deep semantic information of text and cannot effectively solve the problem of element overlap. The purpose is to provide a fine-grained text sentiment extraction method and related products that solve the above problems.
[0007] This invention is achieved through the following technical solution:
[0008] In a first aspect, embodiments of the present invention provide a fine-grained text sentiment extraction method, comprising the following steps:
[0009] Semantic features are extracted from the input text at the character level to obtain a first semantic vector, and semantic features are extracted from the input text at the word level to obtain a second semantic vector;
[0010] The first semantic vector and the second semantic vector are superimposed by concatenation to obtain a deeper semantic representation;
[0011] We utilize dimensionality reduction linear layers and nonlinear functions to extract features from deep semantic representations, obtaining aspect features and viewpoint features.
[0012] A two-dimensional bidirectional matrix is constructed to perform sentiment dependency analysis on aspect features and opinion features, thereby obtaining word-level sentiment dependency information.
[0013] By combining word-level sentiment dependency information with aspect features and viewpoint features, we obtain span-level sentiment dependency information.
[0014] In an optional embodiment of this application, the process of extracting semantic features from the input text at the character-level and obtaining a first semantic vector includes:
[0015] The input text is preprocessed by taking each character in the input text as input to the model and mapping it into a high-dimensional character vector.
[0016] The first semantic vector is obtained by using the BILSTM network to extract features from the character vectors.
[0017] In an optional embodiment of this application, the process of extracting semantic features from the input text based on word granularity and obtaining a second semantic vector includes:
[0018] The input text is preprocessed by using the jieba word segmentation tool to segment the entire input text into words, resulting in a set of all segmented words for the entire input text.
[0019] The Word2Vec algorithm is used to map all word segments to a high-dimensional vector space to obtain high-dimensional word vectors.
[0020] The word vectors are input into the input layer of a convolutional neural network. The convolutional layers of the convolutional neural network use multiple filters to extract features. Then, the extracted features are max-pooled in the pooling layer of the convolutional neural network. Finally, the features are connected through a fully connected layer to obtain a second semantic vector that contains the whole.
[0021] In an optional embodiment of this application, in the feature extraction of deep semantic representation using a dimensionality reduction linear layer and a nonlinear function, the calculation formula for feature extraction is as follows:
[0022] ;
[0023] ;
[0024] in, and It represents both aspectual and viewpoint characteristics. and For the model weights, and For the bias term of the model, This represents a nonlinear function.
[0025] In one optional embodiment of this application, the process of constructing a bidirectional two-dimensional matrix and performing sentiment dependency analysis on aspect features and opinion features includes...
[0026] All words in the input text are paired to form a two-dimensional matrix for inferring viewpoints based on aspects. The horizontal axis of the two-dimensional matrix represents viewpoints and the vertical axis represents aspects. When the two-dimensional matrix resolves the sentiment dependence between viewpoint feature and aspect feature pairs, the corresponding case polarity is filled in the coordinates of the last feature word of a viewpoint and the last feature word of an aspect.
[0027] All words in the input text are paired to form a two-dimensional matrix based on opinion inference. The horizontal axis of the two-dimensional matrix represents the aspect and the vertical axis represents the opinion. When the two-dimensional matrix resolves the sentiment dependence between aspect feature and opinion feature pairs, the corresponding polarity is filled in the coordinates of the last feature word of an aspect and the last feature word of an opinion.
[0028] In one optional embodiment of this application, the formula for performing two-dimensional matrix analysis is:
[0029] ;
[0030] ;
[0031] ;
[0032] ;
[0033] in, Representative viewpoint derivation aspects, directions, and features - viewpoint feature pairs The score of the k-th dependency type, Representative viewpoint derivation aspects, directions, and features - viewpoint feature pairs The probability of a fraction, Representative aspects derive viewpoint characteristics in the direction of viewpoints - aspect characteristic pairs The score of the k-th dependency type, Representative aspects derive viewpoint characteristics in the direction of viewpoints - aspect characteristic pairs The probability of a fraction and It represents the weight and bias that produce the k-th score.
[0034] In an optional embodiment of this application, after obtaining the final prediction result, the method further includes:
[0035] The sentiment dependency information at the span level is analyzed to obtain a set of text sentiment analysis results.
[0036] Based on the results of text sentiment analysis, the network is trained using a balanced cross-entropy loss function, and the loss function is continuously optimized through gradient descent and backpropagation algorithms.
[0037] In an optional embodiment of this application, in obtaining the set of text sentiment analysis results:
[0038] If the analytical result obtained in the two-dimensional matrix of the aspect derivation of the viewpoint cannot be obtained in the two-dimensional matrix of the viewpoint derivation aspect, then this result is added to the text sentiment analysis result set.
[0039] If the analytical result obtained in the two-dimensional matrix of the viewpoint derivation cannot be obtained in the two-dimensional matrix of the viewpoint derivation, then this result is added to the text sentiment analysis result set.
[0040] If different emotional dependencies are predicted for the same aspect and viewpoint in the two-dimensional matrix of aspect-to-viewpoint derivation and the two-dimensional matrix of viewpoint-to-aspect derivation, then the maximum emotional dependency probability predicted by the two matrix models is used to determine the result, and the result with the maximum emotional dependency probability is added to the set of final prediction results.
[0041] Secondly, embodiments of the present invention provide a system based on a fine-grained text sentiment extraction method, comprising:
[0042] The semantic vector extraction layer is used to extract semantic features from the input text at the character level and obtain the first semantic vector, and to extract semantic features from the input text at the word level and obtain the second semantic vector.
[0043] The fully connected layer is used to concatenate the first semantic vector and the second semantic vector to obtain a deeper semantic representation.
[0044] Aspect-viewpoint extraction layer is used to extract features from deep semantic representations using dimensionality reduction linear layers and nonlinear functions, obtaining aspect features and viewpoint features;
[0045] A bidirectional two-dimensional matrix layer is used to perform sentiment dependency parsing on aspect features and opinion features to obtain word-level sentiment dependency information.
[0046] The parsing prediction layer is used to combine word-level sentiment dependency information with aspect features and opinion features to obtain span-level sentiment dependency information; and then parses the span-level sentiment dependency information to obtain the final prediction result.
[0047] Thirdly, embodiments of the present invention provide a computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program, the computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the fine-grained text sentiment extraction method described above.
[0048] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0049] This invention provides a fine-grained text sentiment extraction method, system, and storage medium. The method extracts semantic features from the input text at the character level to obtain a first semantic vector, and then extracts semantic features from the input text at the word level to obtain a second semantic vector. The first and second semantic vectors are then concatenated to obtain a deep semantic representation, thereby uncovering deeper semantic information from the text and enabling the model to accurately understand sentence semantics. Furthermore, by constructing a bidirectional two-dimensional matrix, the problem of extracting overlapping elements in sentiment analysis is effectively solved, while also reducing power consumption and training parameters. Attached Figure Description
[0050] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:
[0051] Figure 1 A flowchart illustrating a fine-grained text sentiment extraction method provided in this embodiment of the invention;
[0052] Figure 2 The flowchart of sub-step S11 of a fine-grained text sentiment extraction method provided in this embodiment of the invention;
[0053] Figure 3 A diagram illustrating the bidirectional two-dimensional matrix parsing process of emotion dependency provided in this embodiment of the invention;
[0054] Figure 4 A diagram illustrating the emotion extraction model provided in this embodiment of the invention;
[0055] Figure 5 This is a schematic diagram of a fine-grained system architecture provided for an embodiment of the present invention. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0057] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0058] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0059] The terms “first,” “second,” “third,” and “fourth,” etc. (if present), in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0060] Fine-grained sentiment extraction is an approach that focuses on aspects to extract all viewpoints and their associated sentiments within those aspects. Its task can be defined as (aspect, viewpoint, sentiment). With technological advancements, fine-grained sentiment extraction plays a crucial role in various fields. For product decision-makers, it allows analysis of user reviews to help businesses understand the differences in how different products resonate with users, enabling iterative product updates and improved user experience. However, current sentiment extraction techniques often rely on single features, failing to uncover deeper semantic meanings. For instance, they struggle to identify puns, irony, and the use of positive words in negative contexts, potentially leading to misinterpretation of words and reducing the accuracy of sentiment extraction. Furthermore, in service industries like catering and shopping, texts often contain numerous overlapping elements. For example, the sentence "This restaurant has a great atmosphere and great food!" should extract the triples (restaurant atmosphere, great, positive) and (food, great, positive). This triple contains the repeated viewpoint element "great," which current technologies cannot effectively extract.
[0061] Existing technologies have limitations: fine-grained sentiment extraction techniques cannot uncover the deep semantic information of text, and they cannot effectively solve the problem of overlapping elements.
[0062] To address the aforementioned problems, embodiments of the present invention provide a fine-grained text sentiment extraction method, such as... Figure 1 and Figure 2 As shown, it includes the following steps:
[0063] S11: Extract semantic features from the input text at the character level and obtain the first semantic vector; extract semantic features from the input text at the word level and obtain the second semantic vector.
[0064] S12: The first semantic vector and the second semantic vector are superimposed by concatenation to obtain a deep semantic representation.
[0065] It is not difficult to understand that forming new deep semantic representations, which simultaneously include semantic features at the word and character levels, can uncover the deep semantic information of the text, enabling the model to accurately understand the semantics of sentences.
[0066] S13: Use a dimension reduction linear layer and a nonlinear function to extract features from the deep semantic representation to obtain aspect features and viewpoint features;
[0067] The reason for using this semantic vector for feature extraction is to remove redundant information and irrelevant features in deep semantics and to avoid potential overfitting risks.
[0068] S14: Construct a bidirectional two-dimensional matrix to perform sentiment dependency analysis on the aspect features and opinion features to obtain word-level sentiment dependency information.
[0069] S15: Combine the word-level sentiment dependency information with the aspect features and the viewpoint features to obtain span-level sentiment dependency information.
[0070] In an optional embodiment of this application, the process of extracting semantic features from the input text at the character level and obtaining a first semantic vector includes the following sub-steps:
[0071] S111a: Preprocess the input text by taking each character in the input text as input to the model and mapping it into a high-dimensional character vector.
[0072] S111b: Use the BILSTM network to extract features from the word vector to obtain the first semantic vector.
[0073] In an optional embodiment of this application, the process of extracting semantic features from the input text based on word granularity and obtaining a second semantic vector includes:
[0074] S112a: Preprocess the input text by segmenting the entire input text using the jieba word segmentation tool to obtain a set of all segmented words for the entire input text.
[0075] S112b: Use the Word2Vec algorithm to map all the word segmentation sets to a high-dimensional vector space to obtain high-dimensional word vectors;
[0076] The algorithm model used in the Word2Vec algorithm can be either the CBOW training model based on Hierarchical Softmax or the Skip-Gram training model based on Hierarchical Softmax. No specific restrictions are imposed in this embodiment.
[0077] S112c: The word vector is input into the input layer of a convolutional neural network (CNN), and features are extracted using multiple filters in the convolutional layer of the CNN. Then, the extracted features are max-pooled in the width of the CNN pooling layer, and then the features are connected through a fully connected layer to finally obtain a second semantic vector containing the whole.
[0078] The kernel size used for max pooling can be 2×2 or 4×4, and can be stacked or not; there are no restrictions here.
[0079] In an optional embodiment of this application, in the feature extraction of the deep semantic representation using a dimensionality reduction linear layer and a nonlinear function, the calculation formula for feature extraction is as follows:
[0080] ;
[0081] ;
[0082] in, and It represents both aspectual and viewpoint characteristics. and For the model weights, and For the bias term of the model, To represent a nonlinear function, in this embodiment, ReLU is used as... The activation function.
[0083] It should be noted that feature extraction also includes sequence labeling of feature words in the input text, thereby extracting features of viewpoints and aspects. In this embodiment, the {B, I, O} labeling scheme is used to label the entire input text. In this embodiment, the calculation formula used for labeling is:
[0084] ;
[0085] ;
[0086] in, It can be used to calculate the probability of each word being labeled as an aspect. , It can be used to calculate the probability that each word is marked as an opinion. , , , as well as This represents the learnable weights and biases.
[0087] In one optional embodiment of this application, the process of constructing a bidirectional two-dimensional matrix and performing sentiment dependency analysis on the aspect features and opinion features includes:
[0088] All words in the input text are paired to form a two-dimensional matrix for inferring viewpoints based on aspects. The horizontal axis of the two-dimensional matrix represents viewpoints and the vertical axis represents aspects. When the two-dimensional matrix resolves the sentiment dependence between viewpoint feature and aspect feature pairs, the corresponding case polarity is filled in the coordinates of the last feature word of a viewpoint and the last feature word of an aspect.
[0089] All words in the input text are paired to form a two-dimensional matrix based on opinion inference. The horizontal axis of the two-dimensional matrix represents the aspect and the vertical axis represents the opinion. When the two-dimensional matrix resolves the sentiment dependence between aspect feature and opinion feature pairs, the corresponding polarity is filled in the coordinates of the last feature word of an aspect and the last feature word of an opinion.
[0090] In one optional embodiment of this application, the formula for performing two-dimensional matrix analysis is:
[0091] ;
[0092] ;
[0093] ;
[0094] ;
[0095] in, Representative viewpoint derivation aspects, directions, and features - viewpoint feature pairs The score of the k-th dependency type, Representative viewpoint derivation aspects, directions, and features - viewpoint feature pairs The probability of a fraction, Representative aspects derive viewpoint characteristics in the direction of viewpoints - aspect characteristic pairs The score of the k-th dependency type, Representative aspects derive viewpoint characteristics in the direction of viewpoints - aspect characteristic pairs The probability of a fraction and It represents the weight and bias that produce the k-th score.
[0096] In an optional embodiment of this application, after obtaining the final prediction result, the method further includes:
[0097] S16: Analyze the sentiment dependency information at the span level to obtain a set of text sentiment analysis results.
[0098] S17: Based on the results of text sentiment analysis, the network is trained using a balanced cross-entropy loss function, and the loss function is optimized using gradient descent and backpropagation algorithms.
[0099] In an optional embodiment of this application, in obtaining the set of text sentiment analysis results:
[0100] If the analytical result obtained in the two-dimensional matrix of the aspect derivation of the viewpoint cannot be obtained in the two-dimensional matrix of the viewpoint derivation aspect, then this result is added to the set of text sentiment analysis results.
[0101] If the analytical result obtained in the two-dimensional matrix of the viewpoint derivation cannot be obtained in the two-dimensional matrix of the viewpoint derivation, then this result is added to the set of text sentiment analysis results.
[0102] If different emotional dependencies are predicted for the same aspect and viewpoint in the two-dimensional matrix of aspect-to-viewpoint derivation and the two-dimensional matrix of viewpoint-to-aspect derivation, then the maximum emotional dependency probability predicted by the two matrix models is used to determine the result, and the result with the maximum emotional dependency probability is added to the set of the final prediction results.
[0103] Secondly, embodiments of the present invention provide a system based on a fine-grained text sentiment extraction method, comprising:
[0104] The semantic vector extraction layer is used to extract semantic features from the input text at the character level and obtain the first semantic vector, and to extract semantic features from the input text at the word level and obtain the second semantic vector.
[0105] The fully connected layer is used to concatenate the first semantic vector and the second semantic vector to obtain a deep semantic representation.
[0106] Aspect-viewpoint extraction layer is used to extract features from the deep semantic representation using a dimensionality reduction linear layer and a nonlinear function to obtain aspect features and viewpoint features.
[0107] A bidirectional two-dimensional matrix layer is used to perform sentiment dependency parsing on the aspect features and opinion features to obtain word-level sentiment dependency information.
[0108] The parsing prediction layer is used to combine the word-level sentiment dependency information with the aspect features and the opinion features to obtain span-level sentiment dependency information; and to parse the span-level sentiment dependency information to obtain the final prediction result.
[0109] Combination Figures 3-5In this system, the entire sentiment extraction process is divided into two stages. In the first stage, the semantic vector extraction layer uses two different network structures (BILSTM and CNN) to mine character-level and word-level semantic vectors, which are then concatenated and superimposed before being fed into a fully connected layer to form a new deep semantic representation. In the second stage, the aspect-opinion extraction layer processes the fused semantic features through a dimensionality reduction linear layer and a non-linear function to extract aspect and opinion features. After extracting opinion and aspect words, a bidirectional two-dimensional matrix layer is constructed. This layer parses sentiment dependencies through two processes: aspect-to-opinion derivation (A->O) and opinion-to-aspect derivation (0->A). Then, in the parsing and prediction layer, character-level sentiment dependency information is combined with the previously extracted opinion and aspect words to obtain span-level sentiment dependency information. Finally, a defined decoding strategy is used to obtain the results.
[0110] Thirdly, embodiments of the present invention also provide a computer-readable storage medium for storing a computer program. The computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the fine-grained text sentiment extraction method described above.
[0111] The computer-readable storage medium may include random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0112] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A fine-grained text sentiment extraction method, characterized in that, Includes the following steps: Semantic features are extracted from the input text at the character level to obtain a first semantic vector, and semantic features are extracted from the input text at the word level to obtain a second semantic vector; The first semantic vector and the second semantic vector are superimposed by concatenation to obtain a deeper semantic representation; The deep semantic representation is used to extract features by using a dimensionality reduction linear layer and a nonlinear function to obtain aspect features and viewpoint features; A bidirectional two-dimensional matrix is constructed to perform sentiment dependency analysis on the aspect features and opinion features to obtain word-level sentiment dependency information. Specifically, the process includes the following steps: All words in the input text are paired to form a two-dimensional matrix for inferring viewpoints based on aspects. The horizontal axis of the two-dimensional matrix represents viewpoints and the vertical axis represents aspects. When the two-dimensional matrix resolves the sentiment dependence between viewpoint feature and aspect feature pairs, the corresponding case polarity is filled in the coordinates of the last feature word of a viewpoint and the last feature word of an aspect. All words in the input text are paired to form a two-dimensional matrix based on opinion inference. The horizontal axis of the two-dimensional matrix represents the aspect and the vertical axis represents the opinion. When the two-dimensional matrix resolves the sentiment dependence between aspect feature and opinion feature pairs, the corresponding case polarity is filled in the coordinates of the last feature word of an aspect and the coordinates of the last feature word of an opinion. By combining the word-level sentiment dependency information with the aspect features and the opinion features, span-level sentiment dependency information is obtained.
2. The text sentiment extraction method based on fine-grained analysis according to claim 1, characterized in that... In extracting semantic features from the input text at the character level and obtaining the first semantic vector, the process includes: The input text is preprocessed by taking each character in the input text as input to the model and mapping it into a high-dimensional character vector. The first semantic vector is obtained by extracting features from the word vector using a BILSTM network.
3. The text sentiment extraction method based on fine-grained analysis according to claim 1, characterized in that... In extracting semantic features from input text at the word granularity level and obtaining a second semantic vector, the following are included: The input text is preprocessed by segmenting the entire input text using the jieba word segmentation tool to obtain a set of all segmented words for the entire input text. The Word2Vec algorithm is used to map all the word segmentation sets to a high-dimensional vector space to obtain high-dimensional word vectors; The word vectors are input into the input layer of a convolutional neural network. Multiple filters are used in the convolutional layer of the convolutional neural network to extract features. Then, the extracted features are max-pooled in the width of the pooling layer of the convolutional neural network. Finally, the features are connected through a fully connected layer to obtain a second semantic vector that contains the whole.
4. The text sentiment extraction method based on fine-grained analysis according to claim 1, characterized in that, In the feature extraction of the deep semantic representation using dimensionality reduction linear layers and nonlinear functions, the calculation formula for feature extraction is as follows: ; ; in, and It represents both aspectual and viewpoint characteristics. and For the model weights, and For the bias term of the model, This represents a nonlinear function.
5. The text sentiment extraction method based on fine-grained analysis according to claim 1, characterized in that, The formula for performing two-dimensional matrix analysis is: ; ; ; ; in, Representative viewpoint derivation aspects, directions, and features - viewpoint feature pairs The score of the k-th dependency type, Representative viewpoint derivation aspects, directions, and features - viewpoint feature pairs The probability of a fraction, Representative aspects derive viewpoint characteristics in the direction of viewpoints - aspect characteristic pairs The score of the k-th dependency type, Representative aspects derive viewpoint characteristics in the direction of viewpoints - aspect characteristic pairs The probability of a fraction and It represents the weight and bias that produce the k-th score.
6. The text sentiment extraction method based on fine-grained analysis according to claim 1, characterized in that... After obtaining the final prediction results, it also includes: The sentiment dependency information at the aforementioned span levels is analyzed to obtain a set of text sentiment analysis results. Based on the results of text sentiment analysis, the network is trained using a balanced cross-entropy loss function, and the loss function is continuously optimized through gradient descent and backpropagation algorithms.
7. A fine-grained text sentiment extraction method according to claim 6, characterized in that... In the set of obtained text sentiment analysis results: If the analytical result obtained in the two-dimensional matrix of the aspect derivation of the viewpoint cannot be obtained in the two-dimensional matrix of the viewpoint derivation aspect, then this result is added to the set of text sentiment analysis results. If the analytical result obtained in the two-dimensional matrix of the viewpoint derivation cannot be obtained in the two-dimensional matrix of the viewpoint derivation, then this result is added to the set of text sentiment analysis results. If different emotional dependencies are predicted for the same aspect and viewpoint in the two-dimensional matrix of aspect-to-viewpoint derivation and the two-dimensional matrix of viewpoint-to-aspect derivation, then the maximum emotional dependency probability predicted by the two matrix models is used to determine the result, and the result with the maximum emotional dependency probability is added to the set of the final prediction results.
8. A system based on a fine-grained text sentiment extraction method, characterized in that, include: The semantic vector extraction layer is used to extract semantic features from the input text at the character level and obtain the first semantic vector, and to extract semantic features from the input text at the word level and obtain the second semantic vector. The fully connected layer is used to concatenate the first semantic vector and the second semantic vector to obtain a deep semantic representation. Aspect-viewpoint extraction layer is used to extract features from the deep semantic representation using a dimensionality reduction linear layer and a nonlinear function to obtain aspect features and viewpoint features. A bidirectional two-dimensional matrix layer is used to perform sentiment dependency parsing on the aspect features and opinion features to obtain word-level sentiment dependency information. The specific implementation process of the bidirectional two-dimensional matrix layer includes: All words in the input text are paired to form a two-dimensional matrix for inferring viewpoints based on aspects. The horizontal axis of the two-dimensional matrix represents viewpoints and the vertical axis represents aspects. When the two-dimensional matrix resolves the sentiment dependence between viewpoint feature and aspect feature pairs, the corresponding case polarity is filled in the coordinates of the last feature word of a viewpoint and the last feature word of an aspect. All words in the input text are paired to form a two-dimensional matrix based on opinion inference. The horizontal axis of the two-dimensional matrix represents the aspect and the vertical axis represents the opinion. When the two-dimensional matrix resolves the sentiment dependence between aspect feature and opinion feature pairs, the corresponding case polarity is filled in the coordinates of the last feature word of an aspect and the coordinates of the last feature word of an opinion. The parsing prediction layer is used to combine the word-level sentiment dependency information with the aspect features and the opinion features to obtain span-level sentiment dependency information; and to parse the span-level sentiment dependency information to obtain the final prediction result.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program, the computer program being stored on the computer-readable storage medium, the computer program being executed by a processor to implement a fine-grained text sentiment extraction method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Deep learning sentiment analysis model based on semantic enhancement and analysis method thereof
CN110502753A
Multi-level Chinese fine-grained sentiment analysis method based on deep learning
CN112861524A