Displaying 1 result from an estimated 1 matches for "stemmed_analyzer".
2007 Nov 09
2
Problem with stemming and AAF
...s[:page], :per_page => #$ItemsPerPage, :limit => $ItemsPerPage,
:offset => $offset)
@results_pages = Product.paginate_search(search_text, :page =>
params[:page], :per_page => $ItemsPerPage)
The next step was to implement stemming, which seemed straightforward
enough. I created the stemmed_analyzer.rb file in the lib directory,
as follows:
require ''rubygems''
require ''ferret''
class StemmedAnalyzer < Ferret::Analysis::Analyzer
include Ferret::Analysis
def initialize(stop_words = ENGLISH_STOP_WORDS)
@stop_words = stop_words
end
def token_strea...