public class SpellChecker
extends java.lang.Object
Note:
The SpellChecker object is used by SpellCheckerRunner; see the provided code there.
SpellCheckerRunner
Constructor and Description |
---|
SpellChecker(Corrector c,
Dictionary d)
Constructs a SpellChecker
|
Modifier and Type | Method and Description |
---|---|
void |
checkDocument(java.io.Reader in,
java.io.InputStream input,
java.io.Writer out)
Interactively spell checks a given document.
|
public SpellChecker(Corrector c, Dictionary d)
c
- A Correctord
- A Dictionarypublic void checkDocument(java.io.Reader in, java.io.InputStream input, java.io.Writer out) throws java.io.IOException
You may assume all of the inputs to this method are non-null.
in
- The source document to spell checkinput
- An InputStream from which user input is obtainedout
- The target document to which the corrected output is writtenjava.io.IOException
- if error while reading