GithubHelp home page GithubHelp logo

emnlp2020-stream-beam-syntactic's Introduction

A Streaming Approach For Efficient Batched Beam Search

This repo contains an implementation of the syntactic parsing experiments for the EMNLP 2020 paper "A Streaming Approach For Efficient Batched Beam Search" by Kevin Yang, Violet Yao, John DeNero, and Dan Klein (https://arxiv.org/abs/2010.02164). For the code for machine translation and semantic parsing experiments see https://github.com/yangkevin2/emnlp2020-stream-beam-mt and https://github.com/yangkevin2/emnlp2020-stream-beam-semantic.

Setup

This repo is forked from https://github.com/jhcross/span-parser and reimplements in PyTorch. See their original repo for setup instructions; additionally, install PyTorch.

Example Command

Run the following command from the src directory to benchmark each method in the paper once, including the FIFO version discussed in the appendix, in series. Prints the oracle reranking performance for each method along with time and efficiency information.

python main.py --vocab ../data/vocabulary.json --test ../data/23.auto.clean --model ../data/model --device cpu --batch-size 10 --beam-size 10 --ap 2.5 --mc 3 --preds_dir ../preds

We provide the pretrained model in data/model since we found reproducing the original results in pytorch to be a bit finicky and highly initialization-dependent. Switch to --device cuda for gpu training.

emnlp2020-stream-beam-syntactic's People

Contributors

yangkevin2 avatar

Watchers

 avatar  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.