Skip to content

ShichaoSun/ConAbsSum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alleviating Exposure Bias via Contrastive Learning for Abstractive Text Summarization

This repository is the implementation for the paper Alleviating Exposure Bias via Contrastive Learning for Abstractive Text Summarization.

Some of my codes come from the Transformers example in https://github.com/huggingface/transformers/tree/v4.0.1/examples/seq2seq.

Requirements

Install requirements

pip install -r requirements.txt

Train and Test

Xsum

  • Get dataset
wget https://cdn-datasets.huggingface.co/summarization/xsum.tar.gz
tar -xzvf xsum.tar.gz
  • Run
bash exp/run_consum_xsum.sh

CNNDM:

  • Get dataset
wget https://cdn-datasets.huggingface.co/summarization/pegasus_data/cnn_dailymail.tar.gz
tar -xzvf cnn_dailymail.tar.gz
mv cnn_dailymail/validation.source cnn_dailymail/val.source 
mv cnn_dailymail/validation.target cnn_dailymail/val.target 
  • Run
bash exp/run_consum_cnndm.sh

Multi-News:

  • Get dataset
wget https://cdn-datasets.huggingface.co/summarization/pegasus_data/multi_news.tar.gz
tar -xzvf multi_news.tar.gz
mv multi_news/validation.source multi_news/val.source 
mv multi_news/validation.target multi_news/val.target 
  • Run
bash exp/run_consum_multinews.sh

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published