Giter VIP home page Giter VIP logo

meed2's Introduction

Empathetic Dialog Generation with Fine-Grained Intents

DOI

Code for paper

Yubo Xie and Pearl Pu. Empathetic Dialog Generation with Fine-Grained Intents. CoNLL 2021. PDF Link.

Environment

The project was developed using the following packages:

tqdm==4.49.0
numpy==1.19.3
scipy==1.5.2
pandas==1.1.0
tensorflow==2.3.1
pytorch_transformers==1.2.0

Files

  • datasets.py: read the data and tokenize the text;
  • model_basics.py: implementation of Transformer basic components;
  • model_emo_pred.py: implementation of the response emotion/intent predictor;
  • model.py: implementation of the empathetic dialog model;
  • model_utils.py: utility functions for the model implementation;
  • train_os.py: pre-train the model on the OS dataset;
  • train_edos.py: fine-tune the model on the EDOS dataset;
  • train_ed.py: fine-tune the model on the ED dataset;
  • train_emo_os.py: pre-train the response emotion/intent predictor on the OS dataset;
  • train_emo_edos.py: fine-tune the response emotion/intent predictor on the EDOS dataset;
  • train_emo_ed.py: fine-tune the response emotion/intent predictor on the ED dataset;
  • predict_emo.py: predict the response emotion/intent;
  • beam_search.py: implementation of the beam search algorithm;
  • predict.py: generate the responses.

Preprocessed Data

The preprocessed data needed for training (tokenization and emotion/intent distribution for each utterance) can be found here (inside the folder data).

Trained Models

TensorFlow checkpoints can be found here (inside the folder checkpoints).

Raw Datasets

The raw OS and EDOS datasets can be found here.

License

See the LICENSE file in the root repo folder for more details.

meed2's People

Contributors

yuboxie avatar

Stargazers

Igor avatar ZhangW avatar wonderengg avatar  avatar Fabio avatar Axelrod Pang avatar  avatar Liz McQuillan avatar  avatar

Watchers

James Cloos avatar  avatar

meed2's Issues

Paper reproduction results

The classifier accuracy on the EmpatheticDialogues test set is only 35.20% when i use your checkpoint of the predict_emo. It doesn't have the precision that you have in your paper. What do you think might have caused this. I am looking forward to your reply.

Query on the labels of .npy file

Hi,

I was going through the data folder and opened the uttr_emots.npy in the train folder of ED dataset. While I understand that they are probability distributions of the 41 classes , is it possible to provide an order for them, or if I can say a mapping of the classes to the index. Or is it safe to assume that the distributions follow the same order as the Figure 2: Distribution of emotions/intents in the emotional dialogs in OpenSubtitles provided within the paper?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.