C D F G H I L M N R S T 

C

checkDocument(Reader, InputStream, Writer) - Method in class SpellChecker
checkDocument interactively spell checks a given document.
compareDocs(String, String) - Static method in class SpellCheckerTest
This is a helper method that compares two documents.
Corrector - Class in <Unnamed>
Skeleton implementation for classes capable of providing spelling corrections.
Corrector() - Constructor for class Corrector
 

D

Dictionary - Class in <Unnamed>
A dictionary manages a collection of known, correctly-spelled words.
Dictionary(TokenScanner) - Constructor for class Dictionary
Constructs a dictionary from words provided by a TokenScanner.
DictionaryTest - Class in <Unnamed>
 
DictionaryTest() - Constructor for class DictionaryTest
 

F

FileCorrector - Class in <Unnamed>
A Corrector whose spelling suggestions are given in a text file.
FileCorrector(Reader) - Constructor for class FileCorrector
Constructs an instance from the supplied Reader.
FileCorrector.FormatException - Exception in <Unnamed>
A special purpose exception class to indicate errors when reading the input for the FileCorrector.
FileCorrector.FormatException(String) - Constructor for exception FileCorrector.FormatException
 
FileCorrectorTest - Class in <Unnamed>
 
FileCorrectorTest() - Constructor for class FileCorrectorTest
 

G

getCorrections(String) - Method in class Corrector
Returns a set of proposed corrections for an incorrectly spelled word.
getCorrections(String) - Method in class FileCorrector
Returns a set of proposed corrections for an incorrect word.
getCorrections(String) - Method in class Levenshtein
 
getCorrections(String) - Method in class SwapCorrector
Suggests as corrections any words in the Dictionary (provided when the object is constructed) that are one swap away from the input word.
getInsertions(String) - Method in class Levenshtein
 
getNumWords() - Method in class Dictionary
Returns the number of unique words in this dictionary.
getSubstitutions(String) - Method in class Levenshtein
 

H

hasNext() - Method in class TokenScanner
Determines whether there is another token available.

I

isWord(String) - Method in class Dictionary
Test whether the input word is present in the Dictionary.
isWord(String) - Static method in class TokenScanner
Determines whether a given String is a valid word
isWordCharacter(int) - Static method in class TokenScanner
Determines whether a given character is a valid word character.

L

Levenshtein - Class in <Unnamed>
A smart Corrector that uses "edit distance" to generate corrections.
Levenshtein(Dictionary) - Constructor for class Levenshtein
Constructs a Levenshtein Corrector instance using the given Dictionary.
LevenshteinTest - Class in <Unnamed>
 
LevenshteinTest() - Constructor for class LevenshteinTest
 

M

main(String[]) - Static method in class SpellCheckerRunner
This main program creates appropriate Reader and Writer objects for doing File IO, creates the appropriate Corrector based on the command-line arguments, and then uses a SpellChecker to interactively check the input file.
make(String) - Static method in class Dictionary
Constructs a dictionary from words from a file.
make(String) - Static method in class FileCorrector
Construct a FileCorrector from a file.
matchCase(String, Set<String>) - Method in class Corrector
Returns a new set that contains the same elements as the input set, except the case (all lowercase, or uppercase first letter) matches that of the input string.
MyTests - Class in <Unnamed>
Put your OWN test cases in this file, for all classes in the assignment.
MyTests() - Constructor for class MyTests
 

N

next() - Method in class TokenScanner
Returns the next token, or throws a NoSuchElementException if none remain.

R

remove() - Method in class TokenScanner
We don't support this functionality with TokenScanner, but since the method is required if implementing Iterator, we just throw new UnsupportedOperationException();

S

setUp() - Method in class LevenshteinTest
 
SpellChecker - Class in <Unnamed>
A SpellChecker uses a Dictionary, a Corrector, and I/O to interactively spell check an input stream.
SpellChecker(Corrector, Dictionary) - Constructor for class SpellChecker
Constructs a SpellChecker
SpellCheckerRunner - Class in <Unnamed>
The main entry point for the SpellChecker program.
SpellCheckerRunner() - Constructor for class SpellCheckerRunner
 
SpellCheckerTest - Class in <Unnamed>
 
SpellCheckerTest() - Constructor for class SpellCheckerTest
 
spellCheckFiles(String, int, String, String, String, String) - Static method in class SpellCheckerTest
spellCheckFiles Runs the spell checker on some test input.
SwapCorrector - Class in <Unnamed>
A Corrector whose spelling suggestions come from "swapped letter" typos.
SwapCorrector(Dictionary) - Constructor for class SwapCorrector
Constructs a SwapCorrector instance using the given Dictionary.
SwapCorrectorTest - Class in <Unnamed>
 
SwapCorrectorTest() - Constructor for class SwapCorrectorTest
 

T

tearDown() - Method in class LevenshteinTest
 
testCheckFoxGood() - Method in class SpellCheckerTest
 
testCheckGettysburgSwap() - Method in class SpellCheckerTest
 
testCheckMeanInput() - Method in class SpellCheckerTest
 
testConstructorInvalid() - Method in class LevenshteinTest
 
testConstructorInvalidTokenScanner() - Method in class DictionaryTest
 
testCorrections() - Method in class LevenshteinTest
 
testCorrectionsCase() - Method in class LevenshteinTest
 
testDeletion() - Method in class LevenshteinTest
 
testDictionaryContainsApostrophe() - Method in class DictionaryTest
 
testDictionaryContainsSimple() - Method in class DictionaryTest
 
testFileCorrectorNullReader() - Method in class FileCorrectorTest
 
testGetCorrection() - Method in class FileCorrectorTest
 
testGetNextTokenWord() - Method in class TokenScannerTest
 
testInsert() - Method in class LevenshteinTest
 
testInvalidFormat() - Method in class FileCorrectorTest
 
testIsWord() - Method in class TokenScannerTest
 
testIsWordCharacter() - Method in class TokenScannerTest
 
testNull() - Method in class LevenshteinTest
 
testSubstitution() - Method in class LevenshteinTest
 
testSwapCorrections() - Method in class SwapCorrectorTest
 
TokenScanner - Class in <Unnamed>
Provides a token Iterator for a given Reader.
TokenScanner(Reader) - Constructor for class TokenScanner
Creates a TokenScanner for a given Reader.
TokenScannerTest - Class in <Unnamed>
 
TokenScannerTest() - Constructor for class TokenScannerTest
 
C D F G H I L M N R S T