CN110705266A - Emotion analysis method and device - Google Patents

Emotion analysis method and device Download PDF

Info

Publication number
CN110705266A
CN110705266A CN201910848784.6A CN201910848784A CN110705266A CN 110705266 A CN110705266 A CN 110705266A CN 201910848784 A CN201910848784 A CN 201910848784A CN 110705266 A CN110705266 A CN 110705266A
Authority
CN
China
Prior art keywords
emotion
module
clause
word
evaluation
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
Application number
CN201910848784.6A
Other languages
Chinese (zh)
Other versions
CN110705266B (en
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.)
Innovation Qizhi (nanjing) Technology Co Ltd
Original Assignee
Innovation Qizhi (nanjing) Technology Co Ltd
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 Innovation Qizhi (nanjing) Technology Co Ltd filed Critical Innovation Qizhi (nanjing) Technology Co Ltd
Priority to CN201910848784.6A priority Critical patent/CN110705266B/en
Publication of CN110705266A publication Critical patent/CN110705266A/en
Application granted granted Critical
Publication of CN110705266B publication Critical patent/CN110705266B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Machine Translation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device for emotion analysis, which comprises the steps of expanding degree adverbs, emotion words and negative words in an emotion word bank by using a word to vector, inputting an original sentence, carrying out sentence segmentation processing on the original sentence, evaluating an object, identifying and processing attributes in the sentence, carrying out emotion analysis processing on the sentence to obtain an emotion score, combining the object evaluation, the sentence attribute and the emotion score to obtain an evaluation term, and processing the initial position of the sentence by a position module to highlight; according to the method and the device for expanding the emotion dictionary by using the unsupervised word to vector, the workload of manually establishing the emotion dictionary is saved to a great extent, and the specific attribute is correspondingly extracted to be used as the attribute of the evaluation object, so that the evaluation term can be given by combining the emotion score with the specific evaluation object and attribute.

Description

