Skip to content

Commit

Permalink
Nuggets::LSI has been extracted into the lsi4r gem.
Browse files Browse the repository at this point in the history
  • Loading branch information
blackwinter committed Apr 17, 2014
1 parent c1e7707 commit dbde8b4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -12,7 +12,7 @@ begin
:email => %q{jens.wille@gmail.com},
:license => %q{AGPL-3.0},
:homepage => :blackwinter,
:dependencies => %w[unicode] << ['ruby-nuggets', '>= 0.9.4']
:dependencies => %w[lsi4r unicode]
}
}}
rescue LoadError => err
Expand Down
4 changes: 2 additions & 2 deletions lib/pms/index.rb
Expand Up @@ -85,7 +85,7 @@ def doc(doc_num)

def build_index(options)
if lsi = options[:lsi]
require 'nuggets/lsi'
require 'lsi4r'

lsi = DEFAULT_LSI if lsi == true
map = Hash.new { |h, k| h[k] = [] }
Expand All @@ -104,7 +104,7 @@ def build_index(options)
}
}

Nuggets::LSI.each_norm(map, :min => lsi, :new => true) { |d, k, _|
Lsi4R.each_norm(map, :min => lsi, :new => true) { |d, k, _|
index[mangle_token(k)][d.key] << nil
} if lsi

Expand Down
2 changes: 1 addition & 1 deletion spec/pms_spec.rb
Expand Up @@ -117,7 +117,7 @@

it 'should find more ducks' do
@pms1.search('ducks').results.should == [1]
@pms2.search('ducks').results.should == [1, 4, 5]
@pms2.search('ducks').results.should == [1, 4, 6]
end

it 'should not report positions for LSI terms' do
Expand Down

0 comments on commit dbde8b4

Please sign in to comment.