Skip to main content

Reusable Joint Slot and Intent Extraction implementation in Tensorflow2.0

Project description

Jonze

Joint Slot and Intent Extraction implementation in Tensorflow2.0

Contains restructured code from the following repo: https://github.com/shubham8111/Joint-NLU

Implementation of Bi-LSTM based NLU baseline and SlotGated-SLU (Goo et al, 2018)(https://www.csie.ntu.edu.tw/~yvchen/doc/NAACL18_SlotGated.pdf) Models are evaulated on Snips and ATIS datasets.

Experiments did not reproduce improvements by SlotGated model over Basline model, on snips dataset.

Preprocessing modules reused from following repo: https://github.com/MiuLab/SlotGated-SLU/

Usage

To install package:
pip install jonze
To train model:
from jonze import train train(dataset = "joint-nlu", datasets_root = "dataset", models_root = "model", layer_size=12)
To test model:
from jonze import test test(dataset = "joint-nlu", datasets_root = "dataset", models_root = "model", layer_size=12, batch_size=46)

Results

Snips Dataset:

Model Slot F1 Intent accuracy Semantic Accuracy
Baseline 84.30 96.57 66.43
Slot Gated 83.5 95.57 66.85

Atis Dataset:

Model Slot F1 Intent accuracy Semantic Accuracy
Baseline 95.08 94.62 81.97
Slot Gated 94.57 96.41 83.65

P.S. Sometimes Slot F1 might get stuck at zero during training, better weight intialization or training a few epochs only on slot loss can resolve the issue.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jonze-0.0.20.tar.gz (8.7 kB view hashes)

Uploaded Source

Built Distribution

jonze-0.0.20-py3-none-any.whl (20.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page