Skip to content

bonzo-ntu/2022ADL-HW1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

2022 ADL HW1

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published