Giter Site home page Giter Site logo

semrl's Introduction

semrl

Semantic dependency parser with reinforcement learning.

Requirements

Tensorflow

Usage

Parsing

We will publish off-the-shelve models soon.

Trainging

Requirements

Preprocessing data

Firstly you need to prepare your datasets with embedding vectors as data.pkl.

python3 src/loaddata.py \
--tasks dm pas psd \
--splits train dev \
--datapkl data.pkl \
--vocab_min_freq 7 \
--emb path_to_glove_embedding_txt \
--file \
path_to_dm_train \
path_to_dm_dev \
path_to_pas_train \
path_to_pas_dev \
path_to_psd_train \
path_to_psd_dev \

Note that you don't need to parse full of the Glove vectors. Just prune uncommon words.

Train & Dev

This is an example of training of DM formalism with supervised learning.

python src/semrl.py \
    --train --parsing \
    --tasks dm \
    --inittasks dm pas psd \
    --splits train dev \
    --datapkl data.pkl \
    --lstm_layers 3 \
    --lstm_layers_dep 1 \
    --fnn_hidden_dim 4000 \
    --h_dim 600 --h_dep_dim 200 --emb_dep 100 \
    --flag_dim 128 \
    --droppout_rate_fnn 0.5 \
    --epoch_max 40 \
    --use_lemma \
    --use_fnn3 \
    --use_highway_fnn \
    --use_highway_fnn2 \
    --donotusenopred 3 \
    --gold_easy_fast 0 \
    --savepath path_to_save_model \

(To be updated soon for details and the labeling model...)

Updated soon

  • Detailed Usage for training.
  • Usage for parsing text files of CONLL format.
  • Off-the-shelf parsing models for DM, PAS and PSD formalisms.

semrl's People

Contributors

shuheikurita avatar

Stargazers

Ruixiang Cui avatar Alex Wang avatar Fariz Ikhwantri avatar Taichi Nishimura avatar

Watchers

James Cloos avatar

Forkers

dd22333

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.