Code Monkey home page Code Monkey logo

plangen's Introduction

Plan-then-Generate: Controlled Data-to-Text Generation via Planning

Authors: Yixuan Su, David Vandyke, Sihui Wang, Yimai Fang, and Nigel Collier

Code for EMNLP 2021 paper Plan-then-Generate: Controlled Data-to-Text Generation via Planning

1. Environment Setup:

(1) Hardware Requirement:

The code in this repo is thoroughly tested on our machine with a single Nvida V100 GPU (16GB)

(2) Installation:

chmod +x ./config_setup.sh
./config_setup.sh

2. ToTTo Data Preprocessing:

Option (1): Preprocess the ToTTo data from scratch by yourself:

cd ./data
chmod +x ./prepare_data.sh
./prepare_data.sh

This process could take up to 1 hour

Option (2): Download the our processed data here

unzip data.zip and replace with the empty ./data folder

For more details about ToTTo dataset, please refer to the original Google Research repo

3. Content Planner:

Please refer to README.md in ./content_planner folder

4. Sequence Generator:

Please refer to README.md in ./generator folder

5. Citation

If you find our paper and resources useful, please kindly cite our paper:

@inproceedings{su-etal-2021-plan-generate,
    title = "Plan-then-Generate: Controlled Data-to-Text Generation via Planning",
    author = "Su, Yixuan  and
      Vandyke, David  and
      Wang, Sihui  and
      Fang, Yimai  and
      Collier, Nigel",
    booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2021",
    month = nov,
    year = "2021",
    address = "Punta Cana, Dominican Republic",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2021.findings-emnlp.76",
    pages = "895--909",
    abstract = "Recent developments in neural networks have led to the advance in data-to-text generation. However, the lack of ability of neural models to control the structure of generated output can be limiting in certain real-world applications. In this study, we propose a novel Plan-then-Generate (PlanGen) framework to improve the controllability of neural data-to-text models. Extensive experiments and analyses are conducted on two benchmark datasets, ToTTo and WebNLG. The results show that our model is able to control both the intra-sentence and inter-sentence structure of the generated output. Furthermore, empirical comparisons against previous state-of-the-art methods show that our model improves the generation quality as well as the output diversity as judged by human and automatic evaluations.",
}

plangen's People

Contributors

yxuansu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

plangen's Issues

isuue about content code

Hi Yixuan,

The paper is quite valuable and I want to reimplement the result. Could you please provide the missing code?

Thanks!

the code of content_planner not provided

Hi,I'm greatly interested in your "Plan-then-Generate" work,but the content planner mentioned in your paper is not provided code,i doubt how to joint the Bert model and CRF to generate the conent planner.I'm looking forward to reading your code in this part.Could you please provide the complete code as soon as possible?Thanks~

Could you provide the processing code for RDF (WebNLG) data and the processed RDF data?

Hi, could you provide the processing code for RDF data and the processed RDF data with content plan? I find it difficult to parse the content plan using the method proposed in the paper because it is hard to align objects in the reference text with those in the input graph. These objects often appear in different representations in reference text and input graphs.

Content Planner Issues

Start Training:
Traceback (most recent call last):
File "train.py", line 99, in
ckpt_save_path, cuda_available, device)
File "/home/fanyongfeng/PyCharm/PlanGen/content_planner/trainer.py", line 83, in model_training
train_batch_src_tensor, train_batch_tgt_tensor, _ = data.get_next_train_batch(batch_size_per_gpu * number_of_gpu)
File "/home/fanyongfeng/PyCharm/PlanGen/content_planner/dataclass.py", line 87, in get_next_train_batch
batch_idx_list = random.sample(self.train_idx_list, batch_size)
File "/home/fanyongfeng/.conda/envs/fanyfeng/lib/python3.6/random.py", line 320, in sample
raise ValueError("Sample larger than population or is negative")
ValueError: Sample larger than population or is negative

Hello, I'm using prepare_ After the data.sh command runs the data, this problem occurs when using train.sh. Do you know why? thank you

Require code for content planner

Hi Yixuan @yxuansu,

Your paper is an interesting read, thanks for sharing your work and code.

Could you please provide the missing code for the Content Planner module?
I would appreciate it, even if it is an initial/unrefined version that you have at the moment.

Thanks!

About the complete code

Hi, sorry to disturb you! I want to ask you when the full code (adding content_planner) will be releasing, i am very interested in you work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.