Could not load dictionaries
kooksee opened this issue · 5 comments
kooksee commented
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,
- Can you delete the hard-coded dictionary location in gse, or can it be configurable through parameters.
- 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
vcaesar commented
Use go mod vendor
? golang #26366.
kooksee commented
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.
vcaesar commented
You can use seg.LoadDictEmbed()
.
jw-star commented
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