Giter Site home page Giter Site logo

bigdataanalysis_tweetsentiment's Introduction

#Project of Sentiment Analysis for the course of Big Data Analysis of the Department of Computer Engineering of Modena and Reggio Emilia.#

##Library used in the project##

To install additional modules and datasource (Wordnet and other modules are required) launch the following command on a python shell:

import nltk
nltk.download()

Download the followings modules:

  • Stopword
  • Wordnet
  • Wordnet_ic
  • All the modules in models

##Project usage##

###Tweet###

The script named ExtractTweet.py can be used to download tweets in a csv file. This script is configurable by this file: config.json

The configurable fields are:

  • consumer_key
  • consumer_secret
  • access_token
  • access_token_secret

These fields can be retrieved from https://dev.twitter.com after creating an account and an application

  • file_name (name of the cvs output file)
  • count (number of tweet to download)
  • filter (a word used to filter the tweet in output)

The CSV file produced in output can be used as arg of the other three script:

  • DeriveTweetSentimentEasy.py: This script uses AFINN-111.txt as vocabulary to try to assign a sentiment score to a tweet.
  • NewTermSentimentInference.py: This script try to assign a sentiment score to the words that are not present in AFINN-111.txt based on the sentiment score of a group of tweets.
  • SentiWordnet.py: This script uses SentiWordNet as vocabulary to try to assign a sentiment score to a tweet. The metrics of the scoring and the annotation process are more complex in this script.

###Document Sentiment Classification###

The script is called DocumentSentimentClassification.py and implements a simple method for document sentiment classification. it possible to set some configuration parameters in the top of Python script:

ipython

For an interactive example with ipython, go into the folder BDA_Senti_ipython and launch the command:

$ ipython notebook --pylab inline

###Slides###

bigdataanalysis_tweetsentiment's People

Contributors

linktdp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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