Spelling correction is an automatic correction feature useful in detecting spelling errors and providing word suggestions if necessary. Spelling correction is one of the crucial preprocessing phases in text mining. The Damerau-Levenshtein Distance method is one of the spelling correction methods that has high accuracy. This method has four types of operations: insertion, deletion, substitution, and transposition. The basic approach in detecting spelling errors in the Indonesian language is to use a dictionary search. Despite its accuracy, the Damerau-Levenshtein Distance method has a slow computation time. Furthermore, when the dictionary contains several suggested words that have the same distance from the target word, it will be difficult to prioritize the most appropriate suggestions. To overcome this problem, we introduce a caching mechanism to store previously calculated corrections, thereby speeding up the computation process. In addition, we use the cosine similarity method to rank words in Damerau-Levenshtein Distance results. The results of our approach have a significant improvement in accuracy, increasing from 72.13% to 83.60% by integrating caching and cosine similarity for ranking, which shows a significant improvement in both efficiency and effectiveness
Copyrights © 2025