Giter VIP home page Giter VIP logo

ratishsp / data2text-macro-plan-py Goto Github PK

View Code? Open in Web Editor NEW
21.0 2.0 10.0 43.6 MB

Code for TACL 2021 paper on Data-to-text Generation with Macro Planning

License: MIT License

Python 89.88% Shell 3.29% Perl 4.17% Smalltalk 0.22% Emacs Lisp 1.94% JavaScript 0.10% NewLisp 0.18% Ruby 0.19% Slash 0.03% SystemVerilog 0.02%
data-to-text-generation deep-learning natural-language-generation

data2text-macro-plan-py's Introduction

data2text-macro-plan-py PWC PWC

This repo contains code for Data-to-text Generation with Macro Planning (Ratish Puduppully and Mirella Lapata; In Transactions of the Association for Computational Linguistics (TACL)); this code is based on an earlier (version 0.9.2) fork of OpenNMT-py.

Citation

@article{puduppully-2021-macro,
  author    = {Ratish Puduppully and Mirella Lapata},
  title     = {Data-to-text Generation with Macro Planning},
  journal = {Transactions of the Association for Computational Linguistics},
  year      = {2021},
  url       = {https://direct.mit.edu/tacl/article/doi/10.1162/tacl_a_00381/101876/Data-to-text-Generation-with-Macro-Planning},
  pages = {510--527},
  volume = {9},
}

Requirements

All dependencies can be installed via:

pip install -r requirements.txt

Code Details

The main branch contains code to generate macro plans from input verbalization. The code for training summary generation is in summary_gen branch for MLB and summary_gen_roto for RotoWire dataset.

The test outputs and trained models can be downloaded from the google drive link https://drive.google.com/drive/folders/1jJjq5IvuBKNLTAe7fuwlDYParrxpK-WD?usp=sharing

The steps for training and inference for RotoWire dataset are given in README_RotoWire, and for MLB dataset are given in README_MLB.

data2text-macro-plan-py's People

Contributors

ratishsp avatar

Stargazers

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

Watchers

 avatar  avatar

data2text-macro-plan-py's Issues

Missing ordinal_adjective_map_file for MLB experiments

Hi @ratishsp,

Thanks a lot for the great paper & code. The experiments for RotoWire are fine, but with MLB I think some file is missing here. Pls see the error below:

(macro_plan directory is the main branch's code)

Traceback (most recent call last):
  File "./macro_plan/scripts/create_mlb_target_data.py", line 160, in <module>
    process(args.json_root, args.dataset_type, args.ordinal_adjective_map_file, args.output_folder)
  File "./macro_plan/scripts/create_mlb_target_data.py", line 20, in process
    ordinal_adjective_map = get_ordinal_adjective_map(ordinal_adjective_map_file)
  File "/check/data2text-macro/macro_plan/scripts/mlb_utils.py", line 556, in get_ordinal_adjective_map
    ordinal_adjective_map_file = open(ordinal_adjective_map_file_name, mode="r", encoding="utf-8")
FileNotFoundError: [Errno 2] No such file or directory: './macro_plan/data/traintokens-ordinaladjective-inning-identifier'

Is there something obvious I'm missing here?

Thanks!

Best-worst scaling

Hi,
How exactly did you apply best-worst scaling? And how did you obtain Table 5 in the paper from binary comparisons (Macro against RBF- 2020,4 ED+CC, Gold, and Templ)?

Why do you think best-worst scaling is more reliable? I've never seen this method in NLP papers before.

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.