The very first spell checker would use misspelled words as inputs.
-
First, it would develop alternative candidates for the misspelled word (input) by making one of the following adjustments: (1) replace a single letter with a different one, or (2) swap the positions of two adjacent letters.
-
Next, it would search the provided dictionary to see which alternatives were valid options.
-
Finally, it would produce a list of valid correctly spelled words for the user to choose from.
Part 1: Follow the Algorithm
Misspelled Word: wello
1 Generate alternative candidates for the misspelled word. (These candidates don’t need to be real words!)
-
First, replace one letter from "wello" with a different one. We’ve provided a first option to get you started.
dello
-
Next, swap the positions of two adjacent letters. Again, we’ve provided a first option to get you started.
ewllo
2 Circle the actual words you listed above. How many real-word suggestions did you come up with?
3 You already found 5 "words" by replacing a single letter of wello. Using that strategy, about how many more could you list?
about 10 more about 50 more about 100 more about 1000 more
A computer would generate 125 options. After replacing the first letter in the word with each of the letters in the alphabet, it would return the first letter to "w" and try replacing each of the other letters in the word with all of the other letters in the alphabet.
Part 2: Reflect
4 What do you think are some limitations of this algorithm?
5 Compared to your own strategy for spell-checking, how similar / different is the first spell checker’s algorithm?
These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, 1738598, 2031479, and 1501927).
Bootstrap by the Bootstrap Community is licensed under a Creative Commons 4.0 Unported License. This license does not grant permission to run training or professional development. Offering training or professional development with materials substantially derived from Bootstrap must be approved in writing by a Bootstrap Director. Permissions beyond the scope of this license, such as to run training, may be available by contacting contact@BootstrapWorld.org.