CN110705266B - Emotion analysis method and device - Google Patents

Emotion analysis method and device Download PDF

Info

Publication number
CN110705266B
CN110705266B CN201910848784.6A CN201910848784A CN110705266B CN 110705266 B CN110705266 B CN 110705266B CN 201910848784 A CN201910848784 A CN 201910848784A CN 110705266 B CN110705266 B CN 110705266B
Authority
CN
China
Prior art keywords
emotion
word
module
clause
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.)
Active
Application number
CN201910848784.6A
Other languages
Chinese (zh)
Other versions
CN110705266A (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.)
Ainnovation Nanjing Technology Co ltd
Original Assignee
Ainnovation 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 Ainnovation Nanjing Technology Co ltd filed Critical Ainnovation 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 comprise the steps of expanding a degree adverb, an emotion word and a negative word in an emotion word library by using word to vector, inputting an original sentence, carrying out sentence segmentation on the original sentence, evaluating an object, carrying out recognition processing on attributes in the sentence, carrying out emotion analysis processing on the sentence to obtain emotion scores, combining object evaluation, sentence attribute and emotion scores to obtain evaluation expressions, and processing the initial position of the sentence by a position module for highlighting; 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 specific attributes are correspondingly extracted to serve as the attributes of the evaluation object, so that the evaluation term can be given for the specific evaluation object and the attributes in combination with emotion scores.

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 the ideas and emotion expression tendencies of others from a large amount of data. Emotion analysis involves the analysis of the emotion tendencies expressed by recognition from utterances, which are generally classified into three categories, positive, negative, and neutral. The existing emotion analysis methods are divided into two types, namely a statistical method and a rule method. The statistical method uses a machine learning algorithm to judge emotion of sentences by means of a large number of manual labels, and common algorithms include Bayes, support vector machines, deep learning methods and the like. The rule method uses manually-arranged rules to identify emotion in a sentence. At present, the statistical method has the following disadvantages:
1. a large number of manually annotated emotion sentences are required as training data.
2. The trained model is difficult to finely adjust according to the real situation when in application, and only reflects the manual labeling situation of the data.
In practice, training and prediction is time consuming and complex. At present, a semi-supervised learning method is also adopted to expand the effect of manual labeling, but the two defects of the statistical method still exist. The rule method also needs a large amount of manual annotation data to sort the rules, but can carry out fine rule adjustment at any time according to the real situation so as to quickly and iteratively check the effect.
At present, some methods based on rules can be searched in emotion analysis, for example, a network text emotion analysis method based on emotion values, an emotion recognition method, a device, a server and a storage medium for texts are respectively disclosed in China patent network application number 201410224628.X and application number 20171013148. X, sentence processing is carried out on an original text, then emotion dictionary or rules are used for judging emotion values, and then the emotion analysis method is carried out through rule reuse statistics. However, the current method still needs a great deal of manpower to build and iterate the emotion dictionary or corpus, and cannot be well realized.
Disclosure of Invention
The invention aims to overcome the problems in the prior art and provide a method and a device for emotion analysis, which greatly save the workload of manually establishing an emotion dictionary by using an unsupervised word to vector, and extract specific names in industries, fields, companies and regions as evaluation objects of emotion analysis and correspondingly extract specific attributes as the attributes of the evaluation objects when emotion analysis is performed, so that evaluation expressions can be given for specific evaluation objects and attributes and by combining emotion scores.
In order to achieve the technical purpose and the technical effect, the invention is realized by the following technical scheme:
a method of emotion analysis comprising the steps of:
s1, expanding the degree adverbs, emotion words and negative words in an emotion Word library by using Word to vector (Word to vector is a method for mapping words to multi-dimensional continuous real vectors through neural network training, adopts a low-dimensional space representation method, solves the problem of dimension disasters, and digs the association attribute among words so as to improve the accuracy of vector semantics);
s2, inputting an original sentence, and carrying out sentence dividing processing on the original sentence by a sentence dividing module;
and S3, the object recognition module performs recognition processing on the objects in the clauses, when the evaluation objects are recognized, the vocabulary in the dictionary is used for matching the clauses, the objects are evaluated, the attribute recognition module performs recognition processing on the attributes in the clauses, the attribute of the clauses is obtained, the attribute represents that the clauses refer to the attribute of the evaluation object, and the recognition is performed through the attribute dictionary. The method comprises the steps that a set of evaluation object attribute values of different categories is different, an emotion analysis module carries out emotion analysis processing on clauses to obtain emotion scores, an evaluation module combines object evaluation, clause attributes and emotion scores to obtain evaluation expression, a position module processes the initial position of the clause, judges the initial position of the clause and carries out highlighting.
Further, the emotion analysis includes the steps of:
s21, judging whether each word in the clause belongs to an emotion word, a degree adverb or a negation word based on a dictionary;
s22, judging the polarity of the emotion words, wherein the polarity of the positive emotion words is positive, the polarity of the negative emotion words is negative, judging the weighted influence value of the degree adverbs, and judging whether the negative word reverses the polarity of the clauses;
s23, carrying out weight combination on the degree adverbs and the negative words through the emotion words to obtain emotion polarities of the clauses, and comprehensively considering the degree adverbs, the emotion words and the negative adverbs in a sentence in the weight combination link to obtain the emotion polarities of the clauses.
An apparatus for emotion analysis, comprising:
word to vector, is used for expanding the degree adverbs, emotion words and negatives in emotion word library;
the sentence dividing module is used for carrying out sentence dividing processing on the original sentence;
the object recognition module is used for recognizing the objects in the clauses and evaluating the objects;
the attribute identification module is used for carrying out identification processing on the attributes in the clauses to obtain the clause attributes;
the emotion analysis module carries out emotion analysis processing on the clauses to obtain emotion scores;
the evaluation module combines the object evaluation, the clause attribute and the emotion score to obtain an evaluation term;
the position module processes the initial position of the clause, judges the initial position of the clause, performs highlighting, and classifies the clause under the evaluation term through highlighting the initial position of the sentence.
Further, the emotion analysis module comprises an emotion word analysis module, a degree adverb analysis module, a negation word analysis module, a weight merging module and an emotion polarity module, wherein the emotion word analysis module judges the polarity of an emotion word, the polarity of a positive emotion word is a positive value, and the polarity of a negative emotion is a negative value; the degree adverb analysis module judges the weighted influence value of the degree adverbs; the negative word analysis module judges whether the negative word reverses the polarity of the clause; and the weight merging module is used for merging weights of the emotion words, the degree adverbs and the negatives to obtain emotion polarities of the clauses.
The invention has the following benefits:
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, specific names in industries, fields, companies and areas are extracted as evaluation objects of emotion analysis during emotion analysis, specific attributes are correspondingly extracted as the attributes of the evaluation objects, and accordingly evaluation expressions can be given for specific evaluation objects and attributes and by combining emotion scores.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of the present invention;
FIG. 2 is a schematic diagram of emotion analysis flow.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1-2, the present invention is a method for emotion analysis, comprising the steps of:
s1, expanding the degree adverbs, emotion words and negative words in an emotion Word library by using Word to vector (Word to vector is a method for mapping words to multi-dimensional continuous real vectors through neural network training, adopts a low-dimensional space representation method, solves the problem of dimension disasters, and digs the association attribute among words so as to improve the accuracy of vector semantics);
s2, inputting an original sentence, and carrying out sentence dividing processing on the original sentence by a sentence dividing module;
and S3, the object recognition module performs recognition processing on the objects in the clauses, when the evaluation objects are recognized, the vocabulary in the dictionary is used for matching the clauses, the objects are evaluated, the attribute recognition module performs recognition processing on the attributes in the clauses, the attribute of the clauses is obtained, the attribute represents that the clauses refer to the attribute of the evaluation object, and the recognition is performed through the attribute dictionary. The method comprises the steps that a set of evaluation object attribute values of different categories is different, an emotion analysis module carries out emotion analysis processing on clauses to obtain emotion scores, an evaluation module combines object evaluation, clause attributes and emotion scores to obtain evaluation expression, a position module processes the initial position of the clause, judges the initial position of the clause and carries out highlighting.
Wherein, emotion analysis includes the following steps:
s21, judging whether each word in the clause belongs to an emotion word, a degree adverb or a negation word based on a dictionary;
s22, judging the polarity of the emotion words, wherein the polarity of the positive emotion words is positive, the polarity of the negative emotion words is negative, judging the weighted influence value of the degree adverbs, and judging whether the negative word reverses the polarity of the clauses;
s23, carrying out weight combination on the degree adverbs and the negative words through the emotion words to obtain emotion polarities of the clauses, and comprehensively considering the degree adverbs, the emotion words and the negative adverbs in a sentence in the weight combination link to obtain the emotion polarities of the clauses.
An apparatus for emotion analysis, comprising:
word to vector, is used for expanding the degree adverbs, emotion words and negatives in emotion word library;
the sentence dividing module is used for carrying out sentence dividing processing on the original sentence;
the object recognition module is used for recognizing the objects in the clauses and evaluating the objects;
the attribute identification module is used for carrying out identification processing on the attributes in the clauses to obtain the clause attributes;
the emotion analysis module carries out emotion analysis processing on the clauses to obtain emotion scores;
the evaluation module combines the object evaluation, the clause attribute and the emotion score to obtain an evaluation term, and classifies the clause under the evaluation term;
the position module processes the initial position of the clause, judges the initial position of the clause and performs highlighting.
The emotion analysis module comprises an emotion word analysis module, a degree adverb analysis module, a negation word analysis module, a weight merging module and an emotion polarity module, wherein the emotion word analysis module judges the polarity of an emotion word, the polarity of a positive emotion word is a positive value, and the polarity of a negative emotion is a negative value; the degree adverb analysis module judges the weighted influence value of the degree adverbs; the degree adverb analysis module judges whether the negative word reverses the polarity of the clause; and the weight merging module is used for merging weights of the emotion words, the degree adverbs and the negatives to obtain emotion polarities of the clauses.
In summary, the method and the device for expanding the emotion dictionary by using the unsupervised word to vector greatly save the workload of manually establishing the emotion dictionary, extract specific names in industries, fields, companies and regions as evaluation objects of emotion analysis during emotion analysis, correspondingly extract specific attributes as the attributes of the evaluation objects, and further provide evaluation expressions aiming at specific evaluation objects and attributes and combining emotion scores.
In the description of the present specification, the descriptions of the terms "one embodiment," "example," "specific example," and the like, 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 present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. 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 only to assist in the explanation of the invention. The preferred embodiments are not exhaustive or to limit the invention to the precise form 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 understand and utilize the invention. The invention is limited only by the claims and the full scope and equivalents thereof.

