GithubHelp home page GithubHelp logo

davidgoliath's Introduction

Analyzed the story about David vs Goliath

  • Obtained the biblical verses about David and Goliath using getPassage.py (1 Sam 17)
Usage:          Get passage from biblegateway.com
         Usage: getPassage.py [options] 
         e.g: 
         ./getPassage.py -v 'ESV' -s 'John 3' > john3_ESV.txt
         

Options:
  -h, --help            show this help message and exit
  -v VERSION, --version=VERSION
                        Bible version
  -s SCRIPTURE, --scripture=SCRIPTURE
                        Bible scripture
# Biblical verses from ESV, KJV, and NIV.
./getPassage.py -v 'ESV' -s '1 Sam 17' > data/DavidGoliath_ESV.txt
./getPassage.py -v 'KJV' -s '1 Sam 17' > data/DavidGoliath_KJV.txt
./getPassage.py -v 'NIV' -s '1 Sam 17' > data/DavidGoliath_NIV.txt
  • Obtained the summary
    • Summary based on the verses not sentences.
# Use meanAverageScore and ESV bible verses.
./getSummary.py data/DavidGoliath_ESV.txt > data/DavidGoliath_summaryESV.txt
  • Sentiment analysis
    • Sentiment analysis per verse
./getSentiment.py data/DavidGoliath_ESV.txt [APIkey] > data/DavidGoliath_sentimentAnalysis_ESV.txt
./getSentiment.py data/DavidGoliath_NIV.txt [APIkey] > data/DavidGoliath_sentimentAnalysis_NIV.txt
./getSentiment.py data/DavidGoliath_KJV.txt [APIkey] > data/DavidGoliath_sentimentAnalysis_KJV.txt
  • Processed sentiment analysis
# Incorporated negative into minus probability and the opposite as well.
# Parsed only no or biblical verses and their probability values. 
awk -F 't' 'BEGIN { OFS="t" } {if($3=="negative") print $1"\t""-"$4; else print $1"\t"$4}' DavidGoliath_sentimentAnalysis_ESV.txt > ESV_sentimentAnalysis.txt
awk -F 't' 'BEGIN { OFS="t" } {if($3=="negative") print $1"\t""-"$4; else print $1"\t"$4}' DavidGoliath_sentimentAnalysis_KJV.txt > KJV_sentimentAnalysis.txt
awk -F 't' 'BEGIN { OFS="t" } {if($3=="negative") print $1"\t""-"$4; else print $1"\t"$4}' DavidGoliath_sentimentAnalysis_NIV.txt > NIV_sentimentAnalysis.txt

  • Compute the wordFreq based on tags
# adverb
./getWordFreq4Tag.py -t 'data/DavidGoliath_ESV.txt' -l 'RB' > data/adverb_ESV.txt
# verb
./getWordFreq4Tag.py -t 'data/DavidGoliath_ESV.txt' -l 'V' > data/verb_ESV.txt

davidgoliath's People

Contributors

rlim19 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.