CN115952787B - Emotion analysis method, system and storage medium for appointed target entity - Google Patents

Emotion analysis method, system and storage medium for appointed target entity Download PDF

Info

Publication number
CN115952787B
CN115952787B CN202310237352.8A CN202310237352A CN115952787B CN 115952787 B CN115952787 B CN 115952787B CN 202310237352 A CN202310237352 A CN 202310237352A CN 115952787 B CN115952787 B CN 115952787B
Authority
CN
China
Prior art keywords
emotion
target entity
sentences
sentence
entity
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
CN202310237352.8A
Other languages
Chinese (zh)
Other versions
CN115952787A (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.)
Beijing Lanzhou Technology Co ltd
Original Assignee
Beijing Lanzhou 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 Beijing Lanzhou Technology Co ltd filed Critical Beijing Lanzhou Technology Co ltd
Priority to CN202310237352.8A priority Critical patent/CN115952787B/en
Publication of CN115952787A publication Critical patent/CN115952787A/en
Application granted granted Critical
Publication of CN115952787B publication Critical patent/CN115952787B/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

Abstract

The invention relates to the technical field of text emotion analysis, in particular to an emotion analysis method, an emotion analysis system and a storage medium for a specified target entity. The method comprises the steps of obtaining an article and a target entity, dividing the article into sentences, and dividing the sentences into two types: contains the target entity and does not contain the target entity; sentence-level emotion analysis is carried out on sentences which do not contain target entities, so that emotion polarity and emotion score of each sentence are obtained; calculating sentences containing target entities to obtain entity-level emotion polarities and emotion scores of the sentences; and processing the feature set consisting of emotion polarities and emotion scores of the two types of sentences by using a pre-trained classifier model to obtain the emotion polarities of the articles after the target entity is specified. And an entity-level emotion analysis task is added on the basis of the chapter-level emotion analysis task, so that the effective fusion of coarse-granularity and fine-granularity emotion analysis tasks is realized, and the accuracy of the chapter-level emotion analysis task is higher.

Description

