gnzeleven / Sentiment-Analysis-Naive-Bayes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sentiment Analysis using Naive Bayes

Heroku web app

Using Naive Bayes for sentiment analysis on tweets. Given a tweet, the objective is to predict whether it has a positive sentiment or a negative sentiment.

Dataset: nltk's twitter_samples

  • Train Naive Bayes model to analyse the sentiment of tweets
  • Test the model's performance
  • Predict on custom tweet

Install dependencies

Use the package manager pip to install all the dependencies.

pip install -r requirements.txt

Demo

Training and Testing

cd NaiveBayesSentiment
cd core/naivebayes

python naive_bayes_sentiment.py

Prediction

Click here

Deployment

Built With

  • Django - Python based web framework that does all the heavy lifting
  • Gunicorn - Python WSGI HTTP Server
  • Heroku - Cloud application platform

Screenshots

Positive Example

Negative Example

Test Accuracy

ROC Curve

License

MIT

About

License:MIT License


Languages

Language:CSS 34.6%Language:SCSS 28.7%Language:Less 28.3%Language:Python 6.4%Language:HTML 1.4%Language:JavaScript 0.6%