GithubHelp home page GithubHelp logo

fagan2888 / kg-goal-oriented-dialog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ibm/kg-goal-oriented-dialog

0.0 0.0 0.0 65 KB

This code is written in Python and implements a goal-oriented dialog system which takes as input a conversation history as well as the underlying database, and predicts the best next utterance.

License: Apache License 2.0

Python 100.00%

kg-goal-oriented-dialog's Introduction

kg-goal-oriented-dialog

This code is written in Python and implements a goal-oriented dialog system which takes as input a conversation history as well as the underlying database, and predicts the best next utterance.

Get started

Prepare the data

Build data

python build_all_data.py -train_path $path_to_train_data -dev_path $path_to_dev_data -db_path $path_to_database -out_dir $path_to_out_dir [-test_path $path_to_test_data]

Dump pretrained word embeddings

python build_pretrained_w2v.py -emb $path_to_pretrained_word_embeddings -vocab_path $path_to_vocabulary -emb_size $embedding_size -out_path $path_to_output_file

Train the model

python train.py -vocab_size $vocab_size -mf $path_to_saved_model -data_dir $path_to_data_dir -pre_w2v  $pretrained_word_embeddings -hidden_size $hidden_size -word_emb_size $word_emb_size -model_name $model_name -eval_every $evaluate_model_every_steps -exp $experiment_index

Evaluate the model

python test.py -data_dir $path_to_data_dir -mf $path_to_saved_model -act $action_type

To compute evaluation metrics, set $action_type as evaluate; To interpret the model (e.g., sample test dialogs with intermediate model attentions), set $action_type$ as interpret.

kg-goal-oriented-dialog's People

Contributors

chinghuachen avatar chulakar avatar kant avatar stevemart 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.