Emotion analysis method and device
Technical Field
The invention relates to the technical field of language processing, in particular to a method and a device for emotion analysis.
Background
Analyzing emotion in text can help us to better understand thoughts and emotional expression tendencies of others from a large amount of data. Emotion analysis involves the analytical recognition of expressed emotional tendencies from utterances, which are generally classified into positive, negative, and neutral categories. The existing emotion analysis methods are divided into two types, namely statistical methods and rule methods. The statistical method uses a machine learning algorithm to perform emotion judgment on the sentences by means of a large number of manual labels, and the common algorithms include Bayes, a support vector machine, a deep learning method and the like. The rule method uses manually arranged rules to identify emotions in the sentence. At present, the statistical method has the following disadvantages:
1. a large number of manually labeled emotional sentences are required as training data.
2. The trained model is difficult to finely adjust according to the real situation when applied, and only reflects the manual labeling situation of the data.
In practice, training and prediction are time consuming and complex. At present, a semi-supervised learning method is used for expanding the effect of manual annotation, but the two defects of the statistical method still exist. The rule method also needs a large amount of manual labeling data to arrange the rules, but can carry out fine rule adjustment at any time according to the real situation to quickly iterate and check the effect.
At present, some rule-based methods can be searched in the aspect of emotion analysis, for example, a network text emotion analysis method based on emotion values and an emotion recognition method, device, server and storage medium of a text are respectively provided with a Chinese patent network application number of 201410224628.X and an application number of 201710113148.X, and an emotion analysis method of sentence division processing is performed on an original text, then an emotion dictionary or rule is used for judging the emotion values, and statistics is performed after the rule is passed. However, the current method still needs a lot of manual work to establish and iterate the emotion dictionary or corpus, and cannot be well implemented.
Disclosure of Invention
The invention aims to overcome the problems in the prior art and provides a method and a device for emotion analysis.
In order to achieve the technical purpose and achieve the technical effect, the invention is realized by the following technical scheme:
a method of sentiment analysis comprising the steps of:
s1, using Word to vector to expand degree adverb, emotion Word and negative Word in emotion Word library (Word to vector is a method for mapping Word to multi-dimensional continuous real number vector through neural network training, using low-dimensional space representation method, not only solving dimension disaster problem, but also digging correlation attribute between words, thereby improving accuracy in vector semantics);
s2, inputting an original sentence, and carrying out sentence dividing processing on the original sentence by the sentence dividing module;
s3 the object recognition module recognizes the object in the clause, when recognizing the evaluation object, the object is evaluated by matching the vocabulary in the dictionary to the clause, the attribute recognition module recognizes the attribute in the clause to obtain the clause attribute, the attribute represents the attribute of the clause referring to the evaluation object, and the recognition is carried out by the attribute dictionary. The set of the attribute values of different types of evaluation objects is different, the emotion analysis module performs emotion analysis processing on the clauses to obtain emotion scores, the evaluation module combines object evaluation, clause attributes and emotion scores to obtain evaluation terms, the position module processes the initial positions of the clauses, judges the initial positions of the clauses and displays the clauses in a highlight mode.
Further, the emotion analysis comprises the following steps:
s21, judging whether each word in the clause belongs to an emotional word, a degree adverb or a negative word based on the dictionary;
s22, judging the polarity of the emotional words, wherein the polarity of positive emotional words is a positive value, the polarity of negative emotions is a negative value, judging the weighted influence value of the degree adverbs, and judging whether the negative words reverse the polarity of the clauses;
s23, combining the weight through the emotion words, the degree adverbs and the negatives to obtain the emotion polarity of the clauses, and comprehensively considering the degree adverbs, the emotion words and the negatives in the sentence in the step of combining the weight to obtain the emotion polarity of the clauses.
An apparatus for sentiment analysis, comprising:
word to vector, which is used for expanding degree adverbs, emotional words and negative words in the emotional word bank;
the sentence dividing module is used for carrying out sentence dividing processing on the original sentence;
the object identification module is used for identifying the objects in the clauses and evaluating the objects;
the attribute identification module is used for identifying the attributes in the clauses to obtain clause attributes;
the emotion analysis module is used for carrying out emotion analysis processing on the clauses to obtain emotion scores;
the evaluation module combines the object evaluation, the clause attributes and the emotion scores to obtain an evaluation term;
the position module processes the starting position of the clause, judges the starting position of the clause, highlights the starting position of the clause, and classifies the clause under the evaluation wording through the highlight display of the starting position of the clause.
Furthermore, the emotion analysis module comprises an emotion word analysis module, a degree adverb analysis module, a negative word analysis module, a weight merging module and an emotion polarity module, wherein the emotion word analysis module judges the polarity of the emotion words, the polarity of positive emotion words is a positive value, and the polarity of negative emotion words is a negative value; the degree adverb analysis module judges the weighted influence value of the degree adverb; the negative word analysis module judges whether the negative words reverse the polarity of the clauses or not; and the weight combining module is used for combining the emotion words, the degree adverbs and the negative words to obtain the emotion polarity of the clauses.
The benefit effects of the invention are:
according to the method and the device for expanding the emotion dictionary by using the unsupervised word to vector, the workload of manually establishing the emotion dictionary is greatly saved, specific names in industries, fields, companies and regions are extracted as evaluation objects of emotion analysis during emotion analysis, and specific attributes are correspondingly extracted as attributes of the evaluation objects, so that evaluation phrases can be given by combining emotion scores according to the specific evaluation objects and attributes.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow diagram of the present invention;
FIG. 2 is a schematic diagram of the emotion analysis process of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in FIGS. 1-2, the present invention is a method for emotion analysis, comprising the steps of:
s1, using Word to vector to expand degree adverb, emotion Word and negative Word in emotion Word library (Word to vector is a method for mapping Word to multi-dimensional continuous real number vector through neural network training, using low-dimensional space representation method, not only solving dimension disaster problem, but also digging correlation attribute between words, thereby improving accuracy in vector semantics);
s2, inputting an original sentence, and carrying out sentence dividing processing on the original sentence by the sentence dividing module;
s3 the object recognition module recognizes the object in the clause, when recognizing the evaluation object, the object is evaluated by matching the vocabulary in the dictionary to the clause, the attribute recognition module recognizes the attribute in the clause to obtain the clause attribute, the attribute represents the attribute of the clause referring to the evaluation object, and the recognition is carried out by the attribute dictionary. The set of the attribute values of different types of evaluation objects is different, the emotion analysis module performs emotion analysis processing on the clauses to obtain emotion scores, the evaluation module combines object evaluation, clause attributes and emotion scores to obtain evaluation terms, the position module processes the initial positions of the clauses, judges the initial positions of the clauses and displays the clauses in a highlight mode.
Wherein, the emotion analysis comprises the following steps:
s21, judging whether each word in the clause belongs to an emotional word, a degree adverb or a negative word based on the dictionary;
s22, judging the polarity of the emotional words, wherein the polarity of positive emotional words is a positive value, the polarity of negative emotions is a negative value, judging the weighted influence value of the degree adverbs, and judging whether the negative words reverse the polarity of the clauses;
s23, combining the weight through the emotion words, the degree adverbs and the negatives to obtain the emotion polarity of the clauses, and comprehensively considering the degree adverbs, the emotion words and the negatives in the sentence in the step of combining the weight to obtain the emotion polarity of the clauses.
An apparatus for sentiment analysis, comprising:
word to vector, which is used for expanding degree adverbs, emotional words and negative words in the emotional word bank;
the sentence dividing module is used for carrying out sentence dividing processing on the original sentence;
the object identification module is used for identifying the objects in the clauses and evaluating the objects;
the attribute identification module is used for identifying the attributes in the clauses to obtain clause attributes;
the emotion analysis module is used for carrying out emotion analysis processing on the clauses to obtain emotion scores;
the evaluation module combines the object evaluation, the clause attributes and the emotion scores to obtain evaluation terms, and classifies the clauses into the evaluation terms;
and the position module processes the starting position of the clause, judges the starting position of the clause and displays the clause in a highlight mode.
The emotion analysis module comprises an emotion word analysis module, a degree adverb analysis module, a negative word analysis module, a weight merging module and an emotion polarity module, wherein the emotion word analysis module judges the polarity of emotion words, the polarity of positive emotion words is a positive value, and the polarity of negative emotion words is a negative value; the degree adverb analysis module judges the weighted influence value of the degree adverb; the degree adverb analysis module judges whether the negative word reverses the polarity of the clauses; and the weight combining module is used for combining the emotion words, the degree adverbs and the negative words to obtain the emotion polarity of the clauses.
In conclusion, the method and the device for expanding the emotion dictionary by using the unsupervised word to vector save the workload of manually establishing the emotion dictionary to a great extent, extract specific names in industries, fields, companies and regions as evaluation objects of emotion analysis during emotion analysis, and correspondingly extract specific attributes as the attributes of the evaluation objects, so that evaluation phrases can be given according to the specific evaluation objects and attributes and by combining emotion scores.
In the description herein, references to the description of "one embodiment," "an example," "a specific example" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The preferred embodiments of the invention disclosed above are intended to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise embodiments disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims (4)