Emotion analysis method, system and storage medium for appointed target entity
Technical Field
The invention relates to the technical field of text emotion analysis, in particular to an emotion analysis method, an emotion analysis system and a storage medium for a specified target entity.
Background
Emotion analysis can be classified into chapter-level emotion analysis and sentence-level emotion analysis according to text granularity. Sentence-level emotion analysis aims at judging the overall emotion polarity of sentences, and chapter-level emotion analysis is more difficult and needs to analyze articles containing a plurality of sentences. The target emotion analysis belongs to fine granularity emotion analysis, an analysis object is specified on the basis of sentence-level emotion analysis tasks, and the target can be an entity or an attribute of the entity. Such as user comments: "the store location is indeed somewhat off-set, but the decoration is still very beautiful, the food material is also fresh-! ", wherein a restaurant is an entity and the set of attributes are location, decoration, and dishes. The entity-level emotion analysis can better mine text content and provide more accurate emotion analysis results.
At present, sentence-level emotion analysis tasks are common, entity-level emotion analysis is applied to industry user comments, but chapter-level emotion analysis task related researches are not more, chapter-level difficulties are larger, various sentences are contained in articles, each sentence possibly affects a final analysis result, emotion expressed by the whole chapter can be inconsistent for different entities, and how to mine text information by combining coarse-granularity and fine-granularity emotion analysis is a problem to be solved urgently.
Disclosure of Invention
In order to solve the problem of low accuracy of the conventional chapter-level emotion analysis, the invention provides an emotion analysis method, an emotion analysis system and a storage medium for a designated target entity.
The invention provides the following technical scheme for solving the technical problems: an emotion analysis method of a specified target entity, comprising the steps of:
the method comprises the steps of obtaining an article and a target entity, dividing the article into sentences, and dividing the sentences into two types: contains the target entity and does not contain the target entity;
sentence-level emotion analysis is carried out on sentences which do not contain target entities, so that emotion polarity and emotion score of each sentence are obtained;
judging the local context direction relative to the target entity in the sentence for the sentence containing the target entity, and calculating to obtain the local context, specifically, carrying out fine-grained clause on the sentence containing the target entity; judging whether the sentences of the target entity and the sentences before and after the target entity have emotion words or not to obtain a local context direction; taking part of text according to the local context direction to perform dependency syntax analysis processing to obtain a syntax dependency tree; calculating a local context specific range according to the syntactic dependency tree to obtain a local context;
according to the calculated local context, calculating and obtaining the entity-level emotion polarity and emotion score of the sentence;
and processing the feature set consisting of emotion polarities and emotion scores of the two types of sentences by using a pre-trained classifier model to obtain the emotion polarities of the articles after the target entity is specified.
Preferably, in acquiring the article and the target entity, the sentence making method further comprises the following steps:
supplementing target entity synonyms, and judging whether sentences contain target entities or not;
sentences containing target entity synonyms are also classified as sentences containing target entities.
Preferably, sentence-level emotion analysis employs BERT model analysis.
Preferably, when analyzing sentences not including the target entity, a emotion score range is further set so that emotion polarities of sentences having emotion scores within the range are judged to be neutral.
Preferably, according to the calculated local context and global context, calculating emotion polarity and emotion score of the obtained sentence is specifically as follows: and directly taking sentences containing target entities as global contexts, respectively obtaining respective sentence vectors by entity-level emotion analysis of the local contexts and the global contexts, splicing and fusing the respective sentence vectors, and then processing by self-intent structures to obtain final entity-level emotion polarities and emotion scores.
Preferably, the feature set is input into a classifier model, the classifier model outputs the importance of each feature, and the feature quantity is adjusted to obtain the final article emotion polarity prediction result.
Preferably, the pre-trained classifier model is an xgboost model.
The invention provides another technical scheme for solving the technical problems as follows: an emotion analysis system for a specified target entity is used for realizing the emotion analysis method for the specified target entity, and comprises a classification module, a sentence-level emotion analysis module, an entity-level emotion analysis module and a classifier module;
and a classification module: the method is used for acquiring the article and the target entity, dividing the article into sentences and classifying the sentences into two types: contains the target entity and does not contain the target entity;
sentence level emotion analysis module: the sentence-level emotion analysis method comprises the steps of performing sentence-level emotion analysis on sentences which do not contain target entities, and obtaining emotion polarity and emotion score of each sentence;
entity-level emotion analysis module: the method is used for judging the local context direction relative to the target entity in the sentence for the sentence containing the target entity, and calculating to obtain the local context, specifically, carrying out fine-grained clause on the sentence containing the target entity; judging whether the sentences of the target entity and the sentences before and after the target entity have emotion words or not to obtain a local context direction; taking part of text according to the local context direction to perform dependency syntax analysis processing to obtain a syntax dependency tree; calculating a local context specific range according to the syntactic dependency tree to obtain a local context; according to the calculated local context, calculating and obtaining the entity-level emotion polarity and emotion score of the sentence;
and a classifier module: and the method is used for processing the feature set consisting of emotion polarities and emotion scores of the two types of sentences to obtain the emotion polarities of the articles after the target entity is specified.
The invention provides another technical scheme for solving the technical problems as follows: a computer storage medium having stored thereon a computer program which, when executed, performs the steps of a method of emotion analysis for a specified target entity as previously described.
Compared with the prior art, the emotion analysis method, the emotion analysis system and the storage medium for the appointed target entity have the following beneficial effects:
1. according to the emotion analysis method for the appointed target entity, sentences in the article are classified through the appointed entity, different treatments are respectively carried out after classification, an entity-level emotion analysis task is added on the basis of a chapter-level emotion analysis task, emotion expressed by the whole article is analyzed aiming at the appointed entity, and effective fusion of coarse-granularity and fine-granularity emotion analysis tasks is achieved, so that the chapter-level emotion analysis task is higher in accuracy and more interpretable.
2. According to the emotion analysis method for the appointed target entity, which is provided by the embodiment of the invention, as emotion polarities reflected by sentences which do not contain the target entity are possibly irrelevant to the target entity, an emotion score range is further arranged in the step S2, so that the emotion polarities of sentences with emotion scores in the range are judged to be neutral, and the influence of sentences irrelevant to the target entity is weakened by setting an emotion polarity threshold value, so that the emotion polarity result of the emotion polarity range is more effectively used for assisting chapter-level emotion polarity judgment.
3. According to the emotion analysis method for the appointed target entity, provided by the embodiment of the invention, the local context direction is judged according to the emotion words, the local context range is obtained through the syntactic dependency tree, the calculation of the local context is refined, the text related to the target entity is fully utilized, and the accuracy of the entity-level emotion analysis task is improved.
4. According to the emotion analysis method for the appointed target entity, provided by the embodiment of the invention, when sentences are classified, target entity synonyms can be expanded, so that a classification result is more accurate, and sentences related to the target entity are prevented from being classified as irrelevant sentences.
5. According to the emotion analysis method for the appointed target entity, xgboost is a classifier model trained in advance; a large number of statistical features are obtained in the sentence-level and entity-level emotion analysis process, the mapping relation of the chapter level is learned by using an xgboost classification model, and a deep learning and machine learning method is combined in the chapter-level emotion analysis task.
6. The embodiment of the invention also provides an emotion analysis system of the appointed target entity, which has the same beneficial effects as the emotion analysis method of the appointed target entity, and the detailed description is omitted.
7. The embodiment of the invention also provides a computer storage medium, which has the same beneficial effects as the emotion analysis method of the specified target entity, and is not described herein.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being 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 flowchart illustrating an emotion analysis method for a specified target entity according to a first embodiment of the present invention.
FIG. 2 is a flowchart illustrating steps S11-S12 of a method for emotion analysis of a specified target entity according to a first embodiment of the present invention.
Fig. 3 is a flowchart illustrating a method for emotion analysis of a specified target entity according to a first embodiment of the present invention.
Fig. 4 is a block diagram of an emotion analysis system for a specified target entity according to a second embodiment of the present invention.
The attached drawings are used for identifying and describing:
1. an emotion analysis system for specifying a target entity;
10. a classification module; 11. sentence level emotion analysis module; 12. an entity-level emotion analysis module; 13. and a classifier module.
Detailed Description
For the purpose of making the technical solution and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and examples of implementation. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, a first embodiment of the present invention provides an emotion analysis method for a specified target entity, including the following steps:
step S1: the method comprises the steps of obtaining an article and a target entity, dividing the article into sentences, and dividing the sentences into two types: contains the target entity and does not contain the target entity;
step S2: sentences which do not contain the target entity are analyzed by using a sentence-level emotion analysis model, so that emotion polarity and emotion score of each sentence are obtained;
step S3: judging the local context direction relative to the target entity in the sentence, and calculating to obtain the local context;
step S4: according to the calculated local context, calculating and obtaining the entity-level emotion polarity and emotion score of the sentence;
step S5: and processing the feature set consisting of emotion polarities and emotion scores of the two types of sentences by using a pre-trained classifier model to obtain the emotion polarities of the articles after the target entity is specified.
It can be appreciated that the target entity may be a person, a thing, etc. appearing in the article, and in general, the article includes a plurality of entities, for each entity, the emotion expressed by the article may not be consistent, the article is a text with larger sentence expression, and the emotion expressed by each sentence is different due to the more sentences, how to mine text information by combining coarse granularity and fine granularity emotion analysis is a problem to be solved, and the invention aims to solve the problem, analyze the emotion of the whole article for the designated target entity, add an entity-level emotion analysis task based on the chapter-level emotion analysis task, realize the effective fusion of the coarse granularity and the fine granularity emotion analysis task, explain the emotion direction of the article from the hierarchy of the entity, and make the chapter-level emotion analysis task have higher accuracy and more interpretability.
Emotion score can be understood as a score made by an emotion analysis model after analysis, for example, when emotion score is negative, emotion polarity is determined to be negative, meaning negative, detraction, etc., and when emotion score is positive, emotion polarity is determined to be positive, meaning, etc.
Referring to fig. 2, in step S1, the following steps are further included:
s11: supplementing target entity synonyms, and judging whether sentences contain target entities or not;
s12: sentences containing target entity synonyms are also classified as sentences containing target entities.
It can be understood that, the sentence classification is mainly to classify sentences as related or unrelated to the entity according to the inclusion or non-inclusion of the target entity, in the implementation, any number of synonyms can be supplemented according to the target entity actually specified so as to fully utilize the content in the article, and reduce the influence on the analysis result caused by writing the same thing into multiple names when writing the article, for example, in a certain article, for the restaurant A, the restaurant A and the like, the names are all indicative of the restaurant A, therefore, when classifying the sentence, the expansion of the synonyms of the target entity can be performed, so that the classification result is more accurate, and the sentence related to the target entity is prevented from being classified as unrelated sentence.
Further, in step S2, a BERT model is adopted for sentence-level emotion analysis; likewise, the BERT model is also used for entity-level emotion analysis, but the two models are respectively two models, and the operation principles of the two models are different.
Because the emotion polarity reflected by the sentence which does not contain the target entity is possibly irrelevant to the target entity, an emotion score range is further set in the step S2, so that the emotion polarity of the sentence with the emotion score in the range is judged to be neutral, and the influence of the sentence irrelevant to the target entity is weakened by setting an emotion polarity judgment threshold value, so that the emotion polarity result of the sentence is more effectively assisted in chapter-level emotion polarity judgment, and a simple and effective processing method is provided for sentence-level emotion analysis of similar application scenes.
It will be appreciated that determining the direction of the local context, i.e. which part of the sentence the context that is more closely related to the target entity is, may be a word, a sentence, etc., the local context represents a part of the text in the sentence that is more closely related to the target entity.
Referring to fig. 3, further, step S3 specifically includes the following steps:
s31: fine-grained clauses are carried out on sentences containing target entities;
s32: judging whether the sentences of the target entity and the sentences before and after the target entity have emotion words or not to obtain a local context direction;
s33: taking part of text according to the local context direction to perform dependency syntax analysis processing to obtain a syntax dependency tree;
s34: and calculating the local context specific range according to the syntactic dependency tree to obtain the local context.
It will be understood that, when the sentence is divided in step S1, the sentence is divided mainly according to the punctuation marks existing in the article, while the fine-grained branch in step S31 further divides the sentence, and separators such as commas, semicolons, etc. are added to the sentence to divide the sentence into sentences with finer granularity, and the divided fine-grained sentences may be words, phrases, etc.
The local context direction is judged according to the emotion words, the local context range is obtained through the syntactic dependency tree, the calculation of the local context is refined, texts related to the target entity are fully utilized, and the accuracy of the entity-level emotion analysis task is improved.
Further, step S4 specifically includes: and directly taking sentences containing target entities as global contexts, respectively processing the local contexts and the global contexts by an entity-level emotion analysis model to obtain respective sentence vectors, splicing and fusing the respective sentence vectors, and then processing by a self-emotion structure to obtain final entity-level emotion polarity and emotion scores.
It can be understood that the global context is expressed as a sentence containing the target entity, the global context is expressed as a part of text which is extracted from the sentence containing the target entity and is more compact than the target entity, and the final entity level emotion polarity and emotion score are obtained through analysis by combining the two.
Further, the pre-trained classifier model is an xgboost classifier model. A large number of statistical features are obtained in the sentence-level and entity-level emotion analysis process, the mapping relation of the chapter level is learned by using an xgboost classifier model, and a deep learning and machine learning method is combined in the chapter-level emotion analysis task.
Preferably, in step S5, the feature set to be input by the xgboost may be set according to a specific task, and initially includes as many features as possible, and in the training process, the importance of each feature is output, and the number of features is adjusted to achieve the best effect, so as to obtain the final article emotion polarity prediction result.
Referring to fig. 4, an emotion analysis system 1 for a specified target entity according to a second embodiment of the present invention is configured to implement an emotion analysis method for a specified target entity according to a first embodiment, and includes a classification module 10, a sentence-level emotion analysis module 11, an entity-level emotion analysis module 12, and a classifier module 13;
classification module 10: the method is used for acquiring the article and the target entity, dividing the article into sentences and classifying the sentences into two types: contains the target entity and does not contain the target entity;
sentence-level emotion analysis module 11: the method comprises the steps of analyzing sentences which do not contain target entities to obtain emotion polarity and emotion scores of each sentence;
entity-level emotion analysis module 12: for analyzing sentences containing target entities to obtain emotion polarities and emotion scores for each sentence
Classifier module 13: processing the feature set consisting of emotion polarities and emotion scores of two types of sentences by using a pre-trained classifier model to obtain emotion polarities of articles after specifying target entities
The emotion analysis system 1 for a specified target entity provided in the second embodiment of the present invention has the same advantages as the emotion analysis method for a specified target entity described above, and will not be described in detail herein.
The third embodiment of the present invention also provides a computer storage medium having stored thereon a computer program which, when executed, implements the steps of a method for emotion analysis of a specified target entity as described in the first embodiment. The method has the same beneficial effects as the emotion analysis method of the specified target entity, and is not described herein.
In the embodiments provided herein, it should be understood that "B corresponding to a" means that B is associated with a, from which B can be determined. It should also be understood that determining B from a does not mean determining B from a alone, but may also determine B from a and/or other information.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Those skilled in the art will also appreciate that the embodiments described in the specification are alternative embodiments and that the acts and modules referred to are not necessarily required for the present invention.
In various embodiments of the present invention, it should be understood that the sequence numbers of the foregoing processes do not imply that the execution sequences of the processes should be determined by the functions and internal logic of the processes, and should not be construed as limiting the implementation of the embodiments of the present invention.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, with the determination being made based upon the functionality involved. It will be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Compared with the prior art, the emotion analysis method, the emotion analysis system and the storage medium for the appointed target entity have the following beneficial effects:
1. according to the emotion analysis method for the appointed target entity, sentences in the article are classified through the appointed entity, different treatments are respectively carried out after classification, an entity-level emotion analysis task is added on the basis of a chapter-level emotion analysis task, emotion expressed by the whole article is analyzed aiming at the appointed entity, and effective fusion of coarse-granularity and fine-granularity emotion analysis tasks is achieved, so that the chapter-level emotion analysis task is higher in accuracy and more interpretable.
2. According to the emotion analysis method for the appointed target entity, which is provided by the embodiment of the invention, as emotion polarities reflected by sentences which do not contain the target entity are possibly irrelevant to the target entity, an emotion score range is further arranged in the step S2, so that the emotion polarities of sentences with emotion scores in the range are judged to be neutral, and the influence of sentences irrelevant to the target entity is weakened by setting an emotion polarity threshold value, so that the emotion polarity result of the emotion polarity range is more effectively used for assisting chapter-level emotion polarity judgment.
3. According to the emotion analysis method for the appointed target entity, provided by the embodiment of the invention, the local context direction is judged according to the emotion words, the local context range is obtained through the syntactic dependency tree, the calculation of the local context is refined, the text related to the target entity is fully utilized, and the accuracy of the entity-level emotion analysis task is improved.
4. According to the emotion analysis method for the appointed target entity, provided by the embodiment of the invention, when sentences are classified, target entity synonyms can be expanded, so that a classification result is more accurate, and sentences related to the target entity are prevented from being classified as irrelevant sentences.
5. According to the emotion analysis method for the appointed target entity, xgboost is a classifier model trained in advance; a large number of statistical features are obtained in the sentence-level and entity-level emotion analysis process, the mapping relation of the chapter level is learned by using an xgboost classification model, and a deep learning and machine learning method is combined in the chapter-level emotion analysis task.
6. The embodiment of the invention also provides an emotion analysis system of the appointed target entity, which has the same beneficial effects as the emotion analysis method of the appointed target entity, and the detailed description is omitted.
7. The embodiment of the invention also provides a computer storage medium, which has the same beneficial effects as the emotion analysis method of the specified target entity, and is not described herein.
The above detailed description of the emotion analysis method, system and storage medium of a specified target entity disclosed in the embodiments of the present invention applies specific examples to illustrate the principles and embodiments of the present invention, and the above description of the embodiments is only used to help understand the method and core idea of the present invention; meanwhile, as for those skilled in the art, according to the idea of the present invention, there are changes in the specific embodiments and the application scope, and in summary, the present disclosure should not be construed as limiting the present invention, and any modifications, equivalent substitutions and improvements made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. An emotion analysis method for a specified target entity, which is characterized by comprising the following steps of: the method comprises the following steps:
the method comprises the steps of obtaining an article and a target entity, dividing the article into sentences, and dividing the sentences into two types: contains the target entity and does not contain the target entity;
sentence-level emotion analysis is carried out on sentences which do not contain target entities, so that emotion polarity and emotion score of each sentence are obtained;
judging the local context direction relative to the target entity in the sentence for the sentence containing the target entity, and calculating to obtain the local context, specifically, carrying out fine-grained clause on the sentence containing the target entity; judging whether the sentences of the target entity and the sentences before and after the target entity have emotion words or not to obtain a local context direction; taking part of text according to the local context direction to perform dependency syntax analysis processing to obtain a syntax dependency tree; calculating a local context specific range according to the syntactic dependency tree to obtain a local context;
according to the calculated local context, calculating and obtaining the entity-level emotion polarity and emotion score of the sentence;
and processing the feature set consisting of emotion polarities and emotion scores of the two types of sentences by using a pre-trained classifier model to obtain the emotion polarities of the articles after the target entity is specified.
2. The emotion analysis method of a specified target entity of claim 1, wherein: in the process of acquiring the article and the target entity, the sentence making of the article further comprises the following steps:
supplementing target entity synonyms, and judging whether sentences contain target entities or not;
sentences containing target entity synonyms are also classified as sentences containing target entities.
3. The emotion analysis method of a specified target entity of claim 1, wherein: sentence-level emotion analysis uses BERT model analysis.
4. The emotion analysis method of a specified target entity of claim 1, wherein: when analyzing sentences which do not contain target entities, a emotion score range is also set, so that emotion polarities of sentences with emotion scores within the range are judged to be neutral.
5. The emotion analysis method of a specified target entity of claim 1, wherein: according to the calculated local context, calculating and obtaining the emotion polarity and emotion score of the sentence specifically comprises the following steps: and directly taking sentences containing target entities as global contexts, respectively obtaining respective sentence vectors by entity-level emotion analysis of the local contexts and the global contexts, splicing and fusing the respective sentence vectors, and then processing by self-intent structures to obtain final entity-level emotion polarities and emotion scores.
6. The emotion analysis method of a specified target entity of claim 1, wherein: the feature set is input into a classifier model, the classifier model outputs the importance of each feature, and the feature quantity is adjusted to obtain the final article emotion polarity prediction result.
7. The emotion analysis method of a specified target entity of claim 1, wherein: the pre-trained classifier model is an xgboost model.
8. A target entity-specific emotion analysis system for implementing a target entity-specific emotion analysis method as set forth in any one of claims 1 to 7, characterized by: the system comprises a classification module, a sentence-level emotion analysis module, an entity-level emotion analysis module and a classifier module;
and a classification module: the method is used for acquiring the article and the target entity, dividing the article into sentences and classifying the sentences into two types: contains the target entity and does not contain the target entity;
sentence level emotion analysis module: the sentence-level emotion analysis method comprises the steps of performing sentence-level emotion analysis on sentences which do not contain target entities, and obtaining emotion polarity and emotion score of each sentence;
entity-level emotion analysis module: the method is used for judging the local context direction relative to the target entity in the sentence for the sentence containing the target entity, and calculating to obtain the local context, specifically, carrying out fine-grained clause on the sentence containing the target entity; judging whether the sentences of the target entity and the sentences before and after the target entity have emotion words or not to obtain a local context direction; taking part of text according to the local context direction to perform dependency syntax analysis processing to obtain a syntax dependency tree; calculating a local context specific range according to the syntactic dependency tree to obtain a local context; according to the calculated local context, calculating and obtaining the entity-level emotion polarity and emotion score of the sentence;
and a classifier module: and the method is used for processing the feature set consisting of emotion polarities and emotion scores of the two types of sentences to obtain the emotion polarities of the articles after the target entity is specified.
9. A computer storage medium having a computer program stored thereon, characterized by: the computer program when executed implements the steps of a method for emotion analysis of a specified target entity as claimed in any of claims 1 to 7.
CN202310237352.8A 2023-03-13 2023-03-13 Emotion analysis method, system and storage medium for appointed target entity Active CN115952787B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310237352.8A CN115952787B (en) 2023-03-13 2023-03-13 Emotion analysis method, system and storage medium for appointed target entity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310237352.8A CN115952787B (en) 2023-03-13 2023-03-13 Emotion analysis method, system and storage medium for appointed target entity

