Giter VIP home page Giter VIP logo

prespol's Introduction

//Install the pdfminer utility to convert to machine-readable format
pip install pdfminer

//Use pdf2txt.py tool on each .pdf document
pdf2txt.py -o DEM2012.html 2012-National-Platform.pdf
pdf2txt.py -o GOP2012.html 2012GOPPlatform.pdf

//Search each .html document for keywords
grep -inr 'internet' GOP2012.html > internet-gop.txt
grep -inr 'internet' DEM2012.html > internet-dem.txt
grep -inr 'intellectual' GOP2012.html > ip-gop.txt
grep -inr 'intellectual' DEM2012.html > ip-dem.txt
grep -inr 'digital' DEM2012.html > digital-dem.txt
grep -inr 'digital' GOP2012.html > digital-gop.txt
grep -inr 'multi' DEM2012.html > multi-dem.txt
grep -inr 'multi' GOP2012.html > multi-gop.txt

//Count number of results in Democratic Platform (excluding 'multi')
wc -l *-dem.txt
    >>>  11 cyber-dem.txt
    >>>   2 digital-dem.txt
    >>>  10 internet-dem.txt
    >>>   6 ip-dem.txt
    >>>  29 total

//Count number of results in Republican Platform (excluding 'multi')
wc -l *-gop.txt
    >>>  20 cyber-gop.txt
    >>>   0 digital-gop.txt
    >>>  17 internet-gop.txt
    >>>   5 ip-gop.txt
    >>>  42 total

prespol's People

Contributors

decause avatar

Stargazers

Angus H. avatar Luke Macken avatar

Watchers

 avatar James Cloos 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.