Skip to content

Text Emotion System Sentiment Analysis (TESSA) is an open-source project focused on sentiment analysis. πŸ’¬

License

Notifications You must be signed in to change notification settings

GeorgiosIoannouCoder/tessa

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn GitHub

TESSA | Text Emotion System Sentiment Analysis


Logo

TESSA

TESSA is a Text Sentiment Analysis project with main purpose to predict the Emotion conveyed from a text document. This project explores machine learning models for text emotion detection and classification. We aim to develop an efficient model for identifying emotions in text data, employing natural language processing. The models trained on labeled Twitter(X) datasets find applications in customer service, social media monitoring, marketing analysis, and various other uses. We mainly hope to utilize this emotion detection as a marketing tool to analyze customer perceptions gathered from reviews, tweets, and customer service interactions. This approach will help clients understand their sentiments within their customer base, enabling targeted strategies aligned with their experiences and expectations. We examine and create eight models to determine the most effective approach for emotion detection. We successfully developed our business tool, with the Bidirectional LSTM emerging as the top-performing model with an accuracy of 92.88%.
Explore the docs Β»

View Web Application Β· Report Bug Β· Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Code
  5. Report
  6. Contributing
  7. License
  8. Contact

About The Project

Logo

Application Graphical User Interface

Logo

Back to top

Tasks

Tasks
Create Github Repository
Brainstorm Project
Find Dataset
EDA
Data Preprocessing
Data Modeling: Random forest, Decision Tree
Data Modeling: Logistic Regression , SVM
Data Modeling: BiLSTM, CNN, CNN+LSTM, MNB
Model Evaluation
Streamlit Application

Back to top

Dataset

Emotions Dataset For NLP

  • 2 Columns:
    • Content
    • Sentiment
  • 20,000 rows

Back to top

Models Built (Click on the model that you are interested)

  1. Bidirectional LSTM (BiLSTM)
  2. Convolutional Neural Network (CNN)
  3. CNN + LSTM
  4. Multinomial Naive Bayes (MNB)
  5. Decision Tree
  6. Random Forest
  7. Logistic Regression
  8. Support Vector Machine (SVM)

Back to top

Models Performance

Models Performance

Back to top

Built With

Python Pandas Numpy scikitlearn Nltk Tensorflow Streamlit Matplotlib Seaborn Plotly Kaggle

Back to top

Getting Started

To get a local copy of TESSA up and running locally follow these simple example steps:

Prerequisites

NOTE: How to check if Python is installed and what is its version

  python --version

NOTE: How to check if Git is installed and what is its version

  git -v
  1. Please make sure you have pyenv installed and use Python3 version 3.11.0:

  2. Please make sure you have git installed

  3. Please look at the setup folder found in this project to find the directions specific to your operating system. The general instructions can also be found below.

Setup

  1. Navigate to the directory where you want to clone/run/save the application:

    cd your_selected_directory
  2. Clone this repository:

    git clone https://github.com/GeorgiosIoannouCoder/tessa.git
  3. Navigate to the realesrgan git repository:

    cd tessa
  4. Use Python3 3.11.0 version in the cloned repository folder:

    pyenv local 3.11.0
  5. Create virtual environment in the cloned repository folder:

    python -m venv .tessa-venv
  6. Activate the virtual environment (Windows OR Mac/Linux):

    1. Windows
    .\.tessa-venv\Scripts\activate
    1. Mac/Linux
    source .tessa-venv/bin/activate
  7. Install the dependencies listed in the requirements.txt file:

    pip install -r requirements.txt
  8. Run Streamlit:

    streamlit run app.py
  9. To Run The Notebooks (3 Options):

    1. Use Kaggle
    2. Use Jupyter Notebboks Extension for VS Code
    3. Use Anaconda
      1. Download and install Anaconda
      2. Launch a jupyter notebook:
        1. MacOS users, open up terminal and type in jupyter notebook
        2. Window users, open up your Anaconda Power Shell, and type in jupyter notebook

Back to top

Code

The full project code with all the Plotly interactive graphs can be found here.

Back to top

Report

Project Final Report is located here.

Back to top

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Back to top

License

Distributed under the MIT License. See LICENSE for more information.

MIT License

Copyright (c) 2023 Georgios Ioannou

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Back to top

Contact

Georgios Ioannou - @LinkedIn

Project Link: https://github.com/GeorgiosIoannouCoder/tessa

Back to top