A semantic rule-based Mongolian reverse reconstruction sentiment distribution learning method

By introducing semantic rules and reverse reconstruction losses in Mongolian emotional distribution learning, the problems of inaccurate data sets and information loss in the prior art are solved, and more accurate emotional distribution data sets and higher model training accuracy are achieved.

CN115146024BActive Publication Date: 2025-03-28INNER MONGOLIA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210530295.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-16
Publication Date
2025-03-28
Estimated Expiration
2042-05-16

AI Technical Summary

Technical Problem

The prior art lacks text data sets with marked emotional distribution in Mongolian emotional distribution learning, and the marking enhancement method based on prior knowledge cannot accurately consider the correlation between emotions and the impact of degree words and negative words on emotional words, resulting in the generated emotional distribution data sets being inaccurate enough.

Method used

A Mongolian reverse reconstruction of emotion distribution learning method based on semantic rules is adopted. By introducing semantic rules and word combinations, different weights are given to the emotion types in the emotional corpus, and data augmentation is used for emotional dictionary and emotion wheel to generate a more accurate emotion distribution data set. Introduce reverse reconstruction loss in model training to reduce the problem of information loss during forward mapping.

Benefits of technology

The accuracy of the Mongolian emotional distribution learning data set is improved, the accuracy of model training is enhanced, the problem of information loss is solved, and the generated emotional distribution data set is more accurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115146024B_ABST
    Figure CN115146024B_ABST
Patent Text Reader

Abstract

A Mongolian reverse reconstruction sentiment distribution learning method based on semantic rules, extracts sentiment words, degree words and negation words from the preprocessed Mongolian sentiment corpus, assigns different weights to the sentiment types corresponding to the sentiment corpus through semantic rules and word collocation; uses sentiment dictionary and sentiment wheel to perform data enhancement on the sentiment corpus to generate sentiment distribution; introduces reverse reconstruction loss in the training model, and trains the obtained sentiment distribution data set for sentiment distribution prediction task; uses the trained model to predict the sentiment distribution of the Mongolian sentiment corpus in the test set. The present invention incorporates semantic rules based on the sentiment dictionary and sentiment wheel tag enhancement method, so that the sentiment distribution data set obtained by enhancing the single-label sentiment data set is more accurate. Introducing reverse reconstruction loss in the model training process alleviates the information loss problem caused by dimensionality reduction in the forward mapping process, thereby improving the accuracy of model training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of artificial intelligence, relates to sentiment analysis of natural language processing, and particularly to a Mongolian reverse reconstruction sentiment distribution learning method based on semantic rules. Background Art

[0002] Sentiment analysis, as an important research topic in the field of natural language processing, has attracted more and more attention from researchers. Traditional text sentiment analysis mostly assumes that each sentence has only one or more associated sentiment tags. It can identify the types of emotions contained in the target sentence, but cannot quantitatively answer the degree of expression of each related emotion. Therefore, sentiment distribution learning can be used to predict the specific proportion of all emotions contained in a sentence to solve this problem.

[0003] Sentiment distribution learning is a multi-sentiment analysis model proposed in recent years for dealing with emotional ambiguity. Its core idea is to record the expression degree of each emotion in the emotional corpus through sentiment distribution, which is suitable for dealing with emotional ambiguity. This study believes that the emotions expressed by the text are composed of multiple basic emotions. Each emotion has different expression strengths in the same corpus. The expression strength of each emotion is between 0 and 1, and the sum of the expression degrees of all basic emotions is 1. The expression degrees of all these basic emotions in the emotional corpus together constitute an emotional distribution. For example, the corpus "The color of the real object is too different from the picture!" expresses 50% anger, 30% disgust and 20% surprise. These different emotional expression degrees constitute an emotional distribution of the corpus. Therefore, the process of supervised learning using emotional corpus and its corresponding emotional distribution is called sentiment distribution learning.

[0004] Mongolian is the daily language of the Mongolian people in Inner Mongolia Autonomous Region of my country. As one of the many netizens, Mongolian people also have an important influence on the development of online public opinion. Since the research on sentiment analysis of Mongolian started late, the sentiment distribution learning based on Mongolian is a new direction of Mongolian sentiment analysis research.

