CN112347258B - Short text aspect level emotion classification method - Google Patents

Short text aspect level emotion classification method Download PDF

Info

Publication number
CN112347258B
CN112347258B CN202011277713.4A CN202011277713A CN112347258B CN 112347258 B CN112347258 B CN 112347258B CN 202011277713 A CN202011277713 A CN 202011277713A CN 112347258 B CN112347258 B CN 112347258B
Authority
CN
China
Prior art keywords
vector
word
speech
words
vector set
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011277713.4A
Other languages
Chinese (zh)
Other versions
CN112347258A (en
Inventor
倪丽萍
高九洲
朱旭辉
陈星月
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei University of Technology
Original Assignee
Hefei University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei University of Technology filed Critical Hefei University of Technology
Priority to CN202011277713.4A priority Critical patent/CN112347258B/en
Publication of CN112347258A publication Critical patent/CN112347258A/en
Application granted granted Critical
Publication of CN112347258B publication Critical patent/CN112347258B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking

Abstract

The invention discloses a short text aspect level emotion classification method, which comprises the following steps: 1. after the short text is divided into words, generating word vectors through the words in the short text, and labeling all the vectors and part of speech vectors; 2. judging the owned aspects of the short text by using an XLNET model, and sequentially splicing the word vector, the part-of-speech vector and the owned aspect vector of each word; 3. inputting the vector after each word is spliced in the step 2 into an emotion classification Bilstm model, inputting the obtained hidden vector of each word into an Attention mechanism, and returning the weight of the hidden vector of each word; 4. and performing weighted average by using the implicit vector and the weight value corresponding to each word, and entering the result into a softmax neural network to obtain a corresponding emotion, wherein a larger probability value is used as an emotion classification result. The method can identify different emotions of the short text in different aspects, thereby finishing fine-grained emotion classification.

Description

Short text aspect level emotion classification method
Technical Field
The invention belongs to the field of natural language processing in artificial intelligence, and particularly relates to an emotion classification method of a Bilstm model, which integrates word vectors, aspect vectors and part-of-speech vectors and adds an Attention mechanism.
Background
With the development of e-commerce platforms, short text comments are becoming more and more an important way for users to express their own emotional opinions. Often more than one aspect is involved in the short text, and even the opposite emotional attitude may be held for different aspects. At present, emotion classification for short texts mostly belongs to coarse-grained classification, namely, only one emotion classification is given for the short texts, and emotions corresponding to different aspects cannot be recognized in a fine-grained manner.
Disclosure of Invention
The invention aims to overcome the defects in the prior art, and provides a short text aspect level emotion classification method, so that different emotions of a short text in different aspects can be recognized by recognizing the aspects contained in the short text and then recognizing corresponding emotions in the aspects, and emotion classification of the fine granularity of the short text is completed.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention discloses a short text aspect level emotion classification method which is characterized by comprising the following steps:
step 1, acquiring all short texts in the comment data and using the short texts as a corpus, and performing preprocessing operations of classifying, cleaning and word segmentation on any one short text in the corpus to obtain a word vector set of the corresponding short text, wherein the word vector set is marked as t ═ t (t ═ t) 1 ,t 2 ,…,t i ,…,t k ),t i Denotes the ith word, i ∈ [1, k ]]K represents a total word amount of the short text;
step 2, the word vector set t is equal to (t) 1 ,t 2 ,…,t i ,…,t k ) And performing part-of-speech recognition to obtain a part-of-speech characterization vector set p ' (p ') ' 1 ,p″′ 2 ,…,p″′ i ,…,p″′ k ),p″′ i Denotes the ith word t i The corresponding part of speech;
step 3, performing preprocessing operation on all short texts in the corpus according to the step 1, deleting repeated words to obtain a dictionary, numbering each word in the dictionary, and taking the number as an index position key of the corresponding word;
step 4, utilizing the index position key of each word in the dictionary to set t (t) as the word vector set 1 ,t 2 ,…,t i ,…,t k ) Index processing is performed to obtain an index vector set s's ', and ' 1 ,s″′ 2 ,…,s″′ i ,…,s″′ k );s″′ i Denotes the ith word t i The corresponding index position;
step 5, recording the total number of words corresponding to the short text containing the most total number of words in the corpus as max; filling the part of speech characterization vector set p 'and the index vector set s' with '0' according to the total number of words max, so that the total number of words in the part of speech characterization vector set p 'and the index vector set s' is equal to max; recording the complemented part-of-speech characterization vector set as p 'and the complemented index vector set as s';
step 6, a pre-training XLNET model is utilized to carry out n-dimensional word vector conversion processing on the jth part of speech in the complemented part of speech characterization vector set p' to obtain a jth part of speech vector which is marked as p j =(p j,1 ,p j,2 ,…,p j,d ,…,p j,n ),p j,d Represents the d-th dimension value in the j-th part-of-speech vector, and d is the [1, n ]];
Step 7, carrying out n-dimensional word vector conversion treatment on the jth word in the complemented index vector set s' by utilizing a pre-training XLNET model to obtain a jth word vector which is marked as s j =(s j,1 ,s j,2 ,…,s j,d ,…,s j,n ),s j,d Representing the d dimension value in the j word vector;
step 8, selecting F aspect words from the corpus, inputting the F-th aspect word into the pre-training XLNET model to obtain a word vector a corresponding to the F-th aspect word f =(a f,1 ,a f,2 ,…,a f,d ,…,a f,n ),a f,d Representing the d dimension value corresponding to the f aspect word;
step 9, respectively carrying out reverse order arrangement on elements in the part of speech characterization vector set p 'and the index vector set s' and filling up the elements by '0' according to the total number max of the words; obtaining a complemented reverse-order part-of-speech characterization vector set as p 'and a complemented reverse-order index vector set as s';
step 10, utilizing a pre-trained XLNET model to carry out n-dimensional word vector conversion processing on the jth part of speech in the complemented reverse-order part of speech characterization vector set p ', so as to obtain the jth reverse-order part of speech vector which is marked as p' j =(p′ j,1 ,p′ j,2 ,…,p′ j,d ,…,p′ j,n ),p′ j,d Represents the d-th dimension value in the j-th reverse-order part-of-speech vector, and belongs to [1, n ]];
Step 11, utilizing a pre-trained XLNET model to convert the j word in the complemented reverse-order index vector set s 'into an n-dimensional word vector to obtain a j reverse-order word vector which is marked as s' j =(s′ j,1 ,s′ j,2 ,…,s′ j,d ,…,s′ j,n ),s′ j,d Representing the d dimension value in the j reverse order word vector;
and 12, forming the forward input characteristics of the Bilstm model:
the jth word vector s j The jth part-of-speech vector p j Sequentially splicing word vectors corresponding to the F aspect words to obtain a feature vector fw _ cell j And as input to the forward Bilstm model, the feature vector fw _ cell j The dimension of (a) is 2 xn + nxf;
step 13, forming the reverse input characteristics of the Bilstm model:
vector s 'of j-th reverse-order word' j J-th reverse-order part-of-speech vector p' j Sequentially splicing word vectors corresponding to the F aspect words to obtain a reverse-order feature vector bw _ cell j And is used as the other input of the reverse Bilstm model;
step 14, establishing F correction matrixes and identifying information in the aspect:
let any F-th rectification matrix be a matrix of multiplying (2+ F) rows by 3 columns, wherein the element of the first row of the first column is "1", the element of the second row of the second column is "1", the element of the F +2 th row of the third column is "1", and the rest elements are all set to "0";
setting the word vector set t ═ t (t) 1 ,t 2 ,…,t i ,…,t k ) Inputting the information into a pre-training XLNET model to obtain aspect information contained in the word vector set t;
acquiring corresponding aspect words through aspect information contained in the word vector set t, so as to obtain corresponding correction matrixes according to the aspect words;
the feature vector fw _ cell is used for carrying out the processing j Multiplying with the correction matrix corresponding to the word vector set t to obtain an input vector I j
The reverse order feature vector bw _ cell is used for carrying out the reverse order feature vector bw _ cell j Multiplying the correction matrix corresponding to the word vector set t to obtain an inverted-order input vector I' j
Step 15, respectively training F Bilstm models by utilizing F side words to obtain F trained Bilstm models;
inputting the vector I j Respectively inputting the input information into the trained Bilstm model of the corresponding aspect words, thereby obtaining output vectors hf corresponding to the aspect information contained in the word vector set t j
Inputting the reverse order into vector I' j Respectively inputting the training result into the Bilstm model of the corresponding aspect words so as to obtain the reverse order output vector hb corresponding to the aspect information contained in the word vector set t j
Will output vector hf j And the reverse order output vector hb j Splicing is carried out to form an implicit vector h j
Step 16, implicit vector h j The jth part-of-speech vector p j And sequentially splicing word vectors corresponding to the F aspect words to obtain an implicit vector h 'of an Attention mechanism' j
Step 17, training an Attention mechanism network by using word vectors corresponding to F number of aspect words to obtain a trained Attention mechanism network;
implicit vector h 'of Attentition mechanism' j Inputting the trained Attention mechanism network to obtain the jth word vector s j A corresponding weight;
step 18, predicting classification results:
respectively combining each implicit vector h j Multiplying the weight by the corresponding weight and then summing to obtain h * Inputting the scores into the full-connection layer to obtain scores corresponding to positive emotions and negative emotions; inputting the scores corresponding to the positive emotion and the negative emotion into the softmax layer to obtain the corresponding probabilities of the positive emotion and the negative emotionAnd the emotion with higher probability is used as a prediction classification result.
Compared with the prior art, the invention has the beneficial effects that:
1. the invention identifies the aspect contained in the short text by adopting XLNET model fine granularity, converts the short text into word vectors, part-of-speech vectors and aspect vectors derived from the aspect identified by XLNET, fuses and inputs the word vectors, the part-of-speech vectors and the aspect vectors derived from the aspect identified by XLNET into the Bilstm model with attention mechanism correspondingly trained in different aspects, obtains the emotion corresponding to the short text in the aspect, completes fine-grained emotion classification by firstly performing label processing and then performing emotion classification processing, and makes the emotion classification of the short text more accurate. Meanwhile, the method and the device have the advantages that the word vectors, the part-of-speech vectors and the aspect vectors are fused, so that the contained information is more comprehensively reserved in the process of converting the short text into the vectors, and the accuracy of aspect identification and emotion classification is improved.
2. The core of natural language processing is to convert language into machine language for recognition and judgment, and the method considers the content of the text, the help of the part of speech of the text to recognize the text and the aspect vector through the triple splicing of the word vector, the part of speech vector and the aspect vector so as to carry out fine-grained emotion classification on the short text.
3. In the process of identifying the aspect labels, the invention provides a correction matrix, the correction matrix is used for generating input vectors which are sequentially spliced by word vectors, part-of-speech vectors and aspect vectors corresponding to various aspects related to the short text, the correction matrix is used for automatically splicing the aspect vectors related to the aspects to the word vectors and the part-of-speech vectors, and then the aspect vectors unrelated to the aspects are automatically abandoned, so that the input vectors are simplified, all contents related to the aspects are reserved, and the complexity of calculation is reduced.
Drawings
FIG. 1 is an overall flow chart of the method of the present invention.
Detailed Description
In this embodiment, an emotion classification method for a Bilstm model, which integrates a word vector, an aspect vector, and a part-of-speech vector and adds an Attention mechanism, is performed according to the following steps:
step 1, acquiring all short texts in the comment data and using the short texts as a corpus, and performing preprocessing operations of classifying, cleaning and segmenting any short text in the corpus to obtain a word vector set of the corresponding short text, wherein the word vector set is marked as t ═ t (t ═ t- 1 ,t 2 ,…,t i ,…,t k ),t i Denotes the ith word, i ∈ [1, k ]]K represents the total number of words of the short text;
step 2, the word vector set t is equal to (t) 1 ,t 2 ,…,t i ,…,t k ) Performing part-of-speech recognition to obtain a part-of-speech characterization vector set p ' -p ', and ' 1 ,p″′ 2 ,…,p″′ i ,…,p″′ k ),p″′ i Denotes the ith word t i The corresponding part of speech;
step 3, performing preprocessing operation on all short texts in the corpus according to the step 1, deleting repeated words to obtain a dictionary, numbering each word in the dictionary, and taking the number as an index position key of the corresponding word;
step 4, utilizing the index position key of each word in the dictionary to set t (t) as the word vector set 1 ,t 2 ,…,t i ,…,t k ) Index processing is performed to obtain an index vector set s's ', and ' 1 ,s″′ 2 ,…,s″′ i ,…,s″′ k );s″′ i Denotes the ith word t i The corresponding index position;
step 5, recording the total number of words corresponding to the short text containing the most total number of words in the corpus as max; filling the part of speech characterization vector set p '″ and the index vector set s' ″ with '0' according to the total number of words max, so that the total number of words in the part of speech characterization vector set p '″ and the index vector set s' ″ is equal to max; recording a part-of-speech characterization vector set after completion as p 'and an index vector set after completion as s';
step 6, as shown in fig. 1, a pretrained XLNET model is utilized to perform n-dimensional word vector transformation on the jth part of speech in the complemented part of speech characterization vector set p ″Converting to obtain the jth part-of-speech vector, which is marked as p j =(p j,1 ,p j,2 ,…,p j,d ,…,p j,n ),p j,d Represents the d-th dimension value in the j-th part-of-speech vector, d ∈ [1, n [ ]];
Step 7, as shown in fig. 1, a pretrained XLNET model is used for carrying out n-dimensional word vector conversion processing on the jth word in the aligned index vector set s ″ to obtain a jth word vector which is marked as s j =(s j,1 ,s j,2 ,…,s j,d ,…,s j,n ),s j,d Representing the d dimension value in the j word vector;
step 8, selecting F aspect words from the corpus, inputting the F-th aspect word into the pre-training XLNET model, and obtaining a word vector a corresponding to the F-th aspect word as shown in FIG. 1 f =(a f,1 ,a f,2 ,…,a f,d ,…,a f,n ),a f,d Representing the d dimension value corresponding to the f aspect word;
step 9, respectively carrying out reverse order arrangement on elements in the part of speech characterization vector set p 'and the index vector set s' and filling up the elements by 0 according to the total number max of words; obtaining a word characteristic vector set of the filled reverse order as p 'and an index vector set of the filled reverse order as s';
step 10, utilizing a pre-trained XLNET model to convert the jth part of speech in the complemented reverse-order part of speech characterization vector set p 'into an n-dimensional word vector to obtain a jth reverse-order part of speech vector which is marked as p' j =(p′ j,1 ,p′ j,2 ,…,p′ j,d ,…,p′ j,n ),p′ j,d Represents the d dimension value in the j reverse order part-of-speech vector, and d is the [1, n ]];
Step 11, converting the j-th word in the complemented reverse-order index vector set s 'by using a pre-trained XLNET model to obtain a j-th reverse-order word vector which is recorded as s' j =(s′ j,1 ,s′ j,2 ,…,s′ j,d ,…,s′ j,n ),s′ j,d Representing the d dimension value in the j reverse order word vector;
and 12, forming the forward input characteristics of the Bilstm model:
the jth word vector s j The jth part-of-speech vector p j Sequentially splicing word vectors corresponding to the F aspect words to obtain a feature vector fw _ cell j And as a forward input to the Bilstm model, the feature vector fw _ cell j The dimension of (a) is 2 xn + nxf; compared with the method that only word vectors are used or only word vectors, part of speech vectors and aspect vectors are spliced in pairs, the word vectors, the part of speech vectors and the aspect vectors are spliced, so that the original short text retains more semantic information.
Step 13, forming the reverse input characteristics of the Bilstm model:
vector s 'of j-th reverse-order word' j J-th reverse-order part-of-speech vector p' j Sequentially splicing word vectors corresponding to the F aspect words to obtain a reverse-order feature vector bw _ cell j And as the reverse input of the Bilstm model (the Bilstm model is automatically converted into reverse input through sequential input), the reverse input is helpful for identifying the context information, so that the context can be considered in the input process of the short text;
step 14, establishing F correction matrixes and identifying information in the aspect:
let any F-th rectification matrix be a matrix of multiplying (2+ F) rows by 3 columns, wherein the element of the first row of the first column is "1", the element of the second row of the second column is "1", the element of the F +2 th row of the third column is "1", and the rest elements are all set to "0";
set of word vectors t ═ t (t) 1 ,t 2 ,…,t i ,…,t k ) Inputting the information into a pre-training XLNET model to obtain aspect information contained in a word vector set t;
acquiring corresponding aspect words through aspect information contained in the word vector set t, and accordingly acquiring corresponding correction matrixes according to the aspect words;
the feature vector fw _ cell j Multiplying with a correction matrix corresponding to the word vector set t to obtain an input vector I j
The reverse order feature vector bw _ cell j With the word vector set tsegmentMultiplying the corresponding correction matrixes to obtain an inverted-sequence input vector I' j
Step 15, respectively training F Bilstm models by utilizing F side words to obtain F trained Bilstm models;
inputting vector I j Respectively inputting the input information into the trained Bilstm model of the corresponding aspect words, thereby obtaining output vectors hf corresponding to the aspect information contained in the word vector set t j
Inputting the reverse order into vector I' j Respectively inputting the input into the trained Bilstm model of the corresponding aspect words, thereby obtaining the reverse order output vector hb corresponding to the aspect information contained in the word vector set t j
Output vector hf j And the reverse order output vector hb j Splicing is carried out to form an implicit vector h j
Step 16, implicit vector h j The jth part-of-speech vector p j And sequentially splicing word vectors corresponding to the F aspect words to obtain an implicit vector h 'of an Attention mechanism' j
Step 17, training an Attention mechanism network by using the word vectors corresponding to the F aspects to obtain the trained Attention mechanism network (the machine can determine which part needs to be input by using the Attention mechanism, and limited information processing resources are allocated to important parts);
implicit vector h 'of Attentition mechanism' j Inputting the trained Attention mechanism network to obtain the jth word vector s j A corresponding weight;
step 18, predicting a classification result:
respectively combining each implicit vector h j Multiplying the obtained product by corresponding weight and summing the product to obtain h * Inputting the scores into the full-connection layer to obtain scores corresponding to positive emotions and negative emotions; and inputting the scores corresponding to the positive emotion and the negative emotion into the softmax layer to obtain the probabilities corresponding to the positive emotion and the negative emotion, and taking the emotion with higher probability as a prediction classification result.

