Skip to content
/ ecm Public
forked from thu-coai/ecm

This project is a tensorflow implement of our work, ECM.

Notifications You must be signed in to change notification settings

sunyz/ecm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emotional Chatting Machine: Emotional Conversation Generation with Internal and External Memory

This project is a tensorflow implement of our work, ECM.

Dataset

Due to the copyright of the STC dataset, you can ask Lifeng Shang ([email protected]) for the STC dataset (Neural Responding Machine for Short-Text Conversation), and build the ESTC dataset follow the instruction in the Data Preparation Section of our paper, ECM.

The basic format of the sample data is [text, emotion tag1, emotion tag2], where emotion tag1 is generated by neural network classifier which is used in our model, and emotion tag2 is generated by rule-based classifier which is not used.

For your convenience, we also recommand you implement your model using the nlpcc2017 dataset (http://aihuang.org:8000/p/challenge.html), which has more than 1 million Weibo post-response pairs with emotional labels.

Usage

  1. train
python baseline.py --use_emb --use_imemory --use_ememory

You can remove "--use_emb", "--use_imemory", "--use_ememory" to remove the embedding, internal memory, and external memory module respectively.

  1. test
python baseline.py --use_emb --use_imemory --use_ememory --decode

You can test and apply the ecm model using this command. Note: the input words should be splitted by ' ', for example, '我 很 喜欢 你 !', or you can add the chinese text segmentation module in split() function.

Requirements

  • Python 2.7
  • Tensorflow 0.12
  • Numpy

About

This project is a tensorflow implement of our work, ECM.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%