org.cdlib.xtf.textIndexer
Class PluralFoldingFilter

Object
  extended by TokenStream
      extended by TokenFilter
          extended by PluralFoldingFilter

public class PluralFoldingFilter
extends TokenFilter

Improves query results by converting plural words to their singular forms.

Author:
Martin Haye

Field Summary
private  WordMap pluralMap
          Set of words to de-pluralize
 
Fields inherited from class TokenFilter
input
 
Constructor Summary
PluralFoldingFilter(TokenStream input, WordMap pluralMap)
          Construct a token stream to convert plural words to singular.
 
Method Summary
 Token next()
          Retrieve the next token in the stream.
 
Methods inherited from class TokenFilter
close
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pluralMap

private WordMap pluralMap
Set of words to de-pluralize

Constructor Detail

PluralFoldingFilter

public PluralFoldingFilter(TokenStream input,
                           WordMap pluralMap)
Construct a token stream to convert plural words to singular.

Parameters:
input - Input stream of tokens to process
pluralMap - Mapping of plural words to their singular equivalents.
Method Detail

next

public Token next()
           throws IOException
Retrieve the next token in the stream.

Specified by:
next in class TokenStream
Throws:
IOException