Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.07 KB

File metadata and controls

36 lines (24 loc) · 1.07 KB

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