Skip to content

A feed-forward neural network to predict the transitions of an arc-standard dependency parser.

Notifications You must be signed in to change notification settings

Zhongheng-Cheng/neural-network-dependency-parser

Repository files navigation

Neural Network Dependency Parser

In this assignment you will train a feed-forward neural network to predict the transitions of an arc-standard dependency parser. The input to this network will be a representation of the current state (including words on the stack and buffer). The output will be a transition (shift, left_arc, right_arc), together with a dependency relation label.

Description

Obtaining the Vocabulary

python3 get_vocab.py data/train.conll data/words.vocab data/pos.vocab

Saving Training Matrices

python3 extract_training_data.py data/train.conll data/input_train.npy data/target_train.npy
python3 extract_training_data.py data/dev.conll data/input_dev.npy data/target_dev.npy

Run the Training

python3 train_model.py data/input_train.npy data/target_train.npy data/model.pt

Print CoNLL Formatted Parse Trees

python3 decoder.py data/model.pt data/dev.conll

Evaluate the Parser

python3 evaluate.py data/model.pt data/dev.conll

About

A feed-forward neural network to predict the transitions of an arc-standard dependency parser.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages