jurafsky&martin_3rdEd_17 (1).pdf

Fig 1810 shows the method applied to a dataset of

Info icon This preview shows pages 336–338. Sign up to view the full content.

View Full Document Right Arrow Icon
Fig. 18.10 shows the method applied to a dataset of restaurant reviews from Yelp, comparing the words used in 1-star reviews to the words used in 5-star reviews (Jurafsky et al., 2014) . The largest difference is in obvious sentiment words, with the 1-star reviews using negative sentiment words like worse, bad, awful and the 5-star reviews using positive sentiment words like great, best, amazing . But there are other illuminating differences. 1-star reviews use logical negation ( no, not ), while 5-star reviews use emphatics and emphasize universality ( very, highly, every, always ). 1- star reviews use first person plurals ( we, us, our ) while 5 star reviews use the second person. 1-star reviews talk about people ( manager, waiter, customer ) while 5-star reviews talk about dessert and properties of expensive restaurants like courses and atmosphere. See Jurafsky et al. (2014) for more details.
Image of page 336

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
18.4 U SING L EXICONS FOR S ENTIMENT R ECOGNITION 337 Class Words in 1-star reviews Class Words in 5-star reviews Negative worst, rude, terrible, horrible, bad, awful, disgusting, bland, tasteless, gross, mediocre, overpriced, worse, poor Positive great, best, love(d), delicious, amazing, favorite, perfect, excellent, awesome, friendly, fantastic, fresh, wonderful, in- credible, sweet, yum(my) Negation no, not Emphatics/ universals very, highly, perfectly, definitely, abso- lutely, everything, every, always 1Pl pro we, us, our 2 pro you 3 pro she, he, her, him Articles a, the Past verb was, were, asked, told, said, did, charged, waited, left, took Advice try, recommend Sequencers after, then Conjunct also, as, well, with, and Nouns manager, waitress, waiter, customer, customers, attitude, waste, poisoning, money, bill, minutes Nouns atmosphere, dessert, chocolate, wine, course, menu Irrealis modals would, should Auxiliaries is/’s, can, ’ve, are Comp to, that Prep, other in, of, die, city, mouth Figure 18.10 The top 50 words associated with one–star and five-star restaurant reviews in a Yelp dataset of 900,000 reviews, using the Monroe et al. (2008) method (Jurafsky et al., 2014) . 18.4 Using Lexicons for Sentiment Recognition In Chapter 6 we introduced the naive Bayes algorithm for sentiment analysis. The lexicons we have focused on throughout the chapter so far can be used in a number of ways to improve sentiment detection. In the simplest case, lexicons can be used when we don’t have sufficient training data to build a supervised sentiment analyzer; it can often be expensive to have a human assign sentiment to each document to train the supervised classifier. In such situations, lexicons can be used in a simple rule-based algorithm for classification. The simplest version is just to use the ratio of positive to negative words: if a document has more positive than negative words (using the lexicon to decide the polarity of each word in the document), it is classified as positive. Often a threshold l is used, in which a document is classified as positive only if the ratio is greater than l . If the sentiment lexicon includes positive and negative weights for each word, q + w and q - w , these can be used as well. Here’s a simple such sentiment
Image of page 337
Image of page 338
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Sign up to access 24/7 study resources for your classes

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern