A stance detection method based on knowledge graph
By constructing a knowledge graph that integrates point of view information, calculating the position vector of the entity and judging the position of the text, the shortcomings of the existing emotion analysis methods in position detection are solved, and the accurate position detection effect is achieved.
Patent Information
- Application Number
- CN202410812199.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-06-21
AI Technical Summary
The existing emotion analysis method has two shortcomings in the position detection task: one is that the preprocessing stage depends on the frequency of word occurrence, making it difficult to capture the characteristics of sentences at the position level; the other is that the predicted emotions have no actual content to support, and the speech cannot be accurately judged. the position of the person.
Using a position detection method based on knowledge graph, a knowledge graph that integrates viewpoint information is constructed through entity-relational extraction model and emotion dictionary, a knowledge graph that integrates viewpoint information is calculated, and the position vector of entities is calculated based on the distance between these vectors and emotional words is calculated. Score, and finally judge the position of the text.
It effectively captures the characteristics of the text at the position level, can accurately determine the speaker's position, and solves the shortcomings of existing emotion analysis methods in position detection.
Smart Images

Figure CN118780355B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of natural language processing, and specifically relates to a stance detection method based on a knowledge graph, a computer device, a computer-readable storage medium, and a computer program product. Background Art
[0002] Stance detection is to automatically classify people's opinions on a topic into support or opposition positions, which can be applied to tasks such as market analysis and opinion mining. Stance detection can be regarded as a branch of text sentiment analysis. Most of the existing sentiment analysis methods use machine learning algorithms. For example, CN111767741B discloses a text sentiment analysis method based on deep learning and TFIDF algorithm, and CN109684636B discloses a user sentiment analysis method based on deep learning. However, the existing sentiment analysis methods have two defects in solving the stance detection task: one is that the statistical results at the word level are used to encode words in the preprocessing stage, and the other is that the predicted sentiment has no actual content to rely on.
[0003] First, whether it is bag-of-words encoding or TF-IDF encoding, this preprocessing method that relies heavily on word frequency often fails to capture the characteristics of the sentence at the stance level, because it neither distinguishes words that express opinions from words that describe entities or topics, and is often limited by the quality of the training set text. For example, given two English texts "We support Internet companies involvement in healthcare" and "We oppose Internet companies involvement in healthcare", the difference in stance between the two is only reflected in the two words "support" and "oppose". In this case, similar word distribution structures cannot indicate that the texts have the same stance label.
[0004] Secondly, most of the existing sentiment analysis work predicts sentiment without a target object (i.e., the entity, event, etc. on which the sentiment is placed). It focuses not on the content and theme of the text, but on the attitude of the speaker who carries the sentiment. This makes it impossible to judge the speaker's position based on sentiment, because the speaker will express different emotions for different events, but the speaker's position is fixed. Furthermore, the task of sentiment analysis generally performs a binary classification task on the text, such as whether it is objective, positive or negative, which cannot directly reflect the position expressed by the text.
[0005] Therefore, existing sentiment analysis methods cannot be directly applied to stance detection tasks. Summary of the invention
[0006] The purpose of the present invention is to provide a stance detection method, computer device, computer-readable storage medium and computer program product based on a knowledge graph, which can construct a knowledge graph that integrates opinion information and realize stance detection based on the knowledge graph.
[0007] One aspect of the present invention provides a stance detection method based on a knowledge graph, comprising:
[0008] Collect speech texts on multiple topics to construct a dataset, and divide the constructed dataset into a training set and a test set, where each text contains multiple sentences;
[0009] The entity-relation extraction model is used to identify the entities that appear in the training set as the first-class entities. The sentiment dictionary is used to identify the sentiment words in the training set. According to the distance between the first-class entities and the sentiment words in the sentence, the stance vector of the first-class entities is calculated.
[0010] Entities that do not appear in the training set but exist in the background knowledge graph and have a relationship with the first-category entities are regarded as second-category entities. The stance vectors of the second-category entities are calculated by weighted summing of the stance vectors of the first-category entities that have a relationship with the second-category entities. The opinion knowledge graph is constructed based on the stance vectors of the first-category entities and the second-category entities.
[0011] Get the intersection of entities appearing in the text of the test set and entities in the opinion knowledge graph, take the entities in the intersection as the third-category entities, calculate the opinion-oriented value of the third-category entities according to the distance between the third-category entities and sentiment words in the sentence, and calculate the stance score of each sentence in the text of the test set according to the stance vector and opinion-oriented value of the third-category entities;
[0012] The stance scores of all sentences in the test set are added up. If the sum is greater than 0, the text is marked as supporting the stance; if the sum is less than 0, the text is marked as opposing the stance.
[0013] Preferably, the stance vector of the first type of entity is calculated as follows <supOp e ,oppOp e >:
[0014]
[0015] Among them, e represents the entity that appears in the training set, supOp e and opp e Respectively represent the opinion scores of the first type of entity e in the support and opposition positions, and the set L = {L 1 , ..., L m} represents m sentences whose positions are supported, and the set S = {S 1 , ..., S n} represents n sentences with opposing stance, op = {op 1 , ..., op q} represents the q sentiment words that appear in the set L or the set s, dis(op j , e) represents entity e and sentiment word op j The distance in the corresponding sentence, op j .SO={-1, 0, 1} are three discrete values, indicating that the sentiment word has positive, neutral, and negative attributes respectively.
[0016] Preferably, the stance vector of the second type of entity is calculated as follows <supOp e′ ,oppOp e′ >:
[0017]
[0018] Among them, W j represents the weight of position propagation, supOp e′ and opp e′ denotes the opinion scores of the second-category entity e′ in terms of support and opposition, respectively, |R| denotes the total number of relations R in the background knowledge graph, and P(r j ) represents the relationship r j The probability of appearing in all relations R, and Respectively indicate that there is a relationship with the second type of entity (e j , r j , e′) or (e′, r j , e j )’s opinion scores for the first category of entities in their support and opposition positions.
[0019] Preferably, the opinion orientation value TOp of the third type entity is calculated as follows i :
[0020]
[0021] Among them, sgn is the symbol function, T is the text in the test set, op j is the sentiment word in each sentence of text T, Represents the third type of entity In this sentence, the sentiment word op j distance.
[0022] Preferably, the stance score stanceW of each sentence is calculated as follows:
[0023]
[0024] in, and Represent the third type of entity Opinion scores for and against positions, |E T | represents the number of entities in the text T.
[0025] Preferably, DBpedia is used as the background knowledge graph, SentiWordNet3.0 is used as the sentiment dictionary, and UIE is used as the entity-relationship extraction model.
[0026] Another aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.
[0027] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when executed by a processor.
[0028] Another aspect of the present invention provides a computer program product, comprising a computer program, which implements the steps of the above method when executed by a processor.
[0029] According to the knowledge graph-based stance detection method, computer device, computer-readable storage medium and computer program product of the above aspects of the present invention, it is possible to construct a knowledge graph that integrates opinion information and implement stance detection based on the knowledge graph. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings used in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work:
[0031] Figure 1 is a flow chart of a stance detection method based on a knowledge graph according to an embodiment of the present invention;
[0032] Figure 2 4 is a structural diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] An embodiment of the present invention provides a stance detection method based on a knowledge graph. Figure 1 FIG. 1 is a flow chart of a method for detecting a stance based on a knowledge graph according to an embodiment of the present invention. Figure 1 As shown, the stance detection method based on knowledge graph in an embodiment of the present invention includes steps S1 to S5.
[0035] In step S1, speech texts of multiple topics are collected to construct a dataset, and the constructed dataset is divided into a training set and a test set, wherein each text contains multiple sentences.
[0036] This step is the dataset construction step. In this step, the texts of the speeches of the pros and cons of multiple debates on multiple topics can be collected. The content of these debate speeches can usually fully show the distinct views held by the speakers of the two sides of the debate, and will have more prominent text features in the task of stance detection. Each debate consists of a series of speech segments. Since each segment is an uninterrupted sequence of speeches by a speaker, it is regarded as a text unit. Each text unit contains multiple sentences for stance detection. The stance label of the sample is determined according to the debate party label of the speaker (the affirmative party corresponds to the support label, and the negative party corresponds to the opposition label). Finally, the data is randomly divided into a training set and a test set according to a certain ratio (for example, 70% and 30%). At this point, the dataset is constructed.
[0037] In step S2, the entity-relationship extraction model is used to identify the entities appearing in the training set as the first-category entities, the sentiment words in the training set are identified using the sentiment dictionary, and the stance vector of the first-category entity is calculated based on the distance between the first-category entity and the sentiment words in the sentence.
[0038] Since the stance detection task requires rich background knowledge, the method of the embodiment of the present invention introduces a large knowledge graph DBpedia as a background knowledge graph to expand entity information. DBpedia is an example of a semantic web application that covers a wide range of knowledge bases. It currently describes more than 4 million entities and 48,293 relationships. It extracts structured data from Wikipedia entries and stores them in (Resource Description Framework, RDF) triples, which is a general graph data model for storing entities and their relationships. Standard RDF describes events in the form of <Subject, Predicate, Object>, i.e., SPO triples, where both the subject and predicate are entities, and the predicate is the type of the relationship between the two. DBpedia will be updated as Wikipedia changes, so when using it, there will be no problem of not covering certain specific field information, or the problem of the relationship between entities changing over time.
[0039] In order to describe the effect of opinions on entities and use entities for stance detection, the method of the embodiment of the present invention expands the SPO triple information to generate a knowledge graph with opinion elements. The specific definition is as follows:
[0040] ([subject,<supOp,oppOp> ],predicate,[object,<supOp,oppOp> ])
[0041] in<supOp,oppOp> It represents the opinion distribution of the entity’s stance. supOp and oppOp represent the sentiment values of the entity towards support and opposition, respectively. The values can be {>0, =0, <0}, corresponding to the degree of positive, neutral, and negative sentiment, respectively.
[0042] Set the background knowledge graph to G b =(V, R), where V is the set of entities (nodes) in the graph, and R is the set of relations (edges) in the graph. The set of entities (first-class entities) identified from the training set using the Universal Information Extraction (UIE) framework or other entity-relationship extraction models is E, and the set of entities (second-class entities) that exist in V but have not appeared in the training set is E′, that is, E∪E′=V; similarly, UIE can identify the set of relations corresponding to the entity set E from the training set, and the final opinion knowledge graph is represented by G i =(V pro , R pro ) indicates that, initially, the values of supOp and oppOp in the entity's stance vector are both set to 0.
[0043] Then, opinion injection is performed. Specifically, the effect of sentiment on entities in training texts of different categories (i.e., positions) is used to assign points to opinions for each entity. First, the sentiment dictionary SentiWordNet3.0 is used for matching to identify sentiment words, and then the injected opinion score is determined based on the distance between the sentiment word and the entity in the sentence, that is, the farther the distance between the sentiment word and the entity, the smaller the injected opinion score. SentiWordNet was developed by the Italian Institute of Information in 2013 based on WordNet. The dictionary records the sentiment scores of different English words and phrases under different parts of speech, and contains a total of 117,659 records, each of which contains part of speech, positive sentiment value, negative sentiment value, etc. The SentiWordNet dictionary records four types of parts of speech, namely adjective (a), adverb (r), noun (n) and verb (v), with 18,156, 3,621, 85,115, and 13,767 records respectively. The value range of positive sentiment value and negative sentiment value is [0, 1]. If the positive sentiment value in the sentiment score corresponding to the identified sentiment word is greater than the negative sentiment value, the sentiment word is considered to be positive. Otherwise, the sentiment word is considered to be negative. If the positive sentiment value is equal to the negative sentiment value, the sentiment word is considered to be neutral.
[0044] Then, for each entity that appears in the training set, the opinion scores obtained from the two stance texts are accumulated to determine the final orientation of each entity in the two stances of support and opposition. Let an entity in E be e (first-class entity), and entity e appears in sentences in the two stance texts respectively, and the set L = {L 1 , ..., L m} to represent the m sentences whose stance is supported, and use the set S = {S 1 , ..., S n} to represent the n sentences whose positions are against. Let op = {op 1 , ..., op q} is q words or phrases (emotional words) that appear in set L or set s and express emotions. i ∈L, i∈[1,m] and L i Each sentiment word op in j , j∈[1,q] calculates the opinion score of entity e in the support position; using each sentence S in the set s i ∈S and S i Each sentiment word op in j , calculate the opinion score of entity e in the opposing position. According to the opinion score of entity e in each sentence of the two stance texts, and accumulate all the sentences of the two stances respectively, its stance vector can be determined <supOp e,oppOp e >For:
[0045]
[0046] Among them, supOp e and opp e Respectively represent the opinion scores of entity e in support and opposition positions, dis(op j , e) represents entity e and sentiment word op j The distance in the corresponding sentence, that is, the distance between the entity e and the sentiment word op j The number of words in the sentence; op j .SO={-1, 0, 1} are three discrete values, indicating that the sentiment word has positive, neutral, and negative attributes respectively.
[0047] Using the above formula, each entity in the training set is injected with opinion information (i.e., stance vector) to obtain the entity set E with opinion injected s ={e 1 , ..., e p}, the stance vector of each entity is expressed as j∈[1, p], stored in the preliminary knowledge graph G i middle.
[0048] In step S3, entities that do not appear in the training set but exist in the background knowledge graph and have a relationship with the first category of entities are taken as second category entities. The stance vector of the second category entity is calculated by weighted summing up the stance vectors of the first category entities that have a relationship with the second category entities, and the opinion knowledge graph is constructed based on the stance vectors of the first category entities and the second category entities.
[0049] Although the above-mentioned knowledge graph G that has been injected with opinions can already perform stance detection, the background knowledge graph G has not yet been fully utilized. b The advantage of having a large number of entities and relations in the background knowledge graph is that the existing opinion information is propagated to entities that do not appear in the training set in order to make the opinion knowledge graph have strong generalization performance. Let an entity in E′ be e′ (the second type entity), in the background knowledge graph G b In the above example, e′ and the entity set E that has been injected with the viewpoint s ={e 1 , ..., e p There is a relationship between j , r j , e′) or (e′, r j , e j ), where j∈[1,p]. Then the position vector of e′ is <supOp e′ ,oppOp e′>The position vectors of all entities related to e′ The weighted summation yields:
[0050]
[0051] Among them, W j represents the weight of position propagation, supOp e′ and opp e′ Respectively represent the opinion scores of the second type entity e′ in support and opposition positions, |R| represents the background knowledge graph G b The total number of relations R in P(r j ) represents the relationship r j The probability of appearing in all relations R, for example, if the background knowledge graph G b There are 100 triples representing the relationship between entities, and the relationship "type" appears 20 times, then |R| = 100, Use -log |R| [P(r j )] to represent the weight W of stance propagation j , this calculation method can ensure:
[0052] (1) The base of the logarithmic function is |R| so that the weight W j It will not exceed 1, that is, the phenomenon of emotional intensity expanding instead of being present during the process of position dissemination.
[0053] (2) The specificity of the relationship between entities can be highlighted. For example, compared with the more general relationship marked as “type”, two entities marked as “signedpresident” are more closely connected semantically. j The value will also be higher.
[0054] It should be noted that in order to widely spread opinions, the method of the embodiment of the present invention regards the directed knowledge graph as an undirected graph, that is, as long as there is a relationship between entities, it will be calculated, because the directional information of the relationship is not very useful for analyzing its opinions and attitudes. After the opinion is spread, the opinion knowledge graph G is finally constructed. i =(V pro , R pro ), where entity set V pro Composed of sets E and E′, R pro Yes V pro A collection of relationships between entities.
[0055] In step S4, the intersection of entities appearing in the text of the test set and entities in the opinion knowledge graph is obtained, and the entities in the intersection are taken as third-category entities. The opinion-oriented value of the third-category entity is calculated according to the distance between the third-category entity and the sentiment word in the sentence, and the stance score of each sentence in the text of the test set is calculated according to the stance vector and opinion-oriented value of the third-category entity.
[0056] Specifically, for a text T in the test set, T contains multiple sentences, using the opinion knowledge graph G i To determine their position, the core idea is that the same views on the same entity are considered to have the same position.
[0057] For each sentence in the text T, calculate its stance score. The specific steps are as follows:
[0058] (1) Let V T For the entity set that appears in T, first get V T and opinion knowledge graph G i Medium Entity V pro The intersection of E T , that is, E T =V T ∩V pro
[0059] (2) For each T Entities in (Third type of entity), whose viewpoint is TOp i The calculation method is:
[0060]
[0061] Among them, sgn is the sign function, op j is the sentiment word in each sentence in the text T, Is Entity In this sentence, the sentiment word op j distance.
[0062] (3) The stance score of each sentence in the final text T is calculated by the following formula:
[0063]
[0064] in, and In the opinion knowledge graph G i Medium Entity The opinion scores corresponding to the two positions (support and opposition), |E T | represents the number of entities in T.
[0065] In step S5, the stance scores of all sentences in the text of the test set are added together. If the sum is greater than 0, the text is marked as supporting the stance; if the sum is less than 0, the text is marked as opposing the stance.
[0066] That is, after calculating the stanceW in each sentence, the stanceW of all sentences in the text are summed up. If stanceW>0, the text T is marked as supporting the stance. On the contrary, if stanceW<0, the text T is marked as opposing the stance.
[0067] The following is a specific example to illustrate the stance detection method based on knowledge graph according to an embodiment of the present invention.
[0068] In step S1, for example, the SemEval-2019-Task7 dataset is constructed for stance detection. In step S2, UIE is used to identify the three entities and the corresponding two entity relationships that appear in the training set, and the stance vectors of the three entities are calculated. <supOp e ,oppOp e >are <0.21, 0.95>, <-8.33, 6.67>, and <-7.65, 7.06> respectively.
[0069] In step S3, the entity information is expanded based on the background knowledge graph. There are 3 entities in the background knowledge graph and they have relationships with the entities in the training set, so they are also included in the opinion knowledge graph. The probability of the relationships corresponding to the above entities appearing in all the relationships contained in the background knowledge graph is calculated to be 0.2 and 0.3 respectively. There are 48,293 relationships in the background knowledge graph, so the weights of the stance propagation are -log 48293 (0.2) = 0.15 and -log 48293 (0.3)=0.11.
[0070] Then the stance vectors corresponding to the above three newly included entities are <supOp e′ ,oppOp e′ The calculation process of > is:
[0071] <0.21×0.15-8.33×0.11,0.95×0.15+6.67×0.11>=<-0.8848,0.2162>
[0072] <-8.33×0.15,6.67×0.15>=<-1.2495,1>
[0073] <-8.33×0.15,6.67×0.15>=<-1.2495,1>
[0074] At this point, all entities have corresponding stance vectors.
[0075] In step S4, taking a test text as an example, the intersection of the entity set appearing in the test text and the entity set contained in the opinion knowledge graph has 2 entities. If the sentiment attribute of the sentiment word in the test text is negative, then the opinion-oriented The stance score is:
[0076]
[0077] stanceW>0, therefore, in step S5, the stance of the test text is determined to be "support".
[0078] From the above process, it can be seen that although the three newly included entities in step S3 did not appear in the training text at first, with the expansion of the background knowledge graph, they were also included in the opinion knowledge graph and were assigned certain stance scores, thereby assisting stance detection.
[0079] In summary, the stance detection method of the embodiment of the present invention performs stance detection based on a knowledge graph that integrates opinion information, uses entities and relationships stored in a large knowledge graph to expand information, establishes a connection between text content and real-world knowledge, and effectively combines factual information with opinion information. It can quickly and effectively propagate and aggregate entity-dependent opinions, construct an opinion knowledge graph by injecting opinions into each entity in the training set text, and use the generalization ability of the knowledge graph to propagate existing opinion information to entities that do not appear in the training set, ultimately achieving the purpose of stance detection, and can be extended to market analysis, opinion mining and other fields.
[0080] An embodiment of the present invention further provides a computer device, which may be a server, and its internal structure diagram may be as shown in FIG. Figure 2 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store operating parameter data of each framework. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps of the standpoint detection method based on the knowledge graph of the embodiment of the present invention are implemented.
[0081] Those skilled in the art will understand that Figure 2The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0082] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the knowledge graph-based stance detection method of an embodiment of the present invention are implemented.
[0083] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the knowledge graph-based stance detection method of an embodiment of the present invention.
[0084] The above description is only by way of illustration of certain exemplary embodiments of the present invention. It is undoubted that those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
Claims
1. A stance detection method based on knowledge graph, characterized in that: include: Collect speech texts on multiple topics to construct a dataset, and divide the constructed dataset into a training set and a test set, where each text contains multiple sentences; The entity-relation extraction model is used to identify the entities that appear in the training set as the first-class entities. The sentiment dictionary is used to identify the sentiment words in the training set. According to the distance between the first-class entities and the sentiment words in the sentence, the stance vector of the first-class entities is calculated. Entities that do not appear in the training set but exist in the background knowledge graph and have a relationship with the first-category entities are regarded as second-category entities. The stance vectors of the second-category entities are calculated by weighted summing of the stance vectors of the first-category entities that have a relationship with the second-category entities. The opinion knowledge graph is constructed based on the stance vectors of the first-category entities and the second-category entities. Get the intersection of entities appearing in the text of the test set and entities in the opinion knowledge graph, take the entities in the intersection as the third-category entities, calculate the opinion-oriented value of the third-category entities according to the distance between the third-category entities and sentiment words in the sentences, and calculate the stance score of each sentence in the text of the test set according to the opinion-oriented value of the third-category entities; The stance scores of all sentences in the test set are added up. If the sum is greater than 0, the text is marked as supporting the stance; if the sum is less than 0, the text is marked as opposing the stance.
2. The method according to claim 1, characterized in that The stance vector of the first type of entity is calculated as follows: e ,oppOp e >: Among them, e represents the entity that appears in the training set, supOp e and opp e denote the opinion scores of the first type of entity e in terms of support and opposition, respectively. The set L = {L1,…,L m } represents m sentences whose positions are supported, and the set S = {S1,...,S n } represents n sentences with opposing positions, op = {op1,...,op q } represents q sentiment words appearing in set L or set S, dis(op j ,e) represents entity e and sentiment word op j The distance in the corresponding sentence, op j .SO={-1,0,1} are three discrete values, indicating that the sentiment words have positive, neutral, and negative attributes respectively.
3. The method according to claim 2, characterized in that The stance vector of the second type of entity is calculated as follows: e' ,oppOp e' >: Among them, W j represents the weight of position propagation, supOp e' and opp e' denote the opinion scores of the second-category entity e' in terms of support and opposition, respectively, |R| denotes the total number of relations R in the background knowledge graph, and P(r j ) represents the relationship r j The probability of appearing in all relations R, and Respectively indicate that there is a relationship with the second type of entity (e j ,r j ,e') or (e',r j ,e j )’s opinion scores for the first category of entities in their support and opposition positions.
4. The method according to claim 3, characterized in that The opinion orientation value TOp of the third type of entity is calculated as follows i : Among them, sgn is the symbol function, T is the text in the test set, op j is the sentiment word in each sentence of text T, Represents the third type of entity In this sentence, the sentiment word op j distance.
5. The method according to claim 4, characterized in that The stance score stanceW of each sentence is calculated as follows: in, and Represent the third type of entity Opinion scores for and against positions, |E T | represents the number of entities in the text T.
6. The method according to any one of claims 1 to 5, characterized in that Use DBpedia as the background knowledge graph, SentiWordNet3.0 as the sentiment dictionary, and UIE as the entity-relationship extraction model.
7. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
A Deep Learning-Based User Sentiment Analysis Method
CN109684636B
A Text Sentiment Analysis Method Based on Deep Learning and TFIDF Algorithm
CN111767741B
Relationship linking method based on knowledge map
CN107480125A
A news data processing method and device
CN109902230A
Cited By
System and method for visualization and analysis of human interaction dynamics using artificial intelligence
US12718433B2
System and Method for Visualization and Analysis of Human Interaction Dynamics Using Artificial Intelligence
US20260220839A1