Publications (2)

Publication Number Publication Date
CN115952787A CN115952787A (en) 2023-04-11
CN115952787B true CN115952787B (en) 2023-05-12

Family

ID=85906924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310237352.8A Active CN115952787B (en) 2023-03-13 2023-03-13 Emotion analysis method, system and storage medium for appointed target entity

Country Status (1)

Country Link
CN (1) CN115952787B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116561325B (en) * 2023-07-07 2023-10-13 中国传媒大学 Multi-language fused media text emotion analysis method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287405A (en) * 2019-05-21 2019-09-27 百度在线网络技术(北京)有限公司 The method, apparatus and storage medium of sentiment analysis
CN110750978A (en) * 2019-09-25 2020-02-04 深圳市金证优智科技有限公司 Emotional tendency analysis method and device, electronic equipment and storage medium
WO2020101477A1 (en) * 2018-11-14 2020-05-22 Mimos Berhad System and method for dynamic entity sentiment analysis
CN114648031A (en) * 2022-03-30 2022-06-21 重庆邮电大学 Text aspect level emotion recognition method based on bidirectional LSTM and multi-head attention mechanism
CN115017916A (en) * 2022-06-28 2022-09-06 华南师范大学 Aspect level emotion analysis method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020101477A1 (en) * 2018-11-14 2020-05-22 Mimos Berhad System and method for dynamic entity sentiment analysis
CN110287405A (en) * 2019-05-21 2019-09-27 百度在线网络技术(北京)有限公司 The method, apparatus and storage medium of sentiment analysis
CN110750978A (en) * 2019-09-25 2020-02-04 深圳市金证优智科技有限公司 Emotional tendency analysis method and device, electronic equipment and storage medium
CN114648031A (en) * 2022-03-30 2022-06-21 重庆邮电大学 Text aspect level emotion recognition method based on bidirectional LSTM and multi-head attention mechanism
CN115017916A (en) * 2022-06-28 2022-09-06 华南师范大学 Aspect level emotion analysis method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李爱萍 ; 邸鹏 ; 段利国 ; .基于句子情感加权算法的篇章情感分析.小型微型计算机系统.2015,36(10),全文. *

