let s talk abo u t o u r feelings
play

Let ' s talk abo u t o u r feelings SE N TIME N T AN ALYSIS IN R - PowerPoint PPT Presentation

Let ' s talk abo u t o u r feelings SE N TIME N T AN ALYSIS IN R Ted K w artler Data D u de Definition : sentiment anal y sis Sentiment anal y sis is the process of e x tracting an a u thor s emotional intent from te x t SENTIMENT ANALYSIS


  1. Let ' s talk abo u t o u r feelings SE N TIME N T AN ALYSIS IN R Ted K w artler Data D u de

  2. Definition : sentiment anal y sis Sentiment anal y sis is the process of e x tracting an a u thor ’ s emotional intent from te x t SENTIMENT ANALYSIS IN R

  3. Wh y is sentiment anal y sis important ? SENTIMENT ANALYSIS IN R

  4. Data formats in this co u rse Bag of Words DTM & TDM Tid y Tribble ... errr ... Tibble SENTIMENT ANALYSIS IN R

  5. Chapter 1: qdap ' s polarit y() f u nction library(qdap) polarity(text$column) polarity(text$column, text$factor_or_author_grouping) SENTIMENT ANALYSIS IN R

  6. Chapter 2: tid y te x t inner joins library(tidytext) inner_join(sentiment_words, some_text_to_be_analyzed) SENTIMENT ANALYSIS IN R

  7. Chapter 3: Vis u ali z ing sentiment ggplot2 line chart html w idgets . org radar chart SENTIMENT ANALYSIS IN R

  8. Chapter 4: Case st u d y on propert y rentals SENTIMENT ANALYSIS IN R

  9. Let ' s practice ! SE N TIME N T AN ALYSIS IN R

  10. Ho w man y w ords do YOU kno w? S u bjecti v it y le x icons , Zipf ' s La w & Least Effort SE N TIME N T AN ALYSIS IN R Ted K w artler Data D u de

  11. S u bjecti v it y le x icon library(qdap) library(magrittr) text_df %$% polarity(text) Ret u rns a " polarit y" object w ith positi v e and negati v e scores . A s u bjecti v it y le x icon is a prede � ned list of w ords associated w ith emotional conte x t s u ch as positi v e / negati v e , or speci � c emotions like " fr u stration " or " jo y." SENTIMENT ANALYSIS IN R

  12. Where to get s u bjecti v it y le x icons ? qdap ' s polarity() f u nction u ses a le x icon from hash_sentiment_huliu tidytext has a sentiments tibble w ith NRC - Words according to 8 emotions like " angr y" or " jo y" and Pos / Neg Bing - Words labeled positi v e or negati v e AFINN - Words scored from -5 to 5 SENTIMENT ANALYSIS IN R

  13. librar y( le x icon ) Name Description dodds_sentiment Mechanical T u rk Sentiment Words hash_emoticons Translations of basic p u nct u ation emoticons :) hash_sentiment_huliu U of IL @ CHI Polarit y (+/-) w ord research hash_sentiment_jockers A le x icon inherited from library(syuzhet) hash_sentiment_nrc 5468 w ords cro w dso u rced scoring bet w een -1 & 1 SENTIMENT ANALYSIS IN R

  14. No w a y! Too fe w w ords . Zipf ' s La w Principle of Least E � ort SENTIMENT ANALYSIS IN R

  15. Zipf ' s La w in action 2010 Cens u s Act u al Zipf ' s Rank Cit y Pop u lation % E x pected % 1 Ne w York 8,175,133 100% ... 2 LA 3,792,621 46% 50% 3 Chicago 2,695,598 33% 33% 4 Ho u ston 2,100,263 26% 25% 5 Philadelphia 1,526,006 19% 20% SENTIMENT ANALYSIS IN R

  16. Principle of Least Effort If there are se v eral w a y s of achie v ing the same goal , people w ill choose the least demanding co u rse of action SENTIMENT ANALYSIS IN R

  17. Up ne x t ... SENTIMENT ANALYSIS IN R

  18. Let ' s practice ! SE N TIME N T AN ALYSIS IN R

  19. E x plore qdap ' s polarit y & b u ilt - in le x icon SE N TIME N T AN ALYSIS IN R Ted K w artler Data D u de

  20. polarit y() An e x ample s u bjecti v it y le x icon : Word Polarit y Ama z ing Positi v e Bad Negati v e Good Positi v e ... ... Wonderf u l Positi v e SENTIMENT ANALYSIS IN R

  21. Conte x t cl u ster E x ample conte x t cl u ster : The DataCamp sentiment co u rse is v er y GOOD for learning . SENTIMENT ANALYSIS IN R

  22. Conte x t cl u ster , contin u ed E x ample conte x t cl u ster : The DataCamp sentiment co u rse is v er y GOOD for learning . Term Class Word Co u nt Ver y Ampli � er 1 Good Polari z ed Term / Positi v e 1 All other w ords Ne u tral 7 SENTIMENT ANALYSIS IN R

  23. Conte x t cl u ster glossar y Polari z ed Term - w ords Valence Shi � ers - w ords associated w ith that e � ect the emotional positi v e / negati v e conte x t Ampli � ers - w ords that Ne u tral Term - no emotional increase emotional intent conte x t De - Ampli � ers - w ords Negator - w ords that in v ert that decrease emotional polari z ed meaning e . g . " not intent good " SENTIMENT ANALYSIS IN R

  24. Conte x t cl u ster scoring E x ample conte x t cl u ster : The DataCamp sentiment co u rse is v er y GOOD for learning . Word Polarit y Term Class Co u nt Val u e Ver y Ampli � er 1 0.8 Polari z ed Good 1 1 Term / Positi v e All other Ne u tral 7 0 w ords SENTIMENT ANALYSIS IN R

  25. Polarit y calc u lation E x ample Conte x t Cl u ster Word Polarit y Class The DataCamp sentiment Co u nt Val u e co u rse is v er y GOOD for Ampli � er 1 0.8 learning . Polari z ed 1. 1 + 0.8 = 1.8 1 1 Term 2. 1+1+7 = 9 1.8 Ne u tral 7 0 3. √9 S u m 9 1.8 Ans w er : 0.6 SENTIMENT ANALYSIS IN R

  26. Let ' s practice ! SE N TIME N T AN ALYSIS IN R

Recommend


More recommend