search for: stemmedanalyz

Displaying 5 results from an estimated 5 matches for "stemmedanalyz".

Did you mean: stemmedanalyzer
2007 Nov 09
2
Problem with stemming and AAF
...h_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_stream(field, str) StemFilter.new(StopFilter.new(LowerCaseFilter.new(StandardTokenizer.new(str)), @stop_words)) end end And added the...
2007 Jan 11
5
stop words in query
Hello all, Quick question, I''m using AAF and the following custom analyzer: class StemmedAnalyzer < Ferret::Analysis::Analyzer include Ferret::Analysis def initialize(stop_words = ENGLISH_STOP_WORDS) @stop_words = stop_words end def token_stream(field, str) StemFilter.new(StopFilter.new(LowerCaseFilter.new(StandardTokenizer.new(str)), @stop_words)) end However when my s...
2006 Nov 13
1
Stemming, stop words, acts_as_ferret
...legal cases. Things like a search for "thermal image" needs to hit "thermal imaging." 2. Stop words. Searches for "failing to instruct the jury" should come up with hits on a search for "fail to instruct." 3. Case-insensitive. What I tried was: class StemmedAnalyzer < Ferret::Analysis::Analyzer def token_stream(field, reader) return Ferret::Analysis::PorterStemFilter.new(Ferret::Analysis::LowerCaseTokenizer. new(reader)) end end class Summary < ActiveRecord::Base acts_as_ferret(:analyzer => StemmedAnalyzer.new) But this doesn''t...
2007 Feb 27
3
segfault in ferret 0.11.0
.../1.8/erb.rb:504: [BUG] Segmentation fault ruby 1.8.4 (2005-12-24) [i686-darwin8.7.1] Abort trap When I revert back to 10.14 I dont get this error. When I comment out the line: Ferret::Index::Index.new({:path => @index_path, :field_infos => fi, :create_if_missing => true, :analyzer => StemmedAnalyzer.new}) This error goes away... If there''s any other things you need to know, let me know and I will be more than glad to answer any questions. Cheers, -Ray -- Posted via http://www.ruby-forum.com/.
2006 Dec 08
4
Using custom stem analyzer giving mongrel errors
I''m using the custom stem analyzer: require ''rubygems'' require ''ferret'' include Ferret module Ferret::Analysis class FerretAnalyzer def initialize(stop_words = FULL_ENGLISH_STOP_WORDS) @stop_words = stop_words end def token_stream(field, text) StemFilter.new(StopFilter.new(LowerCaseFilter.new(StandardTokenizer.new(text)),