Coder Social home page Coder Social logo

luweishuang / bi-seq2seq Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jimth001/bi-seq2seq

0.0 1.0 0.0 21 KB

An implementation of "Two are Better than One: An Ensemble of Retrieval- and Generation-Based Dialog Systems"

License: MIT License

Python 100.00%

bi-seq2seq's Introduction

Bi-Seq2Seq

An implementation of "Two are Better than One: An Ensemble of Retrieval- and Generation-Based Dialog Systems".
This code serves as a baseline of "Response Generation by Context-aware Prototype Editing" (https://arxiv.org/abs/1806.07042).

Code:

Run preprocess() to generate some pickle files for training. (./data/train.pkl, ./data/test.pkl, ./data/val.pkl)
Run train_onehotkey(batch_size=32) for training. Models are saved under "./model".
Run generate_batches(model_path='./model/epoch.10.model',batch_size=32) to generate results(./output/result).

Data preparing:

'./data/train.query',(raw querys, line by line) './data/train.reply',
'./data/train.target',
'./data/val.query',
'./data/val.reply',
'./data/val.target',
'./data/test.query',
'./data/test.reply',
'./data/test.target', (If you don't have a target file, you can let query as the target to run preprocess())
'./data/embedding' (fasttext's format)

Dataset

You can contact the authors of “Two are Better than One: An Ensemble of Retrieval- and Generation-Based Dialog Systems” (https://arxiv.org/abs/1610.07149) if you are trying to reproduce this work. You can also get a dataset to run this code at https://github.com/MarkWuNLP/ResponseEdit.

bi-seq2seq's People

Contributors

jimth001 avatar

Watchers

paper2code - bot avatar

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.