> 
> 1- Add a stem(String) method and delegate to it the
> calling of snowball frenchStemmer as :
> 
>  public String stem(String term)
>  {
>       stemmer.setCurrent(term);
>       if (stemmer.stem())
>               return stemmer.getCurrent();
>       else
>               return term;
>  }
> 
> 2- Add to SnowballProgram ancestor of frenchStemmer
> class stem(String s).
> This is the fastest way but it would make your code 
> dependent to future snowball releases. But I don't
> know your requirements.
> 
> 3- If you have some large range of different stemmers
> to be integrated, you can usefully consider writing
> down an Adaptor class to receive calls from analyser
> and forward them to a particular snowball stemmers. 
> 
Hmm.
Isn't org.apache.lucene.analysis.snowball.SnowballFilter already
what you described?
It can be used like 
        result = new SnowballFilter(result, "German");
where result is some TokenStream.
(Of course you'd use "French" instead of "German" for french.)

I just tried the german snowball filter and found this quite
easy.

greetings
        Morus

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to