Claims (1)

1. A short text aspect level emotion classification method is characterized by comprising the following steps:
step 1, acquiring all short texts in the comment data and using the short texts as a corpus, and performing preprocessing operations of classifying, cleaning and word segmentation on any one short text in the corpus to obtain a word vector set of the corresponding short text, wherein the word vector set is marked as t ═ t (t ═ t) 1 ,t 2 ,…,t i ,…,t k ),t i Denotes the ith word, i ∈ [1, k ]]K represents a total number of words of the short text;
step 2, the word vector set t is equal to (t) 1 ,t 2 ,…,t i ,…,t k ) And performing part-of-speech recognition to obtain a part-of-speech characterization vector set p ' (p ') ' 1 ,p″′ 2 ,…,p″′ i ,…,p″′ k ),p″′ i Denotes the ith word t i The corresponding part of speech;
step 3, carrying out preprocessing operation on all short texts in the corpus according to the step 1, deleting repeated words to obtain a dictionary, numbering each word in the dictionary, and using the number as an index position key of the corresponding word;
step 4, utilizing the index position key of each word in the dictionary to set t (t) as the word vector set 1 ,t 2 ,…,t i ,…,t k ) Index processing is performed to obtain an index vector set s ' (s ') ' 1 ,s″′ 2 ,…,s″′ i ,…,s″′ k );s″′ i Denotes the ith word t i The corresponding index position;
step 5, recording the total number of words corresponding to the short text containing the most total number of words in the corpus as max; filling the part of speech characterization vector set p 'and the index vector set s' with '0' according to the total number of words max, so that the total number of words in the part of speech characterization vector set p 'and the index vector set s' is equal to max; recording the complemented part-of-speech characterization vector set as p 'and the complemented index vector set as s';
step 6, utilizing a pre-trained XLNET model to represent the filled parts of speechThe j part of speech in the vector set p' is converted into an n-dimensional word vector to obtain a j part of speech vector which is marked as p j =(p j,1 ,p j,2 ,…,p j,d ,…,p j,n ),p j,d Represents the d-th dimension value in the j-th part-of-speech vector, d ∈ [1, n [ ]];
Step 7, utilizing a pre-training XLNET model to convert the jth word in the complemented index vector set s' into an n-dimensional word vector to obtain a jth word vector which is marked as s j =(s j,1 ,s j,2 ,…,s j,d ,…,s j,n ),s j,d Representing the d dimension value in the j word vector;
step 8, selecting F aspect words from the corpus, inputting the F-th aspect word into the pre-training XLNET model to obtain a word vector a corresponding to the F-th aspect word f =(a f,1 ,a f,2 ,…,a f,d ,…,a f,n ),a f,d Representing the d dimension value corresponding to the f aspect word;
step 9, respectively carrying out reverse order arrangement on elements in the part of speech characterization vector set p 'and the index vector set s' and filling up the elements by '0' according to the total number max of the words; obtaining a word characteristic vector set of the filled reverse order as p 'and an index vector set of the filled reverse order as s';
step 10, utilizing a pre-training XLNET model to convert the j (th) part of speech in the complemented reverse-order part of speech characterization vector set p 'into an n-dimensional word vector to obtain a j (th) reverse-order part of speech vector which is marked as p' j =(p′ j,1 ,p′ j,2 ,…,p′ j,d ,…,p′ j,n ),p′ j,d Represents the d-th dimension value in the j-th reverse-order part-of-speech vector, and belongs to [1, n ]];
Step 11, utilizing a pre-training XLNET model to convert the j-th word in the complemented reverse-order index vector set s 'into an n-dimensional word vector to obtain a j-th reverse-order word vector which is recorded as s' j =(s′ j,1 ,s′ j,2 ,…,s′ j,d ,…,s′ j,n ),s′ j,d Representing the d-th of the j-th reverse-order word vectorA dimension value;
and 12, forming the forward input characteristics of the Bilstm model:
the jth word vector s j The jth part-of-speech vector p j Sequentially splicing word vectors corresponding to the F aspect words to obtain a feature vector fw _ cell j And as input to the forward bitstm model, the feature vector fw _ cell j The dimension of (a) is 2 xn + nxf;
step 13, forming the reverse input characteristics of the Bilstm model:
j 'th reverse order word vector s' j Jth reverse order part of speech vector p' j Sequentially splicing word vectors corresponding to the F aspect words to obtain a reverse-order feature vector bw _ cell j And is used as the other input of the reverse Bilstm model;
step 14, establishing F correction matrixes and identifying information in the aspect:
let any F-th rectification matrix be a matrix of multiplying (2+ F) rows by 3 columns, wherein the element of the first row of the first column is "1", the element of the second row of the second column is "1", the element of the F +2 th row of the third column is "1", and the rest elements are all set to "0";
setting the word vector set t ═ t (t) 1 ,t 2 ,…,t i ,…,t k ) Inputting the information into a pre-training XLNET model to obtain aspect information contained in the word vector set t;
acquiring corresponding aspect words through aspect information contained in the word vector set t, so as to obtain corresponding correction matrixes according to the aspect words;
the feature vector fw _ cell is used for carrying out the processing j Multiplying with the correction matrix corresponding to the word vector set t to obtain an input vector I j
The reverse order feature vector bw _ cell is processed j Multiplying the correction matrix corresponding to the word vector set t to obtain an inverted-order input vector I' j
Step 15, respectively training F Bilstm models by utilizing F side words to obtain F trained Bilstm models;
inputting the vector I j Respectively input corresponding toObtaining an output vector hf corresponding to the aspect information contained in the word vector set t in the trained Bilstm model of the aspect word j
Inputting the reverse order into vector I' j Respectively inputting the training result into the Bilstm model of the corresponding aspect words so as to obtain the reverse order output vector hb corresponding to the aspect information contained in the word vector set t j
Output vector hf j And the reverse order output vector hb j Splicing is carried out to form an implicit vector h j
Step 16, converting the implicit vector h j The jth part-of-speech vector p j And sequentially splicing word vectors corresponding to the F aspect words to obtain an implicit vector h 'of an Attention mechanism' j
Step 17, training an Attention mechanism network by using word vectors corresponding to F number of aspect words to obtain a trained Attention mechanism network;
implicit vector h 'of Attentition mechanism' j Inputting the trained Attention mechanism network to obtain the jth word vector s j A corresponding weight;
step 18, predicting classification results:
respectively dividing each implicit vector h j Multiplying the obtained product by corresponding weight and summing the product to obtain h * Inputting the scores into the full-connection layer to obtain scores corresponding to positive emotions and negative emotions; and inputting the scores corresponding to the positive emotion and the negative emotion into the softmax layer to obtain the probabilities corresponding to the positive emotion and the negative emotion, and taking the emotion with higher probability as a prediction classification result.
CN202011277713.4A 2020-11-16 2020-11-16 Short text aspect level emotion classification method Active CN112347258B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011277713.4A CN112347258B (en) 2020-11-16 2020-11-16 Short text aspect level emotion classification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011277713.4A CN112347258B (en) 2020-11-16 2020-11-16 Short text aspect level emotion classification method

