Sentiment Detection Using Lexically-Based Classifiers

Similar documents
Switchboard Language Model Improvement with Conversational Data from Gigaword

Lecture 1: Machine Learning Basics

A Comparison of Two Text Representations for Sentiment Analysis

A Case Study: News Classification Based on Term Frequency

Probabilistic Latent Semantic Analysis

Using Web Searches on Important Words to Create Background Sets for LSI Classification

Probability and Statistics Curriculum Pacing Guide

Semi-Supervised Face Detection

Rule Learning With Negation: Issues Regarding Effectiveness

(Sub)Gradient Descent

arxiv: v1 [cs.lg] 3 May 2013

CS Machine Learning

Iterative Cross-Training: An Algorithm for Learning from Unlabeled Web Pages

Python Machine Learning

Assignment 1: Predicting Amazon Review Ratings

Twitter Sentiment Classification on Sanders Data using Hybrid Approach

AUTOMATED TROUBLESHOOTING OF MOBILE NETWORKS USING BAYESIAN NETWORKS

Linking Task: Identifying authors and book titles in verbose queries

Netpix: A Method of Feature Selection Leading. to Accurate Sentiment-Based Classification Models

Rule Learning with Negation: Issues Regarding Effectiveness

A Bayesian Learning Approach to Concept-Based Document Classification

Speech Segmentation Using Probabilistic Phonetic Feature Hierarchy and Support Vector Machines

Human Emotion Recognition From Speech

Multivariate k-nearest Neighbor Regression for Time Series data -

The Good Judgment Project: A large scale test of different methods of combining expert predictions

Chapter 10 APPLYING TOPIC MODELING TO FORENSIC DATA. 1. Introduction. Alta de Waal, Jacobus Venter and Etienne Barnard

Using dialogue context to improve parsing performance in dialogue systems

Learning Structural Correspondences Across Different Linguistic Domains with Synchronous Neural Language Models

S T A T 251 C o u r s e S y l l a b u s I n t r o d u c t i o n t o p r o b a b i l i t y

System Implementation for SemEval-2017 Task 4 Subtask A Based on Interpolated Deep Neural Networks

OPTIMIZATINON OF TRAINING SETS FOR HEBBIAN-LEARNING- BASED CLASSIFIERS

Semi-supervised methods of text processing, and an application to medical concept extraction. Yacine Jernite Text-as-Data series September 17.

Edexcel GCSE. Statistics 1389 Paper 1H. June Mark Scheme. Statistics Edexcel GCSE

AQUA: An Ontology-Driven Question Answering System

Artificial Neural Networks written examination

Online Updating of Word Representations for Part-of-Speech Tagging

Introduction to Causal Inference. Problem Set 1. Required Problems

A Comparison of Charter Schools and Traditional Public Schools in Idaho

Ensemble Technique Utilization for Indonesian Dependency Parser

Learning to Rank with Selection Bias in Personal Search

Determining the Semantic Orientation of Terms through Gloss Classification

Bridging Lexical Gaps between Queries and Questions on Large Online Q&A Collections with Compact Translation Models

Calibration of Confidence Measures in Speech Recognition

Transductive Inference for Text Classication using Support Vector. Machines. Thorsten Joachims. Universitat Dortmund, LS VIII

Learning From the Past with Experiment Databases

COMPUTER-ASSISTED INDEPENDENT STUDY IN MULTIVARIATE CALCULUS

Software Maintenance

have to be modeled) or isolated words. Output of the system is a grapheme-tophoneme conversion system which takes as its input the spelling of words,

Universidade do Minho Escola de Engenharia

Reducing Features to Improve Bug Prediction

Strategies for Solving Fraction Tasks and Their Link to Algebraic Thinking

Discriminative Learning of Beam-Search Heuristics for Planning

Chinese Language Parsing with Maximum-Entropy-Inspired Parser

Evidence for Reliability, Validity and Learning Effectiveness

Multilingual Sentiment and Subjectivity Analysis

Introduction to Simulation

Axiom 2013 Team Description Paper

Exploration. CS : Deep Reinforcement Learning Sergey Levine

WE GAVE A LAWYER BASIC MATH SKILLS, AND YOU WON T BELIEVE WHAT HAPPENED NEXT

Generative models and adversarial training

How do adults reason about their opponent? Typologies of players in a turn-taking game

stateorvalue to each variable in a given set. We use p(x = xjy = y) (or p(xjy) as a shorthand) to denote the probability that X = x given Y = y. We al

STA 225: Introductory Statistics (CT)

Word Segmentation of Off-line Handwritten Documents

