Sentiment Analysis What%is%Sen+ment%Analysis?%Dan%Jurafsky%Posi%ve(or(nega%ve(movie(review?(• unbelievably%disappoin+ng%%• Full%of%zany%characters%and%richly%applied%sa+re,%and%some%great%plot%twists%• %this%is%the%greatest%screwball%comedy%ever%filmed%• %It%was%pathe+c.%The%worst%part%about%it%was%the%boxing%scenes.%2%Dan%Jurafsky%Google(Product(Search(• a%3%Dan%Jurafsky%Bing(Shopping(• a%4%Dan%Jurafsky%Twi;er(sen%ment(versus(Gallup(Poll(of(Consumer(Confidence(Brendan O'Connor, Ramnath Balasubramanyan, Bryan R. Routledge, and Noah A. Smith. 2010. From%Tweets%to%Polls:%Linking%Text%Sen+ment%to%Public%Opinion%Time%Series.%In%ICWSMP2010%Dan%Jurafsky%Twi;er(sen%ment:(Johan%Bollen,%Huina%Mao,%Xiaojun%Zeng.%2011.%TwiXer%mood%predicts%the%stock%market,%Journal%of%Computa+onal%Science%2:1,%1P8.%10.1016/j.jocs.2010.12.007.%%%%6%Dan%Jurafsky%7%Dow%Jones%• CALM%predicts%DJIA%3%days%later%• At%least%one%current%hedge%fund%uses%this%algorithm%CALM%Bollen%et%al.%(2011)%Dan%Jurafsky%Target(Sen%ment(on(Twi;er(• TwiXer%Sen+ment%App%• Alec%Go,%Richa%Bhayani,%Lei%Huang.%2009.%TwiXer%Sen+ment%Classifica+on%using%Distant%Supervision%8%Dan%Jurafsky%Sen%ment(analysis(has(many(other(nam e s(• Opinion%extrac+on%• Opinion%mining%• Sen+ment%mining%• Subjec+vity%analysis%9%Dan%Jurafsky%Why(sen%ment(analysis?(• Movie:%%is%this%review%posi+ve%or%nega+ve?%• Products:%what%do%people%think%about%the%new%iPhone?%• Public/sen1ment:%how%is%consumer%confidence?%Is%despair%increasing?%• Poli1cs:%what%do%people%think%about%this%candidate%or%issue?%• Predic1on:%predict%elec+on%outcomes%or%market%trends%from%sen+ment%10%Dan%Jurafsky%Scherer(Typology(of(Affec%ve(States(• Emo%on:%brief%organically%synchronized%…%evalua+on%of%a%major%event%%• angry,/sad,/joyful,/fearful,/ashamed,/proud,/elated%• Mood:%diffuse%nonPcaused%lowPintensity%longPdura+on%change%in%subjec+ve%feeling%• cheerful,/gloomy,/irritable,/listless,/depressed,/buoyant%• Interpersonal(stances:%affec+ve%stance%toward%another%person%in%a%specific%interac+on%• friendly,/flirta1ous,/distant,/cold,/warm,/suppor1ve,/contemptuous/• AGtudes:%enduring,%affec+vely%colored%beliefs,%disposi+ons%towards%objects%or%persons%• /liking,/loving,/ha1ng,/valuing,/desiring%• Personality(traits:%stable%personality%disposi+ons%and%typical%behavior%tendencies%• nervous,/anxious,/reckless,/morose,/hos1le,/jealous/Dan%Jurafsky%Scherer(Typology(of(Affec%ve(States(• Emo%on:%brief%organically%synchronized%…%evalua+on%of%a%major%event%%• angry,/sad,/joyful,/fearful,/ashamed,/proud,/elated%• Mood:%diffuse%nonPcaused%lowPintensity%longPdura+on%change%in%subjec+ve%feeling%• cheerful,/gloomy,/irritable,/listless,/depressed,/buoyant%• Interpersonal(stances:%affec+ve%stance%toward%another%person%in%a%specific%interac+on%• friendly,/flirta1ous,/distant,/cold,/warm,/suppor1ve,/contemptuous/• AGtudes:(enduring,(affec%vely(colored(beliefs,(disposi%ons(towards(objects(or(persons(• !liking,/loving,/ha1ng,/valuing,/desiring/• Personality(traits:%stable%personality%disposi+ons%and%typical%behavior%tendencies%• nervous,/anxious,/reckless,/morose,/hos1le,/jealous/Dan%Jurafsky%Sen%ment(Analysis(• Sen+ment%analysis%is%the%detec+on%of%aGtudes(“enduring,%affec+vely%colored%beliefs,%disposi+ons%towards%objects%or%persons”%1. Holder((source)(of%aftude%2. Target((aspect)(of%aftude%3. Type(of%aftude%• From%a%set%of%types%• Like,/love,/hate,/value,/desire,%etc.%• Or%(more%commonly)%simple%weighted%polarity:%%• posi1ve,/nega1ve,/neutral,/together%with%strength/4. Text%containing%the%aftude%• Sentence%or%en+re%document%13%Dan%Jurafsky%Sen%ment(Analysis(• Simplest%task:%• Is%the%aftude%of%this%text%posi+ve%or%nega+ve?%• More%complex:%• Rank%the%aftude%of%this%text%from%1%to%5%• Advanced:%• Detect%the%target,%source,%or%complex%aftude%types%Dan%Jurafsky%Sen%ment(Analysis(• Simplest%task:%• Is%the%aftude%of%this%text%posi+ve%or%nega+ve?%• More%complex:%• Rank%the%aftude%of%this%text%from%1%to%5%• Advanced:%• Detect%the%target,%source,%or%complex%aftude%types%Sentiment Analysis What%is%Sen+ment%Analysis?%Sentiment Analysis A%Baseline%Algorithm%Dan%Jurafsky%Sentiment Classification in Movie Reviews • Polarity%detec+on:%• Is%an%IMDB%movie%review%posi+ve%or%nega+ve?%• Data:%Polarity/Data/2.0://• hXp://www.cs.cornell.edu/people/pabo/moviePreviewPdata%Bo%Pang,%Lillian%Lee,%and%Shivakumar%Vaithyanathan.%%2002.%%Thumbs%up?%Sen+ment%Classifica+on%using%Machine%Learning%Techniques.%EMNLPP2002,%79—86.%Bo%Pang%and%Lillian%Lee.%%2004.%%A%Sen+mental%Educa+on:%Sen+ment%Analysis%Using%Subjec+vity%Summariza+on%Based%on%Minimum%Cuts.%%ACL,%271P278%Dan%Jurafsky%IMDB(data(in(the(Pang(and(Lee(database(when%_star%wars_%came%out%some%twenty%years%ago%,%the%image%of%traveling%throughout%the%stars%has%become%a%commonplace%image%.%[…]%when%han%solo%goes%light%speed%,%the%stars%change%to%bright%lines%,%going%towards%the%viewer%in%lines%that%converge%at%an%invisible%point%.%%cool%.%%_october%sky_%offers%a%much%simpler%image–that%of%a%single%white%dot%,%traveling%horizontally%across%the%night%sky%.%%%[.%.%.%]%“%snake%eyes%”%is%the%most%aggrava+ng%kind%of%movie%:%the%kind%that%shows%so%much%poten+al%then%becomes%unbelievably%disappoin+ng%.%%it’s%not%just%because%this%is%a%brian%depalma%film%,%and%since%he’s%a%great%director%and%one%who’s%films%are%always%greeted%with%at%least%some%fanfare%.%%and%it’s%not%even%because%this%was%a%film%starring%nicolas%cage%and%since%he%gives%a%brauvara%performance%,%this%film%is%hardly%worth%his%talents%.%%✓% ✗%Dan%Jurafsky%Baseline(Algorithm((adapted(from(Pang(and(Lee)(• Tokeniza+on%• Feature%Extrac+on%• Classifica+on%using%different%classifiers%• Naïve%Bayes%• MaxEnt%• SVM%Dan%Jurafsky%Sen%ment(Tokeniza%on(Issues(• Deal%with%HTML%and%XML%markup%• TwiXer%markPup%(names,%hash%tags)%• Capitaliza+on%(preserve%for%%%%%%%%%%%%%%%%words%in%all%caps)%• Phone%numbers,%dates%• Emo+cons%• Useful%code:%• Christopher%PoXs%sen+ment%tokenizer%• Brendan%O’Connor%twiXer%tokenizer%21%[<>]? # optional hat/brow![:;=8] # eyes![\-o\*\']?
View Full Document