https://github.com/syou6162/go-easy-first
Dependency Parser with Easy-First Algorithm written in Go.
https://github.com/syou6162/go-easy-first
dependency-parser golang machine-learning nlp
Last synced: 3 months ago
JSON representation
Dependency Parser with Easy-First Algorithm written in Go.
- Host: GitHub
- URL: https://github.com/syou6162/go-easy-first
- Owner: syou6162
- License: mit
- Created: 2017-02-12T22:37:28.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-12-06T17:11:01.000Z (7 months ago)
- Last Synced: 2025-03-25T12:53:33.184Z (3 months ago)
- Topics: dependency-parser, golang, machine-learning, nlp
- Language: Go
- Homepage:
- Size: 81.1 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-easy-first
[](https://circleci.com/gh/syou6162/go-easy-first)
[](https://goreportcard.com/report/github.com/syou6162/go-easy-first)
[](https://coveralls.io/github/syou6162/go-easy-first?branch=coveralls)go-easy-first - Dependency Parser with Easy-First Algorithm (An Efficient Algorithm for Easy-First Non-Directional Dependency Parsing, NAACL-2010, Yoav Goldberg and Michael Elhadad) written in Go.
# Build from source
```sh
% git clone https://github.com/syou6162/go-easy-first.git
% cd go-easy-first
% make deps && make bindata && make build
```# Usage
go-easy-first has `train` (training a parser phase) and `eval` (evaluating a trained parser phase) modes. To see the detail options, type `./go-easy-first --help`.## Training a parser
To see the detail options, type `./go-easy-first train --help`.```sh
% ./go-easy-first train --train-filename path/to/train.txt --dev-filename path/to/dev.txt --max-iter 10 --model-filename model.bin
0, 0.907, 0.893
1, 0.920, 0.901
2, 0.929, 0.904
3, 0.935, 0.906
4, 0.940, 0.907
5, 0.944, 0.907
6, 0.947, 0.908
7, 0.950, 0.908
8, 0.953, 0.908
9, 0.955, 0.908
```## Evaluating a trained parser
To see the detail options, type `./go-easy-first eval --help`.```sh
% ./go-easy-first eval --test-filename path/to/test.txt --model-filename model.bin
| SENTENCES | SECONDS | ACCURACY |
|-----------|---------|----------|
| 1346 | 4.60 | 0.888 |
```## [Experimental] Obtain a single binary embedded model parameters
```sh
% ./go-easy-first train --train-filename path/to/train.txt --dev-filename path/to/dev.txt --max-iter 10 --model-filename data/model.bin
% make bindata && make build
% ./go-easy-first decode --test-filename path/to/test.txt
```# Roadmap
- [ ] Implement PP-Attachment features
- [ ] Beam search with max-violation perceptron
- [ ] Mini-batch update
- [x] Embed weight parameters to a built binary file using go-bindata# Author
Yasuhisa Yoshida