This repository includes the codes and models for the paper A Dynamic Speaker Model for Conversational Interactions for reproducing the experiment results on Switchboard Dialog Act classification.
@InProceedings{Cheng2019NAACL,
author = {Hao Cheng and Hao Fang and Mari Ostendorf},
title = {A Dynamic Speaker Model for Conversational Interactions},
booktitle = {Proc. Annual Conference of the North American Chapter of the Association for Computational Linguistics (NAACL)},
year = {2019},
pages = {2772--2785},
url = {https://www.aclweb.org/anthology/N19-1284},
}
- Python >= 2.7
- virtualenv
- Set up the Python virtual environment for data processing:
virtualenv env/venv_data_processing source env/venv_data_processing/bin/activate pip install -r data_script/requirement.txt
- Install
spacy==2.0.16
and download spacy model.pip install spacy==2.0.16 python -m spacy download en_core_web_sm python -m spacy link en_core_web_sm en
- Install
nltk==2.0.5
. You may get the following error if you directly usepip install nltk==2.0.5
.urllib2.HTTPError: HTTP Error 403: SSL is required
- Download the package from here.
Untar the package, and edit
distribute_setup.py
: changehttp
tohttps
in line 50DEFAULT_URL = "https://pypi.python.org/packages/source/d/distribute/"
- Install the package using pip.
pip install ./nltk-2.0.5
- Download the package from here.
Untar the package, and edit
- Download the swda.zip from The Switchboard Dialog Act Corpus
and unzip it into
data/swda
. - Run the data processing script
This script produces two subdirectories
./process_predictor_data.sh
data/swda_user_dialog_dir
anddata/swda_predictor_dialog_dir
which contain the converted data for training the dynamic speaker model and the dialog act tagging model, respectively.
-
Set up the Python virtual environment for the tagging model.
virtualenv env/venv_tagging_model source env/venv_tagging_model/bin/activate pip install -r src/requirement.txt
-
Untar the pretrained model
tar -xzvf swda_model.tgz
-
Run the following script to evaluate the model
./eval_tagger_model.sh
This script outputs the evaluation results and dumps the prediction into
misc/eval_tagger_model_dir
. -
To train your own model, please see
./train_tagger_model.sh
for details.
Please see ./train_user_model.sh
and ./eval_user_model.sh
for details.