Permalink
Browse files

soulmate-web needs to know about stop words now also

  • Loading branch information...
1 parent 733389e commit 74f3f07675b8856a11d459349bac32c803d2fb46 @erwaller erwaller committed Jan 5, 2012
Showing with 6 additions and 1 deletion.
  1. +1 −1 bin/soulmate
  2. +5 −0 bin/soulmate-web
View
@@ -22,7 +22,7 @@ parser = OptionParser.new do |opts|
opts.on("-s", "--stop-words [FILE]", "Path to file containing a list of stop words") do |fn|
File.open(fn) do |file|
- Soulmate.stop_words = file.readlines.map{ |l| l.strip }
+ Soulmate.stop_words = file.readlines.map{ |l| l.strip }.reject{ |w| w.empty? }
end
end
View
@@ -20,4 +20,9 @@ Vegas::Runner.new(Soulmate::Server, 'soulmate-web', {
runner.logger.info "Using Redis connection string '#{host}'"
Soulmate.redis = host
end
+ opts.on("-s", "--stop-words [FILE]", "Path to file containing a list of stop words") do |fn|
+ File.open(fn) do |file|
+ Soulmate.stop_words = file.readlines.map{ |l| l.strip }.reject{ |w| w.empty? }
+ end
+ end
end

0 comments on commit 74f3f07

Please sign in to comment.