Git Product home page Git Product logo

neural-dep-srl's Introduction

neural-dep-srl

This is the code for used in the papers A Simple and Accurate Syntax-Agnostic Neural Model for Dependency-based Semantic Role Labeling and Encoding Sentences with Graph Convolutional Networks for Semantic Role Labeling.

Dependencies

Semantic role labeling data processing

To run the model the first thing to do is create a dataset and all the files needed for the evaluation.

  1. Place the CoNLL-2009 dataset files with the same format as in here in data/conll2009/

  2. Place the embedding file sskip.100.vectors in data/

  3. Run scripts/srl_preproc.sh in order to obtain the preprocessed data you need for training and testing the model.

  4. Place the development, test, and ood files in /data/conll/eval/ and rename them respectively dev-set_for_eval_gold, test-set_for_eval_gold, ood-set_for_eval_gold.

  5. Place the dev, test, and ood files in /data/conll/eval/ with only the first 12 columns and as 13th column put your predicted predicate sense, and rename the files respectively dev-set_for_eval_ppred, test-set_for_eval_ppred, ood-set_for_eval_ppred

Semantic role labeling training and testing

6a. To train the sintax agnostic model run scripts/train.sh

6b. To train the model with the graph convolutional network over syntax run scripts/train_gcn.sh

  1. To test the trained model run scripts/test.sh

The hyper-parameters on the scripts are the ones with which we obtained the best results.

For any question, send us a mail at marcheggiani [at] uva [dot] nl or anton-fr [at] yandex-team [dot] ru .

neural-dep-srl's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neural-dep-srl's Issues

_DEP_LABELS in read_dependency.py

In read_dependency.py, I noticed that _DEP_LABELS has 63 labels. But I used a counter and found there are 69 labels in conll 2009 training set, and 107 labsls in all datasets(train, dev, test, ood). Neither of them matches your dependency label set. So I got really confused. Could you please tell us how you get _DEP_LABELS or prune this label set? Thanks a lot!

CoNLL 2009 Data Unavailable?

I'm trying to run your code, but the links to download the ConLL 2009 data are mostly dead links. Do you have a direct link to the data you used in training/eval?

Requesting implementation in tensorflow

Hi,
Theano library is no more being maintained by MILA. It would be great if you could provide the implementation of your code in some actively developed libraries like tensorflow or pytorch etc.

I completely understand that it is a bit difficult thing to do but that would make your code more usable.

Thanks in advance.

Error with official script

I'm trying to replicate the results from you SRL paper (https://arxiv.org/pdf/1701.02593.pdf). I've been able to get the code to run and train, but at every iteration I get a message saying that there's an error with the official script. When I run the conll evaluation script myself on the output from the model (prediction_09.paste) the first error is a line mismatch at line 634, which is the line immediately after a sentence ("Two - Way Street") with no predicate in it: in the gold file this line is blank, but the system output file has five tab-separated underscores. When I delete the line, other lines later in the file raise another error, "Invalid number of tokens in line."

Do you know how to fix this problem? Or can you explain the parts of the code that write the output, so I can try to figure it out myself? Thanks!

eval09.pl

Code execution time during training and testing, evaluation is not calculated and the following message is printed, where is the problem? Please help, thank you

There has been some error with the official script
Try next iteration :)

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.