Git Product home page Git Product logo

emnlp20_depsrl's Introduction

srl-dep

Author: Tianze Shi

About this repo

This repo contains the research code and scripts used in the paper Semantic Role Labeling as Syntactic Dependency Parsing. This README file aims at giving basic overviews of the code structure and its major components. For more questions, please directly contact the authors.

Code structure

The entrance point to the package is here. Calls to this package can be chained through fire CLI. The order of calling should usually be build-vocab, create-parser, load-embeddings, train and then finally finish. An example inference script is here using parser.evaluate(data) after loading in models and embeddings.

For official CoNLL evaluation script, access at https://www.cs.upc.edu/~srlconll/soft.html. The F1 scores displayed during model training are NOT official F1 scores (though they are usually very close).

SRL parsing module

The major parsing module is within the python class SRLDepParser inside this file. Back-and-forth conversion algorithms tuned on OntoNotes 5.0 data are contained in this file.

Pre-trained word embeddings

To speed up loading time, we can process the embedding files to trim down to only the vocabulary seen in our data. Script for trimming is here.

Data preparation

Data preparation scripts lie under data_prep folder.

Prerequisite: Stanford CoreNLP with English and Chinese models v3.9.2

  1. Follow http://cemantix.org/data/ontonotes.html to prepare data, using v12 data release
  2. For Chinese data (http://conll.cemantix.org/2012/data.html), copy folders under the correct splits
  3. Use train dev and conll-2012-test splits for English, train dev, test for Chinese
  4. Run aggregate.sh
  5. Run space_to_tab.sh
  6. Run constituency_tree.sh
  7. Run english_dep_tree.sh and english_fuse.py for English data preparation
  8. Run chinese_dep_tree.sh and chinese_fuse.py for Chinese data preparation

emnlp20_depsrl's People

Contributors

tzshi avatar

Stargazers

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

Watchers

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