Autocorrect is a prominent feature of the Internet that many people often overlook, and it is a fitting example of the saying “you only get recognized for your flaws.” I’m sure you remember the countless number of times autocorrect has misinterpreted your slang, but you may not remember the countless number of times autocorrect has fixed your essay typos while you work as fast as you can. This virtual marvel is applicable almost everywhere, but not many people know how it works.
To understand how autocorrect works, it is important to understand what a Levenshtein Distance is first. Counterintuitively, a Levenshtein Distance is not actually a distance. It simply represents the number of transformations needed to transform a word that doesn’t belong to the dictionary into a real word.
There are four types of transformations: insertion (inserting a letter into the word), deletion (deleting a letter from a word), substitution (substituting one letter of a word with another arbitrary letter), and transposition (swapping two letters of the word). While it is important to note that older calculators may consider a transposition as two actions (two substitutions), technology has advanced to the point where transposition has become its own action.
“Step zero” of employing autocorrect is verifying that the word does not belong to the English language (or the language one is typing in). The first step is using Levenshtein Distances to determine words that have a similar structure to the original word typed, with a smaller distance correlating to a closer structure. In the next step, autocorrect would want to pick a word with the smallest Levenshtein Distance, as it would have the closest structure to the original word. If two or more words have the same distance, then autocorrect chooses the word that makes the most sense with the given context.
To make this a bit simpler to digest, here is an example: suppose you type the sentence “I lyke cats.” Obviously, the word “lyke” isn’t in the English dictionary, so autocorrect works to find words with low Levenshtein Distances from “lyke.” After some rigorous searching, there are four possible contenders: “like,” “lake,” “lyre” (an instrument), and “lyken” (a rare type of lichen), each with the lowest possible Levenshtein Distance of 1. The words “lyre” and “lyken” are both very rarely used and certainly do not make sense in this case, so they can be eliminated right away. This leaves the words “lake” and “like” left. They are both quite common words, but notice that only “like” makes sense in this scenario, as “I lake cats” does not seem correct. Therefore, autocorrect suggests replacing “lyke” with “like,” which is correct in this scenario.
It gets a little more difficult with the slang words we use in everyday text messages with our friends. Obviously, slang such as, but not limited to, “lol,” “fr,” “irl,” and “tbh” would trigger autocorrect, which many can vividly remember at some point in their life. Autocorrect has been designed for use with pre-existing words, and since the new emergence of contemporary slang has not been logged into most autocorrect dictionaries, most autocorrect systems morph sentences and change their intended meaning. It may take some time for autocorrect to become advanced enough to start accounting for the emerging slang, but when it does, it will become recognized as more of a tool that can be effectively used by all rather than a hindrance in the age of the Internet.

















![Teacher [Milk] Tea: Part 2](https://bisvquill.com/wp-content/uploads/2024/03/Screen-Shot-2024-03-19-at-9.28.48-PM.png)


































