Coder Social home page Coder Social logo

adit-negi / twitter-sentiment-training Goto Github PK

View Code? Open in Web Editor NEW

This project forked from karanluthra/twitter-sentiment-training

0.0 1.0 0.0 182 KB

Training set of 5513 hand-classified tweets for sentiment classifiers

License: MIT License

Python 100.00%

twitter-sentiment-training's Introduction

twitter-sentiment-training

Training set of 5513 hand-classified tweets for sentiment classifiers


This is an upgrade to the original script by Niek J. Sanders available [here] (http://www.sananalytics.com/lab/twitter-sentiment/). Twitter's [REST API v1.1] (https://dev.twitter.com/docs/api/1.1) has made it mandatory for all requests to be authenticated using oauth and hence the script required to incorporate the authentication capability.

Consequently, you must get an access token, access key, consumer token, consumer key by registering your application with twitter, in order to make such authenticated requests. Refer to this guide for getting these tokens, and provide them as global variables in the install.py script.

It is advised to go through the original Readme file given here for a better understanding of the project and the install script in particular.

Installation

Because of restrictions in Twitter’s Terms of Service, the actual tweets can not be distributed with the sentiment corpus. A small Python script is included to download all of the tweets. Due to limitations in Twitter’s API, the download process takes about 43 hours.

Just four easy steps:

  1. Set your access key and secret, consumer key and secret to the global variables declared at the beginning of install.py
  2. Start the tweet downloader script: python install.py
  3. Hit enter three times to accept the defaults.
  4. Wait till the script indicates that it’s done.

Note: the script is smart enough to resume where it left off if downloading is interrupted. The completed corpus will be in full-corpus.csv. A copy of all the raw data downloaded from Twitter is kept in rawdata/.


Credits

The original work by Niek J. Sanders is a Twitter Sentiment Classifier which can be found [here] (http://www.sananalytics.com/lab/twitter-sentiment/). My work is just a little modification to the code written in 2011 to comply with the latest Twitter API v1.1 requirements.

Support

You may write to me for any help, I'll try and help you to the best of my capability.

Karan Luthra [email protected]

twitter-sentiment-training's People

Contributors

karanluthra avatar jailuthra avatar

Watchers

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.