Publications (2)

Publication Number Publication Date
CN112347258A CN112347258A (en) 2021-02-09
CN112347258B true CN112347258B (en) 2022-09-13

Family

ID=74362772

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011277713.4A Active CN112347258B (en) 2020-11-16 2020-11-16 Short text aspect level emotion classification method

Country Status (1)

Country Link
CN (1) CN112347258B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113761910A (en) * 2021-03-17 2021-12-07 中科天玑数据科技股份有限公司 Comment text fine-grained emotion analysis method integrating emotional characteristics

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019102884A1 (en) * 2017-11-21 2019-05-31 日本電信電話株式会社 Label generation device, model learning device, emotion recognition device, and method, program, and storage medium for said devices
CN111666761A (en) * 2020-05-13 2020-09-15 北京大学 Fine-grained emotion analysis model training method and device
CN111914085A (en) * 2020-06-18 2020-11-10 华南理工大学 Text fine-grained emotion classification method, system, device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083705B (en) * 2019-05-06 2021-11-02 电子科技大学 Multi-hop attention depth model, method, storage medium and terminal for target emotion classification

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019102884A1 (en) * 2017-11-21 2019-05-31 日本電信電話株式会社 Label generation device, model learning device, emotion recognition device, and method, program, and storage medium for said devices
CN111666761A (en) * 2020-05-13 2020-09-15 北京大学 Fine-grained emotion analysis model training method and device
CN111914085A (en) * 2020-06-18 2020-11-10 华南理工大学 Text fine-grained emotion classification method, system, device and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Sentiment Classification for Chinese Text Based on Interactive Multitask Learning";Han Zhang等;《IEEE Access ( Volume: 8)》;20200708;第1-10页 *
"基于BiLSTM-Attention的电商评论情感分析";史振杰等;《河北省科学院学报》;20200630;第12-19页 *

