A sentiment analysis method and device integrating sentiment dictionary

By integrating the emotional dictionary method, the labeled data in the source field is used for transfer learning, and an encoder can extract emotional analysis characteristics is generated, which solves the problem of lack of labeled data in sentiment analysis of financial news, and achieves the effect of obtaining emotional classification results without labeling data, saving human resources and improving analysis accuracy.

CN112860901BActive Publication Date: 2025-05-02INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110346235.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-31
Publication Date
2025-05-02
Estimated Expiration
2041-03-31

AI Technical Summary

Technical Problem

The lack of labeled data in the sentiment analysis of financial news has caused the need to manually labeled data as a training data set, resulting in waste of human resources.

Method used

By integrating the emotional dictionary method, transfer learning is used to use the labeled data in the source field to generate an encoder that can extract relevant features of sentiment analysis, so that emotional classification results can be obtained without labeling data in the target field.

Benefits of technology

Reduce dependence on labeled data, save human resources, and improve the accuracy of sentiment analysis of financial news.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112860901B_ABST
    Figure CN112860901B_ABST
Patent Text Reader

Abstract

The present invention provides a sentiment analysis method and device integrating sentiment dictionaries, which can be applied to the field of artificial intelligence, including: inputting sentences in a source domain and sentences in a target domain into a pre-generated encoder to obtain source domain sentence word vectors and target domain sentence word vectors; inputting source domain word vectors and target domain sentence word vectors into a sentence vector encoder to obtain source domain sentence representations and target domain sentence representations respectively; and obtaining a sentiment classification result of the target domain using the source domain sentence representations and target domain sentence representations. This application takes sentiment words as prediction targets, jointly trains the corpus of the source domain and the target domain through a language model, generates an encoder that can extract sentiment analysis-related features, and then uses the word encoder to generate feature vectors of texts to be sentimentally classified, achieving the technical effect of obtaining usable classification results using less or no labeled data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of natural language processing, and specifically, relates to a sentiment analysis method and device integrating a sentiment dictionary. Background Art

[0002] With the widespread application of deep learning models in the field of natural language processing, the accuracy of text sentiment analysis results has also been greatly improved. Currently, deep learning models have been used to analyze product reviews and public opinion. In the financial industry, by effectively analyzing current news related to corporate clients and judging the public's sentiment index towards the corporate client, it is of great significance for the bank's credit risk control. Sentiment analysis of corporate client public opinion can provide auxiliary decision support for banks to monitor corporate client risk situations. However, most of the open source annotation data for sentiment classification currently comes from product reviews and service reviews of Internet companies, and there are few training sample data for news in the financial field. Therefore, higher requirements are placed on the sentiment analysis model of financial news. In order to obtain better sentiment classification results, some data needs to be manually annotated as training data sets, resulting in a waste of human resources. Summary of the invention

[0003] The present application provides a sentiment analysis method and device integrating a sentiment dictionary, so as to at least solve the problem of how to obtain sentiment classification results without labeling the data when the amount of open source labeled data is small.

[0004] According to one aspect of the present application, a sentiment analysis method integrating a sentiment dictionary is provided, comprising:

[0005] Input the sentences in the source domain and the sentences in the target domain into the pre-generated encoder to obtain the word vectors of the source domain sentences and the word vectors of the target domain sentences;

[0006] Input the source domain word vector and the target domain sentence word vector into the sentence vector encoder to obtain the source domain sentence representation and the target domain sentence representation respectively;

[0007] The sentiment classification results of the target domain are obtained by using the sentence representations of the source domain and the target domain.

[0008] In one embodiment, obtaining a sentiment classification result in the target domain by using the source domain sentence representation and the target domain sentence representation includes:

[0009] The sentiment classifier is trained using the annotated source domain sentence representation to obtain a trained sentiment classifier;

[0010] The sentiment classification result of the target domain is obtained by performing sentiment classification on the unlabeled target domain sentence representations through the trained sentiment classifier.

[0011] In one embodiment, the sentence vector encoder is a long short-term memory network encoder.

[0012] In one embodiment, the sentiment classifier is an MLP multi-layer perceptron.

[0013] In one embodiment, the generation process of the encoder includes:

[0014] Get the sentiment dictionary of the source domain and the sentiment dictionary of the target domain;

[0015] Fuzzy the sentiment words in the sentiment dictionary that appear in the sentence;

[0016] The blurred sentences are used to train word vectors through a language model to obtain an encoder that can extract emotional features.

