Coder Social home page Coder Social logo

kanchitank / text-emotion-analysis Goto Github PK

View Code? Open in Web Editor NEW
53.0 1.0 19.0 10.77 MB

Automate detection of different emotions from paragraphs and predict overall emotion.

License: MIT License

Jupyter Notebook 99.93% Python 0.07%
nlp machine-learning deep-neural-networks deep-learning sentiment-analysis keras emotion-analysis emotion-recognition emotion-detection multiclass-classification text-emotion-detection

text-emotion-analysis's Introduction

Multi-Class Text Emotion Analysis

Text-Emotion-Analysis is a project to develop rule-based and deep learning algorithms with an aim to first appropriately detect the different types of emotions contained in a collection of English sentences or a large paragraph and then accurately predict the overall emotion of the paragraph.

I have two training and validation dataset:

  1. emotion_data.csv in which basic pre-processing of tweets in done (no lemmatization, no removal of stopwords).
    This dataset is comprised of 55,774 tweets from Twitter with labelled emotions of five classes: Neutral, Happy, Sad, Love, Anger.

  2. emotion_data_prep.csv in which more deep pre-processing of tweets in done (lemmatization, removal of stopwords, etc).
    This dataset is comprised of 62,015 tweets from Twitter with labelled emotions of five classes: Neutral, Happy, Sad, Love, Anger.

Comparison of DL and ML models:

DL:

  1. The DLModel using emotion_data.csv gave me 64.80% accuracy.

Confusion Matrix:

  1. The DLModel-Prep using emotion_data_prep.csv gave me 63.47% accuracy.

Confusion Matrix (Prep):

ML:

The ML Algorithms used for prediction are listed as follows:

Building models using different classifiers (Count vectorizer):

Model 1: Multinomial Naive Bayes Classifier - Accuracy 58.46%
Model 2: Linear SVM - Accuracy 62.00%
Model 3: Logistic Regression - Accuracy 62.47%

Building models using different classifiers (TF-IDF vectorizer):

Model 1: Multinomial Naive Bayes Classifier - Accuracy 38.37%
Model 2: Linear SVM - Accuracy 38.49%
Model 3: Logistic Regression - Accuracy 40.13%

Prediction of emotions from paragraphs and sentences (DL Model):

text-emotion-analysis's People

Contributors

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

Watchers

 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.