1. A method of sentiment analysis comprising the steps of:
s1, using word to vector to expand degree adverb, emotion word and negative word in the emotion word stock;
s2, inputting an original sentence, and carrying out sentence dividing processing on the original sentence by the sentence dividing module;
s3 the object recognition module recognizes the object in the clause and evaluates the object, the attribute recognition module recognizes the attribute in the clause and obtains the clause attribute, the emotion analysis module analyzes the clause and obtains the emotion mark, the evaluation module combines the object evaluation, the clause attribute and the emotion mark to obtain the evaluation term, the position module processes the starting position of the clause and judges the starting position of the clause to display the high brightness.
2. A method of sentiment analysis according to claim 1 wherein: the emotion analysis comprises the following steps:
s21, judging whether each word in the clause belongs to an emotional word, a degree adverb or a negative word based on the dictionary;
s22, judging the polarity of the emotional words, wherein the polarity of positive emotional words is a positive value, the polarity of negative emotions is a negative value, judging the weighted influence value of the degree adverbs, and judging whether the negative words reverse the polarity of the clauses;
and S23, combining the weight values through the emotion words, the degree adverbs and the negative words to obtain the emotion polarity of the clauses.
3. An apparatus for emotion analysis, comprising:
word to vector, which is used for expanding degree adverbs, emotional words and negative words in the emotional word bank;
the sentence dividing module is used for carrying out sentence dividing processing on the original sentence;
the object identification module is used for identifying the objects in the clauses and evaluating the objects;
the attribute identification module is used for identifying the attributes in the clauses to obtain clause attributes;
the emotion analysis module is used for carrying out emotion analysis processing on the clauses to obtain emotion scores;
the evaluation module combines the object evaluation, the clause attributes and the emotion scores to obtain an evaluation term;
and the position module processes the starting position of the clause, judges the starting position of the clause and displays the clause in a highlight mode.
4. An emotion analysis apparatus as claimed in claim 3, wherein: the emotion analysis module comprises an emotion word analysis module, a degree adverb analysis module, a negative word analysis module, a weight merging module and an emotion polarity module.
CN201910848784.6A 2019-09-09 2019-09-09 Emotion analysis method and device Active CN110705266B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910848784.6A CN110705266B (en) 2019-09-09 2019-09-09 Emotion analysis method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910848784.6A CN110705266B (en) 2019-09-09 2019-09-09 Emotion analysis method and device

