Hallelujah – Sentiment Analysis of the New Testament

Hallelujah – Sentiment Analysis of the New Testament

God be praised for from His mouth proceeds knowledge and understanding (Proverbs 2:6)

When i was working at Crowdstar i met lots of neat and intelligent people, one guy Ian got me started on R with a perhaps 15 minute overview and i thought a lot of concepts were kind of neat (thanks Ian! and may all thanks be to God!) I finally sat down to try to work at it thinking i wanted to try out some basic twitter sentiment analysis on the Bible. The idea is that, using the ESV2011 version which is available free for personal use in various packages, i output the content with libswords diatheke program with some text formatting manipulations in the shell (bash/zsh). For each ‘line’ i then used ruby-stemmer to steam each word, and grabbed a copy of SentiWordNet (praise God for this!) and also stemmed every word, and created an output file with each line containing only the stemmed words that had some kind of Sentiment data for it. Then again using ruby, a json was created with an array for each line, with all the matching Senti words and scores for each word in the line, the mean of the positive and (hardness) and objectivity (1-(pos+hard)) of all the matching Senti words for each word, and a summation of all the means for the sentence. It is a little less exact for very many words have many meanings and can be verbs or nouns or adjectives at different times, i have not created a dataset to identify the most specific Senti words at this point.

I am thankful to God for part of a course i took on Coursera on Machine learning many years ago  which helped me understand some of the basics like stemming. Using R we can quickly analyze the data using jsonlite to create dataframe representations of the data. At this point i am of course a beginner at R, and the json data is not normalized so it is rather large. I want to post what i think are a neat list of the new testaments 40 most positive verses, which i want to dedicate (glory to God) to my dearly beloved Hannah who has gone through a very hard time and could use prayers and hopefully this is encouraging too, and also 40 ‘hardest’ verses in the new testament according to the above simple Sentiment Analysis technique. In the ‘hardest’ verses i removed the negation verses (verses containing Not) as i have not handled negation logic for sentiments yet. I will do so in the future. I also hope to compare analysis of the Bible old testament vs new testament, different books in the Bible, and to other popular works and preachers hoping to not draw too quickly conclusions from it.

God guide us and bless you in Jesus name



  1. Pingback: Hallelujah! Most positive New Testament verses from sentiment analysis v1 – Love Jesus

  2. Pingback: Hallelujah, 40 hardest verses in the Bible according to Sentiment Analisis v.1 – Love Jesus

🕆 Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.