| With the development of modern science and technology,the internet has gradually become one of the main methods to express people’s emotions.As an important branch of natural language processing,text emotion research has attracted more and more attention.In the past,there are lots of traditional machine learning methods,for example,KNN,Naive Bayes and SVM.These algorithms have excellent performance,but they don’t have good feature expansion and usually need a large number of feature labels to be added manually.However,in recent years,deep learning has been widely applied to various natural language processing tasks.For example,CNN extracts local features using different convolution kernels;LSTM and its variants can solve the temporal relationship between words in sentences and the interaction between words.Although they obtain high accuracy,the existing methods are not ideal for modeling text sentences’ hierarchical structure.Besides,although language looks like a sequence,it has a complex internal hierarchy.It means that even if the sequence looks the same,it may also have semantic differences due to different internal hierarchies.Therefore,it’s necessary to integrate language hierarchy into the model’s training process to make the model have a more powerful representation ability.To address the above problems,this paper takes sentiment analysis and text similarity as the main research tasks and constructs the ordered neurons LSTM and the ordered neurons self-attention model for text analysis.The main work of this paper:(1)The traditional RNN model always models a sentence as a sequence,but in reality,the association between words in a sentence is actually in the form of a grammar tree,so the RNN model does not have the ability to model such a hierarchical structure.In other words,LSTM and ordinary neural networks do not use the sequence information of neurons.The improved LSTM network integrates the hierarchical structure(tree structure)into the LSTM through the specific ordering of neurons,so that the LSTM can automatically learn the hierarchical information,and thus can express more abundant information.Enhance the modeling of language hierarchy and improve the ability of text semantic analysis.(2)The attention mechanism is adopted to better construct the temporal information structure of the text,and to better learn the emotional information of the relevant text with a long distance,so as to avoid the problem of long-term dependence,that is,the perception of some points in the previous time will be weakened,and the performance loss of the text emotional analysis will be reduced.(3)In the IC layer,batch normalization mechanism and Dropout mechanism technology are combined to improve the convergence speed and generalization performance of the model.The innovation points of this paper include:(1)To solve the problem that text hierarchy information is ignored in natural language text sentiment analysis,a short-text similarity detection method based on ordered neuron LSTM is proposed.It solves the problem of neglecting the text hierarchy information,makes the model obtain a higher level of abstraction representation,simulates the language composition effect,and improves the text semantic analysis ability.(2)An emotion analysis method based on LSTM self-attention of ordered neurons is proposed.Attention is used to solve the "local coding" problem of short-distance dependence,so as to establish long-distance dependence relationship on the input sequence,avoid the generation of long-term dependence problem,improve the parallelism efficiency,and thus optimize the model and improve the accuracy.(3)The Dropout and batch normalization techniques are combined to reduce the interaction information and correlation coefficient between any pair of neurons and improve the convergence speed. |