com.swabunga.spell.event

Class FileWordTokenizer

public class FileWordTokenizer extends AbstractWordTokenizer

This class tokenizes a input file.

Any takers to do this efficiently?? doesn't need to replace any words to start with. I need this to get an idea of how quick the spell checker is.

Constructor Summary
FileWordTokenizer(File inputFile)
Creates a new FileWordTokenizer object.
FileWordTokenizer(File inputFile, WordFinder finder)
Creates a new FileWordTokenizer object and associate a WordFinder to it's processing.
Method Summary
voidreplaceWord(String s)
Replaces the current word token

Constructor Detail

FileWordTokenizer

public FileWordTokenizer(File inputFile)
Creates a new FileWordTokenizer object.

Parameters: inputFile the file to work upon

FileWordTokenizer

public FileWordTokenizer(File inputFile, WordFinder finder)
Creates a new FileWordTokenizer object and associate a WordFinder to it's processing.

Parameters: inputFile the file to word upon. finder the specialize processing for words.

Method Detail

replaceWord

public void replaceWord(String s)
Replaces the current word token

Parameters: s the new string

Throws: WordNotFoundException current word not yet set.