Correct misspelled words by minimizing Levenshtein distance, then breaking ties by frequency and lexical order.