In the previous video, I briefly mentioned the four steps required to implement auto-correct. Now, you're going to take a deep dive into these steps. You already know the four steps inside the auto-correct model. It's time to look at each step in detail. You'll be implementing each of these steps in this week's assignments. Step 1, identify a misspelled word. When the string there is encountered, how do you know it's a misspelled word? Well, if it's spelled correctly, you will find it in the dictionary. If not, then it's probably a misspelled word. If a word is not given in a dictionary, flag it for correction. Recall that you're not searching for contextual errors, just spelling errors. There are much more sophisticated techniques for identifying words that are probably incorrect by looking at the words surrounding them. Some of which you'll visit later in the course. But for now, quickly identifying a word as incorrect by its appearance misspelling is a simple and is a powerful model that works well. Words like deer will pass through this filter just fine as it is spelled correctly regardless of how the context may seem. Step two, find strings that are 1, 2, 3, or any number n edit distance away. When saying n edit distance, I'm referring to an edit distance of n, such as edit distance of one, edit distance of two, and so on. An edit is a type of operation performed on a string to change it into another string. Edit distance counts the number of these operations so that the n edit distance tells you how many operations away one string is from another. Now consider an insert operation, for example. This is a type of edit that adds a letter to its string in any position. For example, starting with the word to insert P at the end and you get top or inserts W in the middle and you get two. A delete operation removes the letter. For example, starts with the word hat. Delete T from the end and you get to ha or delete H from the fronts and you get at or delete A from the middle and you get the string H-T. A switch edit swap two adjacent letters. For example, the string E-T-A, switch T and A and you get eat, or switch E and T and you get tea. Notice that you are switching two letters that are next to each other. This does not include switching two letters that are not next to each other, such as switching the E and the A to make ate. A replace edit changes one letter to another. For example, the word jaw, change W to R and you get jar, or change J to P and you get paw. Using the four edits; insert, delete, switch, and replace, you can modify any string. By combining these edits, you can find a list of all possible strings that's are n edits away. For auto-correct, n is usually 1-3 edits. You'll implement each of these edits in this week's programming exercise and combine edits to get a list of two edit distances from the original input string. Now Step 3, filter candidates. Notice how many of the strings that are generated do not look like actual words. To filter these strings and keep ones that are real words, you only want to consider real and correctly spelled words from your candidate lists. Again, compare it to a known dictionary or vocabulary, just like in Step 1. This time, if the string does not appear in the dictionary, remove it from the list of candidates. When you're left with a list of actual words only, then that is good progress. That's the first three steps of building the auto-correct model. In the next lesson, you'll see the fourth and final step. You learned about three of the four steps required to implement auto-correct for the first week. The first step was identifying the misspelled word, then finding the strings that are n edit distances away, then filtering the candidates that are actual words. Now the last step is calculating the probabilities, which you will learn about in the next video.