Elsevier

Expert Systems with Applications

Volume 61, 1 November 2016, Pages 282-289
Expert Systems with Applications

Using information retrieval for sentiment polarity prediction

https://doi.org/10.1016/j.eswa.2016.05.038Get rights and content

Highlights

  • We propose a method for polarity prediction of Tweets.

  • The novelty lies on the proposed features.

  • Features are derived from the ranking generated by an Information Retrieval System.

  • Results comparable to the state-of-the-art can be achieved with only 24 features.

Abstract

Social networks such as Twitter are used by millions of people who express their opinions on a variety of topics. Consequently, these media are constantly being examined by sentiment analysis systems which aim at classifying the posts as positive or negative. Given the variety of topics discussed and the short length of the posts, the standard approach of using the words as features for machine learning algorithms results in sparse vectors. In this work, we propose using features derived from the ranking generated by an Information Retrieval System in response to a query consisting of the post that needs to be classified. Our system can be fully automatic, has only 24 features, and does not depend on expensive resources. Experiments on real datasets have shown that a classifier that relies solely on these features outperforms established baselines and can reach accuracies comparable to the state-of-the-art approaches which are more costly.

Introduction

With over 500 million posts a day1, Twitter2 has consolidated itself as a major forum for expressing personal opinions on a variety of topics. Because of its popularity, this microblogging service has been the target of numerous studies from a broad range of research areas including Psychology, Sociology, Marketing, and Computer Science. For example, in Mostafa (2013), the analysis of tweets is used to determine the sentiment towards sixteen global brands.

Sentiment analysis, also called Opinion Mining, is dedicated to the computational study of opinions and sentiments expressed in text (Pang & Lee, 2008). This topic has been attracting increasing attention from the research community. Out of the different aspects of opinions that can be studied, the polarity of sentiments is the most well investigated. It consists in predicting whether the opinion expressed in the text is positive or negative.

While most of the research focuses on product reviews, recently, a number of studies on Twitter posts (or simply tweets) have emerged. Sentiment Analysis on Twitter can be done at three different levels: (i) entity, (ii) tweet, or (iii) expression. Entity-level analysis deals with discovering the overall opinion about an entity or topic, tweet-level analysis identifies the polarity of individual tweets, and expression level analysis deals with specific phrases within a tweet. Our focus is on the second – tweet-level analysis. The added challenge of analysing tweets (compared to product reviews) is their shorter length – at most 140 characters – which results in very sparse vector representations. In addition, the variety of topics, and the informal vocabulary, characterised by slangs, abbreviations, and misspellings, pose added difficulties to its computational treatment.

Successful approaches for polarity classification on tweets use one or more of the following: resources such as lexicons (which are sometimes manually created) (Fersini, Messina, Pozzi, 2016, Speriosu, Sudan, Upadhyay, Baldridge, 2011, Zhang, Ghosh, Dekhil, Hsu, Liu, 2011), costly preprocessing such as part-of-speech tagging (Fersini, Messina, Pozzi, 2016, Go, Bhayani, Huang, 2009, Hu, Tang, Tang, Liu, 2013, Saif, He, Alani, 2012), numerous features (Fersini, Messina, Pozzi, 2016, Go, Bhayani, Huang, 2009, Saif, He, Alani, 2012, Speriosu, Sudan, Upadhyay, Baldridge, 2011, Zhang, Ghosh, Dekhil, Hsu, Liu, 2011) large amounts of training data (Bakliwal et al., 2012), and elaborated machine learning methods such as classifier ensembles (Coletta, da Silva, Hruschka, Hruschka, 2014, Martìn-Valdivia, Martìnez-Cámara, Perea-Ortega, Ureña López, 2013, da Silva, Hruschka, Hruschka, , 2014). In this work, we propose a method called Sentiment Analysis Based on Information Retrieval (SABIR) which uses none of the above. We show that classification accuracy comparable to the state-of-the-art can be achieved with a single classification algorithm using only 24 features. Unlike existing approaches, we do not use the words of the tweets as features. Our features are derived from the ranking generated by an Information Retrieval System in response to a query q which consists of the tweet that we wish to classify. The ranking has the n most similar tweets for which we already know the class in decreasing order of similarity to the unlabelled tweet q. The rationale is to leverage information of the class of the similar posts to classify q.

We have carried out experiments with four datasets of tweets which have been used in similar studies. Since the training data for the classification system can be generated without manual annotation (Barbosa, Feng, 2010, Go, Bhayani, Huang, 2009), SABIR can be fully automatic. Our results have shown that there is no significant difference between SABIR and the best baseline classifier we implemented using over one thousand features.

Section snippets

Related work

