aaaton / golem

A lemmatizer implemented in Go
MIT License
81 stars 20 forks source link

Breaks without go mod #17

Open aaaton opened 4 years ago

aaaton commented 4 years ago

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

Would be of interest to have it fixed.

mattrltrent commented 3 months ago

@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").