Class SpellChecker

  extended by SpellChecker

public class SpellChecker
extends java.lang.Object

A SpellChecker uses a Dictionary, a Corrector, and I/O to interactively spell check an input stream. It writes the corrected output to the specified output stream.


The SpellChecker object is used by SpellCheckerRunner; see the provided code there.

See Also:

Constructor Summary
SpellChecker(Corrector c, Dictionary d)
Method Summary
 void checkDocument( in, input, out)
          checkDocument interactively spell checks a given document.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public SpellChecker(Corrector c,
                    Dictionary d)
Method Detail


public void checkDocument( in,
checkDocument interactively spell checks a given document. Internally, it should use a TokenScanner to parse the document. Word tokens that are not in the dictionary should be corrected, non-word tokens and words that are in the dictionary should be output verbatim.

in - the source document to spell check
input - an InputStream from which user input is obtained
out - the target document on which the corrected output is written