The literature on sentiment analysis abounds on methods for classifying the polarity of opinionated texts, such as product reviews (Pang & Lee, 2008). In recent years, in interest on treating tweets has grown and several approaches were proposed. Martínez-Cámara, Martín-Valdivia, Urena-López, and Montejo-Ráez (2014) present a survey devoted exclusively to this topic. The task of identifying the polarity of a tweet is typically modelled as a classification problem. Its solution relies on machine

Classifying the polarity of tweets

A Twitter post, or tweet, expresses the opinions or sentiments of its author about an entity. As mentioned in Section 2, the traditional approach for classifying the polarity of a tweet is to implement a classifier using unigrams as features (i.e., BoW). However, this tends to result in a very sparse set of features because of the large diversity of vocabulary in the tweets. Our hypothesis is that twitter posts that are similar tend to belong to the same class. Thus, information about the class

Experiments

In order to test our proposed approach, we ran experiments using four datasets of real Web data. We have also compared our results to a number of baselines, including state-of-the-art approaches. In the next Section, we describe the experimental setup and our results. In addition, as our method has the number of documents retrieved by the query as an input parameter (n), we show how this number affects our results.

Conclusion

We have proposed SABIR a method for polarity classification of tweets based on an Information Retrieval system. Our goal was to leverage the information on the class of (labelled) similar tweets to classify new unlabelled posts. We have proposed and tested 24 features that are based solely on the ranking provided by a search engine in response to queries consisting of the tweets we wish to classify. Since the labels for the indexed posts can be generated without human intervention, our method

Acknowledgements

This work was partially supported by CNPq-Brazil (Project No 305141/2015-5). A. U. Kauer received a scholarship by CNPq.

References (31)

  • B. Billerbeck et al.

    RMIT university at TREC 2004

    Proceedings text retrieval conference (TREC)

    (2004)
  • J. Carvalho et al.

    A statistical and evolutionary approach to sentiment analysis

    International joint conferences on web intelligence (WI) and intelligent agent technologies (IAT) - volume 02. WI-IAT ’14

    (2014)
  • O. Chapelle

    Training a support vector machine in the primal

    Neural Computation

    (2007)
  • L. Coletta et al.

    Combining classification and clustering for tweet sentiment analysis

    Intelligent systems (BRACIS), 2014 Brazilian conference on, Oct

    (2014)
  • D. Davidov et al.

    Enhanced sentiment learning using twitter hashtags and smileys

    Proceedings of the 23rd international conference on computational linguistics: Posters. COLING ’10

    (2010)
  • Cited by (19)

    • Why are some social-media contents more popular than others? Opinion and association rules mining applied to virality patterns discovery

      2022, Expert Systems with Applications
      Citation Excerpt :

      Opinion mining involves detecting, extracting and classifying opinions, sentiments and attitudes on different topics based on what social media users express in textual input. According to the literature, textual data is extracted from social media such as Twitter, and classified in different ways, for example, by extracting the stance of the message (D’Andrea, Ducange, Bechini, Renda, & Marcelloni, 2019), the polarity (Kauer & Moreira, 2016; Rao & Ravichandran, 2009) or the topics (Aguero-Torales, Vilares, & Lopez-Herrera, 2021). There were also several recurrent competitions regarding opinion mining and sentiment analysis using Twitter as input (Chatterjee, Narahari, Joshi, & Agrawal, 2019; Mohammad, Bravo-Marquez, Salameh, & Kiritchenko, 2018; Nakov, Ritter, Rosenthal, Sebastiani, & Stoyanov, 2016; Patwa et al., 2020; Rosenthal, Farra, & Nakov, 2017; Rosenthal, Ritter, Nakov, & Stoyanov, 2014).

    • Generation of simple structured information retrieval functions by genetic algorithm without stagnation

      2017, Expert Systems with Applications
      Citation Excerpt :

      The main problem of the IR system constructing is how to discover a ranking function, which returns the most related documents to each query from a large and diverse test set queries. Developing new term-document scoring functions that outperform already existing traditional scoring schemes is one of the most acute and demanded research area in the theoretical information retrieval (Datta, Varma, C., & Singh, 2017; Vanopstal, Buysschaert, Laureys, & Stichele, 2013) with many applications in the expert systems(Kauer & Moreira, 2016; Tu & Seng, 2009). The Text REtrieval Conference (TREC), co-sponsored by the National Institute of Standards and Technology (NIST) and U.S. Department of Defense, was started in 1992 as part of the TIPSTER Text program.

    • One-Teacher and Multiple-Student Knowledge Distillation on Sentiment Classification

      2022, Proceedings - International Conference on Computational Linguistics, COLING
    • Emotions recognition in synchronic textual CSCL situations

      2022, International Journal of Data Mining, Modelling and Management
    View all citing articles on Scopus
    View full text