Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/srashti13/twitter-sentiment-analysis

Categorize tweets as a positive or negative
https://github.com/srashti13/twitter-sentiment-analysis

jupyter-notebook python python-3-6

Last synced: 1 day ago
JSON representation

Categorize tweets as a positive or negative

Awesome Lists containing this project

README

        

# Twitter-sentiment-Analysis

This project was built as a part of my NLP assignment in my "introduction to Big Data" coursework at George Mason University. The code categorizes incoming tweets as either a positive or negative emotion based on words used.
The project is built in jupyter notebook and utilizes Scikit-Learn & NLTK library to perform all the heavy lifting steps of feature extraction and preprocessing of tweets.

Steps include:
* Remove punctuation
* Stemming
* Lemmatizing
* Tokenization
* Feature extraction
* Modelling

The code is built in function form, different steps are performed by different functions. This increases the readability of the code and its easy to re-use different functions later with minimal efforts

The workflow then includes building classification models (such as Naive Bayes used here).

### Results:
I was able to **achieve 91.79% accuracy** on test set with minimal efforts (which in turn also beats the class average of 88%).

To utilize the functions just download the .ipynb file