CS311 Lab 3: Spell Checking!

Due at the next lab session

Starting with the linked list demo from class, create a spell checker! The spell checker should expect a file to check, and use the dictionary of words on isoptera at /usr/share/dict/american-english. If you're using a system other than isoptera, you can download it here. Set up the spell checker so it loads the entire dictionary into a linked list. Then go through the file to check one word at a time, and check to see if it's in the dictionary. Remember to remove punctuation before comparing, and compare in a case-independent manner. One way to do that is to convert all words to lowercase (or uppercase) before putting them into the dictionary, and converting words before checking for them as well. If a word is not found in the dictionary, print it out with some sort of appropriate message.
Note that the solution will probably run slowly, at least for dictionary creation. If you have a complete project 1 around, you might find it builds the dictionary much faster if the list is reversed prior to loading the dictionary, so new word additions happen at the beginning instead of the end. At some point, we'll discuss better solutions for spell check dictionaries than linked lists.
Update: You can download wordlist.h from the class examples area if you'd prefer to use a header file instead of cut and paste.