Also Published As

Publication number Publication date
CN112347258A (en) 2021-02-09

Similar Documents

Publication Publication Date Title
CN109241255B (en) Intention identification method based on deep learning
CN110059188B (en) Chinese emotion analysis method based on bidirectional time convolution network
CN110609891A (en) Visual dialog generation method based on context awareness graph neural network
CN110990543A (en) Intelligent conversation generation method and device, computer equipment and computer storage medium
CN111209401A (en) System and method for classifying and processing sentiment polarity of online public opinion text information
CN108597541A (en) A kind of speech-emotion recognition method and system for enhancing indignation and happily identifying
CN110647612A (en) Visual conversation generation method based on double-visual attention network
CN111368086A (en) CNN-BilSTM + attribute model-based sentiment classification method for case-involved news viewpoint sentences
CN111709242B (en) Chinese punctuation mark adding method based on named entity recognition
WO2023024412A1 (en) Visual question answering method and apparatus based on deep learning model, and medium and device
CN114238577B (en) Multi-task learning emotion classification method integrating multi-head attention mechanism
CN113065344A (en) Cross-corpus emotion recognition method based on transfer learning and attention mechanism
CN112287106A (en) Online comment emotion classification method based on dual-channel hybrid neural network
CN113361617A (en) Aspect level emotion analysis modeling method based on multivariate attention correction
Chou et al. Exploiting annotators’ typed description of emotion perception to maximize utilization of ratings for speech emotion recognition
CN112800184A (en) Short text comment emotion analysis method based on Target-Aspect-Opinion joint extraction
CN115630156A (en) Mongolian emotion analysis method and system fusing Prompt and SRU
Zhang et al. Multi-modal emotion recognition based on deep learning in speech, video and text
CN112347258B (en) Short text aspect level emotion classification method
CN114742047A (en) Text emotion recognition method based on maximum probability filling and multi-head attention mechanism
CN114722835A (en) Text emotion recognition method based on LDA and BERT fusion improved model
CN114360584A (en) Phoneme-level-based speech emotion layered recognition method and system
CN113239690A (en) Chinese text intention identification method based on integration of Bert and fully-connected neural network
Yuan A Classroom Emotion Recognition Model Based on a Convolutional Neural Network Speech Emotion Algorithm
CN111737467A (en) Object-level emotion classification method based on segmented convolutional neural network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant