Dialogue State Tracking with Multi-Level Fusion of Predicted Dialogue States and Conversations
We develop our code baed on CHAN.
python3.6
Install python packages:
pip install -r requirements_train.txt
We conduct experiments on the following datasets:
We use the same preprocessing steps for both datasets. For example, preprocessing MultiWOZ 2.1:
cd /home/user/DST-DCPDS
# download multiwoz 2.1 dataset
# preprocess datasets for training DST and STP jointly
$ unzip -j MULTIWOZ2.1.zip -d data/multiwoz2.1-update/original
$ cd data/multiwoz2.1-update/original
$ mv ontology.json ..
$ python convert_to_glue_format.py
bert-base-uncased.tar.gz
bert-base-uncased-vocab.txt
cd /home/user/DST-DCPDS
# rename model file
mv bert-base-uncased.tar.gz bert-base-uncased.model
# mv file to target file
mv bert-base-uncased.model /home/user/DST-DCPDS/data/pytorch_bert/.pytorch_pretrained_bert/.
mv bert-base-uncased-vocab.txt /home/user/DST-DCPDS/data/pytorch_bert/.pytorch_pretrained_bert/.
Take DST-DCPDS for both-level training as an example:
bash run_multiwoz2.1_all.sh
For teacher-forcing
set the mix_teaching_force
to 0
For uniform scheduled sampling
set the mix_teaching_force
to 1
Take DST-DCPDS for both-level training as an example:
General performance
uncomment the last line in the run_multiwoz2.1_all.sh
run sh
bash run_multiwoz2.1_all.sh
Related-slot
select taxi domain dialogues from the test datasets to generate file select_taxi.tsv
python select_taxi_dialouge.py
move selected dialogue to target folder
mv select_taxi.tsv data/multiwoz2.1-update/.
Manually replace the explicit expression to implicit form, for example replace rice house
in the utterance to restaurant
. You can also skip the steps.
replace the evaluation file name in code\main.py
from test.tsv
to select_taxi.tsv
run the prediction process
bash run_multiwoz2.1_all.sh
run evaluation process
python eval_related_slot.py
Value-delete
select dialogues, which has value-delete phenomenon, from test datasets to generate file selected_dialog_cand.json
python select_value_delete.py
Manually replace the slot value in the dialogue, which has value-delete phenomenon with [slot-name]
, for example replace rice house
with [resturant-name]
. The template file name as augment_dialog_cand.json
Augment dialogue to generate file update_test.tsv
python augment_value_delete.py
replace the evaluation file name in code\main.py
from test.tsv
to update_test.tsv
run the prediction process
bash run_multiwoz2.1_all.sh
run evaluation process
python eval_value_delete.py