A Topic-aware Pointer Model for Abstractive Summarization using Topic Relevance Loss
This code is based on the pointer-generator model
Note Baseline code is in Python 2. If you want a Python 3 version, see @becxer's fork.
This code can be used in Chinese and English datasets.
English datasets-CNN/Daily Mail, Instructions are here
In our work, we firstly use the pre-trained topic model to get the topic information, then integrating it into the model from two aspects: pointer mechanism and attention mechanism.
The details of data preprocessing are available here.
Follow the instructions of pointer-generator model
If you are using an English dataset, you can use the Python package pyrouge
to run ROUGE evaluation. Some useful instructions in pointer-generator model.
If you are using an Chinese dataset, just follow this code. We have implemented the ROUGE method ourselves in run_rouge.py
.