This reposite create heat maps for each document in XSUM dataset and its summary based on Glove (Sorry, not BERT, since I haven't found a machine to ran the retrained BERT model). Each element in the heat map stands for the (1 - cosine distance) between the term from document (x-axis) and the term from reference sumary (y-axis)
- seaborn
- pandas
- numpy
- matplotlib
The cosine distances have been pre-calculated and stored in directory csv_files
. The directories in csv_files
is named as the document id. Run ipython notebook
and open heat_map.ipynb
. Replace the 8004
in the following line with the document id you are interested in.
plot_doc('8004')
Run all cells in the heat_map.ipynb
. The heat maps of each document sentence and reference summary will appear.