CN107656917A - A kind of Chinese sentiment analysis method and system - Google Patents
A kind of Chinese sentiment analysis method and system Download PDFInfo
- Publication number
- CN107656917A CN107656917A CN201610597182.4A CN201610597182A CN107656917A CN 107656917 A CN107656917 A CN 107656917A CN 201610597182 A CN201610597182 A CN 201610597182A CN 107656917 A CN107656917 A CN 107656917A
- Authority
- CN
- China
- Prior art keywords
- emotion
- weight
- word
- positive
- negative sense
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Machine Translation (AREA)
Abstract
The present invention provides a kind of Chinese sentiment analysis method and system, and this method includes:All emotion words in Chinese sentence are obtained, and obtain the positive emotion weight and negative sense emotion weight of each emotion word;Adverbial word corresponding to each emotion word, and the weight of adverbial word corresponding to acquisition are obtained from the Chinese sentence, according to the positive emotion weight or negative sense emotion weight of the weight modification emotion word of corresponding adverbial word;Negative word corresponding to each emotion word is obtained from the Chinese sentence, according to the positive emotion weight and negative sense emotion weight after the number redjustment and modification of negative word;According to all emotion words corresponding to adverbial word weight and negative word number adjustment after positive emotion weight and negative sense emotion weight calculation emotion score, obtain the Chinese sentence Sentiment orientation.The present invention considers adverbial word corresponding to emotion word when analyzing the Sentiment orientation of Chinese sentence, the ability with analysis emotion exquisiteness, it is contemplated that negative word, improve the degree of accuracy of sentiment analysis.
Description
Technical field
The present invention relates to sentiment analysis technical field, more specifically to a kind of Chinese sentiment analysis method and system.
Background technology
The sentiment analysis of so-called text is exactly the Sentiment orientation for analyzing passage (referring mainly to Chinese), is monitored as public sentiment
Element task, have many purposes naturally.Social networks is more and more fiery, and name is rich or leader of opinion is more and more, it is allowed to user couple
Commodity and the website of service evaluation marking are even more such as emerged rapidly in large numbersBamboo shoots after a spring rain, and the evaluation and recommendations of user can be propagated with the whole network, these texts
The data of type are certainly the power resources of precision marketing, and enterprise can establish the digital shape of oneself according to sentiment analysis
As identifying the new market opportunity, carrying out the market segments, and then promote product successfully to list;But the value portion for catching these to comment on
Point and enterprise huge challenge;Government is equally needed with enterprise by sentiment analysis, monitoring and alleviation, is led public sentiment, is prevented
Social contradications, above-mentioned is exactly the application background of sentiment analysis.
But with so important background run in the opposite direction be Chinese sentiment analysis system weak tendency, common sentiment analysis point
For the sentiment analysis based on sentiment dictionary and the sentiment analysis based on monitor model.
The so-called sentiment analysis based on sentiment dictionary, emotion word is divided into positive (commendation) and negative sense (derogatory sense) first, so
A Chinese text to be analyzed is segmented afterwards, counts positive word number and negative sense word number, is born if positive word number is more than
To word number, then this text belongs to positive, otherwise belongs to emotion negative sense.Some researchers have carried out artificial add to sentiment dictionary
Power, such as " love " and the weight of " liking " are different, manually give " love " higher weight, but no matter how to change, this
The defects of kind analysis mode is apparent.First, accuracy rate is very low, and generally 50% or so, public sentiment can hardly be supported
Monitoring;Secondly, the positive and negative tendency or weight of Manual definition's emotion word, workload are huge and very dogmatic;In addition, for negative
The sentence that sentence and degree adverb are strengthened is nearly unavailable, so as to lose the ability of analysis emotion exquisiteness (degree).
Another kind is the sentiment analysis based on monitor model, i.e., by manually mark a training set (training set it is each
Bar text will manually be classified as emotion forward direction or emotion negative sense), then completed using training set training pattern, model training
After predict text to be analyzed.Although this method temporarily improves accuracy rate, generally 75% or so based on substantial amounts of training set,
But the such vast and numerous work of mark training set allows user to hang back;In addition, manually the granularity of mark training set result in
Ability of this mode equally without analysis emotion exquisiteness, ability is weaker in other words.
The content of the invention
The present invention proposes a kind of Chinese sentiment analysis method and system, and it is thin can to analyze Chinese text (Chinese sentence) emotion
Greasy property, sentiment analysis are accurate.
Therefore, the present invention proposes following technical scheme:
On the one hand, there is provided a kind of Chinese sentiment analysis method, including:
All emotion words in Chinese sentence are obtained, and obtain positive emotion weight and negative sense the emotion power of each emotion word
Weight;
Adverbial word corresponding to each emotion word, and the weight of adverbial word corresponding to acquisition are obtained from the Chinese sentence, according to
The positive emotion weight or negative sense emotion weight of the weight modification emotion word of corresponding adverbial word;
Negative word corresponding to each emotion word is obtained from the Chinese sentence, after the number redjustment and modification of negative word
Positive emotion weight and negative sense emotion weight;
According to all emotion words corresponding to adverbial word weight and negative word number adjustment after positive emotion weight and negative sense
Emotion weight calculation emotion score, obtain the Chinese sentence Sentiment orientation.
Wherein, the positive emotion weight or negative sense emotion weight of the weight modification emotion word of adverbial word corresponding to the basis,
Including:Emotion weight larger in the positive emotion weight and negative sense emotion weight of corresponding emotion word is multiplied by the emotion word
The weight of corresponding adverbial word, less emotion weight are constant.
Wherein, the positive emotion weight and negative sense emotion weight after the number redjustment and modification according to negative word, including:
If the number of negative word is odd number, positive emotion weight and negative sense the emotion power of corresponding emotion word are mutually exchanged;If not
The number for determining word is even number, then positive emotion weight and negative sense the emotion power of corresponding emotion word are constant.
Wherein, it is described according to all emotion words corresponding to adverbial word weight and negative word number adjustment after positive emotion power
Weight and negative sense emotion weight calculation emotion score, including:
Calculate positive emotion weight product;The positive emotion weight product is adverbial word weight corresponding to all emotion words warp
The product of positive emotion weight after being adjusted with negative word number;
Calculate negative sense emotion weight product;The negative sense emotion weight product is adverbial word weight corresponding to all emotion words warp
The product of negative sense emotion weight after being adjusted with negative word number;
The business of positive emotion weight product and positive emotion weight product and the negative sense emotion weight sum of products is calculated, it is described
Business is emotion score;
The value of the emotion score includes 0-1, if emotion score is more than 0.5, for positive Sentiment orientation, if emotion score
Then it is negative sense Sentiment orientation less than 0.5, if emotion score is equal to 0.5, for neutral Sentiment orientation.
Wherein, before obtaining all emotion words in Chinese sentence, in addition to, the sentiment dictionary of structure weighting in advance;It is described
Weighting sentiment dictionary includes positive emotion weight and negative sense emotion weight corresponding to emotion word and emotion word;
All emotion words obtained in Chinese sentence, and obtain positive the emotion weight and negative sense feelings of each emotion word
Feel weight, including:Chinese sentence is segmented, obtained vocabulary and the vocabulary progress in weighting sentiment dictionary will be segmented
Match somebody with somebody, obtain all emotion words in Chinese sentence, and obtain the positive emotion weight and negative sense emotion weight of each emotion device.
On the other hand, a kind of Chinese sentiment analysis system, including:
First acquisition module, for obtaining all emotion words in Chinese sentence, and obtain the positive feelings of each emotion word
Feel weight and negative sense emotion weight;
Second acquisition module, for obtaining adverbial word corresponding to each emotion word from the Chinese sentence, and obtain correspondingly
Adverbial word weight;
Modified module, positive emotion weight or negative sense the emotion power for the weight modification emotion word of adverbial word corresponding to
Weight;
3rd acquisition module, for obtaining negative word corresponding to each emotion word from the Chinese sentence;
Adjusting module, for the positive emotion weight and negative sense emotion weight after the number redjustment and modification according to negative word;
Computing module, for according to all emotion words corresponding to adverbial word weight and negative word number adjustment after positive feelings
Feel weight and negative sense emotion weight calculation emotion score, obtain the Chinese sentence Sentiment orientation.
Wherein, the modified module is specifically used for:By the positive emotion weight and negative sense emotion weight of corresponding emotion word
In larger emotion weight be multiplied by the weight of adverbial word corresponding to the emotion word, less emotion weight is constant.
Wherein, the adjusting module is specifically used for:If the number of negative word is odd number, by the forward direction of corresponding emotion word
Emotion weight and negative sense emotion power are mutually exchanged;If the number of negative word is even number, the positive emotion power of corresponding emotion word
Weight and negative sense emotion power are constant.
Wherein, the computing module includes:
First computing unit, for calculating positive emotion weight product;The positive emotion weight product is all emotions
Word corresponding to adverbial word weight and negative word number adjustment after positive emotion weight product;
Second computing unit, for calculating negative sense emotion weight product;The negative sense emotion weight product is all emotions
Word corresponding to adverbial word weight and negative word number adjustment after negative sense emotion weight product;
3rd computing unit, for calculating positive emotion weight product and positive emotion weight product and negative sense emotion weight
The business of the sum of products, the business are emotion score;
The value of the emotion score includes 0-1, if emotion score is more than 0.5, for positive Sentiment orientation, if emotion score
Then it is negative sense Sentiment orientation less than 0.5, if emotion score is equal to 0.5, for neutral Sentiment orientation.
Wherein, the Chinese sentiment analysis system also includes structure module, for building weighting sentiment dictionary in advance;It is described
Weighting sentiment dictionary includes positive emotion weight and negative sense emotion weight corresponding to emotion word and emotion word;
First acquisition module is specifically used for:Chinese sentence is segmented, obtained vocabulary and weighting feelings will be segmented
Vocabulary in sense dictionary is matched, and obtains all emotion words in Chinese sentence, and obtain the positive emotion of each emotion device
Weight and negative sense emotion weight.
A kind of Chinese sentiment analysis method and system provided by the invention, consider when analyzing the Sentiment orientation of Chinese sentence
Adverbial word corresponding to emotion word, there is the ability of analysis emotion exquisiteness, it is contemplated that negative word, improve the accurate of sentiment analysis
Degree.
Brief description of the drawings
Fig. 1 is a kind of method flow diagram for Chinese sentiment analysis method that the embodiment of the present invention one provides.
Fig. 2 is a kind of method flow diagram for Chinese sentiment analysis method that the embodiment of the present invention two provides.
Fig. 3 is a kind of block diagram for Chinese sentiment analysis system that the embodiment of the present invention three provides.
Fig. 4 is a kind of block diagram for Chinese sentiment analysis system that the embodiment of the present invention four provides.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention
Formula is described in further detail.
Embodiment one
The present embodiment provides a kind of Chinese sentiment analysis method, as shown in figure 1, this method comprises the following steps:
All emotion words in S101, the Chinese sentence of acquisition, and obtain the positive emotion weight and negative sense of each emotion word
Emotion weight.
First, we have a weighting sentiment dictionary, and each emotion word weighted in sentiment dictionary is labeled with forward direction
Emotion weight and negative sense emotion weight, so when obtaining emotion word, we can be to obtain the emotion word square on emotion word
Battle array (includes positive emotion weight and negative sense emotion weight corresponding to emotion word and emotion word).
S102, adverbial word corresponding to each emotion word, and the weight of adverbial word corresponding to acquisition are obtained from the Chinese sentence,
According to the positive emotion weight or negative sense emotion weight of the weight modification emotion word of corresponding adverbial word.
Adverbial word, if ignoring it, have ignored the degree (exquisiteness) of emotion, therefore as a kind of word of reinforcement degree
It is necessarily required to consider adverbial word corresponding to emotion word to obtain accurate sentiment analysis result, the embodiment of the present invention obtains each emotion
After the weight of adverbial word corresponding to word and adverbial word, gone to change the positive emotion weight or negative sense of corresponding emotion word with the weight of adverbial word
Emotion weight, obtains new emotion word matrix, and new emotion matrix contains the emotion degree of emotion word.
S103, negative word corresponding to each emotion word is obtained from the Chinese sentence, adjusted according to the number of negative word
Amended positive emotion weight and negative sense emotion weight.
The number of negative word and negative word plays a crucial role to a sentence, can reverse result completely, therefore analyzing
During Sentiment orientation, the present invention considers the number of the negative word and negative word in sentence, is adjusted according to the number of negative word new
Emotion word matrix, the number of negative word is odd number, then by positive the emotion weight or negative sense emotion in new emotion word matrix
Weight is exchanged, double denial (negative word number is even numbers), then new emotion word matrix is kept constant.
S104, according to all emotion words corresponding to adverbial word weight and negative word number adjustment after positive emotion weight and
Negative sense emotion weight calculation emotion score, obtains the Chinese sentence Sentiment orientation.
Emotion word matrix after being adjusted is final emotion word matrix, and the present invention is according to institute in final emotion word matrix
There are the positive emotion weight and negative sense emotion weight calculation emotion score of emotion word, obtain the Chinese sentence Sentiment orientation, should
Sentiment orientation contains the exquisiteness of emotion, and result is very accurate.
The Chinese sentiment analysis method of the embodiment of the present invention, emotion word is considered when analyzing the Sentiment orientation of Chinese sentence
Corresponding adverbial word, there is the ability of analysis emotion exquisiteness, it is contemplated that negative word, improve the degree of accuracy of sentiment analysis.
Embodiment two
A kind of Chinese sentiment analysis method provided in an embodiment of the present invention, be on the basis of embodiment one supplement step and
Content, the not yet detailed part of the present embodiment refer to embodiment one.
As shown in Fig. 2 Chinese sentiment analysis method, comprises the following steps:
S100, the sentiment dictionary of structure weighting in advance;The weighting sentiment dictionary is included corresponding to emotion word and emotion word just
To emotion weight and negative sense emotion weight.
With the evolution of Chinese, emotion word is also being continuously increased, and during text analyzing, we have accumulated largely
Emotion word, and weighting sentiment dictionary is constructed, comprise about Chinese emotion word 20000 or so, original sentiment dictionary part
Such as table 1 below, emotion vocabulary is arbitrarily only divided into positive Sentiment orientation and negative sense Sentiment orientation, such dictionary is except band
Have beyond subjectivity, can not also meet the purpose for analyzing emotion degree, weight sentiment dictionary part such as table 2 below, including emotion word
Positive emotion weight and negative sense emotion weight.
Wherein, term represents emotion word, and type represents Sentiment orientation type, and 1 represents positive emotion, and -1 represents negative sense feelings
Sense, pdf represent positive emotion weight, and ndf represents negative sense emotion weight.
Before structure weights sentiment dictionary, we will have sentiment analysis text set (including the forward direction of a mark first
Emotion text collection and negative sense emotion text collection), this was a process for needing manually to mark originally, and work is huge, and has
Industry limitation.But the vocabulary that in most cases, people are used to show emotion is similar, only indivedual vocabulary
With industrial characteristic, and the comment data of user is left now with substantial amounts of website, during some website requests user comments
It is divided into two parts:Most satisfied part and most unsatisfied part, we have captured substantial amounts of comment, and will be " most satisfied
Part " is labeled as positive text, and " most unsatisfied part " is labeled as negative sense text, and (similar method can also use user
Scoring carries out text marking), the mark text announced plus researcher, we obtain comprising 100,000 about marked altogether
The sentiment analysis text set of bar text, substantial amounts of label time can be saved by this batch methods, and expand text
Industry source, can also be with the increase continuous updating sentiment analysis text set of data volume.There is sentiment analysis text set, just
Need to be weighted emotion word based on sentiment analysis text set, emotion Weighted Rule:One emotion word is in positive emotion text
Collect the document frequency (DF) occurred as its positive emotion weight, it is used as in the document frequency that negative sense emotion text collection occurs
Negative sense emotion weight, so-called DF be comprising certain word number of files/corpus total number of documents.It can not sentence for some common people
Disconnected neutral words also very quick can reasonably obtain its positive emotion weight and negative sense emotion weight, therefore this according to more than
Not only workload falls sharply positive emotion weight and negative sense the emotion weight of the rule acquisition emotion word of data-driven but also more refinement
It is greasy.
All emotion words in S101, the Chinese sentence of acquisition, and obtain the positive emotion weight and negative sense of each emotion word
Emotion weight.
Preferably, step S101 includes:Chinese sentence is segmented, obtained vocabulary will be segmented with weighting sentiment dictionary
In vocabulary matched, obtain all emotion words in Chinese sentence, and obtain each emotion device positive emotion weight and
Negative sense emotion weight.
One text enters system can segment to text first, in the vocabulary that text branches away and weighting sentiment dictionary
Terminology match, so not only filtered out all emotion words included in text, and forward direction is with the addition of to emotion vocabulary
Emotion weight and positive emotion weight, then we, which just obtain text band, the emotion word matrix of weight.
S102, adverbial word corresponding to each emotion word, and the weight of adverbial word corresponding to acquisition are obtained from the Chinese sentence,
According to the positive emotion weight or negative sense emotion weight of the weight modification emotion word of corresponding adverbial word.
Adverbial word is weighted using adverbial word Weighted Rule, this requires there is a adverbial word weighting dictionary, the degree in Chinese
Adverbial word is fewer, somewhat arranges, manually gives weight can.
Preferably, step S102 includes:Will be larger in the positive emotion weight and negative sense emotion weight of corresponding emotion word
Emotion weight be multiplied by the weight of adverbial word corresponding to the emotion word, less emotion weight is constant.
S103, negative word corresponding to each emotion word is obtained from the Chinese sentence, adjusted according to the number of negative word
Amended positive emotion weight and negative sense emotion weight.
The emotion word matrix of one text is after the adjustment of adverbial word Weighted Rule, it is necessary to further be adjusted according to negative word rule
Whole, we construct negative word rule here:If (it can nearby be made by oneself before emotion word according to punctuation mark or demand
Justice) there is negative word, and the number of negative word is odd number, then the positive emotion weight and negative sense emotion weight of the emotion word
Once exchanged, otherwise keep constant.
That is step S103 includes:If the number of negative word is odd number, by the positive emotion weight of corresponding emotion word and
Negative sense emotion power is mutually exchanged;If the number of negative word is even number, positive the emotion weight and negative sense feelings of corresponding emotion word
Sense power is constant.
S104, according to all emotion words corresponding to adverbial word weight and negative word number adjustment after positive emotion weight and
Negative sense emotion weight calculation emotion score, obtains the Chinese sentence Sentiment orientation.
The emotion word matrix of any text can be obtained according to weighting sentiment dictionary above, is weighted and advised according to adverbial word
Then obtaining final emotion word matrix with the suitable matrixing of negative word rule work can be as the input for building various monitor models
Data, plus powerful text set mask method, various monitor models (random forest, SVM, logistic regression etc.) can make
Model training and test are carried out with above-mentioned final emotion word square, accuracy rate greatly improves than common monitor model system, warp
Crossing program test, we have selected Naive Bayes Classifier algorithm.So-called Naive Bayes Classifier is construed to:One text
In all emotion words positive emotion text concentrate occur probability continued product if greater than this text in all emotion words
The probability continued product occurred is concentrated in negative sense emotion text, then this text belongs to positive Sentiment orientation, otherwise belongs to negative sense feelings
Sense tendency.
That is step S104 includes:
Calculate positive emotion weight product;The positive emotion weight product is adverbial word weight corresponding to all emotion words warp
The product of positive emotion weight after being adjusted with negative word number;
Calculate negative sense emotion weight product;The negative sense emotion weight product is adverbial word weight corresponding to all emotion words warp
The product of negative sense emotion weight after being adjusted with negative word number;
The business of positive emotion weight product and positive emotion weight product and the negative sense emotion weight sum of products is calculated, it is described
Business is emotion score;
The value of the emotion score includes 0-1, if emotion score is more than 0.5, for positive Sentiment orientation, if emotion score
Then it is negative sense Sentiment orientation less than 0.5, if emotion score is equal to 0.5, for neutral Sentiment orientation.
By taking " I does not like turbocharging very much, and maintenance is expensive " this text as an example, text is segmented first, obtains vocabulary
" I, very, or not like, turbocharging, maintenance it is expensive ", then using word segmentation result with weighting sentiment dictionary matched, acquisition
Emotion word matrix such as following table with weight:
term | ndf | |
Like | 0.0151161 | 0.009134 |
Maintain expensive | 0.0000208 | 0.001808 |
Degree adverb is searched forward or backward in original text, if finding degree adverb, according to rule adjustment emotion
Word matrix.This example we degree adverb " very ", and the greater in the emotion weight of " liking " are have found before " liking "
For positive emotion weight (pdf), so being multiplied by the weight (weight of adverbial word " very " is 2) of adverbial word " very ", its negative sense
Emotion weight (ndf) does not change;Emotion word " maintenance is expensive " is front and rear not to find degree adverb, so its emotion weight is not adjusted
It is whole, thus obtain following emotion word matrix:
term | ndf | |
Like | 0.0151161*2 | 0.009134 |
Maintain expensive | 0.0000208 | 0.001808 |
Position according to where emotion word, the Look-ahead negative word in original text, if finding negative word, according to no
Determine word rule adjustment emotion word matrix.We have found negative word " no ", the forward direction of " liking " before " liking " in this example
Emotion weight (pdf) and negative sense emotion weight (ndf) are exchanged, and the pdf that " will be liked " replaces with ndf, and ndf is replaced with
Pdf,;Emotion word " maintenance is expensive " does not above find negative word, so its weight does not adjust, after so we just obtain adjustment
Following emotion word matrix:
term | ndf | |
Like | 0.009134 | 0.0151161*2 |
Maintain expensive | 0.0000208 | 0.001808 |
According to the emotion word matrix of upper table, structure Naive Bayes Classifier calculates emotion score, obtains all emotion words
Pdf product, the product for then calculating it with all emotion word pdf are made plus the quotient of all emotion word ndf sum of products
For emotion score (emotion score is about 0.01), more serious negative sense Sentiment orientation.
By with existing analysis system is more of the invention has the advantage that:(1) artificial mark training sample is relieved
Cumbersome work;(2) give data to judge the weight of emotion word, avoid subjective wrong when judging close to neutral emotion word
Generation by mistake;(3) the emotion weight of data-driven Chinese grammar rule adjustment in addition, makes sentiment analysis finer and smoother, text
Emotion score and the intensity that text emotion is inclined to are closely related, and original qualitative classification system is become into quantitative system;(4) often
Index --- the accuracy rate of sentiment analysis system is weighed, obtains great lifting.
Find that the contrast of the analysis result accuracy rate with going together is as follows through a large amount of tests:
Research institution's correlative theses | Emotion differentiates accuracy rate |
The emotional orientation analysis research of the left loose commodity on-line evaluation of dimension《Modem long jump skill intelligence technology》225 10 phases of 2012 phases | More than 80% |
Guo Yunlong, Pan Yubin, Li Guoxiang, Lu Yang, remaining Xiao Ming, the Chinese microblogging viewpoint sentence identification of the more strategies of Li Li and emotion tendency judge Southwest University | 82.40% |
The improvement of Zhang Weishu, Lv Yunxiang microblog emotionals tendency algorithm is with realizing BJ University of Aeronautics & Astronautics 2013 | 80.74% |
Feng Jingang network public-opinion Chinese informations Sentiment orientation analysis and research North China Electric Power University 2015 | 77.52% |
Song Jingjing Chinese short texts emotional orientation analysis studies Chongqing University of Technology 2013 | 80.02% |
This analysis system | 91% |
The Chinese sentiment analysis method of the embodiment of the present invention, emotion word is considered when analyzing the Sentiment orientation of Chinese sentence
Corresponding adverbial word and negative word, the exquisiteness of emotion can be analyzed, as a result accuracy rate is high.
Embodiment three
A kind of Chinese sentiment analysis system provided in an embodiment of the present invention, this implementation corresponding with the method for embodiment one
The not yet detailed part of example refers to embodiment one.
With reference to figure 3, a kind of Chinese sentiment analysis system, including with lower module:
First acquisition module 101, for obtaining all emotion words in Chinese sentence, and obtain the forward direction of each emotion word
Emotion weight and negative sense emotion weight.
Second acquisition module 102, for obtaining adverbial word corresponding to each emotion word, and acquisition pair from the Chinese sentence
The weight for the adverbial word answered.
Modified module 103, positive emotion weight or negative sense feelings for the weight modification emotion word of adverbial word corresponding to
Feel weight.
3rd acquisition module 104, for obtaining negative word corresponding to each emotion word from the Chinese sentence.
Adjusting module 105, for positive emotion weight and negative sense the emotion power after the number redjustment and modification according to negative word
Weight.
Computing module 106, for according to all emotion words corresponding to adverbial word weight and negative word number adjustment after just
To emotion weight and negative sense emotion weight calculation emotion score, the Chinese sentence Sentiment orientation is obtained.
Example IV
A kind of Chinese sentiment analysis system provided in an embodiment of the present invention, this implementation corresponding with the method for embodiment two
The not yet detailed part of example refers to embodiment two.
With reference to figure 4, a kind of Chinese sentiment analysis system, including with lower module:
Module 100 is built, for building weighting sentiment dictionary in advance;The weighting sentiment dictionary includes emotion word and emotion
Positive emotion weight corresponding to word and negative sense emotion weight.
First acquisition module 101, for obtaining all emotion words in Chinese sentence, and obtain the forward direction of each emotion word
Emotion weight and negative sense emotion weight;
Second acquisition module 102, for obtaining adverbial word corresponding to each emotion word, and acquisition pair from the Chinese sentence
The weight for the adverbial word answered;
Modified module 103, positive emotion weight or negative sense feelings for the weight modification emotion word of adverbial word corresponding to
Feel weight;
3rd acquisition module 104, for obtaining negative word corresponding to each emotion word from the Chinese sentence;
Adjusting module 105, for positive emotion weight and negative sense the emotion power after the number redjustment and modification according to negative word
Weight;
Computing module 106, for according to all emotion words corresponding to adverbial word weight and negative word number adjustment after just
To emotion weight and negative sense emotion weight calculation emotion score, the Chinese sentence Sentiment orientation is obtained.
Preferably, first acquisition module 101 is specifically used for:Chinese sentence is segmented, the word that participle is obtained
Converge and matched with the vocabulary in weighting sentiment dictionary, obtain all emotion words in Chinese sentence, and obtain each emotion device
Positive emotion weight and negative sense emotion weight.
The modified module 103 is specifically used for:By in the positive emotion weight and negative sense emotion weight of corresponding emotion word
Larger emotion weight is multiplied by the weight of adverbial word corresponding to the emotion word, and less emotion weight is constant.
The adjusting module 105 is specifically used for:If the number of negative word is odd number, by the positive feelings of corresponding emotion word
Sense weight and negative sense emotion power are mutually exchanged;If the number of negative word is even number, the positive emotion weight of corresponding emotion word
Weighed with negative sense emotion constant.
The computing module 106, including:
First computing unit, for calculating positive emotion weight product;The positive emotion weight product is all emotions
Word corresponding to adverbial word weight and negative word number adjustment after positive emotion weight product;
Second computing unit, for calculating negative sense emotion weight product;The negative sense emotion weight product is all emotions
Word corresponding to adverbial word weight and negative word number adjustment after negative sense emotion weight product;
3rd computing unit, for calculating positive emotion weight product and positive emotion weight product and negative sense emotion weight
The business of the sum of products, the business are emotion score;
The value of the emotion score includes 0-1, if emotion score is more than 0.5, for positive Sentiment orientation, if emotion score
Then it is negative sense Sentiment orientation less than 0.5, if emotion score is equal to 0.5, for neutral Sentiment orientation.
The Chinese sentiment analysis system of the embodiment of the present invention, emotion word is considered when analyzing the Sentiment orientation of Chinese sentence
Corresponding adverbial word and negative word, the exquisiteness of emotion can be analyzed, as a result accuracy rate is high.
The foregoing is only a preferred embodiment of the present invention, but protection scope of the present invention be not limited thereto,
Any one skilled in the art the invention discloses technical scope in, the change or replacement that can readily occur in,
It should all be included within the scope of the present invention.Therefore, protection scope of the present invention should be with scope of the claims
It is defined.
Claims (10)
- A kind of 1. Chinese sentiment analysis method, it is characterised in that including:All emotion words in Chinese sentence are obtained, and obtain the positive emotion weight and negative sense emotion weight of each emotion word;Adverbial word corresponding to each emotion word, and the weight of adverbial word corresponding to acquisition are obtained from the Chinese sentence, according to corresponding Adverbial word weight modification emotion word positive emotion weight or negative sense emotion weight;Obtain negative word corresponding to each emotion word from the Chinese sentence, according to after the number redjustment and modification of negative word just To emotion weight and negative sense emotion weight;According to all emotion words corresponding to adverbial word weight and negative word number adjustment after positive emotion weight and negative sense emotion Weight calculation emotion score, obtain the Chinese sentence Sentiment orientation.
- 2. Chinese sentiment analysis method as claimed in claim 1, it is characterised in that the weight of adverbial word is repaiied corresponding to the basis Change the positive emotion weight or negative sense emotion weight of emotion word, including:By the positive emotion weight and negative sense of corresponding emotion word Larger emotion weight is multiplied by the weight of adverbial word corresponding to the emotion word in emotion weight, and less emotion weight is constant.
- 3. Chinese sentiment analysis method as claimed in claim 1, it is characterised in that described to be repaiied according to the adjustment of the number of negative word Positive emotion weight and negative sense emotion weight after changing, including:If the number of negative word is odd number, by corresponding emotion word Positive emotion weight and negative sense emotion power is mutually exchanged;If the number of negative word is even number, the positive feelings of corresponding emotion word Feel weight and negative sense emotion power is constant.
- 4. Chinese sentiment analysis method as claimed in claim 1, it is characterised in that described according to corresponding to all emotion words warp Positive emotion weight and negative sense emotion weight calculation emotion score after adverbial word weight and the adjustment of negative word number, including:Calculate positive emotion weight product;The positive emotion weight product is adverbial word weight and no corresponding to all emotion words warp Determine the product of the positive emotion weight after the adjustment of word number;Calculate negative sense emotion weight product;The negative sense emotion weight product is adverbial word weight and no corresponding to all emotion words warp Determine the product of the negative sense emotion weight after the adjustment of word number;The business of positive emotion weight product and positive emotion weight product and the negative sense emotion weight sum of products is calculated, the business is Emotion score;The value of the emotion score includes 0-1, if emotion score is more than 0.5, for positive Sentiment orientation, if emotion score is less than 0.5, then it is negative sense Sentiment orientation, if emotion score is equal to 0.5, for neutral Sentiment orientation.
- 5. Chinese sentiment analysis method as claimed in claim 1, it is characterised in that obtain all emotion words in Chinese sentence Before, in addition to, structure weights sentiment dictionary in advance;The weighting sentiment dictionary includes positive corresponding to emotion word and emotion word Emotion weight and negative sense emotion weight;All emotion words obtained in Chinese sentence, and obtain positive emotion weight and negative sense the emotion power of each emotion word Weight, including:Chinese sentence is segmented, obtained vocabulary will be segmented and matched with weighting the vocabulary in sentiment dictionary, obtained All emotion words in Chinese sentence are obtained, and obtain the positive emotion weight and negative sense emotion weight of each emotion device.
- A kind of 6. Chinese sentiment analysis system, it is characterised in that including:First acquisition module, for obtaining all emotion words in Chinese sentence, and obtain the positive emotion power of each emotion word Weight and negative sense emotion weight;Second acquisition module, for obtaining adverbial word corresponding to each emotion word from the Chinese sentence, and it is secondary corresponding to acquisition The weight of word;Modified module, positive emotion weight or negative sense emotion weight for the weight modification emotion word of adverbial word corresponding to;3rd acquisition module, for obtaining negative word corresponding to each emotion word from the Chinese sentence;Adjusting module, for the positive emotion weight and negative sense emotion weight after the number redjustment and modification according to negative word;Computing module, weighed for the positive emotion after adverbial word weight and negative word number adjust corresponding to according to all emotion words Weight and negative sense emotion weight calculation emotion score, obtain the Chinese sentence Sentiment orientation.
- 7. Chinese sentiment analysis system as claimed in claim 6, it is characterised in that the modified module is specifically used for:Will be right Larger emotion weight is multiplied by secondary corresponding to the emotion word in the positive emotion weight and negative sense emotion weight of the emotion word answered The weight of word, less emotion weight are constant.
- 8. Chinese sentiment analysis system as claimed in claim 6, it is characterised in that the adjusting module is specifically used for:If not The number for determining word is odd number, then mutually exchanges positive emotion weight and negative sense the emotion power of corresponding emotion word;If negative word Number be even number, then corresponding emotion word positive emotion weight and negative sense emotion power it is constant.
- 9. Chinese sentiment analysis system as claimed in claim 6, it is characterised in that the computing module, including:First computing unit, for calculating positive emotion weight product;The positive emotion weight product passes through for all emotion words The product of positive emotion weight after corresponding adverbial word weight and negative word number adjustment;Second computing unit, for calculating negative sense emotion weight product;The negative sense emotion weight product passes through for all emotion words The product of negative sense emotion weight after corresponding adverbial word weight and negative word number adjustment;3rd computing unit, for calculating positive emotion weight product and positive emotion weight product and negative sense emotion weight product The business of sum, the business are emotion score;The value of the emotion score includes 0-1, if emotion score is more than 0.5, for positive Sentiment orientation, if emotion score is less than 0.5, then it is negative sense Sentiment orientation, if emotion score is equal to 0.5, for neutral Sentiment orientation.
- 10. Chinese sentiment analysis system as claimed in claim 6, it is characterised in that also include structure module, for advance structure Build weighting sentiment dictionary;The weighting sentiment dictionary includes positive emotion weight and negative sense emotion corresponding to emotion word and emotion word Weight;First acquisition module is specifically used for:Chinese sentence is segmented, obtained vocabulary and weighting emotion word will be segmented Vocabulary in allusion quotation is matched, and obtains all emotion words in Chinese sentence, and obtains the positive emotion weight of each emotion device With negative sense emotion weight.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610597182.4A CN107656917B (en) | 2016-07-26 | 2016-07-26 | Chinese emotion analysis method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610597182.4A CN107656917B (en) | 2016-07-26 | 2016-07-26 | Chinese emotion analysis method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107656917A true CN107656917A (en) | 2018-02-02 |
CN107656917B CN107656917B (en) | 2021-01-26 |
Family
ID=61127254
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610597182.4A Active CN107656917B (en) | 2016-07-26 | 2016-07-26 | Chinese emotion analysis method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107656917B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108664469A (en) * | 2018-05-07 | 2018-10-16 | 首都师范大学 | A kind of emotional category determines method, apparatus and server |
CN108959268A (en) * | 2018-07-20 | 2018-12-07 | 科大讯飞股份有限公司 | A kind of text emotion analysis method and device |
CN109214008A (en) * | 2018-09-28 | 2019-01-15 | 珠海中科先进技术研究院有限公司 | A kind of sentiment analysis method and system based on keyword extraction |
CN109857852A (en) * | 2019-01-24 | 2019-06-07 | 安徽商贸职业技术学院 | A kind of the screening judgment method and system of electric business online comment training set feature |
CN111104515A (en) * | 2019-12-24 | 2020-05-05 | 山东众志电子有限公司 | Emotional word text information classification method |
CN111984769A (en) * | 2020-06-30 | 2020-11-24 | 联想(北京)有限公司 | Information processing method and device of response system |
CN112086092A (en) * | 2019-06-14 | 2020-12-15 | 广东技术师范大学 | Intelligent extraction method of dialect based on emotion analysis |
CN112364170A (en) * | 2021-01-13 | 2021-02-12 | 北京智慧星光信息技术有限公司 | Data emotion analysis method and device, electronic equipment and medium |
CN112711941A (en) * | 2021-01-08 | 2021-04-27 | 浪潮云信息技术股份公司 | Emotional score analysis processing method based on emotional dictionary entity |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103150367A (en) * | 2013-03-07 | 2013-06-12 | 宁波成电泰克电子信息技术发展有限公司 | Method for analyzing emotional tendency of Chinese microblogs |
CN105022805A (en) * | 2015-07-02 | 2015-11-04 | 四川大学 | Emotional analysis method based on SO-PMI (Semantic Orientation-Pointwise Mutual Information) commodity evaluation information |
KR101625787B1 (en) * | 2015-02-02 | 2016-05-30 | 숭실대학교산학협력단 | Method and server for estimating the sentiment value of word |
-
2016
- 2016-07-26 CN CN201610597182.4A patent/CN107656917B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103150367A (en) * | 2013-03-07 | 2013-06-12 | 宁波成电泰克电子信息技术发展有限公司 | Method for analyzing emotional tendency of Chinese microblogs |
KR101625787B1 (en) * | 2015-02-02 | 2016-05-30 | 숭실대학교산학협력단 | Method and server for estimating the sentiment value of word |
CN105022805A (en) * | 2015-07-02 | 2015-11-04 | 四川大学 | Emotional analysis method based on SO-PMI (Semantic Orientation-Pointwise Mutual Information) commodity evaluation information |
Non-Patent Citations (5)
Title |
---|
MAITE TABOADA: "Lexicon-Based Methods for Sentiment Analysis", 《COMPUTATIONAL LINGUISTICS》 * |
YANG SHEN: "Emotion mining research on micro-blog", 《IEEE SYMPOSIUM ON WEB SOCIETY》 * |
冀俊忠: "基于知识语义权重特征的朴素贝叶斯情感分类算法", 《北京工业大学学报》 * |
孙建旺: "基于词典与机器学习的中文微博情感分析研究", 《计算机应用与软件》 * |
陈晓东: "基于情感词典的中文微博情感倾向分析研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108664469A (en) * | 2018-05-07 | 2018-10-16 | 首都师范大学 | A kind of emotional category determines method, apparatus and server |
CN108664469B (en) * | 2018-05-07 | 2021-11-19 | 首都师范大学 | Emotion category determination method and device and server |
CN108959268A (en) * | 2018-07-20 | 2018-12-07 | 科大讯飞股份有限公司 | A kind of text emotion analysis method and device |
CN109214008A (en) * | 2018-09-28 | 2019-01-15 | 珠海中科先进技术研究院有限公司 | A kind of sentiment analysis method and system based on keyword extraction |
CN109857852A (en) * | 2019-01-24 | 2019-06-07 | 安徽商贸职业技术学院 | A kind of the screening judgment method and system of electric business online comment training set feature |
CN109857852B (en) * | 2019-01-24 | 2021-02-23 | 安徽商贸职业技术学院 | Method and system for screening and judging characteristics of E-commerce online comment training set |
CN112086092A (en) * | 2019-06-14 | 2020-12-15 | 广东技术师范大学 | Intelligent extraction method of dialect based on emotion analysis |
CN111104515A (en) * | 2019-12-24 | 2020-05-05 | 山东众志电子有限公司 | Emotional word text information classification method |
CN111984769A (en) * | 2020-06-30 | 2020-11-24 | 联想(北京)有限公司 | Information processing method and device of response system |
CN111984769B (en) * | 2020-06-30 | 2024-04-26 | 联想(北京)有限公司 | Information processing method and device of response system |
CN112711941A (en) * | 2021-01-08 | 2021-04-27 | 浪潮云信息技术股份公司 | Emotional score analysis processing method based on emotional dictionary entity |
CN112711941B (en) * | 2021-01-08 | 2022-12-27 | 浪潮云信息技术股份公司 | Emotional score analysis processing method based on emotional dictionary entity |
CN112364170A (en) * | 2021-01-13 | 2021-02-12 | 北京智慧星光信息技术有限公司 | Data emotion analysis method and device, electronic equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN107656917B (en) | 2021-01-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107656917A (en) | A kind of Chinese sentiment analysis method and system | |
Saad et al. | Twitter sentiment analysis based on ordinal regression | |
Singh et al. | Sentiment analysis on the impact of coronavirus in social life using the BERT model | |
Liu et al. | PLOME: Pre-training with misspelled knowledge for Chinese spelling correction | |
WO2020125445A1 (en) | Classification model training method, classification method, device and medium | |
CN106528528A (en) | A text emotion analysis method and device | |
CN108108352A (en) | A kind of enterprise's complaint risk method for early warning based on machine learning Text Mining Technology | |
CN106250438A (en) | Based on random walk model zero quotes article recommends method and system | |
CN105183833A (en) | User model based microblogging text recommendation method and recommendation apparatus thereof | |
US10387805B2 (en) | System and method for ranking news feeds | |
CN103399891A (en) | Method, device and system for automatic recommendation of network content | |
CN112711705B (en) | Public opinion data processing method, equipment and storage medium | |
CN105069072A (en) | Emotional analysis based mixed user scoring information recommendation method and apparatus | |
CN107688576B (en) | Construction and tendency classification method of CNN-SVM model | |
Jefriyanto et al. | Application of Naïve Bayes Classification to Analyze Performance Using Stopwords | |
US20200184345A1 (en) | Method and system for generating a transitory sentiment community | |
CN111626050A (en) | Microblog emotion analysis method based on expression dictionary and emotion common sense | |
KR20130103249A (en) | Method of classifying emotion from multi sentence using context information | |
CN104794209A (en) | Chinese microblog sentiment classification method and system based on Markov logic network | |
Sabariah et al. | Sentiment analysis on Twitter using the combination of lexicon-based and support vector machine for assessing the performance of a television program | |
CN109299007A (en) | A kind of defect repair person's auto recommending method | |
CN108694176B (en) | Document emotion analysis method and device, electronic equipment and readable storage medium | |
CN113220964A (en) | Opinion mining method based on short text in network communication field | |
CN110263344B (en) | Text emotion analysis method, device and equipment based on hybrid model | |
Gutsche | Automatic weak signal detection and forecasting |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |