Att-BiLSTM+WL (Bidirectional LSTM with Attention mechanism and weighted loss) This repository contains the source code for the models used for Master of Science Thesis "Sentiment Analysis for Tweets" by Konstantinos Korovesis, supervisor Prof. Ion Androutsopoulos, AUEB, MSc in Computer Science, Department of Computer Science. To be published soon.
Sentiment Analysis is a field of Natural Language Processing which addresses the problem of extracting sentiment or opinion from text. Obtaining deeper insights on that topic can be very valuable for a range of fields such as finance, marketing, politics and business. Previous research has shown how sentiment and public opinion can affect stock markets, product sales, polls as well as public health. This thesis researches the message sentiment polarity classification problem in Twitter aiming to classify messages based on the polarity of the sentiment towards a specific topic, where the tweets and the topics are always given. The dataset analyzed and the evaluation metrics considered are provided from the SemEval 2017 International Workshop and the 4th task about "Sentiment Analysis in Twitter". This task includes five subtasks, two of which were eventually engaged in this research according to the implemented approach. First, subtask B is a binary classification task, where the goal is to classify messages into two classes, positive and negative regarding the sentiment towards the topic. Following, subtask C where the target is to classify messages in a five-scale sentiment polarity from highly negative, negative, neutral, positive to highly positive, based on the sentiment towards a given topic. For this purpose, we built and trained a state-of-the-art Bi-LSTM neural network model with context attention for targeting both subtasks. Context attention is a mechanism that’s calculates how much a word in the text affects the polarity of the sentiment. We describe and analyze our model in detail and provide all information on the technology and the techniques that we used. In addition, we built a convolutional neural network model to compare it with our model during the experiments. Furthermore, we present the experiments and evaluate the results of our model. The main evaluation metrics that were considered in the experiments include accuracy score for subtask B and macro-averaged mean absolute error for subtask C. Other evaluation measurements were also considered during training and validating the models. In both subtasks our model outperformed the CNN model as well as the official SemEval baselines. Finally, we conclude our thesis by discussing the challenges and the results of our work and provide recommendations for new research and directions in the field of sentiment analysis