CIS 554 Scala 1: Spell Checking
Fall 2015, David Matuszek

Purpose of this assignment

General idea

In this assignment you are to read in, from a text file, a large list of English words.

The user will then enter words one at a time. If the word occurs in the word list, the program will tell the user that it is spelled correctly. Otherwise, the program will suggest some (zero or more) possible spellings. Continue until the user enters the word quit (correctly spelled!).


Down the word list from and save it in a text file named wordsEn.txt. Put this file at the top level of your project, so that you can access it easily. When the program begins, read in this file and save the words in a set.

Spell checking algorithms are moderately complex, and this is not a course in algorithms, so we will use a fairly simple algorithm. For each word entered by the user:

The possible transformations, applied individually, should usually give fewer than 100 possible "words" to check against the word list, so the program should be quite fast. If there is a noticeable lag, be sure that you are not using a data structure that requires a linear search.

For this assignment you need only a single object (call it spellChecker) and you don't need any classes. There will be two required methods:
The purpose of this assignment is to introduce you to Scala. Some of the functional features of Scala can be useful in this program, but you are not required to use them.

Due date

Your program is due before 6am Wednesday, November 18 . Submit via Canvas.