Claims (3)

1. A method of emotion analysis, comprising the steps of:
s1, expanding a degree adverb, an emotion word and a negative word in an emotion word library by using a wordtovector;
s2, inputting an original sentence, and carrying out sentence dividing processing on the original sentence by a sentence dividing module;
s21, judging whether each word in the clause belongs to an emotion word, a degree adverb or a negation word based on a dictionary;
s22, judging the polarity of the emotion words, wherein the polarity of the positive emotion words is positive, the polarity of the negative emotion words is negative, judging the weighted influence value of the degree adverbs, and judging whether the negative word reverses the polarity of the clauses;
s23, combining weights of the degree adverbs and the negatives through emotion words to obtain emotion polarities of clauses;
s3, the object recognition module carries out recognition processing on the object in the clause, the object is evaluated, the attribute recognition module carries out recognition processing on the attribute in the clause to obtain the attribute of the clause, the emotion analysis module carries out emotion analysis processing on the clause to obtain emotion scores, the evaluation module combines the object evaluation, the clause attribute and the emotion scores to obtain evaluation expression, the position module carries out processing on the initial position of the clause, the initial position of the clause is judged, and highlighting is carried out.
2. An apparatus for emotion analysis, comprising:
the wordtovector is used for expanding the degree adverbs, the emotion words and the negatives in the emotion word library;
the sentence dividing module is used for carrying out sentence dividing processing on the original sentence;
the object recognition module is used for recognizing the objects in the clauses and evaluating the objects;
the attribute identification module is used for carrying out identification processing on the attributes in the clauses to obtain the clause attributes;
the emotion analysis module carries out emotion analysis processing on the clauses to obtain emotion scores;
the evaluation module combines the object evaluation, the clause attribute and the emotion score to obtain an evaluation term;
the position module processes the initial position of the clause, judges the initial position of the clause and performs highlighting.
3. An emotion analysis apparatus according to claim 2, characterized in that: 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 CN110705266A (en) 2020-01-17
CN110705266B true 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)

