Code for 2023 ACL Findings Paper Sentence Ordering with a Coherence Verifier
- python==3.8.10
- torch==1.13.0
- transformers==4.24.0
- dgl==0.9.1
- BERSON: https://github.com/hwxcby/BERSON
- B-TSort: https://github.com/shrimai/Topological-Sort-for-Sentence-Ordering/
For the AAN and NIPS data, please contact the authors of Sentence Ordering and Coherence Modeling using Recurrent Neural Networks.
The SIND dataset can be downloaded from the Visual Storytelling website.
And the ROCStory dataset can be download from here.
- Construct the instance with gradual permutation. Replace the specific name such as 'roc' with 'dataset'
python get_pairwise_hier_dataset.py dataset
- Train the model.
sh run_score.sh
If you already have the baseline B-TSort and BERSON model and a CoVer model, you can run run_rerank.sh
in Topo_CoVer or run_{dataset}_coherence.sh
in BERSON_CoVer.
Besides, we saved the pairwise scores generated by B-TSort in Topo_CoVer/pairwise_score
, so that you can directly do the reranking process without having a B-TSort model.
We provide the pretrained coherence model
You can download from here: https://drive.google.com/drive/folders/1gHqH3inelArIDPhUIu8XjOAbXcaZSKok?usp=sharing