Skip to content

Latest commit

 

History

History
39 lines (33 loc) · 794 Bytes

README.md

File metadata and controls

39 lines (33 loc) · 794 Bytes

Sample Code for Homework 1 ADL NTU

Download

bash ./download.sh

Train model

python train_intent.py --device cuda:0 --ckpt trained_intent.ckpt --dropout 0.25
python train_slot.py --device cuda:0 --ckpt trained_slot.ckpt --dropout 0.5

Inference

bash ./intent_cls.sh ./data/intent/test.json pred_intent.csv
bash ./slot_tag.sh ./data/slot/test.json pred_slot.csv

Environment

# If you have conda, we recommend you to build a conda environment called "adl-hw1"
make
conda activate adl-hw1
pip install -r requirements.txt
# Otherwise
pip install -r requirements.in

Preprocessing

# To preprocess intent detectiona and slot tagging datasets
bash preprocess.sh

Intent detection

python train_intent.py