Skip to content

A simple console application that fetches and analyzes the sentiment of tweets

License

Notifications You must be signed in to change notification settings

uditarora/twitter-sentiment-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twitter-sentiment-analysis

A simple console application that fetches and analyzes the sentiment of tweets

Usage

These instructions assume that Python3 is set as the default python in your environment.

To fetch tweets from the Twitter API, you'll need to update the app key, secret and token in twitterclient.py

  • To use the pretrained model with a default query of "#RoyalWedding":
$ python main.py
  • To use the pretrained model with your own custom tweets, place the tweets in a text file (see tweets.txt for an example) and run:
$ python main.py --tweets <path_to_text_file>
  • To force the model to retrain:
$ python main.py --train
  • To see the evaluation metrics while training:
$ python main.py --train --eval
  • To use the twitter API to fetch tweets for a given query:
$ python main.py --query "query"

About

A simple console application that fetches and analyzes the sentiment of tweets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages