Text information analysis method, device, electronic device and storage medium
Through vectorization processing and neural network technology, the emotional feature-reason feature clause pairs and intention information in social media texts are obtained, and emotion-reason-intention combinations are generated, which solves the complexity of emotional reason extraction in social media texts in the existing technology. , improving the accuracy of analysis and application adaptability.
Patent Information
- Application Number
- CN202111071139.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-13
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2041-09-13
AI Technical Summary
Existing text emotion cause extraction technology is difficult to effectively handle non-standard emotional expressions and first-person intentions in social media texts, and lacks consideration of users' diverse expressions and intentions, resulting in increased difficulty in emotional clause position detection and intention analysis.
Using vectorization processing combined with graph attention neural network and feed-forward neural network, we obtain emotional feature-reason feature clause pairs and intention information, and generate emotion-reason-intention combinations, which are processed through multi-label binary classifiers and feed-forward neural network models. Annotation of emotion categories and intention categories to adapt to the characteristics of social media texts.
The accuracy of extraction of emotion clauses and reason clauses is improved, user intentions are taken into account, and the practical application ability of emotional cause analysis of social media texts is enhanced.
Smart Images

Figure CN113901790B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of natural language processing technology, and in particular to a text information analysis method, device, electronic device and storage medium. Background Art
[0002] Text emotion cause extraction is a task to extract sentences with emotions and their corresponding reasons from a given text, which can effectively help people quickly locate the causes of certain emotions.
[0003] In recent years, with the rapid development of Internet technology, more and more people tend to express their opinions on the Internet. Therefore, there is a wealth of information available on social media platforms (such as Weibo, Zhihu and other websites with comment functions), and public opinion tendency is an important one among them.
[0004] Traditional sentiment analysis only classifies text emotions and focuses only on the emotion categories expressed in the text. However, while detecting emotions, text emotion cause extraction also focuses on the causes of emotions, such as dissatisfaction with new policies issued by government departments, or dissatisfaction with e-commerce products or services. This task plays an important role in public opinion monitoring, policy optimization, and product improvement. Text emotion cause extraction technology is gaining more and more attention.
[0005] Different from news texts, social media texts have two representative characteristics: (1) the texts are more irregular and the emotional expressions are more diverse; (2) they are more subjective, and they express opinions and intentions while expressing emotions. Therefore, in terms of emotion detection, due to the diverse ways of expression of users, such as metaphors and irony, it is more challenging to correctly and effectively detect the position of emotional clauses. At the same time, since it is impossible to pre-define the emotional dictionary to include all emotional expressions, after the position of the emotional clauses in social media texts is determined, it is necessary to classify them in order to better serve downstream tasks.
[0006] In addition, since users in social media post topics in the first person, compared with the news field, the text often contains users' personal opinions or intentions caused by certain emotions. This semantic role has never been considered in the news field. The user's intention is very important information for the government, enterprises and other departments. By analyzing the possible actions that users may take in the future, countermeasures can be prepared in advance.
[0007] However, the above characteristics have not been considered in the existing text emotion reason extraction datasets. The existing datasets mainly annotate emotion reason ID pairs, and also annotate the emotion categories. However, all emotion clauses in the news dataset contain certain emotion keywords, which is far from the diverse expressions in actual scenarios. In addition, there are few first-person intention expressions in the news field. Summary of the invention
[0008] In order to solve at least one of the above technical problems, the present disclosure provides a text information analysis method, device, electronic device and storage medium.
[0009] The text information analysis method, device, electronic device and storage medium disclosed in the present invention are implemented through the following technical solutions.
[0010] According to one aspect of the present disclosure, a text information analysis method is provided, comprising:
[0011] Performing vectorization processing on the target text to obtain a clause vector representation of the target text;
[0012] Acquire at least one clause containing an emotion feature and at least one clause containing a cause feature in the target text after the vectorization process to form at least one emotion feature-cause feature clause pair;
[0013] Obtaining the emotion category of the clause containing the emotion feature;
[0014] Obtaining a clause containing intent information in the vectorized target text; and,
[0015] The emotion-reason-intent combination of the target text is generated based on the emotion feature-reason feature clause pair, the emotion category of the emotion feature-reason feature clause pair, and the clause containing intent information.
[0016] According to the text information analysis method of at least one embodiment of the present disclosure, the target text is a target text extracted from a same user of a website with a comment function.
[0017] According to the text information analysis method of at least one embodiment of the present disclosure, obtaining at least one clause containing an emotion feature and at least one clause containing a cause feature in the target text after vectorization processing to form at least one emotion feature-cause feature clause pair includes:
[0018] Based on the graph attention neural network, at least one clause containing emotional features and at least one clause containing cause features in the target text after vectorization processing are obtained; and, the clause containing cause features whose distance from the clause containing emotional features is within a first preset distance is detected to obtain a first corresponding probability between the clause containing emotional features and the clause containing cause features, and the clause containing emotional features whose distance from the clause containing cause features is within the first preset distance is detected to obtain a second corresponding probability between the clause containing cause features and the clause containing emotional features, and if the average value of the first corresponding probability and the second corresponding probability is greater than 1 / 2, the clause containing emotional features and the clause containing cause features within the first preset distance are combined into the emotional feature-cause feature clause pair.
[0019] According to the text information analysis method of at least one embodiment of the present disclosure, obtaining the emotion category of the clause containing the emotion feature includes:
[0020] The emotion category of the clause containing the emotion feature is obtained using a first feedforward neural network.
[0021] According to the text information analysis method of at least one embodiment of the present disclosure, obtaining a clause containing intent information in the target text after vectorization processing includes:
[0022] A second feedforward neural network is used to obtain at least one clause containing intent information in the vectorized target text.
[0023] According to the text information analysis method of at least one embodiment of the present disclosure, obtaining a clause containing intent information in the target text after vectorization processing includes:
[0024] Obtain a clause containing intention information corresponding to the emotion feature-reason feature clause.
[0025] According to the text information analysis method of at least one embodiment of the present disclosure, the intent category is acquired based on the intent information of the clause containing the intent information.
[0026] According to another aspect of the present disclosure, a text information analysis method is provided, comprising:
[0027] Performing vectorization processing on the target text to obtain a clause vector representation of the target text;
[0028] Acquire at least one clause containing an emotion feature and at least one clause containing a cause feature in the target text after the vectorization process to form at least one emotion feature-cause feature clause pair;
[0029] Obtaining the emotion category of the emotion feature-reason feature clause pair;
[0030] Obtaining a clause containing intent information in the vectorized target text; and,
[0031] The emotion-reason-intent combination of the target text is generated based on the emotion feature-reason feature clause pair, the emotion category of the emotion feature-reason feature clause pair, and the clause containing intent information.
[0032] According to the text information analysis method of at least one embodiment of the present disclosure, obtaining at least one clause containing an emotion feature and at least one clause containing a cause feature in the target text after vectorization processing to form at least one emotion feature-cause feature clause pair includes:
[0033] Based on the graph attention neural network, at least one clause containing emotional features and at least one clause containing cause features in the target text after vectorization processing are obtained; and, the clause containing cause features whose distance from the clause containing emotional features is within a first preset distance is detected to obtain a first corresponding probability between the clause containing emotional features and the clause containing cause features, and the clause containing emotional features whose distance from the clause containing cause features is within the first preset distance is detected to obtain a second corresponding probability between the clause containing cause features and the clause containing emotional features, and if the average value of the first corresponding probability and the second corresponding probability is greater than 1 / 2, the clause containing emotional features and the clause containing cause features within the first preset distance are combined into the emotional feature-cause feature clause pair.
[0034] According to the text information analysis method of at least one embodiment of the present disclosure, obtaining the emotion category of the emotion feature-reason feature clause pair includes:
[0035] The emotion category of the emotion feature-reason feature clause pair is obtained using a first feedforward neural network.
[0036] According to another aspect of the present disclosure, there is provided a text information analysis device, comprising:
[0037] A vectorization processing module, which performs vectorization processing on the target text to obtain a clause vector representation of the target text;
[0038] A first acquisition module, wherein the first acquisition module acquires at least one clause containing an emotion feature and at least one clause containing a cause feature in the target text after the vectorization process, to form at least one emotion feature-cause feature clause pair;
[0039] a second acquisition module, wherein the second acquisition module acquires the emotion category of the clause containing the emotion feature;
[0040] A third acquisition module, the third acquisition module acquires a clause containing intention information in the target text after vectorization processing; and
[0041] A generation module, wherein the generation module generates an emotion-reason-intent combination of the target text based on the emotion feature-reason feature clause pair, the emotion category of the emotion feature-reason feature clause pair, and the clause containing intent information.
[0042] According to another aspect of the present disclosure, there is provided a text information analysis device, comprising:
[0043] A vectorization processing module, which performs vectorization processing on the target text to obtain a clause vector representation of the target text;
[0044] A first acquisition module, wherein the first acquisition module acquires at least one clause containing an emotion feature and at least one clause containing a cause feature in the target text after the vectorization process, to form at least one emotion feature-cause feature clause pair;
[0045] a second acquisition module, the second acquisition module acquiring the emotion category of the emotion feature-reason feature clause pair;
[0046] A third acquisition module, the third acquisition module acquires at least one clause containing intent information in the vectorized target text; and
[0047] A generation module, wherein the generation module generates an emotion-reason-intent combination of the target text based on the emotion feature-reason feature clause pair, the emotion category of the emotion feature-reason feature clause pair, and the clause containing intent information.
[0048] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0049] a memory storing execution instructions; and,
[0050] A processor, wherein the processor executes the execution instruction stored in the memory, so that the processor executes any one of the methods described above.
[0051] According to another aspect of the present disclosure, a readable storage medium is provided, wherein the readable storage medium stores execution instructions, and the execution instructions are used to implement any of the above-mentioned methods when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.
[0053] Figure 1 A microblog text obtained from a microblog website and a combination of emotion-reason-intention obtained from the comment content are shown.
[0054] Figure 2 It is a flowchart of a text information analysis method according to an embodiment of the present disclosure.
[0055] Figure 3 It is a flowchart of a text information analysis method according to another embodiment of the present disclosure.
[0056] Figure 4 It is a schematic block diagram of the structure of a text information analysis device using a hardware implementation of a processing system according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0057] The present disclosure is further described in detail below in conjunction with the accompanying drawings and implementations. It is understood that the specific implementations described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.
[0058] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0059] Unless otherwise specified, the exemplary embodiments / embodiments shown will be understood as providing exemplary features of various details of some ways in which the technical concept of the present disclosure can be implemented in practice. Therefore, unless otherwise specified, the features of the various embodiments / embodiments can be combined, separated, interchanged and / or rearranged without departing from the technical concept of the present disclosure.
[0060] The use of cross-hatching and / or shading in the accompanying drawings is generally used to make the boundaries between adjacent components clear. As such, unless otherwise specified, the presence or absence of cross-hatching or shading does not convey or indicate any preference or requirement for the specific materials, material properties, dimensions, proportions, commonalities between the components shown, and / or any other characteristics, attributes, properties, etc. of the components. In addition, in the accompanying drawings, the sizes and relative sizes of the components may be exaggerated for clarity and / or descriptive purposes. When the exemplary embodiments can be implemented differently, the specific process sequence can be performed in a different order than described. For example, two successively described processes can be performed substantially simultaneously or in an order opposite to the described order. In addition, the same figure numbers represent the same components.
[0061] When a component is referred to as being "on," "over," "connected to," or "coupled to" another component, the component may be directly on, directly connected to, or directly coupled to the other component, or intervening components may be present. However, when a component is referred to as being "directly on," "directly connected to," or "directly coupled to" another component, there are no intervening components. For this purpose, the term "connected" may refer to a physical connection, an electrical connection, etc., with or without intervening components.
[0062] The terms used herein are for the purpose of describing specific embodiments, and are not intended to be restrictive. As used herein, unless the context clearly indicates otherwise, the singular forms "one (kind, person)" and "said (the)" are also intended to include plural forms. In addition, when the terms "comprise" and / or "include" and their variations are used in this specification, it is explained that there are stated features, integral bodies, steps, operations, parts, assemblies and / or their groups, but it is not excluded that there are or add one or more other features, integral bodies, steps, operations, parts, assemblies and / or their groups. It should also be noted that, as used herein, the terms "substantially", "approximately" and other similar terms are used as approximate terms and not as degree terms, so that they are used to explain the inherent deviations of the measured values, calculated values and / or the values provided that will be recognized by those of ordinary skill in the art.
[0063] Figure 2 is a flowchart of a text information analysis method according to an embodiment of the present disclosure, such as Figure 2 As shown, the text information analysis method S100 includes:
[0064] S102, performing vectorization processing on the target text to obtain a clause vector representation of the target text;
[0065] In this step, for example, for a target text D = [c1, c2, ... c i ...cn ], subscript i is the clause number, and n is the total number of clauses in the target text. First, each clause is processed as c i =(w i1 ,w i2 ,...w id ), w represents a character, indicating that the clause has a total of d characters. Each clause is further processed as follows:
[0066] c′ i =([CLS],w i1 ,w i2 ,...w id ,[SEP]); where [CLS] is the clause start character and [SEP] is the clause end character.
[0067] The target text D may be obtained from a microblog website or other websites with comment functions, such as a comment content of a certain user under a certain microblog topic.
[0068] Figure 1 A microblog text (ie, target text) obtained from a microblog website is shown.
[0069] S104, obtaining at least one clause containing an emotion feature and at least one clause containing a cause feature in the target text after the vectorization processing, to form at least one emotion feature-cause feature clause pair;
[0070] Figure 1 The sentiment feature-reason feature clause pairs obtained from the review content are shown in (1,3) and (1,5).
[0071] S106, obtaining the emotion category of the clause containing the emotion feature;
[0072] S108, obtaining the clauses containing the intent information in the target text after the vectorization processing, such as Figure 1 Clause 6 of the microblog text in; and,
[0073] S110 , generating an emotion-reason-intent combination of the target text based on the emotion feature-reason feature clause pair, the emotion category of the emotion feature-reason feature clause pair, and the clause containing intent information.
[0074] Figure 1 The emotion-reason-intention combination of the target text is shown as an example in FIG.
[0075] Among them, the emotion categories can be divided into 9 types, namely, happy, angry, afraid, disgusted, surprised, sad, envious, liked and touched. The present disclosure does not make any special limitation on the classification of emotion categories.
[0076] The text information analysis method disclosed in the present invention can directly process target text extracted from a website with a comment function (such as a microblog).
[0077] The target text can be obtained by crawling the daily hot search topics in the complete hot search list of the Weibo website, searching in the Weibo search bar with each hot search topic as a keyword, crawling all user comments under the topic, and forming a comment list. The comment list can be used as a target text.
[0078] For the text information analysis method S100 of the above embodiment, preferably, the target text is the target text of the same user extracted from a website with a comment function, so as to analyze the emotion category and intention information of each user.
[0079] According to the text information analysis method of the preferred embodiment of the present disclosure, S104, obtaining at least one clause containing an emotion feature and at least one clause containing a cause feature in the target text after the vectorization processing, forming at least one emotion feature-cause feature clause pair, including:
[0080] Acquire at least one clause containing emotion features and at least one clause containing cause features in the target text after vectorization based on the graph attention neural network; and,
[0081] Detect the clauses containing cause characteristics whose distance from the clause containing emotional characteristics is within a first preset distance, and obtain a first corresponding probability between the clause containing emotional characteristics and the clause containing cause characteristics; detect the clauses containing emotional characteristics whose distance from the clause containing cause characteristics is within the first preset distance, and obtain a second corresponding probability between the clause containing cause characteristics and the clause containing emotional characteristics; if the average value of the first corresponding probability and the second corresponding probability is greater than 1 / 2, the clauses containing emotional characteristics and the clauses containing cause characteristics within the first preset distance are combined into the emotional feature-cause feature clause pair.
[0082] A multi-label binary classifier can be used to perform cause detection and emotion detection within a window (the window size represents the first preset distance).
[0083] For the text information analysis method of each of the above embodiments, preferably, S106, obtaining the emotion category of the clause containing the emotion feature, includes:
[0084] The emotion category of the clause containing the emotion feature is obtained using a first feedforward neural network.
[0085] Among them, the first feedforward neural network is a feedforward neural network trained with a labeled data set.
[0086] The labeled data set is a plurality of training texts labeled with emotion category labels, and each training text is divided into a plurality of clauses.
[0087] For the text information analysis method of each of the above embodiments, preferably, S108, obtaining a clause containing intent information in the target text after vectorization processing, includes:
[0088] A second feedforward neural network is used to obtain a clause containing intent information in the vectorized target text.
[0089] Among them, the second feedforward neural network is a feedforward neural network trained with a labeled data set.
[0090] The annotated data set is a plurality of training texts annotated with at least intention information clauses, emotion feature clauses, and cause feature clauses, and each training text is divided into a plurality of clauses.
[0091] For the text information analysis method of each of the above embodiments, preferably, S108, obtaining at least one clause containing intent information in the target text after vectorization processing, includes:
[0092] Obtain a clause containing intention information corresponding to the emotion feature-reason feature clause.
[0093] For the text information analysis method of each of the above-mentioned embodiments, preferably, the intent category is obtained based on the intent information of the clause containing the intent information.
[0094] Among them, the intent category can be obtained through the second feedforward neural network. The labeled dataset also annotates the intent category for the clauses annotated with intent information. The intent category can be "future action", "expectation", "suggestion", etc.
[0095] Figure 3 FIG. 5 is a flowchart of a text information analysis method S200 according to another embodiment of the present disclosure, comprising:
[0096] S202, performing vectorization processing on the target text to obtain a clause vector representation of the target text;
[0097] S204, obtaining at least one clause containing an emotion feature and at least one clause containing a cause feature in the target text after the vectorization process, to form at least one emotion feature-cause feature clause pair;
[0098] S206, obtaining the emotion category of the emotion feature-reason feature clause pair;
[0099] S208, obtaining a clause containing intention information in the target text after vectorization processing; and
[0100] S210 , generating an emotion-reason-intent combination of the target text based on the emotion feature-reason feature clause pair, the emotion category of the emotion feature-reason feature clause pair, and the clause containing intent information.
[0101] Preferably, S204, obtaining at least one clause containing an emotion feature and at least one clause containing a cause feature in the target text after the vectorization process, forming at least one emotion feature-cause feature clause pair, includes:
[0102] Acquire at least one clause containing emotion features and at least one clause containing cause features in the target text after vectorization based on the graph attention neural network; and,
[0103] Detect the clauses containing cause characteristics whose distance from the clause containing emotional characteristics is within a first preset distance, and obtain a first corresponding probability between the clause containing emotional characteristics and the clause containing cause characteristics; detect the clauses containing emotional characteristics whose distance from the clause containing cause characteristics is within the first preset distance, and obtain a second corresponding probability between the clause containing cause characteristics and the clause containing emotional characteristics; if the average value of the first corresponding probability and the second corresponding probability is greater than 1 / 2, the clauses containing emotional characteristics and the clauses containing cause characteristics within the first preset distance are combined into the emotional feature-cause feature clause pair.
[0104] A multi-label binary classifier can be used to perform cause detection and emotion detection within a window (the window size represents the first preset distance).
[0105] Preferably, S206, obtaining the emotion category of the emotion feature-reason feature clause pair, comprises:
[0106] The emotion category of the emotion feature-reason feature clause pair is obtained using a first feedforward neural network.
[0107] The first feedforward neural network is a feedforward neural network trained with a first labeled data set.
[0108] The first annotated data set is a plurality of training texts annotated with at least sentiment words / emotion words and sentiment category labels, and each training text is divided into a plurality of clauses.
[0109] The text information analysis method disclosed in the present invention takes into account the characteristics of social media (such as review websites, Weibo, WeChat groups, etc.) when extracting emotion-cause clause pairs, extracts non-standard emotional expressions based on training models, and annotates the semantic role of intention as an extraction object in the data, effectively adapting to the actual application scenarios of emotion cause extraction.
[0110] According to another aspect of the present disclosure, a method for constructing a data set is provided. The method for constructing a data set of the present disclosure is described in detail below using Sina Weibo as a specific example.
[0111] The data set construction method S300 includes:
[0112] S310, crawl all user comments under the daily hot topics of Sina Weibo, and perform text cleaning and deduplication to form a raw corpus;
[0113] S320, screening out sample texts containing both emotion clauses and corresponding reason clauses in the birth corpus;
[0114] S330, determining whether the text contains user intention information (i.e., the intention expressed by the user) based on the emotional features (i.e., the expressed emotions) in the sample text;
[0115] S340, labeling the sample text with emotion features, cause features, and intention information with emotion features, emotion categories, cause features, intention information, and intention categories.
[0116] Among them, S310 crawls all user comments under the daily hot topics of Sina Weibo, and performs text cleaning and deduplication to form a raw corpus, including:
[0117] Crawl the daily hot search topics from the complete hot search list on Weibo;
[0118] Use each hot search topic as a keyword to search in the Weibo search bar, crawl all user comments under the topic; also, remove duplicates from all comments, convert emoticons into text symbols, and build a raw corpus.
[0119] Preferably, S320, screening sample texts containing both emotional clauses and corresponding reason clauses in the corpus, that is, determining whether to retain the sample according to whether the microblog text contains emotional expressions and their corresponding reasons, includes:
[0120] Predefine emotion categories; and, based on the defined emotion categories, filter sample texts with emotion expressions, and detect whether there are reasons corresponding to the emotion in the sample texts. If so, retain the sample texts; otherwise, remove them from the raw corpus.
[0121] Furthermore, based on the emotions expressed in the microblog text and the causes of the emotions, it is determined whether the sample contains a certain intention of the user, including:
[0122] In the retained sample text, it is determined whether the sample text contains a certain intention of the user (ie, intention information) based on the emotions expressed by the user and the reasons causing the emotions.
[0123] Preferably, S340, labeling the sample text with emotion features, cause features, and intention information with emotion features, emotion categories, cause features, intention information, and intention categories includes:
[0124] Mark all the emotion-reason sentence ID pairs in the sample text;
[0125] Label the emotion categories of the sentences with emotions in the sample text;
[0126] Mark out the sentence IDs of all intended expressions in the sample text;
[0127] Label the intent categories of all sentences expressing intent.
[0128] According to an embodiment of the present disclosure, a text information analysis device 1000 includes:
[0129] A vectorization processing module 1002, wherein the vectorization processing module 1002 performs vectorization processing on the target text to obtain a clause vector representation of the target text;
[0130] A first acquisition module 1004, wherein the first acquisition module 1004 acquires at least one clause containing an emotion feature and at least one clause containing a cause feature in the target text after the vectorization process, to form at least one emotion feature-cause feature clause pair;
[0131] The second acquisition module 1006 acquires the emotion category of the clause containing the emotion feature; for example, a feedforward neural network model.
[0132] A third acquisition module 1008, wherein the third acquisition module 1008 acquires a clause containing intention information in the vectorized target text, such as a feedforward neural network model; and
[0133] A generation module 1010 generates an emotion-reason-intent combination of the target text based on the emotion feature-reason feature clause pair, the emotion category of the emotion feature-reason feature clause pair, and the clause containing intent information.
[0134] The text information analysis device 1000 of this embodiment can be implemented in the form of a computer program software architecture.
[0135] The vectorization processing module 1002 preferably includes a BERT model. The first acquisition module 1004 preferably includes two graph attention neural networks and a multi-label classifier model. The second acquisition module 1006 preferably includes a feedforward neural network model.
[0136] According to another embodiment of the present disclosure, a text information analysis device 1000 includes:
[0137] A vectorization processing module 1002, wherein the vectorization processing module 1002 performs vectorization processing on the target text to obtain a clause vector representation of the target text;
[0138] A first acquisition module 1004, wherein the first acquisition module 1004 acquires at least one clause containing an emotion feature and at least one clause containing a cause feature in the target text after the vectorization process, to form at least one emotion feature-cause feature clause pair;
[0139] A second acquisition module 1006, wherein the second acquisition module 1006 acquires the emotion category of the emotion feature-reason feature clause pair;
[0140] A third acquisition module 1008, wherein the third acquisition module 1008 acquires a clause containing intention information in the vectorized target text; and
[0141] A generation module 1010 generates an emotion-reason-intent combination of the target text based on the emotion feature-reason feature clause pair, the emotion category of the emotion feature-reason feature clause pair, and the clause containing intent information.
[0142] The text information analysis device 1000 of this embodiment can be implemented in the form of a computer program software architecture.
[0143] Figure 4 The present invention shows a structural schematic block diagram of a text information analysis device using a hardware implementation of a processing system.
[0144] The text information analysis device may include corresponding modules for executing each or several steps in the above flowchart. Therefore, each step or several steps in the above flowchart may be executed by the corresponding module, and the device may include one or more modules in these modules. The module may be one or more hardware modules specially configured to execute the corresponding steps, or implemented by a processor configured to execute the corresponding steps, or stored in a computer-readable medium for implementation by a processor, or implemented by some combination.
[0145] The hardware structure can be implemented using a bus architecture. The bus architecture can include any number of interconnecting buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, memory 1300, and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc.
[0146] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.
[0147] Any process or method description in the flowchart or otherwise described herein can be understood as a module, fragment or portion of a code representing one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present disclosure includes other implementations, in which the functions may not be performed in the order shown or discussed, including performing the functions in a substantially simultaneous manner or in a reverse order according to the functions involved, which should be understood by a person skilled in the art of the present disclosure. The processor performs the various methods and processes described above. For example, the method implementation in the present disclosure can be implemented as a software program, which is tangibly contained in a machine-readable medium, such as a memory. In some embodiments, part or all of the software program can be loaded and / or installed via a memory and / or a communication interface. When the software program is loaded into the memory and executed by the processor, one or more steps in the method described above can be performed. Alternatively, in other embodiments, the processor can be configured to perform one of the above methods in any other appropriate manner (e.g., by means of firmware).
[0148] The logic and / or steps represented in the flowchart or otherwise described herein may be embodied in any readable storage medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from and execute instructions on an instruction execution system, apparatus, or device), or in combination with such instruction execution systems, apparatuses, or devices.
[0149] For the purposes of this specification, a "readable storage medium" may be any device that can contain, store, communicate, propagate or transmit a program for use with or in conjunction with an instruction execution system, device or apparatus. More specific examples of readable storage media (a non-exhaustive list) include the following: an electrical connection with one or more wirings (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), a fiber optic device, and a portable read-only memory (CDROM). In addition, the readable storage medium may even be paper or other suitable medium on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a memory.
[0150] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0151] A person skilled in the art may understand that all or part of the steps of implementing the above-mentioned implementation method may be completed by instructing related hardware through a program, and the program may be stored in a readable storage medium, which, when executed, includes one or a combination of the steps of the implementation method.
[0152] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a readable storage medium. The storage medium may be a read-only memory, a disk or an optical disk, etc.
[0153] The present disclosure also provides an electronic device, including: a memory, the memory storing execution instructions; and a processor or other hardware module, the processor or other hardware module executes the execution instructions stored in the memory, so that the processor or other hardware module executes the above method.
[0154] The present disclosure also provides a readable storage medium, in which execution instructions are stored. When the execution instructions are executed by a processor, they are used to implement the above method.
[0155] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present application. In this specification, the schematic representations of the above terms are not necessarily the same embodiment / method or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments / methods or examples described in this specification and the features of the different embodiments / methods or examples, unless they are contradictory.
[0156] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0157] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.
Claims
1. A text information analysis method, characterized in that: include: Performing vectorization processing on the target text to obtain a clause vector representation of the target text; Acquire at least one clause containing an emotion feature and at least one clause containing a cause feature in the target text after the vectorization process to form at least one emotion feature-cause feature clause pair; Obtaining the emotion category of the clause containing the emotion feature; Obtaining a clause containing intent information in the vectorized target text; and Generate an emotion-reason-intention combination of the target text based on the emotion feature-reason feature clause pair, the emotion category of the emotion feature-reason feature clause pair, and the clause containing intention information; Among them, obtaining at least one clause containing emotional features and at least one clause containing cause features in the target text after vectorization processing to form at least one emotional feature-cause feature clause pair includes: obtaining at least one clause containing emotional features and at least one clause containing cause features in the target text after vectorization processing based on a graph attention neural network; and detecting the clause containing cause features whose distance from the clause containing emotional features is within a first preset distance to obtain a first corresponding probability between the clause containing emotional features and the clause containing cause features, detecting the clause containing emotional features whose distance from the clause containing cause features is within the first preset distance to obtain a second corresponding probability between the clause containing cause features and the clause containing emotional features, and if the average value of the first corresponding probability and the second corresponding probability is greater than 1 / 2, the clause containing emotional features and the clause containing cause features within the first preset distance are combined into the emotional feature-cause feature clause pair.
2. The text information analysis method according to claim 1, characterized in that: The target text is a target text extracted from a website with a comment function by the same user.
3. The text information analysis method according to claim 1 or 2, characterized in that: Obtaining the emotion category of the clause containing the emotion feature includes: The emotion category of the clause containing the emotion feature is obtained using a first feedforward neural network.
4. The text information analysis method according to claim 3, characterized in that: Obtaining a clause containing intent information in the target text after the vectorization process, including: A second feedforward neural network is used to obtain at least one clause containing intent information in the vectorized target text.
5. The text information analysis method according to claim 4, characterized in that: Obtaining a clause containing intent information in the target text after the vectorization process, including: Obtain a clause containing intention information corresponding to the emotion feature-reason feature clause.
6. The text information analysis method according to claim 1, characterized in that: Obtaining the emotion category of the emotion feature-reason feature clause pair includes: The emotion category of the emotion feature-reason feature clause pair is obtained using a first feedforward neural network.
7. A text information analysis device, characterized in that: include: A vectorization processing module, which performs vectorization processing on the target text to obtain a clause vector representation of the target text; A first acquisition module, wherein the first acquisition module acquires at least one clause containing an emotion feature and at least one clause containing a cause feature in the target text after the vectorization process, to form at least one emotion feature-cause feature clause pair; a second acquisition module, wherein the second acquisition module acquires the emotion category of the clause containing the emotion feature; A third acquisition module, the third acquisition module acquires a clause containing intent information in the target text after the vectorization processing; as well as A generation module, wherein the generation module generates an emotion-reason-intent combination of the target text based on the emotion feature-reason feature clause pair, the emotion category of the emotion feature-reason feature clause pair, and the clause containing intent information; Among them, obtaining at least one clause containing emotional features and at least one clause containing cause features in the target text after vectorization processing to form at least one emotional feature-cause feature clause pair includes: obtaining at least one clause containing emotional features and at least one clause containing cause features in the target text after vectorization processing based on a graph attention neural network; and detecting the clause containing cause features whose distance from the clause containing emotional features is within a first preset distance to obtain a first corresponding probability between the clause containing emotional features and the clause containing cause features, detecting the clause containing emotional features whose distance from the clause containing cause features is within the first preset distance to obtain a second corresponding probability between the clause containing cause features and the clause containing emotional features, and if the average value of the first corresponding probability and the second corresponding probability is greater than 1 / 2, the clause containing emotional features and the clause containing cause features within the first preset distance are combined into the emotional feature-cause feature clause pair.
8. An electronic device, characterized in that: include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instructions stored in the memory, so that the processor executes the method according to any one of claims 1 to 6.
9. A readable storage medium, characterized in that: The readable storage medium stores execution instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.
