org.getopt.stempel.lucene
Class StempelFilter

java.lang.Object
  extended byorg.apache.lucene.analysis.TokenStream
      extended byorg.apache.lucene.analysis.TokenFilter
          extended byorg.getopt.stempel.lucene.StempelFilter

public class StempelFilter
extends org.apache.lucene.analysis.TokenFilter

Transforms the token stream as per the stemming algorithm. Note: the input to the stemming filter must already be in lower case, so you will need to use LowerCaseFilter or LowerCaseTokenizer farther down the Tokenizer chain in order for this to work properly!

Author:
Andrzej Bialecki <ab@getopt.org>

Field Summary
 
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
 
Constructor Summary
StempelFilter(Stemmer stemmer, org.apache.lucene.analysis.TokenStream in)
          Create filter using the supplied stemming table.
StempelFilter(org.apache.lucene.analysis.TokenStream in)
          Create filter using the default stemming table.
 
Method Summary
 org.apache.lucene.analysis.Token next()
          Returns the next input Token, after being stemmed
 
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StempelFilter

public StempelFilter(org.apache.lucene.analysis.TokenStream in)
Create filter using the default stemming table.

Parameters:
in - input token stream

StempelFilter

public StempelFilter(Stemmer stemmer,
                     org.apache.lucene.analysis.TokenStream in)
Create filter using the supplied stemming table.

Parameters:
stemmer - stemmer
in - input token stream
Method Detail

next

public final org.apache.lucene.analysis.Token next()
                                            throws java.io.IOException
Returns the next input Token, after being stemmed

Throws:
java.io.IOException