-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zero vectors can not be normalized #64
Comments
Not sure! Do you have any posts which aren't like the others? Perhaps one without any content? |
This is one of those tricky Matrix building errors, I think. Any empty post might cause this. |
Just started playing with this today, and I won't pretend to understand No issue:
Note I'm going to change the first string. No issue: Still no issue: Issue: Not sure if thats helpful. |
@chris357 really small inputs without meaningful words i.e. only stop words are known to break LSI. I'm looking into how to handle this more gracefully. |
+1 same error here |
fixed by #77 |
Time for some reanimation of zombie threads... I ran into this issue again. Classifier Reborn 2.1.0, GSL 2.1.0.3. I'm taking data from a Rails app and trying to feed it into an LSI classifier: Post.where.not(body: nil).each do |p|
body = p.body.tr "\n", ''
if p.is_tp
lsi.add_item p.body, :spam
elsif p.is_fp
lsi.add_item p.body, :ham
end
end The data being fed in looks something like this:
Getting the same old |
@ArtOfCode- can you try our master branch? There's been a lot of work dones since 2.1.0 was released. |
Sure thing. I'm not at a dev machine right now, but I'll give it a shot when I get back later on. |
I just cut a new version, 2.2.0. Let me know if it works. |
So I've given both a shot. Neither 2.2.0 from Gems or the master branch solve the problem - still getting the same error. |
More info: unknowingly, I actually wasn't using GSL (was installed but not loaded... bah). Using GSL, the problem seems to have disappeared. That seems to indicate the issue is somewhere in CR's own implementation of vectors. |
That is in fact consistent with what I'd expect. We intend to fix our implementation, but it's a tricky algorithm to implement correctly in Ruby. |
This may be fixed (ish) by #173 |
Hi there!
I am using Rake to try to automate my Jekyll blog generation and find such errors. I didn't encounter such when using
jekyll serve --lsi
. Any pointers? 😄The text was updated successfully, but these errors were encountered: