Skip to content

Commit

Permalink
removed KirinDave conditionally definition of Array#sum, yury had alr…
Browse files Browse the repository at this point in the history
…eady fixed this
  • Loading branch information
luisparravicini committed Dec 26, 2009
1 parent ee09ae0 commit dc640d0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ rb-gsl:: http://rb-gsl.rubyforge.org
Notice that LSI will work without these libraries, but as soon as they are installed, Classifier will make use of them. No configuration changes are needed, we like to keep things ridiculously easy for you.

== Changes in this branch
I made this branch to fix a TypeError on untrain (classifier-1.3.1), then merge KirinDave branch[http://github.com/KirinDave/classifier/] to fix an incompatibility problem with ActiveSupport (with Array#sum), then francois[http://github.com/francois/classifier/] branch for jeweler and all the changes yuri[http://github.com/yury/classifier/] made on his branch (specially the use of ruby-stemmer, which I needed).
I made this branch to fix a TypeError on untrain (classifier-1.3.1), then francois[http://github.com/francois/classifier/] branch for jeweler and all the changes yuri[http://github.com/yury/classifier/] made on his branch (specially the use of ruby-stemmer, and the incompatibility fix on Array#sum, which I needed).
After that I added support for loading the stopwords of certain language from a file (before the list was embedded on the source code) and a stopword list for Spanish.
This branch only works with Ruby 1.9

Expand Down
9 changes: 0 additions & 9 deletions lib/classifier/extensions/vector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@
require 'matrix'
require 'mathn'

# Conflicts with ActiveSupport
unless Array.new.respond_to?(:sum)
class Array
def sum
inject(0) { |sum,term| sum += term }.to_f
end
end
end

class Vector
def magnitude
sumsqs = 0.0
Expand Down

0 comments on commit dc640d0

Please sign in to comment.