[0005] At present, an important difficulty faced by sentiment distribution learning is the lack of text datasets with annotated sentiment distribution. Due to the high cost of manual annotation, a large number of existing single-label sentiment datasets can be used through the method of tag enhancement to enhance the sentiment labels of sentiment corpus into sentiment distribution. For Mongolian, single-label sentiment datasets are relatively scarce. How to efficiently use the only single-label sentiment dataset to construct a sentiment distribution dataset is an urgent problem to be solved. For example, for the above-mentioned corpus "The difference between the color of the real object and the picture is too big!", its original single label is "anger". Now it is necessary to use the method of tag enhancement to restore the other emotions to be expressed in the corpus and the intensity of each emotion, so as to generate the sentiment distribution corresponding to the sentiment corpus.

[0006] Prior knowledge-based tag enhancement methods have been widely used, such as sentiment distribution tag enhancement methods based on sentiment dictionaries, text sentiment distribution tag enhancement methods based on sentiment wheels and sentiment dictionaries, etc. However, the enhancement methods based on sentiment dictionaries do not take into account the correlation between various emotions. Although the enhancement methods based on sentiment wheels and sentiment dictionaries take into account the correlation between emotions, they do not take into account the influence of degree words and negative words on sentiment words, resulting in the final constructed data set being inaccurate. Therefore, for low-resource languages ​​such as Mongolian, how to introduce other rules based on the above two prior knowledge to make the generated sentiment distribution data set more accurate is a problem worth studying in the field of data enhancement.

[0007] Usually, in the process of model training, since the dimension of the input instance feature space is much higher than the dimension of the category label space, the reduction of dimension in the mapping process will cause some loss of discriminative information, and the same is true for sentiment distribution learning. Therefore, in sentiment distribution learning, how to reduce the loss of discriminative information in the mapping process is also a problem worth studying. Summary of the invention

[0008] In order to overcome the shortcomings of the above-mentioned prior art, the purpose of the present invention is to provide a Mongolian reverse reconstruction sentiment distribution learning method based on semantic rules, which incorporates semantic rules on the basis of sentiment dictionary and sentiment wheel labeling enhancement method, so that the sentiment distribution data set obtained by enhancing the single-label sentiment data set is more accurate. In the subsequent model training process of sentiment distribution learning, the reverse reconstruction loss is introduced to alleviate the information loss problem caused by the reduction of dimension in the forward mapping process, so as to improve the accuracy of model training.

[0009] In order to achieve the above object, the technical solution adopted by the present invention is:

[0010] A Mongolian reverse reconstruction sentiment distribution learning method based on semantic rules includes the following steps:

[0011] Step 1, preprocessing Mongolian sentiment corpus;

[0012] Step 2, extracting sentiment words, degree words and negation words from the preprocessed Mongolian sentiment corpus, and assigning different weights to the sentiment types corresponding to the sentiment corpus through semantic rules and word collocation;

[0013] Step 3: Use the sentiment dictionary and sentiment wheel to perform data enhancement on the sentiment corpus and generate sentiment distribution;

[0014] Step 4, introduce the reverse reconstruction loss into the training model, and train the sentiment distribution prediction task on the sentiment distribution dataset obtained in step 3;

[0015] Step 5: Use the trained model to predict the sentiment distribution of the Mongolian sentiment corpus in the test set.

[0016] Compared with the prior art, the present invention has the following beneficial effects:

[0017] Firstly, the present invention enriches the research content of Mongolian sentiment analysis, and develops Mongolian from single-label sentiment classification training to multi-label sentiment distribution learning; secondly, the present invention improves the existing data enhancement method, and introduces semantic rules based on the sentiment wheel and sentiment dictionary prior knowledge, and incorporates the influence of degree words and negative words on sentiment words, so that the generated sentiment distribution data set is more accurate; thirdly, the present invention improves the lossy mapping compression problem existing in the existing model training, and compensates for the information loss caused by the forward mapping by adding the reverse reconstruction mapping, thereby improving the accuracy of the model training. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a schematic diagram of the overall process of the present invention.

