Class SpellChecker

java.lang.Object
  extended by SpellChecker

public class SpellChecker
extends java.lang.Object

Class that implements a simple spell-checker for files.

Version:
4/10/2010
Author:
Dave Reed

Constructor Summary
SpellChecker(java.lang.String dictFile)
          Constructs a spell checker with the specified dictionary.
 
Method Summary
 void checkFile(java.lang.String textFile)
          Method that interactively checks a file for misspelled words.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpellChecker

public SpellChecker(java.lang.String dictFile)
Constructs a spell checker with the specified dictionary.

Parameters:
dictFile - the file containing the dictionary words
Method Detail

checkFile

public void checkFile(java.lang.String textFile)
Method that interactively checks a file for misspelled words. For each word not in the dictionary, the user is prompted whether they should (A)dd the word to the dictionary, (I)gnore the word for the entire file, or (C)ontinue. If the dictionary was updated, the method should rewrite the dictionary file when done.

Parameters:
textFile - the name of the text file to be spell-checked