Abstract
Due to the increasing growth of social media content on websites such as Twitter and Facebook, analyzing textual sentiment has become a challenging task. Therefore, many studies have focused on textual sentiment analysis. Recently, deep learning models, such as convolutional neural networks and long short-term memory, have achieved promising performance in sentiment analysis. These models have proven their ability to cope with the arbitrary length of sequences. However, when they are used in the feature extraction layer, the feature distance is highly dimensional, the text data are sparse, and they assign equal importance to various features. To address these issues, we propose a hybrid model that combines a deep neural network with a multi-head attention mechanism (DNN–MHAT). In the DNN–MHAT model, we first design an improved deep neural network to capture the text’s actual context and extract the local features of position invariants by combining recurrent bidirectional long short-term memory units (Bi-LSTM) with a convolutional neural network (CNN). Second, we present a multi-head attention mechanism to capture the words in the text that are significantly related to long space and encoding dependencies, which adds a different focus to the information outputted from the hidden layers of BiLSTM. Finally, a global average pooling is applied for transforming the vector into a high-level sentiment representation to avoid model overfitting, and a sigmoid classifier is applied to carry out the sentiment polarity classification of texts. The DNN–MHAT model is tested on four reviews and two Twitter datasets. The results of the experiments illustrate the effectiveness of the DNN–MHAT model, which achieved excellent performance compared to the state-of-the-art baseline methods based on short tweets and long reviews.
Highlights
Sentiment analysis (SA) of text aims to extract and analyze knowledge from the personal information posted on the internet
We investigate the effectiveness of the deep neural networks (DNN)–multi-head attention (MHAT) model on two types of datasets: long reviews and short tweets on social media
The major major difference difference between between our our model model and and the is that proposed model considers the following significant features simultaneously: (i) short and proposed model considers the following significant features simultaneously: (i) short and long context dependencies utilizing bidirectional long short-term memory units (Bi-long short-term memory (LSTM)); (ii) identifying most significant features strong to positional changes utilizing convolutional neural network (CNN) with various kernels, filter sizes, and pooling mechanisms; (iii) capturing capturing the words words in the text that are significantly related related to long space and encoding dependencies utilizing a multi-head attention mechanism
Summary
Sentiment analysis (SA) of text aims to extract and analyze knowledge from the personal information posted on the internet. Most of the previous approaches for SA have trained shallow techniques on carefully developed efficient features for obtaining satisfactory polarity categorization performances [3] These models occasionally apply traditional classification approaches involving Naïve Bayes, support vector machines (SVM), and latent Dirichlet allocation (LDA) to linguistic properties, such as lexical features, part-of-speech (POS) tags, and n-grams. These approaches have two major drawbacks: (1) the feature distance on which the model must be trained is highly dimensional and scattered and affects the model performance; (2) the feature engineering operation is time intensive and an uphill task
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.