Publications (2)

Publication Number Publication Date
CN110705266A true CN110705266A (en) 2020-01-17
CN110705266B CN110705266B (en) 2023-05-12

Family

ID=69194850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910848784.6A Active CN110705266B (en) 2019-09-09 2019-09-09 Emotion analysis method and device

Country Status (1)

Country Link
CN (1) CN110705266B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107305539A (en) * 2016-04-18 2017-10-31 南京理工大学 A kind of text tendency analysis method based on Word2Vec network sentiment new word discoveries
CN107688630A (en) * 2017-08-21 2018-02-13 北京工业大学 A kind of more sentiment dictionary extending methods of Weakly supervised microblogging based on semanteme
CN110175325A (en) * 2019-04-26 2019-08-27 南京邮电大学 The comment and analysis method and Visual Intelligent Interface Model of word-based vector sum syntactic feature

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107305539A (en) * 2016-04-18 2017-10-31 南京理工大学 A kind of text tendency analysis method based on Word2Vec network sentiment new word discoveries
CN107688630A (en) * 2017-08-21 2018-02-13 北京工业大学 A kind of more sentiment dictionary extending methods of Weakly supervised microblogging based on semanteme
CN110175325A (en) * 2019-04-26 2019-08-27 南京邮电大学 The comment and analysis method and Visual Intelligent Interface Model of word-based vector sum syntactic feature

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王仁武等: "基于Word2vec的情感分析在品牌认知中的应用研究", 《图书情报工作》 *

Also Published As

Publication number Publication date
CN110705266B (en) 2023-05-12

Similar Documents

Publication Publication Date Title
CN110096570B (en) Intention identification method and device applied to intelligent customer service robot
JP7253848B2 (en) Fine Grained Emotion Analysis Method for Supporting Interlanguage Transition
CN107633007B (en) Commodity comment data tagging system and method based on hierarchical AP clustering
CN106326212B (en) A kind of implicit chapter relationship analysis method based on level deep semantic
CN108446271B (en) Text emotion analysis method of convolutional neural network based on Chinese character component characteristics
CN108563638B (en) Microblog emotion analysis method based on topic identification and integrated learning
CN109684626A (en) Method for recognizing semantics, model, storage medium and device
US20230069935A1 (en) Dialog system answering method based on sentence paraphrase recognition
CN109492105B (en) Text emotion classification method based on multi-feature ensemble learning
CN112069312B (en) Text classification method based on entity recognition and electronic device
CN111339260A (en) BERT and QA thought-based fine-grained emotion analysis method
CN110717045A (en) Letter element automatic extraction method based on letter overview
CN110750646B (en) Attribute description extracting method for hotel comment text
CN115687634A (en) Financial entity relationship extraction system and method combining priori knowledge
CN107818173B (en) Vector space model-based Chinese false comment filtering method
CN115713072A (en) Relation category inference system and method based on prompt learning and context awareness
Celikyilmaz et al. A graph-based semi-supervised learning for question-answering
CN114970536A (en) Combined lexical analysis method for word segmentation, part of speech tagging and named entity recognition
CN110610007A (en) Maintenance vehicle condition intelligent identification method and device based on NLP
CN108491375B (en) Entity identification and linking system and method based on CN-DBpedia
Al-Azani et al. Audio-textual Arabic dialect identification for opinion mining videos
CN112380346B (en) Financial news emotion analysis method and device, computer equipment and storage medium
CN111159405B (en) Irony detection method based on background knowledge
CN113157918A (en) Commodity name short text classification method and system based on attention mechanism
CN111160756A (en) Scenic spot assessment method and model based on secondary artificial intelligence algorithm

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