GithubHelp home page GithubHelp logo

graphtransformer's Introduction

GraphTransformer

An implementation for paper "AMR-to-text Generation with Graph Transformer" (accepted at TACL20)

Requirements

  • python 3.5
  • tensorflow 1.5

Data Preprocessing

We use the tools in https://github.com/Cartus/DCGCN (without anonymization) to preprocessing the data. Because AMR corpus has LDC license, we cannot distribute the preprocessed data. We upload some examples for format reference. If you have the license, feel free to contact us for getting the preprocessed data.

We use pretrained Glove vectors. Due to the limitation of filesize, we only upload part of pretrained vectors. You can extract it from "glove.840B.300d.txt" with the vocab file.

Train

python train.py --enc_layers=8 --dec_layers=6 --num_heads=2 --num_units=256 --emb_dim=300  --train_dir=save/ --use_copy=1 --batch_size=64 --dropout_rate=0.2 --gpu_device=0 --max_src_len=90 --max_tgt_len=90

Test

python infer.py --enc_layers=8 --dec_layers=6 --num_heads=2 --num_units=256 --emb_dim=300  --train_dir=save/ --use_copy=1 --batch_size=64 --dropout_rate=0.2 --gpu_device=0 --max_src_len=90 --max_tgt_len=90

#The output file can be found in the folder directory.

Citation

@article{wang2020amr,
  title={AMR-To-Text Generation with Graph Transformer},
  author={Wang, Tianming and Wan, Xiaojun and Jin, Hanqi},
  journal={Transactions of the Association for Computational Linguistics},
  volume={8},
  pages={19--33},
  year={2020},
  publisher={MIT Press}
}

graphtransformer's People

Contributors

sodawater avatar

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.