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}
}

dialoguegenerationwithemotion's People

Contributors

chenyangh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dialoguegenerationwithemotion's Issues

求运行

Hi,I can not run the code. Couldd you help me? I will thanl you very much.

数据集 (About the dataset)

您好,我想问一下程序中‘data_6_remove_dup_train.csv’这样的数据文件是如何得到的?您这边方便提供吗?或者您方便告诉一下这个数据文件的结构吗?

feature/fasttext model

Hello,

I tried running the code but it gave me that it needs a file named "feature/fasttextModel" where I can find that file?

thanks

求训练过程

想问下训练的过程,分享一下实验过程中的数据,我跑了一下,好多提示缺少数据,谢谢您

question about data

hello, chenyang, I hope that you can finish the readme file and we can follow your work to do some relevant researches. Thanks!

运行过程

请问直接运行trainer就可以进行训练了吗?而分类器的作用是判断输出结果的情感分类是吗?

code doesn't run. help me! please!ㅜㅜ

I read a good paper.
However, I have a question.
I'm trying to run the code, but unfortunately it doesn't work.

  1. For each uploaded Python code, an error occurs that there is no normal_seq2seq.py file-> (250 line) feature / fasttextModel file.
    Can you upload fasttextModel?
    Otherwise, please tell me how to create it. It seems to be different from the fast text model generation I know of.

  2. There are many Python files, please tell me the order of execution. There are many parts that are too difficult for me to understand.

I am really desperate now.
It's so sad that the code doesn't run well.

I really ask for it !!! please!

feature/fasttext model

Please!!!
I have tried to run the code,but it doesn't work,there is no feature / fasttextModel file, can you upload the file? I really need that.Please!!!
Thank you so much !!!!!!!!

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.