Python reimplementations of a series of neural extensions of the Dependency Model with Valence (DMV) for unsupervised dependency parsing.
Due to the difference in the framework, dataset processing methods and model implementation, we did not use the parameter settings in the paper and results are for reference only.
- NDMV: Unsupervised Neural Dependency Parsing
- L-NDMV: Dependency Grammar Induction with Neural Lexicalization and Big Training Data
- D-NDMV: Enhancing Unsupervised Generative Dependency Parser with Contextual Information
python==3.7
pytorch==1.4
cupy-cuda100==7.2.0
A GPU is required.
model | result | in paper | configure file |
---|---|---|---|
Neural DMV (Standard EM) | 55.4 | 51.3 | ndmv_em_1.json |
Neural DMV (Viterbi EM) | 65.1 | 65.9 | ndmv_viterbi_1.json |
Neural E-DMV | 69.0 | 69.7 | ndmv_viterbi_2.json |
Neural E-DMV (Good Init) | - | 72.5 | - |
- Prepare your dataset. CoNLL format are expected and train, dev and test are splitted.
- Modify
train_ds
,dev_ds
andtest_ds
fields in the configure file. - run command
python model/ndmv.py --load_option <path_to_configure_file>
.
You can find the description of each field of the configuration file in the subclass of Options, which named as XXXXOptions
.
If get an ModuleNotFoundError for utils
or module
, you need set PYTHONPATH
to include the project`s root.