Coder Social home page Coder Social logo

ihabbendidi / sentiment_embeddings Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 2.0 55.29 MB

A scientific benchmark and comparison of the performance of sentiment analysis models in NLP on small to medium datasets

License: MIT License

Jupyter Notebook 100.00%
sentiment-analysis sentiment-embeddings benchmark pytorch keras bert nlp lstm python notebook

sentiment_embeddings's Introduction

Sentiment Analysis Benchmark

A scientific benchmark and comparison of the performance of sentiment analysis models in NLP on small to medium datasets

Open In Colab GitHub license

Authors : Ihab Bendidi, Yousra Bourkiche, Clément Siegrist, Kaouter Berrahal

In general, documents with similar sentiments, would be close to each other in the embeddings feature space. This can become another method to judge the performance of sentiment analysis models.

In this work, we aim to perform a benchmark of recent sentiment analysis works and models, reproduce their results, and judge their performance in comparison to baseline methods.

Outline

The following work in made on a jupyter notebook, that you can find here, or open in Colab here.

I - Processing & Exploratory Data Analysis

  • Understanding the data
  • Text Preprocessing

II - Sentiment classification models

  • Bert Model
  • LSTM recurrent model
  • Baseline method : textblob

III - Document Embeddings

  • Training doc2vec
  • Doc2vec sentiment classifier

IV - Model performance visualisation

  • Bert model
  • LSTM model
  • Logreg model
  • Textblob

You can also find .pdfreport with code here.

Installation

This was tested on Ubuntu 20.04 with Python 3.7, but should run on any device and any python 3 version.

Before running it, make sure to install dependencies, by running in terminal :

pip install -r requirements.txt

On Google colab, you would need to import the requirements.txt file, and the tweets.csv dataset to your colab session.

sentiment_embeddings's People

Contributors

clementsiegrist avatar ihabbendidi avatar

Stargazers

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

Watchers

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