[0017] In one embodiment, the sentiment analysis method integrating the sentiment dictionary further includes:

[0018] The Adam optimizer is used to optimize the encoder to obtain the optimized encoder.

[0019] According to another aspect of the present application, a sentiment analysis device integrating a sentiment dictionary is also provided, comprising:

[0020] A word vector acquisition unit, used for inputting the acquired sentences in the source domain and the acquired sentences in the target domain into a pre-generated encoder to obtain the word vectors of the source domain sentences and the word vectors of the target domain sentences;

[0021] A sentence representation acquisition unit, used for inputting the source domain word vector and the target domain sentence word vector into a sentence vector encoder to obtain the source domain sentence representation and the target domain sentence representation respectively;

[0022] The sentiment classification unit is used to obtain the sentiment classification result of the target domain by using the sentence representation of the source domain and the sentence representation of the target domain.

[0023] In one embodiment, the emotion classification unit includes:

[0024] A sentiment classifier training module is used to train a sentiment classifier using the annotated source domain sentence representation to obtain a trained sentiment classifier;

[0025] The classification module is used to perform sentiment classification on the unlabeled target domain sentence representations through the trained sentiment classifier to obtain the sentiment classification results of the target domain.

[0026] In one embodiment, the sentence vector encoder is a long short-term memory network encoder.

[0027] In one embodiment, the sentiment classifier is an MLP multi-layer perceptron.

[0028] In one embodiment, the sentiment analysis device further comprises a generating unit of an encoder, comprising:

[0029] Sentiment dictionary acquisition module, used to obtain the sentiment dictionary of the source domain and the sentiment dictionary of the target domain;

[0030] The fuzzy module is used to fuzzy the sentiment words in the sentiment dictionary that appear in the sentence;

[0031] The training module is used to use the blurred sentences to train word vectors through a language model to obtain an encoder that can extract sentiment features.

[0032] In one embodiment, the sentiment analysis device further includes:

[0033] The optimization module is used to optimize the encoder using the Adam optimizer to obtain the optimized encoder.

[0034] The method provided in the present application takes sentiment words as prediction targets, jointly trains the corpus of the source domain and the target domain through a language model, generates an encoder that can extract features related to sentiment analysis, and then uses the word encoder to generate feature vectors of the text to be sentimentally classified, thereby achieving the technical effect of obtaining usable classification results using less or no labeled data. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 A flowchart of a sentiment analysis method integrating a sentiment dictionary provided in this application.

[0037] Figure 2 This is a flow chart of a method for obtaining sentiment classification results for a target domain in an embodiment of the present application.

[0038] Figure 3 This is a flow chart of the generation process of the encoder in the embodiment of the present application.

[0039] Figure 4 Schematic diagram of the word vector generation model in the embodiment of the present application.

[0040] Figure 5 A structural block diagram of a sentiment analysis device integrated with a sentiment dictionary provided in this application.

[0041] Figure 6This is a structural block diagram of the emotion classification unit in the embodiment of the present application.

[0042] Figure 7 This is a structural block diagram of a generation unit of an encoder in an embodiment of the present application.

[0043] Figure 8 This is a specific implementation of an electronic device in an embodiment of the present application.

[0044] Fig. 9 This is a structural diagram of the overall framework of transfer learning in the embodiments of the present application. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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.

[0046] Currently, most of the open source labeled data for sentiment classification comes from product reviews and service reviews of Internet companies. There are fewer training sample data for news in the financial field, so higher requirements are placed on the sentiment analysis model of financial news. In order to obtain better sentiment classification results, some data needs to be manually labeled as training data sets, resulting in a waste of human resources. Therefore, in order to make full use of the existing labeled data in other fields to solve the problem of data in this field, transfer learning can be used to allow the model to migrate from the source field of existing labeled data to the target field of unlabeled data, thereby training a model suitable for the target field.

[0047] Based on this, this application provides a sentiment analysis method integrating sentiment dictionaries, such as Figure 1 As shown, including:

[0048] S101: Input the acquired sentences in the source domain and the acquired sentences in the target domain into a pre-generated encoder to obtain the word vectors of the source domain sentences and the word vectors of the target domain sentences.

[0049] S102: Input the source domain word vector and the target domain sentence word vector into the sentence vector encoder to obtain the source domain sentence representation and the target domain sentence representation respectively.

[0050] S103: Obtain sentiment classification results in the target domain using the source domain sentence representation and the target domain sentence representation.

