Hi,

#{RAILS_ROOT}/lib is a good place for things like this. If you name your
file correctly, i.e. german_stemming_analyzer.rb, Rails will auto-load
it when you use the class name.

Jens

On Fri, Sep 07, 2007 at 04:21:56PM +0200, Guillaume Differenthink wrote:
> Hi,
> 
> I m trying to use a custom analyser to add my french stop words... i m
> reading the tutorial at :
> http://projects.jkraemer.net/acts_as_ferret/wiki/AdvancedUsage
> 
> My problem is that i ve no idea where to put my custom Analyser class
> like :
> 
> class GermanStemmingAnalyzer < Ferret::Analysis::Analyzer
>   include Ferret::Analysis
>   def initialize(stop_words = FULL_GERMAN_STOP_WORDS)
>     @stop_words = stop_words
>   end
>   def token_stream(field, str)
>     
> StemFilter.new(StopFilter.new(LowerCaseFilter.new(StandardTokenizer.new(str)),
> @stop_words), 'de')
>   end
> end
> 
> Any clue ?
> 
> Thanks a lot
> 
> Guillaume.
> -- 
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Ferret-talk mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/ferret-talk
> 

-- 
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[EMAIL PROTECTED] | www.webit.de
 
Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to