Family Cites Families (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
CN107688630B (en) * 2017-08-21 2020-05-22 北京工业大学 Semantic-based weakly supervised microbo multi-emotion dictionary expansion method
CN110175325B (en) * 2019-04-26 2023-07-11 南京邮电大学 Comment analysis method based on word vector and syntactic characteristics and visual interaction interface

Also Published As

Publication number Publication date
CN110705266A (en) 2020-01-17

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
CN106776581B (en) Subjective text emotion analysis method based on deep learning
CN110245229B (en) Deep learning theme emotion classification method based on data enhancement
CN107590177B (en) Chinese text classification method combined with supervised learning
CN109684626A (en) Method for recognizing semantics, model, storage medium and device
CN109002473B (en) Emotion analysis method based on word vectors and parts of speech
CN109657230A (en) Merge the name entity recognition method and device of term vector and part of speech vector
CN106326212A (en) Method for analyzing implicit type discourse relation based on hierarchical depth semantics
WO2023137911A1 (en) Intention classification method and apparatus based on small-sample corpus, and computer device
CN110134793A (en) Text sentiment classification method
CN113051887A (en) Method, system and device for extracting announcement information elements
CN115357719A (en) Power audit text classification method and device based on improved BERT model
CN114491024A (en) Small sample-based specific field multi-label text classification method
CN116842194A (en) Electric power semantic knowledge graph system and method
CN110991515B (en) Image description method fusing visual context
CN108491375B (en) Entity identification and linking system and method based on CN-DBpedia
CN112862569B (en) Product appearance style evaluation method and system based on image and text multi-modal data
CN113312907A (en) Remote supervision relation extraction method and device based on hybrid neural network
CN110377753B (en) Relation extraction method and device based on relation trigger word and GRU model
Arora et al. Sentimental analysis on imdb movies review using bert
CN112347247A (en) Specific category text title binary classification method based on LDA and Bert
CN110705266B (en) Emotion analysis method and device
CN116680407A (en) Knowledge graph construction method and device
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