Giter VIP home page Giter VIP logo

dep-parser's Introduction

dep-parser

CircleCI

Code to train a dependency parser model.

Install

To install dependencies run:

$ conda env create -f environment.yml

And then install the appropriate version of pytorch, for example:

$ conda install pytorch torchvision cpuonly -c pytorch
$ # conda install pytorch==1.0.0 torchvision==0.2.1 cuda80 -c pytorch

Data

Get Universal Dependencies data in [https://universaldependencies.org/#download].

$ make get_ud

Running the code

First preprocess the data for the language you are using:

$ python src/h01_data/process.py --language <language-code> --glove-file <glove-vectors-filename>

Where language is the ISO 639-1 code for the language, and glove file is the path to a txt file containing one word and its embedding per line. GloVe embeddings for wikipedia can be trained with this repository.

Then, train the model with the command:

$ python src/h02_learn/train.py --language <language-code>

This code will, by default, train a Deep Biaffine Parser. To train the model using the MST parser loss add the argument --model mst.

This code, will by default look for data in the ./data path. To change it (either during data preprocessing or training) use the argument --data-path <data-path>.

dep-parser's People

Contributors

ranzmigrod avatar tpimentelms avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

devpouya

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.