Skip to content

Twitter sentiment analyzer that uses Naïve-Bayesian machine learning and n-gram tokenization

License

Notifications You must be signed in to change notification settings

jnguyen1098/plumage

Repository files navigation

Plumage

This app performs a sentiment analysis on Twitter posts on a given keyword topic.

This was a research project I did over the summer—you can read the journal here.

You should probably install the dependencies (python -m pip install -r requirements.txt)

You need a file in dev/ called tokeninfo containing four lines:

  • Consumer key
  • Consumer secret
  • Access token
  • Access secret

After this, you can run a demo using the makefile by executing make demo.

Edit your parameters (including search query) accordingly in the makefile.

This project consists of four modules:

  • extract.py — extracts raw Tweets into

  • preprocess.py — cleans up the Tweets and prunes any non-promising posts (i.e. too "objective" for analysis)

  • mine.py — classifies the Tweets and atomizes them into n-gram aspects for analysis

  • analyze.py — takes the data from mine.py and creates a report determining the sentiments from aspects

plumage.py is just a demo driver that runs these four modules in sequence. To get a more configurable experience, run the other scripts separately and tweak to your desire.

About

Twitter sentiment analyzer that uses Naïve-Bayesian machine learning and n-gram tokenization

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published