CN113704459A - Online text emotion analysis method based on neural network - Google Patents

Online text emotion analysis method based on neural network Download PDF

Info

Publication number
CN113704459A
CN113704459A CN202010428776.9A CN202010428776A CN113704459A CN 113704459 A CN113704459 A CN 113704459A CN 202010428776 A CN202010428776 A CN 202010428776A CN 113704459 A CN113704459 A CN 113704459A
Authority
CN
China
Prior art keywords
neural network
text
data
user
ubpnn
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010428776.9A
Other languages
Chinese (zh)
Inventor
王楚
王忠锋
李力刚
崔世界
邵帅
于诗矛
宋纯贺
赵冰洁
许驰
卞晶
黄剑龙
朱江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Jiangsu Electric Power Co ltd Marketing Service Center
Shenyang Institute of Automation of CAS
Original Assignee
State Grid Jiangsu Electric Power Co ltd Marketing Service Center
Shenyang Institute of Automation of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Jiangsu Electric Power Co ltd Marketing Service Center, Shenyang Institute of Automation of CAS filed Critical State Grid Jiangsu Electric Power Co ltd Marketing Service Center
Priority to CN202010428776.9A priority Critical patent/CN113704459A/en
Publication of CN113704459A publication Critical patent/CN113704459A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0203Market surveys; Market polls

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Accounting & Taxation (AREA)
  • Data Mining & Analysis (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Game Theory and Decision Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to an online text emotion analysis method based on a neural network, which comprises the following steps: the method comprises the following steps: preprocessing the online text sample data, and manually marking emotion assessment grades in advance; step two: constructing an initial UBPNN neural network model for online text emotion analysis, and training the model by using training set data; calculating a loss function every time, calculating the gradient of neurons in an output layer, reversely transmitting and updating the network parameter value of each layer, and obtaining an optimized UBPNN neural network model and each network parameter until a training stopping condition is reached; step three: and acquiring actual text corpus data, and processing the data by using the optimized UBPNN neural network model to acquire an online text emotion analysis result. The method has the function of analyzing the emotional tendency of the user comment quickly and accurately, and automatically analyzes and provides the user evaluation result by analyzing the user evaluation text.

Description

Online text emotion analysis method based on neural network
Technical Field
The invention belongs to the field of machine learning and text mining, and particularly relates to an emotion analysis method for online commodity evaluation based on a text.
Background
In an online interactive platform, text analysis greatly changes the communication and thinking modes of people, and promotes the explosive growth of user generated information. In recent years, a large amount of text generated by users has become one of the most representative data sources of big data. Mining and analyzing user generated information has become an important component of social development research. As an emerging information processing technology, emotion analysis, which is a social media text for analyzing, processing, summarizing, and reasoning about subjective text with emotion, has recently received a great deal of attention in both academic and industrial fields, and has been widely applied to many fields of the internet. Even in life, the emotion analysis method has a wide application range, such as in the field of user interaction of service robots in power business halls, and the traditional emotion analysis research work mainly focuses on analyzing text emotion, but ignores individual differences of users in emotion expression, thereby affecting the quality of analysis results. To solve these problems, the present invention aims to solve the personalized emotion analysis problem. In consideration of the wide application of the BP neural network technology in social media processing, the invention provides various models based on the BP neural network to apply the social media text personalized emotion analysis method to online commodity comments.
Sentiment Analysis (SA) is a process of analyzing, processing, summarizing, and reasoning about subjective text with sentiment expressions (e.g., micro blogs, online reviews, online news, etc.). The history of the emotional analytics study is not long. It started to receive widespread attention and rapidly developed around 2000 and then became a hot topic in the fields of natural language processing and text mining. There are also many alternative names and similar techniques for emotion analysis, such as opinion mining, emotion mining, subjective analysis, etc., all of which can be studied under emotion analysis. For example, for movie reviews, the user's evaluation of the movie may be identified and analyzed, or the product reviews of the digital camera may be analyzed, such as the user's emotional tendency for "price", "size", "zoom", and other indicators. Currently, emotion analysis has become a comprehensive research field across subjects, such as natural language processing, information retrieval, computational linguistics, machine learning, artificial intelligence and the like. The existing text emotion analysis algorithm mainly relates to the viewpoint and the opinion of a user on a text. Due to the lack of interpretation of the user characteristics of the text, these algorithms have difficulty reflecting the user's true emotional expressions completely accurately. In order to overcome the defects of the existing method, the invention can provide a personalized text emotion analysis method by introducing the influence of users and even product functions. Although emotion analysis of text is currently widely studied and performs well in many public evaluation tasks. However, there has been little research on truly available text emotion analysis tools, particularly personalized text emotion analysis tools, and to some extent has been overlooked by scholars and the industry. Meanwhile, how to dynamically capture the personalized emotion preference of the user also provides a new challenge for emotion analysis. Since personalized sentiment analysis introduces user information, it may cause a "cold start" problem for the recommendation system, including two cases: inactive users and non-present users. An inactive user usually has no history, so that the influence of the user or a product is difficult to accurately obtain through a personalized emotion model; and the new user does not record documents in the system at all, which may result in that the traditional personalized emotion analysis model cannot be used at all. For some product review data with an evaluation target, there may also be a user problem similar to "cold start". The present invention is primarily directed to users that have not been present.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides an online text sentiment analysis method based on a neural network, which can be used for quickly and accurately analyzing commercial comment sentiment tendency of a user, automatically analyzing an evaluation result of the user and visually displaying the user preference degree by adopting visualization.
The technical scheme adopted by the invention for realizing the purpose is as follows: an online text emotion analysis method based on a neural network comprises the following steps:
the method comprises the following steps: preprocessing the online text sample data, and manually marking emotion assessment grades in advance;
step two: constructing an initial UBPNN neural network model for online text emotion analysis, and training the model by using training set data; calculating a loss function every time, calculating the gradient of neurons in an output layer, and reversely propagating and updating the network parameter value of each layer until a cutoff condition is reached to obtain an optimized UBPNN neural network model and each network parameter;
step three: and acquiring actual text corpus data, and processing the data by using the optimized UBPNN neural network model to acquire an online text emotion analysis result.
Dividing the sample data into a training set and a verification set, training the UBPNN neural network model by using the data in the training set, and verifying by using the data in the verification set.
In the second step, an initial UBPNN neural network model for online text emotion analysis is constructed, and training the model by using training set data comprises the following steps:
embedding words of all words of an input sentence as semantic representation of the sentence; for the input semantic representation, acquiring the semantic representation of the hidden layer by using linear operation of matrix multiplication and a nonlinear activation function; inputting semantic representation of a hidden layer, and obtaining sentence-level semantic representation by using dimension reduction operation; combining the sentence representation form and the user representation form and inputting the combination into a classification layer, and combining the functions of user information on the sentence level; the classification layer maps the obtained vectors into a two-dimensional emotion space, and performs emotion classification by using a softmax method;
inputting a model: training set D { ((x)1k,...,xdk),(y1k,...,y5k),uk) Where k is 1, M is the number of training data;
and (3) outputting a model: training the optimized UBPNN neural network and network parameters;
wherein (x)1k,...,xdk) Is a word vector, (y)1k,...,y5k) For hidden layer output, ukManually pre-labeled emotional ratings representing characteristics of the user.
And the training set D is obtained after the sentences in the original online text sample data are subjected to word segmentation and word deactivation.
The method for constructing the online text emotion analysis UBPNN neural network model specifically comprises the following steps:
uniformly distributing parameters in the network and randomly initializing;
obtaining an integrated word vector sentence representation according to the word vectors in the sentences;
Figure BDA0002499732890000031
calculating the weight of the word by using a TF-IDF method, and performing weighting processing on the integrated word vector sentence by using the weight;
inputting the weighted word vector into an input layer by combining the user characteristics;
b=g(Wb[x,u]+tb)
the input layer takes the output as hidden layer input;
y=g(Wyb+ty)
hidden layer output, combining with the user word vector and inputting to an output layer;
s=softmax(Ws[y,u]+ts)
where u is the user's embedding feature, Wb,tb,Wy,ty,WsAnd tsIs a trainable parameter and g (.) is the tanh activation function.
The calculating of the weight of the word using the TF-IDF method includes:
for a text set containing i documents, the document with sequence number i is denoted as Di=(W1,i,W2,i,...,Wn,i),WnIs the nth text word in the document;
the weight of the word is calculated according to the formula: TFIDF ═ TF × log (Ndoc/IDF);
where TF is the frequency of input, IDF is the number of times the word appears in all text in the corpus, and Ndoc is the total number of words in the corpus.
The method adopts an adapelta optimization method to carry out gradient back propagation.
Inputting verification data into a UBPNN neural network model to obtain a corresponding evaluation grade result, manually marking emotion evaluation grades in advance for comparison, stopping iteration if the emotion evaluation grades meet an error range, and obtaining an optimized UBPNN neural network and network parameters.
Further comprising: and automatically mapping and associating the online text emotion analysis result with the original actual text corpus data of the user according to the emotion rating, marking the preference degree, and performing visual display for visually displaying the preference degree of the user.
The method is to adopt the color gradient sequence of strong, dark and weak to color and label the information for the actual text corpus data of different users.
The invention has the following beneficial effects and advantages:
1. the method carries out emotion analysis on the text based on the user feature vector, and has the function of analyzing the commercial comment emotion tendency of the user quickly and accurately;
2. the method has the advantages that personalized emotion analysis is introduced into the commercial comments, so that the usability and the reasonability of the traditional emotion analysis technology are enhanced;
3. the method has the advantages of solving the cold start problem existing in personalized emotion analysis;
4. the method automatically analyzes the user evaluation result by analyzing the user evaluation text, and visually displays the user preference degree by adopting visual visualization, so that the effect is obvious.
Drawings
FIG. 1 is a schematic diagram of emotion analysis based on BP neural network according to the present invention;
FIG. 2 is a schematic diagram of the TF-IDF algorithm of the present invention;
FIG. 3 is a diagram of a word vector model according to the present invention.
Detailed Description
The steps performed in the following are further described with reference to the figures and specific applications of the present invention.
Herein, we use a BP neural network based approach to process textual emotion analysis. As shown in fig. 1, the BP neural network method has been widely used and developed in many fields. In particular, the BP neural network is a multi-layer feed-forward network trained by an error back-propagation algorithm. It is one of the most widely used neural network models. The BP network can learn and store a large number of input/output pattern mappings without having to reveal mathematical equations for such mappings in advance. The learning rule is to use a gradient descent method and combine a back propagation algorithm to continuously adjust the weight and the threshold value of the network so as to obtain the minimum network variance sum. The BP neural network model topology comprises an input layer, a hidden layer and an output layer. The learning process of the BP algorithm (back propagation algorithm) includes two processes: forward propagation of information and backward propagation of errors. The input layer neurons are responsible for receiving input information from the outside world and transmitting it to the middle layer neurons. The middle layer is an internal information processing layer and is responsible for information conversion. The intermediate layer can be designed as a single-layer or multi-layer structure, depending on the ability of the information to vary. The last hidden layer conveys information to each neuron in the output layer. After further processing, the forward propagation process of learning is completed, and the information processing result is output from the output layer to the outside. When the actual output does not match the expected output, it will enter the error back propagation phase. And correcting errors through the output layer, correcting the weight of each layer according to the error gradient, and reversely transmitting the hidden layer and the input layer by layer. The forward propagation and error backward propagation process of the repeated information is a process of continuously adjusting the weight of each layer and is also a process of learning and training of the neural network. This process continues until the error in the network output is reduced to an acceptable level or preset. The number of learning is determined. The method is used for solving the problem of personalized emotion analysis of text comments, and is specifically explained as follows.
The data sets employed by the present invention are Yelp2013 and Yelp 2014. The data set includes 470 ten thousand user ratings, 15 more than ten thousand merchant information, 20 ten thousand pictures, and 12 metropolis. In addition, 100 million tips of 110 multiple users are covered, and over 120 million merchant attributes (such as business hours, whether a parking lot exists, whether reservation can be made, environment and other information) are covered, and the total number of users signed in at each merchant is increased along with the time. The reviews in the dataset are divided into 5 levels, and the 5 levels are respectively in english: "Eek, metals not", "Meh, I have experienced better bet", "A-OK", "Yay! I am a fun "," Woohoo! As good As it gets! ". As shown in table 1, the larger the star count of the user for the merchant, the better the evaluation of the customer.
TABLE 1 evaluation of a Sandwich restaurant on the Yelp Web site and rating examples thereof
Figure BDA0002499732890000061
FIG. 2 shows a text word level semantic representation of a 3-dimensional vector space. Each segment of text is represented by the weight of three word attributes. After extending to the n-dimensional space, for a text set containing i documents, the document with sequence number i is represented as Di=(W1,i,W2,i,...,Wn,i),WnIs the nth text word in the document. Herein, the weights of the words are calculated using the TF-IDF method, which is as follows: TFIDF ═ TF × log (Ndoc/DF) ITF is the frequency of input, IDF is the number of times the word appears in all the texts in the corpus, and Ndoc is the total number of words in the corpus.
We use Google's open source pre-trained Word2vec Word training method to obtain a representation of a Word vector. First a word is selected in the middle of a sentence as an input word and then a parameter for skip window is defined, which indicates the number of words selected from one side (left or right) of the currently input word. Another parameter is num _ skip, which indicates how many different words we have selected from the entire window as output words. Based on these training data, the neural network will output a probability distribution that represents the probability that each word in the dictionary is an output word. If two different words have very similar "contexts" (window words are very similar), the embedded vectors for the two words will be very similar by training with the Word2Vec model. Therefore, we can better obtain semantic representations at the word level for emotion classification of text. In the vector space model, words and words are independent relationships, and semantic features at the word level cannot be prepared. The model is shown in fig. 3.
The current text emotion classification and personalization method has the following defects:
1) current text emotion analysis methods ignore individual differences between users.
2) And (4) ignoring potential personalization factors of the user, such as language habits, user personality, viewpoint bias and the like.
3) How to accurately acquire the dependency relationship between the text and the user and grasp the potential personality of the user has great significance for emotion classification. In order to solve the problems, a neural network model UBPNN based on user emotion is provided.
Figure BDA0002499732890000071
Where l is the length of sentence x, e (x)i) Is the word xiThe word of (2) is embedded. We apply the activation function g (.) for nonlinear transformation projection.
b=g(Wbx+tb) (2)
y=g(Wyb+ty) (3)
s=softmax(Wsy+ts) (4)
Wherein Wb,tb,Wy,ty,WsAnd tsIs a trainable parameter and g (.) is the tanh activation function.
b=g(Wb[x,u]+tb) (5)
y=g(Wyb+ty) (6)
s=softmax(Ws[y,u]+ts) (7)
Where u is user embedding, Wb,tb,Wy,ty,WsAnd tsIs a trainable parameter and g (.) is the tanh activation function.
The loss function is calculated by the formula:
Figure BDA0002499732890000081
where D is the number of training set texts, C represents the number of emotion classes,
Figure BDA0002499732890000082
is a function for measuring whether a certain emotion is correctly classified, if the emotion is correctly classified, the emotion is 1, otherwise, the emotion is 0.
The hyper-parameters of the model of the invention are set as follows:
activation function: tan h
Word vector dimension: 200 (word vector from wikipedia 2014 year data pre-trained by GLOVE method)
User vector dimension: 200
Input layer input form is (user vector, emotion word vector), input dimension 400, output dimension 200 hidden layer input dimension 200, output dimension 100
Output layer input dimension 100, output dimension is the number of emotion categories (i.e. 5)
The training optimization method comprises the following steps: adadelta
The word segmentation method comprises the following steps: stanford CoreNLP.
Conditions for stopping training: the training is stopped immediately if the effect on the validation set becomes worse.
An input layer: words of all words of the input sentence are embedded as semantic representations of the sentence. Meanwhile, the user of the corresponding sentence is randomly initialized into a vector with a certain dimension, and the combined sentence represents the influence of the user information on the word semantic level in the common input model. Hiding the layer: for the input semantic representation, linear operation of matrix multiplication and a nonlinear activation function are used to obtain the semantic representation of the hidden layer. An output layer: the semantic representation of the hidden layer is input, and the semantic representation at the sentence level is obtained by using the dimension reduction operation. The sentence representation is combined with the user representation and input into the classification layer, wherein the role of the user information on the sentence level is combined. A classification layer: and mapping the obtained vector into a two-dimensional emotion space, and performing emotion classification by using a softmax method. The whole process is shown in table 2.
TABLE 2
Figure BDA0002499732890000091
Due to the complexity of the cold start problem in personalized emotion analysis, emotion analysis is only performed for users who never appeared. Based on the UBPNN model mentioned above, we obtain a vector representation of all users. In the test, for users who never appeared, the arithmetic mean of vectors based on user features was used as a representation of such users and combined with text for emotion classification.
In the measurement of the experiment, the accuracy represents the proportion of correctly classified positive samples. Precision TP/(TP + FP).
Recall is a measure of coverage. There are several positive examples of metrics. The recall ratio TP/(TP + FN) TP/P
The F value is the average of the precision and recall. F value 0.5 ═ precision + recall rate)
Accuracy is the most common assessment index, accuracy ═ TP + TN)/(P + N). It is the number of correctly sorted samples divided by the total number of samples. The higher the accuracy, the better the classifier;
where P is the number of positive samples; n is the number of negative samples; TP (true case) is the prediction of a positive sample as a positive sample; FN (false negative) denotes predicting positive samples as negative samples; FP (false positive case) is the prediction of negative samples as positive samples; TN (true inverse) means that negative samples are predicted as negative samples
Root Mean Square Error (RMSE), which is the square root of the ratio of the square of the deviation of the predicted value from the true value to the number of observations n. For measuring the deviation between the predicted value and the true value.
The results of the experiments are shown in tables 3 and 4.
Table 3 experimental results for the Yelp2013 data set
Figure BDA0002499732890000101
Figure BDA0002499732890000111
Table 4 experimental results for the Yelp2014 data set
Figure BDA0002499732890000112
Experimental results show that the UPBNN method proposed herein outperforms the other baseline methods on both datasets.
The method can also automatically map and correlate the online text sentiment analysis result with the original actual text corpus data of the user according to the sentiment evaluation grade, and perform information coloring and labeling preference degrees for the actual text corpus data of different users by adopting a color gradient sequence with strong, dark, light and weak, and then perform visual display, so that the method is used for automatically analyzing the user evaluation result by analyzing the user evaluation text, visually displaying the preference degree of the user to give visual display to people, and has obvious effect.
An emotion analysis model called UBPNN is provided based on a neural network BPNN method. Experimental results show that the method is superior to other comparison methods in many aspects and has certain advantages.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and all simple modifications, changes and equivalent structural changes made to the above embodiment according to the technical spirit of the present invention still fall within the protection scope of the technical solution of the present invention.

