Skip to main content

Multilingual Emotion Classification

Project description

Text Emotion

Introduction

Supported Languages

The following languages are supported by the finetuned xlm-roberta model:

  • English
  • French
  • Spanish
  • German
  • Italian

All other languages are translated to English using the EasyNMT library. If the language is not supported by EasyNMT, then it is not supported.

Installation

You can install emotion using:

$ pip install text-emotion

Usage

from text_emotion import Detector

detector = Detector(emotion_language="fr")

print(detector.detect("Hello, I am so happy!"))

XLM-Roberta

The underlying model is xlm-roberta-large. You can test it at:

https://huggingface.co/ma2za/xlm-roberta-emotion

References

Unsupervised Cross-lingual Representation Learning at Scale (Conneau et al., ACL 2020)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

text_emotion-0.0.3.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

text_emotion-0.0.3-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page