Program Steps
Read a dictionary word file into a vector of strings.
Sort the dictionary.
Reading in a test file, one line at a time. Search the dictionary word list (the vector of strings) for each word in the line. If the word is not found, print a message. The search should be performed as a binary search.
Program Requirements
Use files for your dictionary and the final spell check test.
Use a vector of strings to store your word file. Use a string to hold each line in the test file. “Parse” each line into individual words for spell checking.
Spell checking must ignore case. For example, “Hello” is the same as “hello”.
The spelling checking must include 4 additional rules. If a test word ends in a suffix, s, ed, 's, or ing, then the spell check must find it if the “base word” is in the dictionary. For example, if the test word is “looked” and the dictionary contains “look”, then the find is successful. Or, for example, if the test word is “Sunday’s” and the dictionary contains “Sunday” then the find is successful.
Program Output
Your output should looks quite similar to this:
Misspelled word, captivity on line 5
Misspelled word, sadly on line 7
Misspelled word, segregation on line 8
Misspelled word, lonely on line 9
Misspelled word, prosperity on line 10
Misspelled word, dramatize on line 12
Misspelled word, guaranteed on line 17
Misspelled word, tranquilizing on line 28
Misspelled word, gradualism on line 29
Misspelled word, segregation on line 30