Claims (10)

1. An online text emotion analysis method based on a neural network is characterized by comprising the following steps:
the method comprises the following steps: preprocessing the online text sample data, and manually marking emotion assessment grades in advance;
step two: constructing an initial UBPNN neural network model for online text emotion analysis, and training the model by using training set data; calculating a loss function every time, calculating the gradient of neurons in an output layer, and reversely propagating and updating the network parameter value of each layer until a cutoff condition is reached to obtain an optimized UBPNN neural network model and each network parameter;
step three: and acquiring actual text corpus data, and processing the data by using the optimized UBPNN neural network model to acquire an online text emotion analysis result.
2. The method of claim 1, wherein the sample data is divided into a training set and a verification set, the UBPNN neural network model is trained by using the data in the training set, and the data in the verification set is used for verification.
3. The method of claim 1, wherein the step two of constructing an initial UBPNN neural network model for online text emotion analysis, and training the model with training set data comprises:
embedding words of all words of an input sentence as semantic representation of the sentence; for the input semantic representation, acquiring the semantic representation of the hidden layer by using linear operation of matrix multiplication and a nonlinear activation function; inputting semantic representation of a hidden layer, and obtaining sentence-level semantic representation by using dimension reduction operation; combining the sentence representation form and the user representation form and inputting the combination into a classification layer, and combining the functions of user information on the sentence level; the classification layer maps the obtained vectors into a two-dimensional emotion space, and performs emotion classification by using a softmax method;
inputting a model: training set D { ((x)1k,...,xdk),(y1k,...,y5k),uk) Where k is 1, M is the number of training data;
and (3) outputting a model: training the optimized UBPNN neural network and network parameters;
wherein (x)1k,...,xdk) Is a word vector, (y)1k,...,y5k) For hidden layer output, ukManually pre-labeled emotional ratings representing characteristics of the user.
4. The method of claim 3, wherein the training set D is obtained by performing word segmentation and word deactivation on sentences in original online text sample data.
5. The method for online text sentiment analysis based on neural network as claimed in claim 3, wherein the constructing of the online text sentiment analysis UBPNN neural network model specifically comprises:
uniformly distributing parameters in the network and randomly initializing;
obtaining an integrated word vector sentence representation according to the word vectors in the sentences;
Figure FDA0002499732880000021
calculating the weight of the word by using a TF-IDF method, and performing weighting processing on the integrated word vector sentence by using the weight;
inputting the weighted word vector into an input layer by combining the user characteristics;
b=g(Wb[x,u]+tb)
the input layer takes the output as hidden layer input;
y=g(Wyb+ty)
hidden layer output, combining with the user word vector and inputting to an output layer;
s=softmax(Ws[y,u]+ts)
where u is the user's embedding feature, Wb,tb,Wy,ty,WsAnd tsIs a trainable parameter and g (.) is the tanh activation function.
6. The method for online emotion analysis of text based on neural network as claimed in claim 5, wherein said calculating the weight of the word using TF-IDF method includes:
for a text set containing i documents, the document with sequence number i is denoted as Di=(W1,i,W2,i,...,Wn,i),WnFor the nth in the documentA text word;
the weight of the word is calculated according to the formula: TFIDF ═ TF × log (Ndoc/IDF);
where TF is the frequency of input, IDF is the number of times the word appears in all text in the corpus, and Ndoc is the total number of words in the corpus.
7. The method for online emotion analysis of text based on neural network as claimed in claim 1, wherein the adadelta optimization method is used for gradient back propagation.
8. The method as claimed in claim 1, wherein the verification data is input into the UBPNN neural network model to obtain corresponding evaluation grade results, emotion evaluation grade labeling is manually performed in advance for comparison, iteration is stopped if an error range is met, and the optimized UBPNN neural network and network parameters are obtained.
9. The method for online emotion analysis of text based on neural network as claimed in any one of claims 1-8, further comprising: and automatically mapping and associating the online text emotion analysis result with the original actual text corpus data of the user according to the emotion rating, marking the preference degree, and performing visual display for visually displaying the preference degree of the user.
10. The method according to claim 9, wherein the information coloring and labeling are performed on the actual text corpus data of different users by using a color gradient sequence of strong, light and weak.
CN202010428776.9A 2020-05-20 2020-05-20 Online text emotion analysis method based on neural network Pending CN113704459A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010428776.9A CN113704459A (en) 2020-05-20 2020-05-20 Online text emotion analysis method based on neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010428776.9A CN113704459A (en) 2020-05-20 2020-05-20 Online text emotion analysis method based on neural network

