Git Product home page Git Product logo

dialog-nlu's Introduction

Dialog System NLU

Tensorflow and Keras Implementation of the state of the art researches in Dialog System NLU. Tested on Tensorflow version 1.14.0

Implemented Papers

BERT for Joint Intent Classification and Slot Filling

Joint BERT

Supported data format:

  • Data format as in the paper Slot-Gated Modeling for Joint Slot Filling and Intent Prediction (Goo et al):
    • Consists of 3 files:
      • seq.in file contains text samples (utterances)
      • seq.out file contains tags corresponding to samples from seq.in
      • label file contains intent labels corresponding to samples from seq.in

Datasets included in the repo:

  • Snips Dataset (Snips voice platform: an embedded spoken language understanding system for private- by-design voice interfaces )(Coucke et al., 2018), which is collected from the Snips personal voice assistant.
    • The training, development and test sets contain 13,084, 700 and 700 utterances, respectively.
    • There are 72 slot labels and 7 intent types for the training set.

Training the model with SICK-like data:

2 models implemented joint_bert and joint_bert_crf

Required Parameters:
  • --train or -t Path to training data in Goo et al format.
  • --val or -v Path to validation data in Goo et al format.
  • --save or -s Folder path to save the trained model.
Optional Parameters:
  • --epochs or -e Number of epochs.
  • --batch or -bs Batch size.
python train_joint_bert.py --train=data/snips/train --val=data/snips/valid --save=saved_models/joint_bert_model --epochs=5 --batch=64
python train_joint_bert_crf.py --train=data/snips/train --val=data/snips/valid --save=saved_models/joint_bert_crf_model --epochs=5 --batch=32

Evaluating the Joint BERT NLU model:

Required Parameters:
  • --model or -m Path to joint BERT NLU model.
  • --data or -d Path to data in Goo et al format.
Optional Parameters:
  • --batch or -bs Batch size.
python eval_joint_bert.py --model=saved_models/joint_bert_model --data=data/snips/test --batch=128
python eval_joint_bert_crf.py --model=saved_models/joint_bert_crf_model --data=data/snips/test --batch=128

dialog-nlu's People

Contributors

mahmoudwahdan 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.