lib/lederhosen/tasks/cluster.rb in lederhosen-0.5.6 vs lib/lederhosen/tasks/cluster.rb in lederhosen-0.5.7
- old
+ new
@@ -14,20 +14,22 @@
method_option :stepwords, :type => :numeric, :default => 8
method_option :wordlen, :type => :numeric, :default => 8
method_option :maxaccepts, :type => :numeric, :default => 1
method_option :maxrejects, :type => :numeric, :default => 8
method_option :lib, :type => :string
+ method_option :libonly, :type => :boolean, :default => false
def cluster
identity = options[:identity]
output = options[:output]
input = options[:input]
stepwords = options[:stepwords]
maxaccepts = options[:maxaccepts]
maxrejects = options[:maxrejects]
wordlen = options[:wordlen]
lib = options[:lib]
+ libonly = options[:libonly]
ohai "clustering #{input}, saving to #{output}"
options.each_pair do |key, value|
ohai "#{key} = #{value}"
@@ -43,9 +45,10 @@
"--maxrejects #{maxrejects}",
"--w #{wordlen}"
]
cmd << "--lib #{lib}" unless lib.nil?
+ cmd << "--libonly" if libonly == true
cmd = cmd.join(' ')
@shell.mute { run cmd }
end