GithubHelp home page GithubHelp logo

sannketnikam / emotion-detection-in-text Goto Github PK

View Code? Open in Web Editor NEW
22.0 1.0 5.0 4.34 MB

This project employs emotion detection in textual data, specifically trained on Twitter data comprising tweets labeled with corresponding emotions. It seamlessly takes text inputs and provides the most fitting emotion assigned to it. This app has more than 400 visitors!

Home Page: https://emotion-detection-in-text.streamlit.app

Python 7.17% Jupyter Notebook 92.83%
count-vectorizer data-science emotion-detection lemmatization logistic-regression machine-learning model-deployment multinomialnb nlp nltk

emotion-detection-in-text's Introduction

Emotion Detection in Text using Natural Language Processing


Introduction

Emotion detection in text data involves identifying the emotions expressed in textual data. This can be a challenging task since emotions are often expressed in complex and subtle ways. Natural language processing (NLP) techniques can be used to analyze text data and identify the emotions expressed in it.

The aim of this project is to develop a model that uses NLP techniques to accurately detect emotions in text data. The model can be used for sentiment analysis, customer feedback analysis, and social media monitoring. The model is trained on a dataset of text data that has been labeled with the corresponding emotions expressed in it.

Dataset

The dataset used for this project contains text data labeled with one of eight emotions: anger, disgust, fear, joy, neutral, sadness, shame and surprise. The dataset contains a total of 34795 rows.

Methodology

  • The methodology used for this project involves the following steps:
  1. Preprocessing the text data: The text data is preprocessed by removing stop words, punctuation, user handles and converting all text to lowercase.
  2. Model training: A machine learning model is trained on the extracted features to predict the emotions expressed in the text data. The model used for this project is a Logistic Regression and MultinomialNB.
  3. Model evaluation: The trained model is evaluated on the test data to measure its accuracy in detecting emotions in text data.

Results

The Logistic Regression achieved an accuracy of 62% on the data.

Installation

  1. Clone the repository to your local machine:
git clone https://github.com/SannketNikam/Chatbot.git
  1. Install the 'requirements.txt':
pip install -r requirements.txt
  1. To run this project :
streamlit run app.py
  1. It'll automatically open the Streamlit app in your default browser.

emotion-detection-in-text's People

Contributors

sannketnikam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

emotion-detection-in-text's Issues

Hi, I'm learning machine learning sentiment analysis and your code is a great reference, but I'm running into some issues that I can't resolve

From the code it appears that train_loss and val_loss contain only a single sentiment category label, not the full loss value. This may be due to problems with data processing or saving.
train_acc and val_acc also contain only a single sentiment category label instead of the full accuracy value. This may also be due to problems with data processing or saving. How can these problems be solved, and how do I retrain the model to improve it so that I can draw specific loss curves and accuracy curves during model training? Thank you very much for your answer.

Translated with www.DeepL.com/Translator (free version)

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.