An example dependency parser for NLP, use arc-eager algorithm.
- libsvm (with python interface)
- Python NLTK package, now used to draw tree
python parser.py --test
to check predict accuracy with d.data
python parser.py file
to show dependency tree of given sentences from file, format:
word POS-tag
word POS-tag
sentence should be separated by empty line
It may take seconds for script to load model
-
python trainer.py input out
to covert input file to features list, save to output file. -
use
svm-train
to train features to modelnow suggest params with -c 32 -g 0.5. You may want to try to use lib linear to train features file to model, which is much faster.