[0051] The source domain is an existing domain with annotated data, and the target domain is a domain without annotated data for sentiment classification. First, before sentiment classification of the text in the target domain is performed, a word vector encoder that combines the source domain knowledge and the target domain knowledge is generated (detailed description is provided later). Using this encoder, the sentences in the source domain and the target domain are processed to obtain word vectors, which are then input into the sentence vector encoder to generate sentence representations. The sentence representations in the source domain are then used to train the classifier to finally obtain the sentiment classification of the target domain.

[0052] In one embodiment, the source domain sentence representation and the target domain sentence representation are used to obtain the sentiment classification result of the target domain, such as Figure 2 As shown, including:

[0053] S201: Train a sentiment classifier using the annotated source domain sentence representation to obtain a trained sentiment classifier.

[0054] S202: Perform sentiment classification on the unlabeled target domain sentence representations using the trained sentiment classifier to obtain a sentiment classification result for the target domain.

[0055] In a specific embodiment, the word vector representations of the source domain and the target domain are obtained by a pre-generated encoder, and after the sentence representation is generated by LSTM (Long Short-Term Memory), the sentiment classifier is trained with annotated metadata and then migrated to the unlabeled target domain sentiment prediction, which specifically includes: firstly, using LSTM as a sentence vector encoder, passing the sentences in the source domain and the target domain text through the pre-generated encoder to obtain word vectors, and inputting the word vectors into the LSTM to generate sentence representations (source domain sentence representation S, target domain sentence representation T);

[0056] Then, the sentence representation S and label Ls of the source domain with annotated data are input into the classifier to train the classifier. In the present application, the sentiment classifier C is obtained through training, but the present application is not limited to this.

[0057] Finally, the sentence representation T in the target domain of the unlabeled data is input into the learned sentiment classifier C to obtain the sentiment classification result of the target domain data.

[0058] In one embodiment, the sentence vector encoder is a long short-term memory network encoder.

[0059] In one embodiment, the sentiment classifier is an MLP multi-layer perceptron.

[0060] In one embodiment, if Figure 3 As shown, the generation process of the encoder includes:

[0061] S301: Obtain the sentiment dictionary of the source domain and the sentiment dictionary of the target domain.

[0062] S302: Fuzzy processing is performed on the sentiment words in the sentiment dictionary that appear in the sentence.

[0063] S303: Using the blurred sentences to train word vectors through a language model, an encoder capable of extracting sentiment features is obtained.

[0064] In one embodiment, the sentiment analysis method integrating the sentiment dictionary further includes:

[0065] The Adam optimizer is used to optimize the encoder to obtain the optimized encoder.

[0066] In a specific embodiment, according to the sentiment lexicon of the source domain and the target domain, the sentiment words in the original corpus of the two domains are masked (fuzzy) respectively; unsupervised training is performed with the goal of what the next word of the language model is, and in order to make the mask word have the semantic representation of the context at the same time, the transformer is used as the encoder to train the word vector generation model, and the word vector generation model is as follows: Figure 4 As shown in Figure 2, the overall framework of transfer learning is as follows: Fig. 9 As shown in the figure. The fuzzy corpus is input into the word vector generation model to predict "what is the masked word" as the training target and output the training result. The training result includes two parts, the source domain and the target domain. Finally, a transformer encoder that can extract a wider range of emotional features is trained. Then the Adam optimizer is used to optimize it to obtain the final encoder. After the sentence in the source domain or the target domain is input into the final encoder, the word vector representation related to the emotional features can be generated.

[0067] The present application integrates the transfer learning method of financial sentiment dictionary information to reduce the reliance on manual labeling of data and save human resources. In addition, the sentiment words in the financial sentiment dictionary vocabulary are directly used as supervision information to extract the words that have a direct impact on sentiment analysis, and the sentiment analysis features can be explicitly extracted. The source domain and target domain data sets are synchronously trained through the Transformer encoder to make the semantic connection between the source domain and the target domain more complete, which can improve the accuracy of transfer learning to a certain extent.

[0068] Based on the same inventive concept, the embodiment of the present application also provides a sentiment analysis device that integrates a sentiment dictionary, which can be used to implement the method described in the above embodiment, as described in the following embodiment. Since the principle of solving the problem by the sentiment analysis device that integrates a sentiment dictionary is similar to the sentiment analysis method that integrates a sentiment dictionary, the implementation of the sentiment analysis device that integrates a sentiment dictionary can refer to the implementation of the sentiment analysis method that integrates a sentiment dictionary, and the repetitions will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0069] According to another aspect of the present application, a sentiment analysis device integrating a sentiment dictionary is also provided. Figure 5 As shown, including:

