https://github.com/linmx0130/parserChiang
Naïve transition-based dependency parser in Gluon
https://github.com/linmx0130/parserChiang
conll-u dependency-parser gluon mxnet parser
Last synced: 2 days ago
JSON representation
Naïve transition-based dependency parser in Gluon
- Host: GitHub
- URL: https://github.com/linmx0130/parserChiang
- Owner: linmx0130
- License: mit
- Created: 2017-11-29T06:53:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-17T07:52:21.000Z (over 5 years ago)
- Last Synced: 2024-11-08T18:46:09.657Z (5 months ago)
- Topics: conll-u, dependency-parser, gluon, mxnet, parser
- Language: Python
- Homepage:
- Size: 56.6 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-MXNet - parserChiang(Gluon:star:)
README
parserChiang - Naïve Transition-based Dependency Parser in Gluon
=====
This repo support CoNLL format, which is adapted by [Universal Dependencies](http://universaldependencies.org/) Project. parserChiang is implemented with great [MXNet gluon](http://gluon.mxnet.io/).
### Models
There are different models in this repo:
1. [DEPRECATED] *default/*: The default parser model using only word features. It is the baseline of all other models.
2. [DEPRECATED] *pos_aid/*: This parser model requires standard POS tagging during inference, which is provided in CoNLL dataset. In practice, you may use Stanford NLP tools to get good POS tags.
3. [DEPRECATED] *pos_joint/*: This parser model will predict POS tags.
4. *pos_deprel_joint/*: This parser model will predict POS tags and **dependent relation label**. LAS index requires the output from this model.
5. [DEPRECATED] *pos_aid_deprel_joint/*: This parser model requires standard POS tagging during inference, and will predict ependent relation label.The models marked with [DEPRECATED] will not be updated to latest functions.
### Usage
Data should be put into *data/* directory. Train the model with
$ python3 train_pos_parser.py
If the training procedure runs on GPU and the loss value become NaN abruptly, change to CPU training with following command:
$ python3 train_pos_parser.py --cpu
The maintainer is still working on this bug.Then it will create a directory named *model_dumps_{Date}_{Time}* to store the model dump. Test it with
$ python3 test_pos_parser.py [model_path] [model_file]### Notes
This implementation is a **low**-performance transition-based parser in both training speed and predicition accuracy. I created it as a toy model simply for learning natural language processing. **DO NOT USE IT IN ANY REAL WORLD TASKS**.Have fun with it!
### License
Copyright 2017-2019 Mengxiao Lin \, read LICENSE for more details.