Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R...
Transcript of Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R...
![Page 1: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/1.jpg)
DataCamp SentimentAnalysisinR
Let'stalkaboutourfeelings
SENTIMENTANALYSISINR
TedKwartlerDataDude
![Page 2: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/2.jpg)
DataCamp SentimentAnalysisinR
Definition:SentimentAnalysis
Sentimentanalysisistheprocessofextractinganauthor’semotionalintentfromtext
![Page 3: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/3.jpg)
DataCamp SentimentAnalysisinR
Whyissentimentanalysisimportant?
![Page 4: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/4.jpg)
DataCamp SentimentAnalysisinR
DataFormatsinthisCourse
BagofWordsDTM&TDM
TidyTribble...errr..Tibble
![Page 5: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/5.jpg)
DataCamp SentimentAnalysisinR
Chapter1:qdap'sPolarityFunction>library(qdap)
>polarity(text$column)
>polarity(text$column,text$factor_or_author_grouping)
![Page 6: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/6.jpg)
DataCamp SentimentAnalysisinR
Chapter2:tidytextinnerjoins>library(tidytext)
>inner_join(sentiment_words,some_text_to_be_analyzed)
![Page 7: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/7.jpg)
DataCamp SentimentAnalysisinR
Chapter3:VisualizingSentiment
radarchart ggplot2linecharthtmlwidget.org
![Page 8: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/8.jpg)
DataCamp SentimentAnalysisinR
Chapter4:CaseStudyonPropertyRentals
![Page 9: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/9.jpg)
DataCamp SentimentAnalysisinR
Let'spractice!
SENTIMENTANALYSISINR
![Page 10: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/10.jpg)
DataCamp SentimentAnalysisinR
HowmanywordsdoYOUknow?Subjectivitylexicons,Zipf'sLaw&
LeastEffort
SENTIMENTANALYSISINR
TedKwartlerDataDude
![Page 11: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/11.jpg)
DataCamp SentimentAnalysisinR
SubjectivityLexicon
Returnsa"polarity"objectwithpositiveandnegativescores.
Asubjectivitylexiconisapredefinedlistofwordsassociatedwithemotionalcontextsuchaspositive/negative,orspecificemotionslike"frustration"or"joy"
>library(qdap)>library(magrittr)
>text_df%$%polarity(text)
![Page 12: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/12.jpg)
DataCamp SentimentAnalysisinR
Wheretogetsubjectivitylexicons?
qdap'spolarity()functionusesalexiconfromhash_sentiment_huliu
tidytexthasasentimentstibblewith
NRC-Wordsaccordingto8emotionslike"angry"or"joy"andPos/NegBing-WordslabeledpositiveornegativeAFINN-Wordsscoredfrom-5to5
![Page 13: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/13.jpg)
DataCamp SentimentAnalysisinR
library(lexicon)Name Description
dodds_sentiment MechanicalTurkSentimentWords
hash_emoticons Translationsofbasicpunctuationemoticons:)
hash_sentiment_huliu UofIL@CHIPolarity(+/-)wordresearch
hash_sentiment_jockers Alexiconinheritedfromlibrary(syuzhet)
hash_sentiment_nrc 5468wordscrowdsourcedscoringbetween-1&1
![Page 14: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/14.jpg)
DataCamp SentimentAnalysisinR
Noway!Toofewwords.Zipf'sLawPrincipleofLeastEffort
![Page 15: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/15.jpg)
DataCamp SentimentAnalysisinR
Zipf'sLawinActionRank City 2010CensusPopulation Actual% Zipf'sExpected%
1 NewYork 8,175,133 100% ...
2 LA 3,792,621 46% 50%
3 Chicago 2,695,598 33% 33%
4 Houston 2,100,263 26% 25%
5 Philadelphia 1,526,006 19% 20%
![Page 16: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/16.jpg)
DataCamp SentimentAnalysisinR
PrincipleofLeastEffort
Ifthereareseveralwaysofachievingthesamegoal,peoplewillchoosetheleastdemandingcourseofaction
![Page 17: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/17.jpg)
DataCamp SentimentAnalysisinR
UpNext...
![Page 18: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/18.jpg)
DataCamp SentimentAnalysisinR
Let'spractice!
SENTIMENTANALYSISINR
![Page 19: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/19.jpg)
DataCamp SentimentAnalysisinR
Exploreqdap'spolarity&built-inlexicon
SENTIMENTANALYSISINR
TedKwartlerDataDude
![Page 20: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/20.jpg)
DataCamp SentimentAnalysisinR
polarity()
Anexamplesubjectivitylexicon
Word Polarity
Amazing Positive
Bad Negative
Good Positive
... ...
Wonderful Positive
![Page 21: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/21.jpg)
DataCamp SentimentAnalysisinR
ContextCluster
ExampleContextClusterTheDataCampsentimentcourseisveryGOODforlearning.
![Page 22: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/22.jpg)
DataCamp SentimentAnalysisinR
ContextCluster,continued
ExampleContextClusterTheDataCampsentimentcourseisveryGOODforlearning.
Term Class WordCount
Very Amplifier 1
Good PolarizedTerm/Positive 1
Allotherwords Neutral 7
![Page 23: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/23.jpg)
DataCamp SentimentAnalysisinR
ContextClusterGlossaryPolarizedTerm-wordsassociatedwithpositive/negativeNeutralTerm-noemotionalcontextNegator-wordsthatinvertpolarizedmeaninge.g."notgood"
ValenceShifters-wordsthateffecttheemotionalcontext
Amplifiers-wordsthatincreaseemotionalintentDe-Amplifiers-wordsthatdecreaseemotionalintent
![Page 24: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/24.jpg)
DataCamp SentimentAnalysisinR
ContextClusterScoringTerm Class WordCount PolarityValue
Very Amplifier 1 0.8
Good PolarizedTerm/Positive 1 1
Allotherwords Neutral 7 0
ExampleContextClusterTheDataCampsentimentcourseisveryGOODforlearning.
![Page 25: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/25.jpg)
DataCamp SentimentAnalysisinR
PolarityCalculationClass Word
CountPolarityValue
Amplifier 1 0.8
PolarizedTerm/Positive
1 1
Neutral 7 0
Sum 9 1.8
ExampleContextClusterTheDataCampsentimentcourseisveryGOODforlearning.
1. 1+0.8=1.82. 1+1+7=93.
Answer:0.6
√91.8
![Page 26: Let's talk about our feelings - Amazon S3 · Let's talk about our feelings SENTIMENT ANALYSIS IN R Ted Kwartler Data Dude. DataCamp Sentiment Analysis in R Definition: Sentiment Analysis](https://reader036.fdocuments.in/reader036/viewer/2022062910/5b944a1509d3f2df3f8ca621/html5/thumbnails/26.jpg)
DataCamp SentimentAnalysisinR
Let'spractice!
SENTIMENTANALYSISINR