[0070] A word vector acquisition unit 501 is used to input the acquired sentences in the source domain and the sentences in the target domain into a pre-generated encoder to obtain the word vectors of the source domain sentences and the word vectors of the target domain sentences;

[0071] A sentence representation acquisition unit 502 is used to input the source domain word vector and the target domain sentence word vector into a sentence vector encoder to obtain the source domain sentence representation and the target domain sentence representation respectively;

[0072] The sentiment classification unit 503 is used to obtain a sentiment classification result in the target domain by using the source domain sentence representation and the target domain sentence representation.

[0073] In one embodiment, if Figure 6 As shown, the emotion classification unit 503 includes:

[0074] The sentiment classifier training module 601 is used to train the sentiment classifier using the source domain sentence representation with annotations to obtain the trained sentiment classifier;

[0075] The classification module 602 is used to perform sentiment classification on the unlabeled target domain sentence representations through the trained sentiment classifier to obtain the sentiment classification result of the target domain.

[0076] In one embodiment, the sentence vector encoder is a long short-term memory network encoder.

[0077] In one embodiment, the sentiment classifier is an MLP multi-layer perceptron.

[0078] In one embodiment, if Figure 7 As shown, the sentiment analysis device also has a generating unit of an encoder, including:

[0079] The sentiment dictionary acquisition module 701 is used to acquire the sentiment dictionary of the source domain and the sentiment dictionary of the target domain;

[0080] A fuzzy module 702 is used to perform fuzzy processing on the sentiment words in the sentiment dictionary appearing in the sentence;

[0081] The training module 703 is used to train word vectors using the blurred sentences through a language model to obtain an encoder capable of extracting emotional features.

[0082] In one embodiment, the sentiment analysis device further includes:

[0083] The optimization module is used to optimize the encoder using the Adam optimizer to obtain the optimized encoder.

[0084] The above-mentioned application provides a word vector generation device that integrates a financial sentiment dictionary, takes sentiment words as prediction targets, jointly trains general domain (source domain) and financial domain (target domain) corpora through a language model, generates an encoder that can extract sentiment analysis-related features, and then uses this encoder to generate feature vectors of text to be sentimentally classified; in the transfer learning stage, first obtains the sentence vector representation of the source domain, trains the sentiment classifier through labeled data in the source domain, and then uses the trained classifier to perform sentiment analysis and judgment on the sentence representation of the target domain.

[0085] The embodiments of the present application also provide a specific implementation of an electronic device that can implement all the steps in the method in the above embodiments, see Figure 8 , the electronic device specifically includes the following contents:

[0086] Processor 801, memory 802, communication interface 803, bus 804 and non-volatile memory 805;

[0087] The processor 801, memory 802, and communication interface 803 communicate with each other via the bus 804;

[0088] The processor 801 is used to call the computer program in the memory 802 and the non-volatile memory 805. When the processor executes the computer program, all the steps in the method in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:

[0089] S101: Input the acquired sentences in the source domain and the acquired sentences in the target domain into a pre-generated encoder to obtain the word vectors of the source domain sentences and the word vectors of the target domain sentences.

[0090] S102: Input the source domain word vector and the target domain sentence word vector into the sentence vector encoder to obtain the source domain sentence representation and the target domain sentence representation respectively.

[0091] S103: Obtain sentiment classification results in the target domain using the source domain sentence representation and the target domain sentence representation.

[0092] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps of the method in the above embodiments. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, all the steps of the method in the above embodiments are implemented. For example, when the processor executes the computer program, the following steps are implemented:

[0093] S101: Input the acquired sentences in the source domain and the acquired sentences in the target domain into a pre-generated encoder to obtain the word vectors of the source domain sentences and the word vectors of the target domain sentences.

[0094] S102: Input the source domain word vector and the target domain sentence word vector into the sentence vector encoder to obtain the source domain sentence representation and the target domain sentence representation respectively.

[0095] S103: Obtain sentiment classification results in the target domain using the source domain sentence representation and the target domain sentence representation.

