golem icon indicating copy to clipboard operation
golem copied to clipboard

Breaks without go mod

Open aaaton opened this issue 5 years ago • 1 comments

Since v4, the project is not compiling without go modules, i.e. with the classic GOPATH.

Would be of interest to have it fixed.

aaaton avatar Apr 06 '20 11:04 aaaton

@aaaton Is there a way around this?

I assume it's the reason this doesn't work:

import (
	"github.com/aaaton/golem"
	"github.com/aaaton/golem/v4/dicts/en"
)

var lem *golem.Lemmatizer

func init() {
	var err error
	lem, err = golem.New(en.New())
	if err != nil {
		panic(err)
	}
}

It outputs: "panic: language en is not valid".


FIX:

Just use this commit: go get https://github.com/aaaton/golem/@afcd5a41d6d857732697e663908e516b77f2d6ea and then: lem, err = golem.New("en").

mattrltrent avatar May 20 '24 00:05 mattrltrent