org.cdlib.xtf.textIndexer
Class SpellWritingFilter

Object
  extended by TokenStream
      extended by TokenFilter
          extended by SpellWritingFilter

public class SpellWritingFilter
extends TokenFilter

Adds words from the token stream to a SpellWriter.

Author:
Martin Haye

Field Summary
private  boolean firstTime
          true before the first token is returned
private  SpellWriter writer
          Spelling writer to write to
 
Fields inherited from class TokenFilter
input
 
Constructor Summary
SpellWritingFilter(TokenStream input, SpellWriter writer)
          Construct a token stream to add tokens to a spelling correction dictionary.
 
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

writer

private SpellWriter writer
Spelling writer to write to


firstTime

private boolean firstTime
true before the first token is returned

Constructor Detail

SpellWritingFilter

public SpellWritingFilter(TokenStream input,
                          SpellWriter writer)
Construct a token stream to add tokens to a spelling correction dictionary.

Parameters:
input - Input stream of tokens to process
writer - Spelling dictionary writer
Method Detail

next

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

Specified by:
next in class TokenStream
Throws:
IOException