CmpE 160
Project 3
Due date: 6th August
SPELL CHECKER
In this project you are to develop a spell checker. A spell checker takes a text file as input and scans it for errors using a dictionary. Every single word is checked against the dictionary and if a word is not found it is replaced by the closest match. The new file is then saved.
Project Details:
Your spell checker will use an English word list of 100,000 words, which can be found here. You can also download it in four parts from http://www.bookcase.com/library/software/msdos.education.linguistics.html.
The program will read the entire dictionary and store it in a binary search tree. Then it will prompt the user for the filename of the input text file. The input file will be read word by word and matched against the dictionary using binary search. If the word is found in the dictionary it will be left as it is. If the word does not exist in the library the lexicographically closest match will be found and the original word will be replaced by this new word. (Note that this isn’t a good method. If you use your own heuristic to find the closest match you may receive a bonus up to %20). For every such word your program should ask the user if the original word X should be replaced by the closest match Y. When the entire input file is read, the new file with corrections will be saved under a different name.
What you should submit is the
same as the other projects. Try to submit the SDD as hardcopy.