{"id":18832995,"url":"https://github.com/declare-lab/reccon","last_synced_at":"2025-07-23T05:33:24.770Z","repository":{"id":85286834,"uuid":"317069564","full_name":"declare-lab/RECCON","owner":"declare-lab","description":"This repository contains the dataset and the PyTorch implementations of the models from the paper Recognizing Emotion Cause in Conversations.","archived":false,"fork":false,"pushed_at":"2022-11-26T03:14:45.000Z","size":16645,"stargazers_count":179,"open_issues_count":3,"forks_count":30,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-08T03:39:27.636Z","etag":null,"topics":["bert-model","causal-inference","causal-models","causal-spans","causality","conversations","dataset","dialogue-generation","dialogue-systems","emotion","emotion-cause","emotion-cause-pair-extraction","emotion-recognition","emotion-recognition-in-conversation","emotion-tasks","inference","natural-language-inference","reasoning","roberta"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/declare-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-11-30T00:16:44.000Z","updated_at":"2025-03-20T05:54:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"82a4b792-a2b0-4cec-9c9a-0171fff05c5c","html_url":"https://github.com/declare-lab/RECCON","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/declare-lab/RECCON","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/declare-lab%2FRECCON","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/declare-lab%2FRECCON/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/declare-lab%2FRECCON/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/declare-lab%2FRECCON/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/declare-lab","download_url":"https://codeload.github.com/declare-lab/RECCON/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/declare-lab%2FRECCON/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266624728,"owners_count":23958299,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bert-model","causal-inference","causal-models","causal-spans","causality","conversations","dataset","dialogue-generation","dialogue-systems","emotion","emotion-cause","emotion-cause-pair-extraction","emotion-recognition","emotion-recognition-in-conversation","emotion-tasks","inference","natural-language-inference","reasoning","roberta"],"created_at":"2024-11-08T01:59:47.874Z","updated_at":"2025-07-23T05:33:24.738Z","avatar_url":"https://github.com/declare-lab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RECCON: Recognizing Emotion Cause in CONversations\n\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/recognizing-emotion-cause-in-conversations-1/causal-emotion-entailment-on-reccon)](https://paperswithcode.com/sota/causal-emotion-entailment-on-reccon?p=recognizing-emotion-cause-in-conversations-1)\n\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/recognizing-emotion-cause-in-conversations-1/recognizing-emotion-cause-in-conversations-on)](https://paperswithcode.com/sota/recognizing-emotion-cause-in-conversations-on?p=recognizing-emotion-cause-in-conversations-1)\n\n:fire::fire::fire: New baselines: visit [emotion-cause-extraction](https://github.com/declare-lab/conv-emotion/tree/master/emotion-cause-extraction)\n\nThis repository contains the dataset and the pytorch implementations of the models from the paper [Recognizing Emotion Cause in Conversations](https://arxiv.org/pdf/2012.11820.pdf).\n\n## Overview of the Task\n\n![Alt text](RECCON.png?raw=true \"Task Details\")\n\nGiven an utterance U, labeled with emotion E, the task is to extract the causal spans S from the conversational history H (including utterance U) that sufficiently represent the causes of emotion E.\n\n## Dataset\n\nThe original annotated dataset can be found in the json files in the `data/original_annotation` folder. The dataset with negative examples for the Causal Span Extraction and the Causal Entailment of Emotion tasks can be found in `data/subtask1/` and `data/subtask2/` folders respectively.\n\n### Data Format\n\nThe annotations and dialogues of the DailyDialog and IEMOCAP are available at [`data/original_annotation/*.json`](data/original_annotation/).\nEach instance in the JSON file is allotted one identifier (e.g. \"tr\\_10180\") which is a list having a dictionary of the following items for each utterance:   \n\n| Key                                | Value                                                                        | \n| ---------------------------------- |:----------------------------------------------------------------------------:| \n| `turn`                             | Utterance index starting from 1.                                             |\n| `speaker`                          | Speaker of the target utterance.                                             | \n| `utterance`                        | The text of the utterance.                                                   | \n| `emotion`                          | Emotion label of the utterance.                                              | \n| `expanded emotion cause evidence`  | Utterance indices indicating the cause of a non neutral target utterance.    | \n| `expanded emotion cause spans`     | Causal spans corresponding to the evidence utterances.                       |\n| `explanation`                      | Only if the annotator wrote any explanation about the emotion cause.         | \n| `type`                             | The type of the emotion cause.                                               | \n\n\nExample format in JSON:\n\n```json\n{\n  \"tr_10180\": \n  [\n    [\n        {\n            \"turn\": 1,\n            \"speaker\": \"A\",\n            \"utterance\": \"It's time for desserts ! Are you still hungry ?\",\n            \"emotion\": \"neutral\"\n        },\n        {\n            \"turn\": 2,\n            \"speaker\": \"B\",\n            \"utterance\": \"I've always got room for something sweet !\",\n            \"emotion\": \"happiness\",\n            \"expanded emotion cause evidence\": [\n                1,\n                2\n            ],\n            \"expanded emotion cause span\": [\n                \"desserts\",\n                \"I've always got room for something sweet !\"\n            ],\n            \"type\": [\n                \"no-context\",\n                \"inter-personal\"\n            ]\n        }\n\n    ]\n  ]\n}\n```\n\n## Causal Span Extraction\n\nWe formulate the Causal Span Extraction task as a question answering task. To train RoBERTa or SpanBERT models for this task on the DailyDialog dataset use the following command:\n\n`python train_qa.py --model [rob|span] --fold [1|2|3] --context`\n\nThen, evlaution can be carried out on DailyDialog or IEMOCAP as follows:\n\n`python eval_qa.py --model [rob|span] --fold [1|2|3] --context --dataset [dailydialog|iemocap]`\n\n\n## Causal Entailment of Emotion\n\nThe Causal Entailment of Emotion task is formulated as a classification task. To train RoBERTa-Base or RoBERTa-Large models for this task on the DailyDialog dataset use the following command:\n\n`python train_classification.py --model [rob|robl] --fold [1|2|3] --context`\n\nThen, evlaution can be carried out on DailyDialog or IEMOCAP as follows:\n\n`python eval_classification.py --model [rob|robl] --fold [1|2|3] --context --dataset [dailydialog|iemocap]`\n\nWithout context models can be trained and evaluated by removing `--context` from the above commands.\n\n## Citation\n\nRecognizing Emotion Cause in Conversations. Soujanya Poria, Navonil Majumder, Devamanyu Hazarika, Deepanway Ghosal, Rishabh Bhardwaj, Samson Yu Bai Jian, Pengfei Hong, Romila Ghosh, Abhinaba Roy, Niyati Chhaya, Alexander Gelbukh, Rada Mihalcea. Cognitive Computation (2021).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeclare-lab%2Freccon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeclare-lab%2Freccon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeclare-lab%2Freccon/lists"}