Comparison of Cosine Similarity, Rabin-Karp, and Levenshtein Distance Algorithms for Plagiarism Detection in Document - Pardede, Jasman; Yudistira, Agil (ULTIMATICS, 2025)
Prevention and detection of plagiarism are crucial. There are several algorithms that can be used to detect plagiarism in documents, including the Cosine Similarity, Rabin-Karp, Levenshtein Distance, Hamming Distance, Euclidean Distance, Edit Distance, Ratcliff/Obershelp, etc. Based on the literature review from previous research, three best algorithms were identified: Cosine Similarity, Rabin-Karp, and Levenshtein Distance. However, there has been no study analyzing the comparison of these three algorithms. Therefore, this study will compare the performance of each algorithm and determine the best algorithm for plagiarism detection in documents based on similarity scores and execution time. The research objects use a sample of documents consisting of titles and abstracts from Indonesian-language informatics journals. Cosine Similarity algorithm is superior to others for plagiarism detection in documents, as it produces the highest average similarity score with a relatively fast execution time. The similarity values of Cosine Similarity, Rabin-Karp with 4 k-grams, and Levenshtein Distance are 48.80%, 47.13%, 20.61%, respectively. The average execution time of Cosine Similarity, Rabin-Karp with 4 k-grams, and Levenshtein Distance are 0.22 s, 0.45 s, and 39.15 s, respectively