GithubHelp home page GithubHelp logo

karthi2016 / deepdeepparser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from janmbuys/deepdeepparser

0.0 1.0 0.0 92 KB

Neural Semantic Graph Parser

License: Apache License 2.0

Python 98.37% Shell 1.63%

deepdeepparser's Introduction

DeepDeepParser

Code and data preparation scripts for the paper Robust Incremental Neural Semantic Graph Parsing, Jan Buys and Phil Blunsom, ACL 2017.

Prerequisites

See Dependencies.md

Data preparation

To extract DMRS and EDS graphs from DeepBank (requires the LOGON environment and full original data):

scripts/extract-deepbank.sh

To extract DMRS and EDS graphs from the SDP release of DeepBank (does not require the LOGON environment):

scripts/extract-deepbank-sdp.sh 

Pre-processing (constructs lexicon, runs Stanford CoreNLP, constructs graph linearizations/oracle transition sequences):

scripts/preprocess.sh

Training

Train the transition-based parser:

python rnn/parser.py --decode_dev --decode_train --use_hard_attention_arc_eager_decoder --predict_span_end_pointers  --data_dir [data_dir] --train_dir [working_dir] --embedding_vectors [embedding_file] --train_name train --dev_name dev --singleton_keep_prob 0.5 --size 256 --input_embedding_size 256 --output_embedding_size 128 --tag_embedding_size 32 --use_encoder_tags --input_drop_prob 0.3 --output_drop_prob 0.3 --initialize_word_vectors 

where data_dir contains the pre-processed files for training.

Word embeddings are initialized with pre-trained structured skip-gram embeddings: sskip.100.vectors

Decoding

A pre-trained EDS model is available here

Decode with the parser (transition-based model):

python rnn/parser.py --decode --decode_dev --use_hard_attention_arc_eager_decoder --predict_span_end_pointers --data_dir [data_dir] --train_dir [working_dir] --dev_name [filename] --size 256 --input_embedding_size 256 --output_embedding_size 128 --tag_embedding_size 32 --use_encoder_tags --input_drop_prob 0.3 --output_drop_prob 0.3 --checkpoint_file model.ckpt

where data_dir contains the pre-processed files for decoding (filename.en, filename.ne, filename.pos) as well as a buckets file, and working_dir contains the model (checkpoint) file.

Suggested buckets:

24 77
37 133
52 201

Post-processing

Restore lemmas and constants and convert to output graph formats.

python mrs/linear_to_mrs.py [data_dir] [filename] [working_dir] output -arceagerbuffershift -unlex -withendspan 

deepdeepparser's People

Watchers

James Cloos 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.