Extracting Opinion Expressions and Their Polarities Exploration of Pipelines and Joint Models

Missouri Mathematics Grade-Level Expectations

Algebra 1, Quarter 3, Unit 3.1. Line of Best Fit. Overview

A Neural Network GUI Tested on Text-To-Phoneme Mapping

Experiments with SMS Translation and Stochastic Gradient Descent in Spanish Text Author Profiling

Managerial Decision Making

Product Feature-based Ratings foropinionsummarization of E-Commerce Feedback Comments

Math-U-See Correlation with the Common Core State Standards for Mathematical Content for Third Grade

Reinforcement Learning by Comparing Immediate Reward

A Case-Based Approach To Imitation Learning in Robotic Agents

CS 446: Machine Learning

Specification and Evaluation of Machine Translation Toy Systems - Criteria for laboratory assignments

Australian Journal of Basic and Applied Sciences

Machine Learning and Development Policy

THEORY OF PLANNED BEHAVIOR MODEL IN ELECTRONIC LEARNING: A PILOT STUDY

School Size and the Quality of Teaching and Learning

NCEO Technical Report 27

Speech Emotion Recognition Using Support Vector Machine

Verbal Behaviors and Persuasiveness in Online Multimedia Content

Designing a Rubric to Assess the Modelling Phase of Student Design Projects in Upper Year Engineering Courses

Entrepreneurial Discovery and the Demmert/Klein Experiment: Additional Evidence from Germany

Analysis of Emotion Recognition System through Speech Signal Using KNN & GMM Classifier

Universiteit Leiden ICT in Business

SINGLE DOCUMENT AUTOMATIC TEXT SUMMARIZATION USING TERM FREQUENCY-INVERSE DOCUMENT FREQUENCY (TF-IDF)

A Metacognitive Approach to Support Heuristic Solution of Mathematical Problems

Informatics 2A: Language Complexity and the. Inf2A: Chomsky Hierarchy

Improved Effects of Word-Retrieval Treatments Subsequent to Addition of the Orthographic Form

Shockwheat. Statistics 1, Activity 1

A study of speaker adaptation for DNN-based speech synthesis

Disambiguation of Thai Personal Name from Online News Articles

Emotions from text: machine learning for text-based emotion prediction