[0019] Figure 2 Schematic diagram of data enhancement of the present invention.

[0020] Figure 3 It is a structural schematic diagram of the present invention introducing reverse reconstruction mapping.

[0021] Figure 4 This is a diagram of Plutchik's emotion wheel.

[0022] Figure 5 It is a visualization diagram of sentiment distribution. DETAILED DESCRIPTION

[0023] The embodiments of the present invention are described in detail below with reference to the accompanying drawings and examples.

[0024] like Figure 1As shown in FIG, the present invention is mainly a Mongolian reverse reconstruction sentiment distribution learning method based on semantic rules. The present invention is divided into two parts. The first part is data enhancement. This part is based on the prior knowledge of sentiment wheel and sentiment dictionary, and introduces semantic rules to enhance the single label data set into a sentiment distribution data set, such as Figure 2 The second part is the emotion distribution learning. This part uses the emotion distribution data set constructed above and combines the reverse reconstruction mapping added by the present invention to perform model training for Mongolian emotion distribution learning. The reverse reconstruction structure is introduced as shown in Figure 3 shown.

[0025] The method of the present invention specifically comprises the following steps:

[0026] Step 1: Preprocess the Mongolian sentiment corpus.

[0027] First, the Mongolian sentiment corpus is cleaned, and then BPE is used to perform word segmentation on Mongolian.

[0028] For the word segmentation operation, each Mongolian word is separated as the smallest unit. Taking "I am not very satisfied with his translation of this sentence" as an example, its corresponding Mongolian expression is " The result after word segmentation is ”.

[0029] Step 2: Extract sentiment words, degree words and negation words from the preprocessed Mongolian sentiment corpus, and assign different weights to the sentiment types corresponding to the sentiment corpus through semantic rules and word collocation. The specific steps are as follows:

[0030] Step 2.1, extract all sentiment words, degree words and negative words from the preprocessed Mongolian sentiment corpus. In this embodiment, sentiment words are extracted through the sentiment dictionary. (Satisfied)", assign weight 1 to all extracted sentiment words. Extract degree words " (too)", extract the negative word " (No)".

[0031] Step 2.2, determine the combination type of sentiment words according to semantic rules and modify the weight of the sentiment words.

