go-ego/gse

Could not load dictionaries

kooksee opened this issue · 5 comments

I pulled gse through go mod, but I found that the dictionary data in gse was not pulled down, so I found a "Could not load dictionaries" error. Then, I copied the dictionary data into the gse package to run it through. So, I think,

  1. Can you delete the hard-coded dictionary location in gse, or can it be configurable through parameters.
  2. If you want to load dictionary data, is it possible to convert the dictionary data into go static data code through "go-bindata" or other

Use go mod vendor? golang #26366.

Thank you very much for answering my question. I have learned about go mod before. My solution is to put an init.go file in a static folder and then call this in a package such as gse file. In a nutshell, just treat static files as a go package, thanks.

You can use seg.LoadDictEmbed().

You can use seg.LoadDictEmbed().

When I compile to binary, I can’t find the default dictionary

RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GOARM=6 go build -ldflags '-w -s' -o main

@jw-star But there is due to can't reproduce.