All Projects → wyu97 → permgen

wyu97 / permgen

Licence: other
Author: Wenhao Yu ([email protected]). EMNLP'21. Sentence-Permuted Paragraph Generation.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to permgen

spring
SPRING is a seq2seq model for Text-to-AMR and AMR-to-Text (AAAI2021).
Stars: ✭ 103 (+212.12%)
Mutual labels:  natural-language-generation
SGCP
TACL 2020: Syntax-Guided Controlled Generation of Paraphrases
Stars: ✭ 67 (+103.03%)
Mutual labels:  natural-language-generation
factedit
🧐 Code & Data for Fact-based Text Editing (Iso et al; ACL 2020)
Stars: ✭ 16 (-51.52%)
Mutual labels:  natural-language-generation
DCGCN
Densely Connected Graph Convolutional Networks for Graph-to-Sequence Learning (authors' MXNet implementation for the TACL19 paper)
Stars: ✭ 73 (+121.21%)
Mutual labels:  natural-language-generation
rtg
Reader Translator Generator - NMT toolkit based on pytorch
Stars: ✭ 26 (-21.21%)
Mutual labels:  natural-language-generation
easse
Easier Automatic Sentence Simplification Evaluation
Stars: ✭ 109 (+230.3%)
Mutual labels:  natural-language-generation
Gluon Nlp
NLP made easy
Stars: ✭ 2,344 (+7003.03%)
Mutual labels:  natural-language-generation
PlanSum
[AAAI2021] Unsupervised Opinion Summarization with Content Planning
Stars: ✭ 25 (-24.24%)
Mutual labels:  natural-language-generation
awesome-nlg
A curated list of resources dedicated to Natural Language Generation (NLG)
Stars: ✭ 386 (+1069.7%)
Mutual labels:  natural-language-generation
numberwords
Convert a number to an approximated text expression: from '0.23' to 'less than a quarter'.
Stars: ✭ 191 (+478.79%)
Mutual labels:  natural-language-generation
Court-View-Gen
Interpretable Charge Predictions for Criminal Cases: Learning to Generate Court Views from Fact Descriptions
Stars: ✭ 13 (-60.61%)
Mutual labels:  natural-language-generation
chatbot-samples
🤖 聊天机器人,对话模板
Stars: ✭ 110 (+233.33%)
Mutual labels:  natural-language-generation
TextFeatureSelection
Python library for feature selection for text features. It has filter method, genetic algorithm and TextFeatureSelectionEnsemble for improving text classification models. Helps improve your machine learning models
Stars: ✭ 42 (+27.27%)
Mutual labels:  natural-language-generation
Luci
Logical Unity for Communicational Interactivity
Stars: ✭ 25 (-24.24%)
Mutual labels:  natural-language-generation
mtdata
A tool that locates, downloads, and extracts machine translation corpora
Stars: ✭ 95 (+187.88%)
Mutual labels:  natural-language-generation
Awesome Nlg
A curated list of resources dedicated to Natural Language Generation (NLG)
Stars: ✭ 211 (+539.39%)
Mutual labels:  natural-language-generation
wikiHow paper list
A paper list of research conducted based on wikiHow
Stars: ✭ 25 (-24.24%)
Mutual labels:  natural-language-generation
Entity2Topic
[NAACL2018] Entity Commonsense Representation for Neural Abstractive Summarization
Stars: ✭ 20 (-39.39%)
Mutual labels:  natural-language-generation
linguistic-style-transfer-pytorch
Implementation of "Disentangled Representation Learning for Non-Parallel Text Style Transfer(ACL 2019)" in Pytorch
Stars: ✭ 55 (+66.67%)
Mutual labels:  natural-language-generation
nlg-markovify-api
An API built on Plumber (R) utilizing Markovify, a Python package, wrapped in markovifyR (R). It builds a Markov Chain-model based on text (user input) and generates new text based on the model.
Stars: ✭ 19 (-42.42%)
Mutual labels:  natural-language-generation

Sentence-Permuted Paragraph Generation

This repository contains the code package for the EMNLP'2021 paper:

Sentence-Permuted Paragraph Generation [arXiv] [slides] [video]

Wenhao Yu (ND), Chenguang Zhu (MSR), Tong Zhao (ND), Zhichun Guo (ND), Meng Jiang (ND).

In this paper, we propose a novel framework PermGen whose objective is to maximize the expected log-likelihood of output paragraph distributions with respect to all possible sentence orders. PermGen uses hierarchical positional embedding and designs new procedures for training, and decoding. Experiments on three generation benchmarks showed PermGen generates more diverse outputs with a higher quality than existing models.

Model Usage

Step 1: Download datasets

We conducted experiments on three paragraph generation tasks: story generation (ROCStory), news generation (DailyMail), paper abstract generation (AGENDA). For the ROCStory and AGENDA datasets, we directly download them from their official repos. For the DailyMail dataset, We use randomly sampled 53,102 news articles from the original corpus and extract keyphrases from each sentence using RAKE.

Dataset Name Original Link Paper Link Our Pre-processed
ROCStory OL-ROC PL-ROC OP-ROC
AGENDA OL-AG PL-AG OP-AG
DailyMail OL-DM PL-DM OP-DM

After downloading the pre-processed datasets, please put them in the dataset folder.

Step 2: Install packages

The python version should be at least 3.6.0.

conda create -n permgen python=3.6
conda activate permgen
pip install transformers==3.3.1
pip install torch==1.7.0

Step 3: Randomly permute sentences

Add/delete --dataset to choose the dataset.

python dataset/preprocessing.py --agenda True --dailymail True --rocstory True

Step 4: Train the model

bash scripts/train_agenda.sh
bash scripts/train_dailymail.sh
bash scripts/train_rocstory.sh

Step 5: Test with saved checkpoints

Do not forget to specify the path for saved checkpoints!

bash scripts/test_agenda.sh
bash scripts/test_dailymail.sh
bash scripts/test_rocstory.sh

Easy-to-use baseline implementation

The baseline BART implementation can be found at here. The repository contains the code to reproduce the baseline performance reported in our paper. All hyperparameters and evaluations are the same as in this repository.

Output examples

Please find our output examples in the examples folder.

Reference

If you find this repository useful in your research, please consider to cite our paper:

@inproceedings{yu2021sentence,
  title={Sentence-Permuted Paragraph Generation},
  author={Yu, Wenhao and Zhu, Chenguang and Zhao, Tong and Guo, Zhichun and Jiang, Meng},
  booktitle={Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing (EMNLP)},
  year={2021}
}

Contact

If you have any questions, please contact Wenhao Yu ([email protected])

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].