Coder Social home page Coder Social logo

dialoguegenerationwithemotion's Introduction

Dialogue Generation with Expressed Emotions

License: MIT

This repo contains the implementation of the two papers:

Automatic dialogue generation with expressed emotions

Generating Responses Expressing Emotion in an Open-domain Dialogue System

The second paper is basically an extension of the first, it shows four more approaches to express specified emotions.

The following figure shows an overview of all the 7 models.

models

Instructions

The code is originally written in PyTorch0.3 and Python3.6

This project is heavily relying on emotion classifier. In this code ,we use a very simple Bi-LSTM model. The performance would very but not too much depending what kinda of text classifier you are using.

CBET dataset can be accessed through this link. It is balanced in single labeled emotions and preprocessed.

To replicate the results in the paper, you need to follow the following instructions:

  1. Firstly, train an emotion classifier using CBET dataset. I used a bi-LSTM.

  2. Download jiwei's dataset as in his github page, I made a code that converts his dataset from token IDs to actual tokens.

python jiwei_dataset.py
  1. However, there are duplications in the dataset, therefore we need to remove them. I did this by sort and uniq linux command line, and there are many alternatives.

  2. Automaticlaly label the dataset by the classifier.

The procedures are quite simple and I suggest redoing it by better classifiers (E.g. BERT).

Since I am still receiving questions about how to prepare the data, I looked into my old drives and found them. They are now in this Google Drive folder

Citation

If you find our work helpful, please consider citing one of the following papers.

Automatic dialogue generation with expressed emotions

@inproceedings{huang2018automatic,
  title={Automatic dialogue generation with expressed emotions},
  author={Huang, Chenyang and Za\"{i}ane, Osmar and Trabelsi, Amine and Dziri, Nouha},
  booktitle={Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers)},
  volume={2},
  pages={49--54},
  year={2018}
}

Generating Responses Expressing Emotion in an Open-domain Dialogue System

@incollection{Huang2019,
  doi = {10.1007/978-3-030-17705-8_9},
  url = {https://doi.org/10.1007/978-3-030-17705-8_9},
  year = {2019},
  publisher = {Springer International Publishing},
  pages = {100--112},
  author = {Chenyang Huang and Osmar R. Za\"{i}ane},
  title = {Generating Responses Expressing Emotion in an Open-Domain Dialogue System},
  booktitle = {Internet Science}
}

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.