Publications (1)

Publication Number Publication Date
CN113704459A true CN113704459A (en) 2021-11-26

Family

ID=78645483

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010428776.9A Pending CN113704459A (en) 2020-05-20 2020-05-20 Online text emotion analysis method based on neural network

Country Status (1)

Country Link
CN (1) CN113704459A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220229984A1 (en) * 2021-01-15 2022-07-21 Recruit Co., Ltd., Systems and methods for semi-supervised extraction of text classification information
DE202023102803U1 (en) 2023-05-22 2023-07-17 Pradeep Bedi System for emotion detection and mood analysis through machine learning
CN117391742A (en) * 2023-10-18 2024-01-12 广州电力交易中心有限责任公司 Method for analyzing market operation economy

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220229984A1 (en) * 2021-01-15 2022-07-21 Recruit Co., Ltd., Systems and methods for semi-supervised extraction of text classification information
DE202023102803U1 (en) 2023-05-22 2023-07-17 Pradeep Bedi System for emotion detection and mood analysis through machine learning
CN117391742A (en) * 2023-10-18 2024-01-12 广州电力交易中心有限责任公司 Method for analyzing market operation economy

Similar Documents

Publication Publication Date Title
US10642975B2 (en) System and methods for automatically detecting deceptive content
Mitra et al. Helpfulness of online consumer reviews: A multi-perspective approach
Shaheen et al. Sentiment analysis on mobile phone reviews using supervised learning techniques
CN110765769B (en) Clause feature-based entity attribute dependency emotion analysis method
CN110825867B (en) Similar text recommendation method and device, electronic equipment and storage medium
CN113704459A (en) Online text emotion analysis method based on neural network
Shen et al. A voice of the customer real-time strategy: An integrated quality function deployment approach
Chauhan et al. Improving bert model accuracy for uni-modal aspect-based sentiment analysis task
CN114817683A (en) Information recommendation method and device, computer equipment and storage medium
Hao et al. Sentiment recognition and analysis method of official document text based on BERT–SVM model
Kim et al. Accurate and prompt answering framework based on customer reviews and question-answer pairs
Vijaya Shetty et al. Essay scoring systems using ai and feature extraction: A review
Wang et al. Sentiment analysis of commodity reviews based on ALBERT-LSTM
Mushtaq et al. Text-based automatic personality recognition: Recent developments
Liu et al. Text classification in tourism and hospitality–a deep learning perspective
Basyuk et al. Peculiarities of an Information System Development for Studying Ukrainian Language and Carrying out an Emotional and Content Analysis.
Mukhlash et al. Opinion mining on book review using convolutional neural network algorithm long short term memory
Li Emotion analysis method of teaching evaluation texts based on deep learning in big data environment
Ouamane et al. Deep reinforcement learning applied to NLP: a brief survey
Gurin Methods for Automatic Sentiment Detection
Wu et al. Typical opinions mining based on Douban film comments in animated movies
Dogra A Framework for an automatic evaluation of image description based on an image accessibility guideline
Agarwal et al. Sentiment Analysis Dashboard for Socia Media comments using BERT
Mednini et al. Natural language processing for detecting brand hate speech
Geetha et al. Deep Learning and Sentiment Analysis Improve E-commerce Sales Prediction

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination