Comparison of Cosine Similarity, Rabin-Karp, and Levenshtein Distance Algorithms for Plagiarism Detection in Document

Authors

  • Jasman Pardede Institut Teknologi Nasional (Itenas) Bandung
  • Agil Yudistira Institut Teknologi Nasional (Itenas) Bandung
  • Agil Yudistira Institut Teknologi Nasional (Itenas) Bandung

DOI:

https://doi.org/10.31937/ti.v17i1.3867

Abstract

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

Downloads

Download data is not yet available.

Additional Files

Published

2025-06-25

How to Cite

Pardede, J., Yudistira, A., & Yudistira, A. (2025). Comparison of Cosine Similarity, Rabin-Karp, and Levenshtein Distance Algorithms for Plagiarism Detection in Document. Ultimatics : Jurnal Teknik Informatika, 17(1), 63–71. https://doi.org/10.31937/ti.v17i1.3867