Codes of the AKBC 2021 paper: Do Boat and Ocean Suggest Beach? Dialogue Summarization with External Knowledge.
The data can be downloaded here.
Check inference/pipeline.ipynb
for more details.
- Extract concepts from dialogues and summaries (
get_concepts.py
). - Get Concepts Out-of Dialogue Context (
get_codc.py
). - Build Co-occurence graph (
build_graph.py
). - Get the inferred knowledge (
get_features.py
). - Classifier (
classify.ipynb
).
Prepare training data. Training dataset preparation for baselines:
sh scripts/prepare_training_data_baseline.sh
And modify the paths to the training knowledge in prepare_training_data_knowattn.sh
, which is the -train_know
argument.
sh scripts/prepare_training_data_knowattn.sh
Generate summaries:
python translate.py -gpu 0 \
-knowledge \
-batch_size 20 \
-beam_size 4 \
-model models/random_train_know/trans_copy_top5_prop0.2_step_35000.pt \
-src codc_data/dialogs/dialog.test.txt \
-know codc_data/inference/knowledge/rfdepth12_mindepth4_mindis0_EMNLP_filter_nofilter_test_top13.txt \
-output decodings/prop0.2_tfdep12_top13_35k_trainedtop5 \
-min_length 5 \
-max_length 15
python eval_codc.py