Pp. 176{182 in Proceedings of The Second International Conference on Knowledge Discovery and Data Mining. Predictive Data Mining with Finite Mixtures

Proof Theory for Syntacticians

CS 1103 Computer Science I Honors. Fall Instructor Muller. Syllabus

Learning Methods in Multilingual Speech Recognition

Transcription:

Sentiment Detection Using Lexically-Based Classifiers Ben Allison Natural Language Processing Group, Department of Computer Science University of Sheffield, UK b.allison@dcs.shef.ac.uk Abstract. This paper addresses the problem of supervised sentiment detection using classifiers which are derived from word features. We argue that, while the literature has suggested the use of lexical features is inappropriate for sentiment detection, a careful and thorough evaluation reveals a less clear cut state of affairs. We present results from five classifiers using word based features on three tasks, and show that the variation between classifiers can often be as great as has been reported between different feature sets with a fixed classifier. We are thus led to conclude that classifier choice plays at least as important a role as feature choice, and that in many cases word based classifiers perform well on the sentiment detection task. Key words: Sentiment Detection, Machine Learning, Bayesian Methods, Text Classification 1 Introduction Sentiment detection as we approach it in this paper is the task of ascribing one of a pre (and well ) defined set of non overlapping sentiment labels to a document. Approached in this way, the problem has received some considerable attention in recent computational linguistics literature, and early references are [1, 2]. Whilst it is by no means obligatory, posed in such a way the problem can easily be approached as one of classification. Within the scope of the supervised classification problem, to use standard machine learning techniques one must make a decision about the features one wishes to use. On this point, several authors have remarked that for sentiment classification, standard text classification techniques using lexically based features (that is, features which describe the frequency of use of some word or combination of words) are generally unsuitable for the purposes of sentiment classification. For example, [3] bemoans the initially dismal word based performance, and [4] conclude their work by saying that traditional word based text classification methods (are) inadequate for the variant of sentiment detection they approach. This paper revisits the problem of supervised sentiment detection, and whether lexically based features are adequate for the task in hand. We conclude that,

2 Sentiment Detection Using Lexically-Based Classifiers far from providing overwhelming evidence supporting the previous position, an extensive and careful evaluation leads to generally good performance on a range of tasks. However, it emerges that the choice of method plays at least as large a role in the eventual performance as is often claimed for differing representations and feature sets. The rest of this paper is organised as follows: 2 describes our evaluation in detail; 3 describes the classifiers we use for these experiments; 4 presents results and informally describes trends. Finally, 5 ends with some brief concluding remarks. 2 Experimental Setup The evaluation presented in this work is on the basis of three tasks: the first two are the movie review collection first presented in [1] which has received a great deal of attention in the literature since, and the collection of political speeches presented in [5]. Since both of these data sets are binary (i.e. two-way) classification problems, we also consider third problem, using a new corpus which continues the political theme but includes five classes. Each of them is described separately below. The movie review task is to determine the sentiment of the author of a review towards the film he is reviewing a review is either positive or negative. We use version 2.0 of the movie review data. 1 The corpus contains approximately 2000 reviews equally split between the two categories, with mean length 653 words and median 613. The task for the political speech data is to determine whether an utterance is in support of a motion, or in opposition to it, and the source of the data is automatically transcribed political debates. For this work, we use version 1.1 of the political data. 2 We use the full corpus (i.e. training, tuning and testing data) to create random splits: thus the corpus contains approximately 3850 documents with mean length 287 words and median 168. The new collection consists of text taken from the election manifestos of five UK political parties for the last three general elections (that is, for the elections in 1997, 2001 and 2005). The parties used were: Labour, Conservative, Liberal Democrat, the British National Party and the UK Independence Party. The corpus is approximately 250,000 words in total, and we divide the manifestos into documents by selecting non overlapping twenty sentence sections. This results in a corpus of approximately 650 documents, each of which is roughly 300 400 words in length. We also wished to test the impact of the amount of training data; various studies have shown this to be an important consideration when evaluating classification methods. Of particular relevance to our work and results is that of [6], who show that the relative performances of different methods change as the amount of training data increases. Thus we vary the percentage of documents 1 http://www.cs.cornell.edu/people/pabo/movie-review-data/ 2 http://www.cs.cornell.edu/home/llee/data/convote.html

Sentiment Detection Using Lexically-Based Classifiers 3 used as training between 10% and 90% at 10% increments. For a fixed percentage level, we select that percentage of documents from each class (thus maintaining class distribution) randomly as training, and use all remaining as testing. We repeat this procedure five times for each percentage level. All results are in terms of the simplest performance measure, and that most frequently used for non overlapping classification problems, accuracy. Otherwise, all words are identified as contiguous alpha numeric strings. We use no stemming, no stoplisting, no feature selection and no minimum frequency cutoff. We were also interested to observe the effects of restricting the vocabulary of texts to contain only words with some emotional significance, since this in some ways seems a natural strategy, ignoring words with specific topical and authorial associations. We thus perform experiments on the movie review collection, but using only words which are marked as Positive or Negative in the General Inquirer Dictionary [7]. 3 Methods This section describes the methods we evaluate in detail. To test the applicability of both word presence features and word count features, we include standard probabilistic methods designed specifically for these representations. We also include a more advanced probabilistic method with two possibilities for parameter estimation, and finally we test an SVM classifier, which is something of a standard in the literature. 3.1 Probabilistic Methods In this section, we briefly describe the use of a model of language as applied to the problem of document classification, and also how we estimate all relevant parameters for the work which follows. In terms of notation, we use c to represent a random variable and c to represent an outcome. We use roman letters for observed or observable quantities and greek letters for unobservables (i.e. parameters). We write c ϕ(c) to mean that c has probability density (discrete or continuous) ϕ(c), and write p(c) as shorthand for p( c = c). Finally, we make no explicit distinction in notation between univariate and multivariate quantities; however, we use θ j to refer to the j-th component of the vector θ. We consider cases where documents are represented as vectors of count valued (possibly only zero or one, in the case of binary features) random variables such that d = {d 1...d v }. As with most other work, we further assume that words in a document are exchangeable and thus a document can be represented simply by the number of times each word occurs. In classification, interest centres on the conditional distribution of the class variable, given a document. Where documents are to be assigned to one class only (as in the case of this paper), this class is judged to be the most probable class.

4 Sentiment Detection Using Lexically-Based Classifiers Classifiers such as the probabilistic classifiers considered here model the posterior distribution of interest from the joint distribution of class and document: this means incorporating a sampling model p(d c), which encodes assumptions about how documents are sampled. Thus letting c be a random variable representing class and d be a random variable representing a document, by Bayes theorem: p(c d) p(c) p(d c) (1) For the purposes of this work we also assume a uniform prior on c, meaning the ultimate decision is on the basis of the document alone. For each of the probabilistic methods, what sets them apart is the sampling model p(d c); as such, for each method we describe the form of this distribution and how parameters are estimated for a fixed class. We estimate a single model of the types described below for each possible class, and combine estimates to make a decision as above, and as such we will not use subscripts referring to a particular class for clarity in notation. Where training documents and/or training counts are mentioned, these relate only to the class in question. Binary Independence Sampling Model For a vocabulary with v distinct types, the simplest representation of a document is as a vector of length v, where each element of the vector corresponds to a particular word and may take on either of two values: 1, indicating that the word appears in the document, and 0, indicating that it does not. Such a scheme a long heritage in information retrieval: see e.g. [8] for a survey, and [9, 10] for applications in information retrieval and classification respectively. This model depends upon parameter θ, which is a vector also of length v, representing the probabilities that each of the v words is used in a document. Given these parameters (and further assuming independence between components of d), the term p(d c) is simply the product of the probabilities of each of the random variables taking on the value that they do. Thus the probability that the j-th component of d, dj is one is simply θ j (the probability that it is zero is just 1 θ j ) and the probability of the whole vector is: p bin indep (d θ) = j p bi (d j θ j ) (2) Given training data for some particular class, we estimate the θ j as their posterior means, assuming a uniform prior. Multinomial Sampling Model A natural way to model the distribution of word counts (rather than the presence or absence of words) is to let p(d c) be distributed multinomially, as proposed in [11,10] amongst others. The multinomial model assumes that documents are the result of repeated trials, where on each trial a word is selected at random, and the probability of selecting the j-th word is θ j. Under multinomial sampling, the term p(d c) has distribution:

Sentiment Detection Using Lexically-Based Classifiers 5 p multinomial (d θ) = ( j d j)! j (d j!) j θ dj j (3) Once again, as is usual, given training data we esimate the vector θ as its posterior mean assuming a uniform Dirichlet prior. A Joint Beta-Binomial Sampling Model The final classifier decomposes the term p(d c) into a sequence of independent terms of the form p(d j c), and hypothesises that conditional on known class (i.e. c) d j Binomial(θ j, n). However, unlike before, we also assume that θ j Beta(α j, β j ), that is θ j is allowed to vary between documents subject only to the restriction that θ j Beta(α j, β j ). Integrating over the unknown θ j in the new document gives the distribution of d j as: p bb (d j α j, β j ) = n! d j!(n d j )! B(d j + α j, n d j + β j ) B(α j, β j ) where B( ) is the Beta function. The term p(d c) is then simply: (4) p beta binomial (d α, β) = j p(d j α j, β j ) (5) As with most previous work, our first estimate of parameters of the betabinomial model are in closed form, using the method-of-moments estimate proposed in [12]. We also experiment with an alternate estimate, corrected so that documents have the same impact upon parameter estimates regardless of their length. We refer to the original as the Beta-Binomial model, and the modified version as the Alternate Beta-Binomial. 3.2 A Support Vector Machine Classifier We also experiment with a linear Support Vector Machine, shown in several comparative studies to be the best performing classifier for document categorization [13, 14]. Briefly, the support vector machine seeks the hyperplane which maximises the separation between two classes while minimising the magnitude of errors committed by this hyperplane. The preceding goal is posed as an optimisation problem, evaluated purely in terms of dot products between the vectors representing individual instances. The flexibility of the machine arises from the possibility to use a whole range of kernel functions, φ(x 1, x 2 ) which is the dot product between instance vectors x 1 and x 2 in some transformed space. Despite the apparent flexibility, the majority of NLP work uses the linear kernel such that φ(x 1, x 2 ) = x 1 x 2. Nevertheless, the linear SVM has been shown to perform extremely well, and so we present results using the the linear kernel from the SV M light toolkit [15] (we note that experimentation with non linear kernels made little difference, with no consistent trends in performance).

6 Sentiment Detection Using Lexically-Based Classifiers We use the most typical method for transforming the SVM into a multi-class classifier, the One-Vs-All method, shown to perform extremely competitively [16]. All vectors are also normed to unit length. 4 Results This section presents the results of our experiments on the collections described in 2 Figure 1 shows performance on [1] s movie reviews collection. Several trends are obvious; the first is that, reassuringly, performance generally increases as the amount of training data increases. Note, however, that this is not always the case a product of the random nature of the training/testing selection process, despite performing the procedure multiple times for each data point. Note also that individual classifiers experience difficulties with particular splits of the data which are not experienced by all. The most telling example of this is the pronounced dip in the performance of the SVM at 40% training not reflected in other classifiers performance. Also, we note that the classifier specifically designed to model binary representations fails to perform as well as the multinomial and Beta Binomial models, in contradiction to [1], who observed superior performance using binary features, but inkeeping with results on more standard text classification tasks [10,12]. Figure 2 shows results on the same data using only words deemed Positive or Negative. Note here that relative performance trends are markedly different, with the SVM experiencing a particular reversal of fortunes. Otherwise, the same idiosyncrasies are evident occasional dips in one classifier s performance not observed with others, and crossing of lines in the graphs. Figure 3 presents a slightly less changeable picture, although what is apparent is the complete reversal in fortunes of the methods when compared to the previous collection. The binary classifier performs worst by some margin, and the alternate Beta-Binomial classifier is superior by a similar margin. Also, note that at certain points performance for some classifiers dips, while for others it merely plateaus. Finally, Figure 4 displays results from [5] s collection of political debates. The results here are perhaps the most volatile of all the impact of using any particular classifier over others is quite pronounced, and the SVM is inferior to the best method by up to 7% in some places. Furthermore, the binary classifier is even worse, and this is exactly the combination used in the original study. The difference between classifiers is in many cases the same as the difference between the general document based classifier and the modified scheme presented in that paper. 5 Conclusion In terms of a conclusion, we revisit the initial question. Is it fair to say that the use of lexically based features leads to classifiers which do not perform accept-

Sentiment Detection Using Lexically-Based Classifiers 7 Fig. 1. Results for [1] s Movie Review Collection Fig. 2. Results for [1] s Movie Review Collection, using only words marked as Positive or Negative in the General Inquirer Dictionary Fig. 3. Results for the Manifestos Collection Fig. 4. Results for [5] s Political Speeches Collection

8 Sentiment Detection Using Lexically-Based Classifiers ably? Of course, this question glosses over the difficulty of defining acceptable performance; however, the only sound answer can be that it depends upon the classifier in question, the amount of training data, and so on. While it would be easier if sweeping generalisations could be made, clearly they are not justified. References 1. Pang, B., Lee, L., Vaithyanathan, S.: Thumbs up? sentiment classification using machine learning techniques. In: Proceedings of the 2002 Conference on Empirical Methods in Natural Language Processing (EMNLP). (2002) 2. Turney, P., Littman, M.: Measuring praise and criticism: Inference of semantic orientation from association. ACM Transactions on Information Systems 21(4) (2003) 315 346 3. Efron, M.: Cultural orientation: Classifying subjective documents by cociation (sic) analysis. In: Proceedings of the AAAI Fall Symposium on Style and Meaning in Language, Art, Music, and Design. (2004) 41 48 4. Mullen, T., Malouf, R.: A preliminary investigation into sentiment analysis for informal political discourse. In: Proceedings of the AAAI Workshop on Analysis of Weblogs. (2006) 5. Thomas, M., Pang, B., Lee, L.: Get out the vote: Determining support or opposition from Congressional floor-debate transcripts. In: Proceedings of EMNLP. (2006) 327 335 6. Banko, M., Brill, E.: Mitigating the paucity of data problem: Exploring the effect of training corpus size on classifier performance for nlp. In: Proceedings of the Conference on Human Language Technology. (2001) 7. Stone, P.J., Dunphy, D.C., Smith, M.S., Ogilvie, D.M., associates: The General Inquirer: A Computer Approach to Content Analysis. MIT Press (1966) 8. Lewis, D.D.: Naïve (Bayes) at forty: The independence assumption in information retrieval. In: Proceedings of ECML-98. (1998) 4 15 9. Robertson, S.E., Jones, K.S.: Relevance weighting of search terms. Document retrieval systems (1988) 143 160 10. McCallum, A., Nigam, K.: A comparison of event models for naïve bayes text classification. In: Proceedings AAAI-98 Workshop on Learning for Text Categorization. (1998) 11. Guthrie, L., Walker, E., Guthrie, J.: Document classification by machine: theory and practice. In: Proceedings COLING 94. (1994) 1059 1063 12. Jansche, M.: Parametric models of linguistic count data. In: ACL 03. (2003) 288 295 13. Dumais, S., Platt, J., Heckerman, D., Sahami, M.: Inductive learning algorithms and representations for text categorization. In: CIKM 98. (1998) 148 155 14. Yang, Y., Liu, X.: A re-examination of text categorization methods. In: 22nd Annual International SIGIR, Berkley (August 1999) 42 49 15. Joachims, T.: Making large-scale svm learning practical. Advances in Kernel Methods - Support Vector Learning (1999) 16. Rennie, J.D.M., Rifkin, R.: Improving multiclass text classification with the Support Vector Machine. Technical report, Massachusetts Insititute of Technology, Artificial Intelligence Laboratory (2001)