Multilingual Emotion classification using BERT (fine-tuning). Published at the WASSA workshop (ACL2022).

Overview

XLM-EMO: Multilingual Emotion Prediction in Social Media Text

Abstract

Detecting emotion in text allows social and computational scientists to study how people behave and react to online events. However, developing these tools for different languages requires data that is not always available. This paper collects the available emotion detection datasets across 19 languages. We train a multilingual emotion prediction model for social media data, XLM-EMO. The model shows competitive performance in a zero-shot setting, suggesting it is helpful in the context of low-resource languages. We release our model to the community so that interested researchers can directly use it.

See the paper for additional details:

Bianchi, F., Nozza, D., & Hovy, D. "XLM-EMO: Multilingual Emotion Prediction in Social Media Text". In Proceedings of the 12th Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis (Forthcoming). Association for Computational Linguistics, 2022. Link.

License

Code comes from HuggingFace and thus our License is an MIT license.

For models restrictions may apply on the data (which are derived from existing datasets) or Twitter (main data source). We refer users to the original licenses accompanying each dataset and Twitter regulations.

Installing

pip install -U xlm-emo

Important: If you want to use CUDA you need to install the correct version of the CUDA systems that matches your distribution, see PyTorch.

Features

from xlm_emo.classifier import  EmotionClassifier
ec = EmotionClassifier()

ec.predict(["senti testa di cazzo", "I am very happy"])

>> ["anger", "joy"]

Models

Model Link Macro F1 on Test Set
XLM-EMO-T https://huggingface.co/MilaNLProc/xlm-emo-t 0.85
XLM-EMO-B TBD TBD
XLM-EMO-L TBD TBD

Reference

If you use this tool please cite the following paper:

@inproceedings{bianchi-etal-2022-xlmemo,
title = {{XLM-EMO}: Multilingual Emotion Prediction in Social Media Text},
author = "Bianchi, Federico and Nozza, Debora and Hovy, Dirk",
booktitle = "Proceedings of the 12th Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis",
year = "2022",
publisher = "Association for Computational Linguistics"
}

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

You might also like...

Example codebase for fine-tuning layoutLMv3 on DocVQA

Fine-tuning LayoutLMv3 on DocVQA We try to reproduce the experiments for fine-tuning LayoutLMv3 on DocVQA using both extractive and abstractive approa

Sep 16, 2022

This repository contains the code used for distillation and fine-tuning of compact biomedical transformers that have been introduced in the paper "On The Effectiveness of Compact Biomedical Transformers"

Compact Biomedical Transformers This repository contains the code used for distillation and fine-tuning of compact biomedical transformers that have b

Sep 10, 2022

PyTorch – SMART: Robust and Efficient Fine-Tuning for Pre-trained Natural Language Models.

PyTorch – SMART: Robust and Efficient Fine-Tuning for Pre-trained Natural Language Models.

SMART - PyTorch A PyTorch implementation of SMART, a regularization technique to fine-tune pretrained (language) models. You might also be interested

Sep 7, 2022

Scripts, data, and results from the "Through time with BERT" project, which evaluated and examined the extent to which English tenses are represented in BERT's raw sentence embeddings.

Scripts, data, and results from the

Through time with BERT: Representation of Temporal Information in Raw Sentence Embeddings This repository contains the scripts, data, and results of a

Mar 16, 2022

Code for 'Dynamic MLP for Fine-Grained Image Classification by Leveraging Geographical and Temporal Information'

Dynamic MLP, which is parameterized by the learned embeddings of variable locations and dates to help fine-grained image classification.

Sep 13, 2022

Emotion based music player using Python.

Emotion based music player using Python.

EMO_Music_Player emotion-based-music-player This is a project using machine learning for detecting emotions based on the expression of the users. The

May 11, 2022

A video rental application with a published API endpoint for consumption created using the Django-tastypie framework

A video rental application with a published API endpoint for consumption created using the Django-tastypie framework. The API returns list of movies available, number in stock, release year along with its daily rental rate.

Jul 10, 2022

A program implementing the JPEG format in Python, using the most advanced compression techniques published and no library.

JPEG-Python-no-library A program implementing the JPEG format in Python. It follows the latest standards of the format, uses the most advanced DCT alg

Sep 8, 2022

During this introductory workshop, you will learn how to deploy an ML model using Streamlit

During this introductory workshop, you will learn how to deploy an ML model using Streamlit. Streamlit is a user-friendly way to add interactivity and engagement to any ML project. By the end of the session, you will know how to show off your models and insights with this helpful tool. Having some familiarity with python and how to run code in the terminal will be useful for this session.

Feb 22, 2022
Owner
MilaNLP
MilaNLP
Automatic Literacy and Speech Assessment using a fine-tuned Distil Bert model, Wave2Vec 2.0 and Word2Vec

Automatic Literacy and Speech Assesment Fine-Tuned Distil Bert- Automatically determining how difficult something is to read is a difficult task as un

null 2 Sep 7, 2022
Official implementation for Open-set Face Identification on Few-shot Gallery by Fine-Tuning

OSFI-by-FineTuning Official implementation for Open-set Face Identification on Few-shot Gallery by Fine-Tuning Requirements Pytorch 1.7.1 Torchvision

HojinPark 5 Aug 19, 2022
Ensemble Knowledge Guided Sub-network Search and Fine-tuning for Filter Pruning

Ensemble Knowledge Guided Sub-network Search and Fine-tuning for Filter Pruning This repository is official Tensorflow implementation of paper: Ensemb

Seunghyun Lee 10 Aug 16, 2022
1.4B latent diffusion model fine tuning

GLID-3-XL GLID-3-xl is the 1.4B latent diffusion model back-ported to the guided diffusion codebase the text encoder, first stage vae and the diffusio

Jack Qiao 215 Sep 22, 2022
A distributed computing infrastructure for simulations, model training & fine-tuning.

Deep Learning Research Lab This library implements a distributed computing infrastructure for simulations, model training & fine-tuning. It allowed th

Nadav Timor 1 Apr 30, 2022
Code for T-Few from "Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learning"

T-Few This repository contains the official code for the paper: "Few-Shot Parameter-Efficient Fine-Tuning Outperforms In-Context Learning". This metho

null 176 Sep 27, 2022
Quaterion is a framework for fine-tuning similarity learning models.

Blazing fast framework for fine-tuning Similarity Learning models A dwarf on a giant's shoulders sees farther of the two Quaterion is a framework for

qdrant 354 Sep 20, 2022
Fine-tuning 6-Billion GPT-J (& other models) with LoRA and 8-bit compression

Fine-tuning 6-Billion GPT-J (& other models) in colab with LoRA and 8-bit compression This notebook is a simple example for fine-tuning GPT-J-6B with

Gustave Cortal 4 Aug 23, 2022
This script loads desired stock price training data, trains an XGBoost Regressor for Time Series Forecasting (allowing fine-tuning) and downloads the model to be used for prediction tasks

This script loads desired stock price training data, trains an XGBoost Regressor for Time Series Forecasting (allowing fine-tuning) and downloads the model to be used for prediction tasks. Specifically, it attempts to predict the following day's adjusted close price based on former days' adjusted close prices.

Lluís Salvat Niell 2 Jul 7, 2022
Python code for fine-tuning AlphaFold to perform protein-peptide binding predictions

alphafold_finetune Python code for fine-tuning AlphaFold to perform protein-peptide binding predictions. This repository is a collaborative effort: Ju

Philip Bradley 37 Sep 18, 2022