Next: Implementation
Up: Second assignment
Previous: Second assignment
The aim of this assignment is to implement a spell checker
using Java. The checker operates by comparing words in a text file
with the words in a dictionary. Words not occurring in the dictionary
are to be regarded as misspelled. Misspelled words should be printed
out alphabetically after the whole file has been processed, together
with their line numbers. In outline your program should
- load the words in the dictionary file
- read the text file to be checked
- look up each word from the text file in the dictionary
- print out the misspelled words in alphabetical order with their
line numbers.
The misspelled words should be printed exactly as they occur in the
text file, using the same characters and the same case. An extension
of the basic program will also provide, for each misspelled word, a
list of correct spellings of words that might have been intended.
The dictionary
You are provided with two dictionary files called words.txt
and
words.big.txt. Both have a separate word
on each line and are in alphabetical order. To save on memory
requirements, and loading time, you can use the smaller
words.txt file for development of your program.
Next: Implementation
Up: Second assignment
Previous: Second assignment
Peter Williams
2005-06-07