Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize Field Names #7

Open
chewxy opened this issue Jun 4, 2017 · 0 comments
Open

Standardize Field Names #7

chewxy opened this issue Jun 4, 2017 · 0 comments

Comments

@chewxy
Copy link
Owner

chewxy commented Jun 4, 2017

It's very obvious when you see this:

func pipeline(name string, f io.Reader) (*lingo.Dependency, error) {
	l := lexer.New(name, f)
	p := pos.New(pos.WithModel(posModel), pos.WithCluster(clusters), pos.WithStemmer(stemmer{}), pos.WithLemmatizer(fixer{}))
	d := dep.New(depModel)

	// set up pipeline
	p.Input = l.Output
	d.Input = p.Output
	go l.Run()
	go p.Run()
	go d.Run()

	select {
	case err := <-l.Errors:
	case err := <-d.Error: // should be named "Errors"
	case dep := <-d.Output:
		return dep, nil
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant