Metadata-Version: 2.1
Name: text-emotion
Version: 0.0.3
Summary: Multilingual Emotion Classification
Home-page: https://github.com/ma2za/text-emotion
License: MIT
Keywords: text-emotion,xlm-roberta,text-classification,multilingual
Author: ma2za
Author-email: mazzapaolo2019@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Provides-Extra: translate
Requires-Dist: easynmt (>=2.0.2,<3.0.0) ; extra == "translate"
Requires-Dist: fasttext (>=0.9.2,<0.10.0) ; extra == "translate"
Requires-Dist: requests (>=2.31.0,<3.0.0) ; extra == "translate"
Requires-Dist: torch (>=2.0.1,<3.0.0)
Requires-Dist: transformers (>=4.30.1,<5.0.0)
Project-URL: Repository, https://github.com/ma2za/text-emotion
Description-Content-Type: text/markdown

# 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

```python
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](https://aclanthology.org/2020.acl-main.747) (Conneau et
al., ACL 2020)
