FEA-Bench / testbed /embeddings-benchmark__mteb /mteb /tasks /Classification /eng /EmotionClassification.py
| from __future__ import annotations | |
| from mteb.abstasks.TaskMetadata import TaskMetadata | |
| from ....abstasks import AbsTaskClassification | |
| class EmotionClassification(AbsTaskClassification): | |
| metadata = TaskMetadata( | |
| name="EmotionClassification", | |
| description="Emotion is a dataset of English Twitter messages with six basic emotions: anger, fear, joy, love, sadness, and surprise.", | |
| reference="https://www.aclweb.org/anthology/D18-1404", | |
| dataset={ | |
| "path": "mteb/emotion", | |
| "revision": "4f58c6b202a23cf9a4da393831edf4f9183cad37", | |
| }, | |
| type="Classification", | |
| category="s2s", | |
| eval_splits=["validation", "test"], | |
| eval_langs=["eng-Latn"], | |
| main_score="accuracy", | |
| date=( | |
| "2017-01-01", | |
| "2018-12-31", | |
| ), # Estimated range for the collection of Twitter messages | |
| form=["written"], | |
| domains=["Social"], | |
| task_subtypes=["Sentiment/Hate speech"], | |
| license="Not specified", | |
| socioeconomic_status="mixed", | |
| annotations_creators="human-annotated", | |
| dialect=[], | |
| text_creation="found", | |
| bibtex_citation="""@inproceedings{saravia-etal-2018-carer, | |
| title = "{CARER}: Contextualized Affect Representations for Emotion Recognition", | |
| author = "Saravia, Elvis and | |
| Liu, Hsien-Chi Toby and | |
| Huang, Yen-Hao and | |
| Wu, Junlin and | |
| Chen, Yi-Shin", | |
| editor = "Riloff, Ellen and | |
| Chiang, David and | |
| Hockenmaier, Julia and | |
| Tsujii, Jun{'}ichi", | |
| booktitle = "Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing", | |
| month = oct # "-" # nov, | |
| year = "2018", | |
| address = "Brussels, Belgium", | |
| publisher = "Association for Computational Linguistics", | |
| url = "https://aclanthology.org/D18-1404", | |
| doi = "10.18653/v1/D18-1404", | |
| pages = "3687--3697", | |
| abstract = "Emotions are expressed in nuanced ways, which varies by collective or individual experiences, knowledge, and beliefs. Therefore, to understand emotion, as conveyed through text, a robust mechanism capable of capturing and modeling different linguistic nuances and phenomena is needed. We propose a semi-supervised, graph-based algorithm to produce rich structural descriptors which serve as the building blocks for constructing contextualized affect representations from text. The pattern-based representations are further enriched with word embeddings and evaluated through several emotion recognition tasks. Our experimental results demonstrate that the proposed method outperforms state-of-the-art techniques on emotion recognition tasks.", | |
| }""", | |
| n_samples={"validation": 2000, "test": 2000}, | |
| avg_character_length={"validation": 95.3, "test": 95.6}, | |
| ) | |
| def metadata_dict(self) -> dict[str, str]: | |
| metadata_dict = super().metadata_dict | |
| metadata_dict["n_experiments"] = 10 | |
| metadata_dict["samples_per_label"] = 16 | |
| return metadata_dict | |