Also Published As

Publication number Publication date
CN115952787A (en) 2023-04-11

Similar Documents

Publication Publication Date Title
CN109635116B (en) Training method of text word vector model, electronic equipment and computer storage medium
US9740736B2 (en) Linking ontologies to expand supported language
CN107818085B (en) Answer selection method and system for reading understanding of reading robot
CN110968700A (en) Domain event map construction method and device fusing multi-class affairs and entity knowledge
CN110502642B (en) Entity relation extraction method based on dependency syntactic analysis and rules
CN104391942A (en) Short text characteristic expanding method based on semantic atlas
CN109800414A (en) Faulty wording corrects recommended method and system
CN109614620B (en) HowNet-based graph model word sense disambiguation method and system
CN115952787B (en) Emotion analysis method, system and storage medium for appointed target entity
CN113312922B (en) Improved chapter-level triple information extraction method
CN114218379B (en) Attribution method for question answering incapacity of intelligent question answering system
CN112163097A (en) Military knowledge graph construction method and system
CN113806493A (en) Entity relationship joint extraction method and device for Internet text data
CN106445914A (en) Microblog emotion classifier establishing method and device
CN109657052A (en) A kind of abstract of a thesis contains the abstracting method and device of fine granularity Knowledge Element
US11036935B2 (en) Argument structure extension device, argument structure extension method, program, and data structure
CN114564967B (en) Semantic annotation and semantic dependency analysis method and device for emotion semantics
CN111680146A (en) Method and device for determining new words, electronic equipment and readable storage medium
CN110069601A (en) Mood determination method and relevant apparatus
WO2019228016A1 (en) Intelligent writing method and apparatus
JP2021009538A (en) Natural language processing device and natural language processing program
CN113688620B (en) Article emotion analysis method and device
CN113656556B (en) Text feature extraction method and knowledge graph construction method
Lupea et al. Formal concept analysis of a Romanian emotion lexicon
JP2009163565A (en) Sentence shaping device and sentence shaping program

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