Class SpellChecker

java.lang.Object
  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.

Note:

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

See Also:
SpellCheckerRunner

Constructor Summary
SpellChecker(Corrector c, Dictionary d)
           
 
Method Summary
 void checkDocument(java.io.Reader in, java.io.InputStream input, java.io.Writer 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

SpellChecker

public SpellChecker(Corrector c,
                    Dictionary d)
Method Detail

checkDocument

public void checkDocument(java.io.Reader in,
                          java.io.InputStream input,
                          java.io.Writer out)
                   throws java.io.IOException
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.

Parameters:
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
Throws:
java.io.IOException