lib/tasks/try.rake in picky-1.4.1 vs lib/tasks/try.rake in picky-1.4.2
- old
+ new
@@ -4,19 +4,19 @@
# desc "Try how a given word would be tokenized when indexing (type:category optional)."
task :index, [:text, :index_and_category] => :application do |_, options|
text, index_and_category = options.text, options.index_and_category
- tokenizer = index_and_category ? Indexes.find(*index_and_category.split(':')).tokenizer : Tokenizers::Index.default
+ tokenizer = index_and_category ? Indexes.find(*index_and_category.split(':')).tokenizer : Internals::Tokenizers::Index.default
puts "\"#{text}\" is saved in the index as #{tokenizer.tokenize(text.dup).to_a}"
end
# desc "Try how a given word would be tokenized when querying."
task :query, [:text] => :application do |_, options|
text = options.text
- puts "\"#{text}\" as a query will be preprocessed into #{Tokenizers::Query.default.tokenize(text.dup).to_a.map(&:to_s).map(&:to_sym)}"
+ puts "\"#{text}\" as a query will be preprocessed into #{Internals::Tokenizers::Query.default.tokenize(text.dup).to_a.map(&:to_s).map(&:to_sym)}"
end
# desc "Try the given text with both the index and the query (type:category optional)."
task :both, [:text, :index_and_category] => :application do |_, options|
text, index_and_category = options.text, options.index_and_category
\ No newline at end of file