[0032] It is not enough to rely on sentiment dictionary to construct sentiment distribution. Different word collocations and sentence patterns will affect the sentiment analysis of the text. For example, when negative words modify sentiment words, the sentiment tendency will change; when degree words modify sentiment words, the degree of sentiment will be affected. Therefore, when conducting text sentiment analysis, we should not only rely on sentiment dictionary, but also consider the influence of semantic rules and word collocation on sentiment analysis. Through the analysis of sentiment corpus, the types of sentiment word combinations in Mongolian sentiment corpus can be summarized into the following 6 types (the sentiment categories follow the 8 categories of emotions in Plutchik's emotional wheel: anger, disgust, sadness, surprise, fear, trust, happiness and expectation):

[0033] (1) Only sentiment words. For example, " (People were stunned.)", after word segmentation, the sentiment word " (Shocked)"," (Stunned)" belongs to the "surprise" emotion category among the 8 categories of emotions, and other words have no effect on the emotion of the whole sentence.

[0034] (2) Degree words and sentiment words. Sentiment words are modified by degree words, such as " (I am worried.)", after word segmentation, the sentiment word " (Worry)"," (worry)" corresponds to the main emotion category of the 8-category emotion classification, which is "fear". (very)" is a degree word, and sentiment words are " The emotion of “fear” is enhanced after the modification of “very”.

[0035] (3) Negative words and sentiment words. Sentiment words are modified by negative words, such as " (I don’t like being a taxi driver.)”, after word segmentation, the sentiment word “ (like)"," (Like)" corresponds to the main emotion category of the 8-category emotion classification, which is "happy", but it is negatively affected by the word " After the modification of "(not)", the emotional polarity changes.

[0036] (4) Negative words modify degree words and sentiment words. For example, " (I am not very satisfied with his translation of this sentence.)", after word segmentation, sentiment words are identified " (satisfy)"," (Satisfied)" corresponds to the main emotion category of the 8-category emotion classification, which is "trust". The emotion word is replaced by the degree word " (too)” modifies and strengthens the intensity of the emotion of “trust”, while the negative word “ (Not)” modifies this combination and reverses the emotional polarity, weakening the emotional enhancement caused by the degree word.

[0037] (5) Degree words modify negative words and sentiment words. For example, " (This is very inconvenient.)", after word segmentation, sentiment words are identified " (convenient)"," (convenience)" corresponds to the main emotion category of the 8-category emotion classification, which is "happy". The emotional word is negated by the word " (not)" modification, the emotional polarity is reversed, the degree word " (very)” modifies this combination to strengthen the emotion after the emotion reversal.

[0038] (6) Combination of multiple negative words and sentiment words. For example, " (I am not in a bad mood.)", after word segmentation, the sentiment word " (good)"," (good)" corresponds to the main emotion category of the 8-category emotion classification, which is "happy". The emotional word is negated by the word " (No)" modification, emotional polarity reversed once, (No)” modifies this combination, and the emotional polarity is reversed again. The two reversals make the emotional expression unchanged and consistent with the original.

[0039] For Mongolian, the word for negation is This negative word usually appears after the sentiment word. Therefore, when extracting sentiment words, if a negative word is found The sentiment polarity of the sentiment word becomes reversed, and the weight of the sentiment word is multiplied by "-1". To express double negation in Mongolian, you only need to add a negative after the first negative word. (translated as "not" related). Therefore, if not only And later it was discovered that The sentiment polarity of the sentiment word remains unchanged, and the weight of the sentiment word is determined according to the semantic rules in the corresponding sentiment word combination type.

[0040] The present invention roughly divides the commonly used degree words in Mongolian into two levels, each level corresponds to a different weight, and lists some example words for each level, as shown in Table 1.

[0041] Table 1 Example of degree word weights

[0042]

[0043] When extracting sentiment words, if degree words are identified, their degree levels are judged by querying the degree word dictionary, and the weights of the corresponding sentiment categories are modified in combination with the above six sentiment word combination types.

[0044] In this embodiment, according to the extracted keywords, it can be judged that the sentence in this embodiment belongs to the "negative word modification degree word emotional word combination" in the emotional word combination type. (Satisfied)" is a degree word After modification, the emotional intensity is enhanced. After query, it is found that the degree word " (too)" is a high-level degree word, so the weight of the sentiment word is modified to 1.5; the degree word sentiment word combination " (Too Satisfied)" is also negatively worded " (Not)” modification, the sentiment polarity is reversed, so that the sentiment enhancement caused by the degree word is weakened, and the weight becomes 1. Due to the modification of the negative word, the weight of the sentiment word is multiplied by -1, and the final weight becomes -1. Since the absolute value of the weight is still 1, the sentiment intensity does not change.

[0045] Step 3: Use the sentiment dictionary and Plutchik's sentiment wheel to perform data enhancement on the sentiment corpus and generate sentiment distribution.

[0046] Plutchik's emotion wheel is a theory that describes the relationship between human emotions from a psychological perspective. The emotion wheel contains 8 basic emotions: anger, disgust, sadness, surprise, fear, trust, happiness and expectation. These 8 emotions are divided into 4 groups of opposing emotions in the emotion wheel. Emotions in diagonal positions show opposition (negative correlation), and emotions in adjacent positions have similarities (positive correlation). In the emotion wheel, every two adjacent emotions are 45 degrees apart, and the corresponding distance is 1; opposing emotions are 180 degrees apart, and the corresponding distance is 4. From this definition, we can see that the distance between any two different emotions is an integer between 1 and 4, and the distance between the same emotion is 0. For example Figure 4 shown.

[0047] The present invention uses the eight emotions in the Plutchik emotion wheel to construct the emotion distribution. This step is based on the psychological distance defined by the Plutchik emotion wheel to establish the Gaussian distribution.

[0048] Given a certain emotion label α, α∈{1,2,…,C}, the present invention generates its corresponding emotion distribution according to the following two criteria: (1) the score of emotion label α should be the maximum value in the emotion distribution to ensure the dominance of the real emotion in the distribution; (2) the scores of other emotions should decrease as the psychological distance from α increases, so that the emotions that are more similar to the real emotion have higher scores in the distribution. Because all basic emotions are in a ring relationship on the emotion wheel, the generated emotion distribution should be a distribution centered on the real emotion label α and decreasing symmetrically from left to right.

[0049] The specific steps of generating sentiment distribution can be described as follows:

[0050] Step 3.1, establish a sentiment word set for the sentiment words that have been assigned different weights in step 2, and find the corresponding emotion label set in the Plutchik sentiment wheel for each sentiment word.

[0051] Specifically, for sentence s i All weighted sentiment words extracted from the n i Yes i The number of sentiment words in the i,k There are several associated emotion tags m k Yes i,k The number of emotion tags. For the emotion words with negative weights, they correspond to the emotion opposite to the original emotion. The text of a sentence can contain multiple emotion words, or there may be no emotion words; each emotion word is associated with at least one emotion tag.

[0052] In this embodiment, the sentiment word " (Satisfied)" is put into the sentiment word set because" (Satisfied)" originally had associated emotion categories "happy" and "trust", but because the weight of the emotion word changed from positive to negative, the emotion category associated with the emotion word changed from "happy" to its opposite emotion "sadness", and from "trust" to its opposite emotion "disgust", so these two associated emotions were put into the emotion label set. At this time, m k =2.

[0053] Step 3.2, use the psychological distance of the Plutchik emotion wheel to generate a Gaussian distribution for the true emotion labels corresponding to the Mongolian emotion corpus.

[0054] Based on the above two criteria, the present invention assumes that the emotion distribution generated from the emotion label follows a normal distribution, and uses a discrete Gaussian distribution to expand the emotion label α into a Gaussian distribution. It is a discrete Gaussian distribution centered on α and composed of the remaining 7 emotion labels e. Its calculation formula is as follows:

[0055]

[0056]

[0057] Where C is the number of emotion tags, σ is the standard deviation of discrete Gaussian distribution, in this invention, σ=0.5, and Z is the normalization factor, so that |e-α| is the distance between e and α. There are 8 emotion labels e, 1 represents anger, 2 represents expectation, 3 represents happiness, 4 represents trust, 5 represents fear, 6 represents surprise, 7 represents sadness, 8 represents disgust, and e=1 represents its initial value is 1;

[0058] Let α be sentence s i The true emotion label i When , the corresponding Gaussian distribution is generated

[0059] For example, for " (I am not satisfied with his translation of this sentence)" The original corresponding true single label is "disgust". Using the above formula, we can calculate the Gaussian distribution of the true emotion label.

[0060] Step 3.3, use the psychological distance of the Plutchik emotion wheel to generate a Gaussian distribution for the emotion labels corresponding to the first N emotion words with larger weights in the Mongolian emotion corpus.

[0061] Select the first N sentiment words with the largest absolute weights among the sentiment words, use the two formulas in step 3.2, and take α as the emotion label corresponding to the N sentiment words in the emotion wheel Generate Gaussian distribution

[0062] In this embodiment, since the sentiment word set contains only one sentiment word " (Satisfied)", then extract the sentiment word and use the two formulas in step 3.2 to generate Gaussian distributions for its corresponding sentiment labels "sad" and "disgusted" respectively and

[0063] Step 3.4, superimpose the two Gaussian distributions into a unified sentiment distribution.

[0064] Will and Superimpose to obtain the comprehensive sentiment distribution d i , the calculation formula is as follows:

[0065]

[0066] Among them, n i Yes i The number of sentiment words, m k It is a sentence i The kth sentiment word w i,k The number of sentiment labels, Is a sentiment word i,k The tth emotion label Gaussian distribution, λ is the true emotion label l i The weight coefficient is used to control the distribution In the emotional distribution i The proportion in .

[0067] The value range of the weight coefficient λ is [0,1]. When λ=1, the sentiment distribution d i Only the real emotional label of the sentence is considered, and the emotional word information in the sentence text is not used; when λ = 0, the emotional distribution d i It is generated only from the sentiment words and sentiment dictionary in the sentence, without considering the sentiment label of the sentence. Therefore, the weight coefficient λ is an important parameter affecting this tag enhancement method. In the present invention, λ=0.8.

[0068] In this embodiment, the example " (I am not satisfied with his translation of this sentence)” corresponds to the sentiment distribution of [8.52×10 -2 ,1.60×10 -4 ,0,0,4.00×10 -5 ,2.14×10 -2 ,2.43×10 -1 ,6.51×10 -1 ], the visual representation of this sentiment distribution is as follows Figure 5 shown.

[0069] Step 4: Introduce the reverse reconstruction loss into the training model and train the sentiment distribution prediction task on the sentiment distribution dataset obtained in step 3.

[0070] The training task in this step is to realize multi-label sentiment distribution by mapping the instance feature space p(x) to the sentiment distribution space q(x) through the coefficient matrix W. Under normal circumstances, since the dimension of the input instance feature space is much higher than the dimension of the sentiment distribution space, the mapping from p(x) to q(x) can be considered as a lossy mapping compression representation. Due to the reduction of dimensionality during the mapping process, this may cause the loss of identification information during the mapping process, omitting the basic information that should be inherited from the original input space, thereby affecting the learning performance of the model.

[0071] The present invention proposes a reverse reconstruction method, which adds reverse projection to the model and solves the above problem by minimizing the loss function of the reverse projection.

[0072] The specific steps are as follows:

[0073] Step 4.1, establish a reverse mapping from sentiment distribution to sentiment corpus for the training model, and reconstruct the loss function of the model by introducing the reverse reconstruction loss function.

[0074] First, a projection from the instance feature space p(x) to the sentiment distribution space q(x) is established to fully explore the mapping relationship between feature data and labels, and then a reverse reconstruction mapping f:q(x)→p(x) is established. This process is a step to reconstruct the feature space p(x), that is, the reverse reconstruction parameter W′ is introduced to reconstruct the instance feature space p(x) from the sentiment distribution space q(x), and a bidirectional mapping model is established, so that the predicted sentiment distribution matrix and the original sentiment distribution matrix are as similar as possible. The loss function J of the training model is as follows:

[0075]

[0076] Among them, L is the mapping loss, which is used to measure the distance between the predicted sentiment distribution and the true sentiment distribution; L′ is the reverse reconstruction loss function, which is used to measure the similarity between the model input feature matrix and the reconstructed feature matrix; in order to avoid model overfitting, we introduce and Regularization term, which is implemented using the Frobenius norm; γ1 and γ2 are trade-off parameters;

[0077] The mapping loss function L of the model is:

[0078]

[0079] p(x r )=sigmoid(Wx r )

[0080] The loss function L′ of the reverse reconstruction of the model:

[0081]

[0082] q(x j )=sigmoid(W′x j )

[0083]

[0084] Where W is the mapping parameter, g and h are the total number of sentences, r and j are intermediate variables, and x r represents the rth sentence, x jrepresents the jth sentence, p(x r ) and p(x j ) represents the instance feature space, q(x r ) and q(x j ) represents the sentiment distribution space.

[0085] In order to simplify the model, the optimal reconstruction parameter of W′ is defined as W T , then the two regular terms in the model's loss function J can be simplified to one, so the model's loss function is simplified to:

[0086]

[0087] Among them, γ is a balance parameter used to adjust the empirical error and model complexity.

[0088] In this embodiment, when training the model, first establish the sentence " (I am not very satisfied with his translation of this sentence)" to the sentiment distribution d i The mapping is then reconstructed from the sentiment distribution d i Through such a bidirectional mapping model, the predicted sentiment distribution matrix and the original sentiment distribution matrix are made as similar as possible during the training process.

[0089] Step 4.2: Use the sentiment distribution obtained in step 3 as the label of the sentiment corpus, and use the training model constructed in step 4.1 to train the sentiment distribution prediction task.

[0090] Step 5: Use the trained model to predict the sentiment distribution of the Mongolian sentiment corpus in the test set. (He actually refused!)”, the model will predict its sentiment distribution.

Claims

1. A Mongolian reverse reconstruction sentiment distribution learning method based on semantic rules, characterized in that: The steps include: Step 1, preprocessing Mongolian sentiment corpus; Step 2, extracting sentiment words, degree words and negation words from the preprocessed Mongolian sentiment corpus, and assigning different weights to the sentiment types corresponding to the sentiment corpus through semantic rules and word collocation; Step 3: Use the sentiment dictionary and sentiment wheel to perform data enhancement on the sentiment corpus and generate sentiment distribution; Step 4, introduce the reverse reconstruction loss into the training model, and train the sentiment distribution prediction task on the sentiment distribution dataset obtained in step 3; Step 5, using the trained model to predict the sentiment distribution of the Mongolian sentiment corpus in the test set; The step 4 comprises: Step 4.1, establish a reverse mapping from sentiment distribution to sentiment corpus for the training model, and reconstruct the loss function of the model by introducing the reverse reconstruction loss function; Step 4.2, using the sentiment distribution data set obtained in step 3 and the training model to perform training for the sentiment distribution prediction task; The loss function J of the training model is as follows: Among them, L is the mapping loss, which is used to measure the distance between the predicted emotion distribution and the true emotion distribution; L ′ is the reverse reconstruction loss function, which is used to measure the similarity between the model input feature matrix and the reconstructed feature matrix; in order to avoid overfitting of the model, and Regularization term, which is implemented using the Frobenius norm; γ1 and γ2 are trade-off parameters; The mapping loss function L of the model is: p(x r )=sigmoid(Wx r ) The loss function L of the reverse reconstruction of the model ′ : q(x j )=sigmoid(W ′ x j ) Where W is the mapping parameter, g and h are the total number of sentences, r and j are intermediate variables, and x r represents the rth sentence, x j represents the jth sentence, p(x r ) and p(x j ) represents the instance feature space, q(x r ) and q(x j ) represents the sentiment distribution space.

2. The Mongolian reverse reconstruction sentiment distribution learning method based on semantic rules according to claim 1 is characterized in that: In the step 1, a data cleaning operation is first performed on the Mongolian sentiment corpus, and then BPE is used to perform a word segmentation operation on Mongolian, with each Mongolian word being used as the smallest unit during word segmentation.

3. The Mongolian reverse reconstruction sentiment distribution learning method based on semantic rules according to claim 1 is characterized in that: The step 2 comprises: Step 2.1, extract all sentiment words, degree words and negation words from the preprocessed Mongolian sentiment corpus; Step 2.2, determine the combination type of sentiment words according to semantic rules and modify the weight of the sentiment words.

4. The Mongolian reverse reconstruction sentiment distribution learning method based on semantic rules according to claim 3 is characterized in that: In the step 2.1, sentiment words are extracted through the sentiment dictionary, and a weight of "1" is assigned to all the extracted sentiment words. Degree words and negation words are respectively extracted through the degree dictionary and the negation dictionary.

5. The Mongolian reverse reconstruction sentiment distribution learning method based on semantic rules according to claim 3 or 4 is characterized in that: In step 2.2, the sentiment word combination types in the Mongolian sentiment corpus are summarized into the following 6 types: (1) Only sentiment words; (2) Degree words and sentiment words, sentiment words are modified by degree words; (3) Negative words and sentiment words, sentiment words are modified by negative words; (4) Negative words modify degree words and sentiment words; (5) Degree words modify negation words and sentiment words; (6) Combination of multiple negative words and sentiment words; When extracting sentiment words, if negative words are found The sentiment polarity corresponding to the sentiment word becomes reversed, and the weight of the sentiment word is multiplied by "-1"; if not only And later it was discovered that Then the sentiment polarity of sentiment words remains unchanged, and the weight of sentiment words is determined according to the semantic rules in the corresponding sentiment word combination type; The degree words are divided into two levels: high and low. Each level corresponds to a different weight. When extracting sentiment words, if a degree word is recognized, its degree level is judged by querying the degree word dictionary, and the weight is modified for the corresponding emotion category in combination with the above 6 types of sentiment word combinations.

6. The Mongolian reverse reconstruction sentiment distribution learning method based on semantic rules according to claim 1 is characterized in that: The step 3 comprises: Step 3.1, establish a sentiment word set for the sentiment words that have been assigned different weights in step 2, and find the corresponding emotion label set in the sentiment wheel for each sentiment word; Step 3.2, using the psychological distance of the Plutchik emotion wheel to generate a Gaussian distribution for the true emotion labels corresponding to the Mongolian emotion corpus; Step 3.3, using the psychological distance of the Plutchik emotion wheel, a Gaussian distribution is generated for the emotion labels corresponding to the first N emotion words with larger weights in the Mongolian emotion corpus; Step 3.4, superimpose the two Gaussian distributions into a unified sentiment distribution.

7. The Mongolian reverse reconstruction sentiment distribution learning method based on semantic rules according to claim 6 is characterized in that: In step 3.1, for sentence s i All weighted sentiment words extracted from the Each sentiment word w i,k There are several associated emotion tags For sentiment words with negative weights, they correspond to the opposite sentiment to the original sentiment. The text of a sentence contains multiple sentiment words, or no sentiment words; each sentiment word is associated with at least one sentiment label; In step 3.2, the emotion label α is expanded into a Gaussian distribution using a discrete Gaussian distribution. It is a discrete Gaussian distribution centered on α and composed of the remaining 7 emotion labels e. Its calculation formula is as follows: Where C is the number of sentiment labels, σ is the standard deviation of the discrete Gaussian distribution, and Z is a normalization factor such that |e-α| is the distance between e and α in the emotional wheel. There are 8 emotional labels e, 1 for anger, 2 for expectation, 3 for happiness, 4 for trust, 5 for fear, 6 for surprise, 7 for sadness, and 8 for disgust. e=1 means that its initial value is 1; Let α be sentence s i The true emotion label i , generating its Gaussian distribution In step 3.3, select the first N sentiment words with the largest absolute value of weight among the sentiment words, and take α as the emotion label corresponding to the N sentiment words in the emotion wheel. Generate Gaussian distribution In step 3.4, and Superimpose to obtain the comprehensive sentiment distribution d i , the calculation formula is as follows: Among them, n i Yes i The number of sentiment words, m k It is a sentence i The kth sentiment word w i,k The number of sentiment labels, Is a sentiment word i,k The tth emotion label Gaussian distribution, λ is the true emotion label l i The weight coefficient is used to control the distribution In the emotional distribution i The proportion in .

8. The Mongolian reverse reconstruction sentiment distribution learning method based on semantic rules according to claim 1 is characterized in that: In step 4.1, a projection from the instance feature space p(x) to the sentiment distribution space q(x) is first established to fully explore the mapping relationship between feature data and labels, and then a reverse reconstruction mapping f:q(x)→p(x) is established. This process is a step of reconstructing the feature space p(x), that is, introducing the reverse reconstruction parameter W ′ Reconstruct the instance feature space p(x) from the emotion distribution space q(x), establish a bidirectional mapping model, and finally make the predicted emotion distribution matrix and the original emotion distribution matrix as similar as possible; In step 4.2, the sentiment distribution obtained in step 3 is used as the label of the sentiment corpus, and the model constructed in step 4.1 is used to train the sentiment distribution prediction task.

Citation Information

Patent Citations

  • Short text sentiment classification method based on Tree-LSTM and sentiment information

    CN110472244A

  • Priori knowledge fused Mongolian text sentiment analysis method

    CN113723084A