[0096] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the hardware + program embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. Although the embodiment of this specification provides the method operation steps described in the embodiment or flow chart, more or less operation steps can be included based on conventional or non-creative means. The order of steps listed in the embodiment is only one way of executing the order of many steps, and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiment or the accompanying drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the embodiments of this specification, the functions of each module can be implemented in the same one or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The present invention is described with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the process and / or box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process Figure 1 A process or multiple processes and / or boxes Figure 1A device for specifying functions in a box or multiple boxes. It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, the embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts refer to the partial description of the method embodiment. In the description of this specification, the description of the reference term "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction. The above description is only an embodiment of the embodiment of this specification and is not intended to limit the embodiment of this specification. For those skilled in the art, the embodiment of this specification may have various changes and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the embodiment of this specification shall be included in the scope of the claims of the embodiment of this specification.

Claims

1. A sentiment analysis method integrating sentiment dictionary, characterized in that: include: Input the sentences in the source domain and the sentences in the target domain into a word vector encoder to obtain the word vectors of the source domain sentences and the word vectors of the target domain sentences, wherein the generation process of the word vector encoder adopts a sentiment dictionary; Input the source domain sentence word vector and the target domain sentence word vector into a sentence vector encoder to obtain a source domain sentence representation and a target domain sentence representation respectively; By using the source domain sentence representation and the target domain sentence representation generated by LSTM, the sentiment classifier is trained with annotated metadata and then transferred to the unannotated target domain sentiment prediction to obtain the sentiment classification result of the target domain. The step of training the sentiment classifier with labeled metadata and then migrating to the sentiment prediction of the unlabeled target domain to obtain the sentiment classification result of the target domain includes: Training a sentiment classifier using the labeled source domain sentence representation to obtain a trained sentiment classifier; The sentiment classification result of the target domain is obtained by performing sentiment classification on the unlabeled sentence representations of the target domain through the trained sentiment classifier.

2. The sentiment analysis method of integrating sentiment dictionary according to claim 1 is characterized in that: The sentence vector encoder is a long short-term memory network encoder.

3. The sentiment analysis method of integrating sentiment dictionary according to claim 1 is characterized in that: The sentiment classifier is an MLP multi-layer perceptron.

4. The sentiment analysis method of integrating sentiment dictionary according to claim 1 is characterized in that: The generation process of the word vector encoder includes: Obtain the sentiment dictionary of the source domain and the sentiment dictionary of the target domain; Fuzzy the sentiment words in the sentiment dictionary that appear in the sentence; The blurred sentences are used to train word vectors through a language model to obtain the word vector encoder capable of extracting emotional features.

5. The sentiment analysis method of integrating sentiment dictionary according to claim 4 is characterized in that: Also includes: The word vector encoder is optimized using the Adam optimizer to obtain an optimized word vector encoder.

6. The sentiment analysis method of integrating sentiment dictionary according to claim 4 is characterized in that: The steps of using the blurred sentences to train word vectors through the language model include: Generate training samples based on sentences after sentiment word fuzzification; The training samples are input into the language model to obtain the meaning of the fuzzy processed sentiment words.

7. A sentiment analysis device integrating a sentiment dictionary, characterized in that: include: A word vector acquisition unit, used for inputting the acquired sentences in the source domain and the sentences in the target domain into a word vector encoder to obtain the word vectors of the source domain sentences and the word vectors of the target domain sentences, wherein the generation process of the word vector encoder adopts a sentiment dictionary; A sentence representation acquisition unit, used for inputting the source domain sentence word vector and the target domain sentence word vector into a sentence vector encoder to obtain a source domain sentence representation and a target domain sentence representation respectively; The sentiment classification unit is used to use the source domain sentence representation and the target domain sentence representation generated by LSTM to train the sentiment classifier with annotated metadata and then migrate to the unannotated target domain sentiment prediction to obtain the sentiment classification result of the target domain. Wherein, the emotion classification unit includes: A sentiment classifier training module is used to train a sentiment classifier using the annotated source domain sentence representation to obtain a trained sentiment classifier; The classification module is used to perform sentiment classification on the unlabeled target domain sentence representations through the trained sentiment classifier to obtain the sentiment classification results of the target domain.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the sentiment analysis method integrating the sentiment dictionary according to any one of claims 1 to 6 are implemented.

9. 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 sentiment analysis method integrating a sentiment dictionary according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer usable storage medium and a computer usable program code, characterized in that: When the computer-usable program code is executed by a processor, the steps of the sentiment analysis method of integrating a sentiment dictionary according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Cross-domain emotion classification method and system based on feature representation learning

    CN112199505A