Attention-based methods for deep neural networks constitute a technique that has attracted increased interest in recent years. Attention mechanisms can focus on important parts of a sequence and, as a result, enhance the performance of neural networks in a variety of tasks, including sentiment analysis, emotion recognition, machine translation and speech recognition. In this work, we study attention-based models built on recurrent neural networks (RNNs) and examine their performance in various contexts of sentiment analysis. Self-attention, global-attention and hierarchical-attention methods are examined under various deep neural models, training methods and hyperparameters. Even though attention mechanisms are a powerful recent concept in the field of deep learning, their exact effectiveness in sentiment analysis is yet to be thoroughly assessed. A comparative analysis is performed in a text sentiment classification task where baseline models are compared with and without the use of attention for every experiment. The experimental study additionally examines the proposed models’ ability in recognizing opinions and emotions in movie reviews. The results indicate that attention-based models lead to great improvements in the performance of deep neural models showcasing up to a 3.5% improvement in their accuracy.
User-generated content in social media contain very meaningful information about public sentiment and stance and require automated methods to analyze them extract knowledge from them. The recognition of sentiments, emotions and attitudes in textual data is necessary for understanding public stance and is highly desired for various services and procedures. In this work, we examine the performance of Hidden Markov Models (HMM) in the recognition of sentiments and opinions in text. Hidden Markov Models constitute a quite suitable approach given the special characteristics of the textual data. In particular, they can utilize the sequential nature of textual data, a piece of information that traditional machine learning approaches fail to fully take into account. We performed several experiments in order to assess the performance of different HMM-based methods under various training parameters and architectures. The evaluation results indicate that Hidden Markov Models achieve superior performance compared to traditional machine learning algorithms and highlight that they are scalable and accurate in analyzing user generated content and in specifying opinions and attitudes.