Pages

Monday, March 23, 2015

Text Analytics Fun - Visualizing Sentiment Between General Conference Talks

I decided to have some more fun with the April 2014 General Conference talks. This time, I applied some basic text analytics and natural language processing techniques to estimate each talk's overall sentiment. In general, a talk with "positive sentiment" uses more optimistic type words and a talk with "negative sentiment" uses more pessimistic type words.

Below is a chart summarizing the sentiment differences for each talk, but only based on adjectives and adverbs a computer algorithm automatically identified for me. Adjectives and adverbs tend to be the types of words that convey sentiment. Surprisingly, Talk #17 -- Love—the Essence of the Gospel -- had the most negative sentiment! Go figure! Talk #16 -- Live True to the Faith -- had the most positive sentiment! (Cell phone users - click/tap image to expand and see fine text)



 [1] A Priceless Heritage of Hope
 [2] Are You Sleeping through the Restoration
 [3] Be Strong and of a Good Courage      
 [4] Bear Up Their Burdens with Ease  
 [5] Christ the Redeemer      
 [6] Daughters in the Covenant
 [7] Fear Not; I Am with Thee   
 [8] Following Up  
 [9] Grateful in Any Circumstances  
[10] I Have Given You an Example  
[11] If Ye Lack Wisdom
[12] If Ye Love Me, Keep My Commandments   
[13] Keeping Covenants Protects Us Prepares Us and Empowers Us
[14] Let's Not Take the Wrong Way 
[15] Let Your Faith Show 
[16] Live True to the Faith   
[17] Love—the Essence of the Gospel   
[18] Obedience through Our Faithfulness
[19] Protection from Pornography—a Christ-Focused Home 
[20] Roots and Branches  
[21] Sisterhood Oh How We Need Each Other  
[22] Spiritual Whirlwinds    
[23] The Choice Generation 
[24] The Cost—and Blessings—of Discipleship 
[25] The Joyful Burden of Discipleship
[26] The Keys and Authority of the Priesthood  
[27] The Priesthood Man 
[28] The Prophet Joseph Smith 
[29] The Resurrection of Jesus Christ 
[30] The Witness 
[31] Wanted Hands and Hearts to Hasten the Work
[32] What Are You Thinking
[33] What Manner of Men  
[34] Where Your Treasure Is 
[35] Your Four Minute


I also made a second chart showing sentiment differences, but this time it was based on all words which the sentiment lexicon/dictionary could identify and was not limited to just adjectives and adverbs. With this method, Talk #5 -- Christ the Redeemer -- ended up having the most negative sentiment! Talk #13 -- Keeping Covenants Protects Us Prepares Us and Empowers Us -- had the most positive sentiment.  



Overall, this was a fun exercise to see how general conference talks vary sentiment-wise. The methodologies and computer algorithms utilized for this analysis are by no means perfect, but they are surprisingly useful to get additional insight and extract information from text.

***

Summary of methodology:

·         R was used for all analysis/visualization. Libraries tm, NLP, openNLP, proxy, RWeka, openNLPmodels.en, and stringr used.
·         Each conference talk was copy and pasted into its own text file to make a corpus of documents.
·         Harvard's Inquirer Lexicon/Dictionary was used to estimate sentiment, but with some modifications by myself. This dictionary can be accessed at these links: http://www.wjh.harvard.edu/~inquirer/homecat.htm  (general page) or directly at http://www.wjh.harvard.edu/~inquirer/spreadsheet_guide.htm
·         Sentiment was estimated for each talk individually by taking the total number of positive sentiment words and dividing it by the total number of all sentiment words (positive + negative) the Lexicon could identify.

  • The mean sentiment for the group of 35 talks was 72%. I.e. on average, of all the sentiment type words identified, 72% of them were positive in the talks.    

No comments:

Post a Comment