Comments (20)
Hello @aaaton , Still getting same error, any help will be appreciated
from golem.
@smileart
I've built this without git lfs
now, and compressed the sizes significantly. I've also made the dicts into submodules so you will only need to fetch what is necessary.
The big difference for users is that you need to get github.com/aaaton/golem/v4
with the version appended at the end.
You will also need to get the languages/dictionaries you are interested in:
go get github.com/aaaton/golem/v4/dicts/en
for english, etc.
It seems to work fine when I'm testing, but please give it a go and let me know.
from golem.
works fine with modules 👍
but "go get" from readme gives me this:
$ go get github.com/aaaton/golem/v4/dicts/en
/home/slirx/dev/go/src/github.com/aaaton/golem/v4/dicts/en/pack.go:10:2: no Go files in /home/slirx/dev/go/src/github.com/aaaton/golem/v4
from golem.
The binaries and code generation was mainly to be able to package the data with the code, so a "go get" would suffice for any project, without needing additional dict files, paths etc.
VFS or something similar would have done the same trick, but they tend to package the data encoded as a list of bytes, which is not expressed in a compact way in source.
If there is any chance your custom needs would be interesting for some else, please fork and PR.
from golem.
Same issue. Replacing dicts/de/data.go
file from this repository manually helped me.
from golem.
First off: Apologies for my slow response.
I think the problem might be due to that we started using git lfs, but forgot to document it anywhere. Do you have LFS installed?
https://help.github.com/en/articles/installing-git-large-file-storage
from golem.
No worries, thx for the hint. i will check that in the next days
from golem.
Sorry for bumping an old issue, but I can't get this working either.
I installed git-lfs
as per the above instructions, to no avail. I have tried with the following installation commands:
$ git lfs install
$ git lfs install --skip-repo
$ sudo git lfs install --system
Removing the go mod
downloaded file each time, prior to go get -u
(the overkill to cover off any weird go get
cases).
I also re-ran the above steps with git-lfs
from pacman -Sy git-lfs
with the same result as OP.
from golem.
Thanks for the comment @jspc
I'll look into what the problem might be, if it's not git-lfs related.
from golem.
Running git lfs pull in the repo solved the issue for me. There should be triggers for this in the config.
Could you give it a try?
from golem.
Should be fixed in v3.0.2
from golem.
Does this link help?
essentially running git lfs install --skip-repo
anywhere on your machine
You might need to go into the repo (if you're not using modules) and do git lfs pull
again.
from golem.
Hi, @aaaton
Can't make it work:
$ git lfs install --skip-repo
Git LFS initialized.
$ go run main.go
go: downloading github.com/aaaton/golem v0.0.0-20191129093449-a9f1a1b6b185
main.go:12:2:
../../../../pkg/mod/github.com/aaaton/[email protected]/dicts/en/data.go:1:1: expected 'package', found version
Are there any additional steps to do?
from golem.
@slirx
Are you using go-modules or the classic dep system? What version of go are you running?
Does a 'git lfs pull' in the repo do the trick?
A lot of probing questions, but I'm a little bit at a loss why it's not working
from golem.
I'm using modules, so not entirely sure what to do in that case (other than cloning the repo and replacing it in ./mod directory, which is not an option). What do you think about not shipping the dictionaries with the library, but allowing users to provide their own dictionaries location trough path or ENV variable? In that case, large files won't be in git + adding new languages won't require any changes and releasing a new version of the library.
from golem.
Thanks for the suggestion.
I am also using this project with modules and building it using docker, so it is possible to get it to work, but we have to figure out what and why it's not doing so for everyone.
I will have a look at this over the weekend and hopefully figure it out.
Did the git lfs install
have no effect?
from golem.
@aaaton thank you for your time and consideration. Certainly I've tried to install and initialise LFS (it said Git LFS initialized.
), after that I deleted the lib in the mod directory and installed it again, but it had no effect so far. Just in case: I'm trying it on MacOS 10.15.4 w/ Go 1.14 and git 2.24.0 w/ git-lfs/2.10.0 (GitHub; darwin amd64; go 1.13.6)
from golem.
Thanks for the detailed report. @smileart
I'll have a peek at it today. Maybe LFS is a bad fit for the dicts, like you said. The size of them is not really large enough to warrant LFS, but they are also too big for regular git (10-50mb). I'll see if I can reduce the size of the binary blobs by using something like a state machine or a btree. And just commit it with git instead.
from golem.
Is that outside of a module? I'm guessing the readme is only adapted for module use.
Actually, the entire project is probably go modules-only since the latest version.
I haven't really done multi-module repos before and it was trickier than expected.
from golem.
@aaaton thank you so much for the fix. I tested it in my project, and now it works like a charm! Frankly, meanwhile I've started working on my own lemmatizer to address some custom needs and I just wonder if there where any particular reasons why you went on with those binaries and code generation in the first place? Just so I won't make a mistake of not doing that in my own project. Thanks once again. I believe now README is correct and the project is usable for anyone again.
from golem.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from golem.