This repository has been originally forked from tpimentelms/dep-parser but has changed a lot since then.
It implements a generalized easy first parser currently able to parse according to the MH4 transition system in both a shift-reduce and free order. It is able to train both a multilingual and a monoligual parser.
Install the dependencies youself :P
Get Universal Dependencies data in [https://universaldependencies.org/#download].
$ make get_ud
First preprocess the data for the language you are using:
$ python src/h01_data/process.py --language <language-code> --easy-first <True/False>
Where language is the ISO 639-1 code for the language. You can further specify "multilingual" to prepare a multilingual dataset. easy-first specifies whether the oracle will use an easy-first or shift-reduce order to derive the tree.
Then, train the model with the command:
$ python src/h02_learn/train.py --language <language-code> --mode <easy-first/shift-reduce>
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>
.