Coder Social home page Coder Social logo

curioustauseef / tweet-sentiment-scores Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mmmayo13/tweet-sentiment-scores

0.0 2.0 0.0 144 KB

Scripts for capturing tweets, creating data dictionary, processing & scoring tweet sentiments

License: MIT License

Python 100.00%

tweet-sentiment-scores's Introduction

Tweet Sentiment Analysis

Introduction

Scripts for capturing tweets, creating sentiment dictionary, processing & scoring tweet sentiments, written in Python. These scripts were written to facilitate the clustering of tweet length & sentiment scores in this research paper.

Twitter app authentication credentials are required for use of get_tweets.py. Acquire these here.

Inspiration for some of this material comes from Bill Howe and his Coursera course, Introduction to Data Science.

Description

get_tweets.py

  • Captures tweets from Twitter stream
  • Requires keys and secrets in order to successfully run

build_dict.py

  • Takes existing sentiment dictionary as list of seed words
  • Builds new dictionary of unscored tweet words based on tweet mean score of scored existing words

process_tweets.py

  • Scores the tweets word-by-word based on crafted sentiment dictionary created with build_dict.py

extract_text.py

  • Extracts the tweet text from the tweet JSON document, optionally saves to file

Usage

The research paper cited above provides detailed explanation and use case examples for utilizing these scripts.

Requirements

Python (tested with 2.7.7)

Installation

No installation; just download and run scripts

# get_tweets.py
python get_tweets.py > <capture_filename>

# build_dict.py
python build_dict.py <sentiment_file> <tweet_file> > <newsent_filename>

# process_tweets.py
python process_tweets.py <sentiment_file> <tweet_file>

# extract_text.py
python extract_tweets.py <tweet_file> > <output_file>

Getting Help

The code is fairly simple and should be easy to follow.

If you require an introduction to sentiment analysis, check here.

Author

Matt Mayo

License

This software is made available under the MIT License

tweet-sentiment-scores's People

Contributors

mmmayo13 avatar

Watchers

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