Measuring similarity between Karel programs using character and word n-grams

G. Sidorov, M. Ibarra Romero, I. Markov, R. Guzman-Cabrera, L. Chanona-Hernández, F. Velásquez

Research output: Contribution to journalArticlepeer-review

8 Scopus citations

Abstract

We present a method for measuring similarity between source codes. We approach this task from the machine learning perspective using character and word n-grams as features and examining different machine learning algorithms. Furthermore, we explore the contribution of the latent semantic analysis in this task. We developed a corpus in order to evaluate the proposed approach. The corpus consists of around 10,000 source codes written in the Karel programming language to solve 100 different tasks. The results show that the highest classification accuracy is achieved when using Support Vector Machines classifier, applying the latent semantic analysis, and selecting as features trigrams of words.

Original languageEnglish
Pages (from-to)47-50
Number of pages4
JournalProgramming and Computer Software
Volume43
Issue number1
DOIs
StatePublished - 1 Jan 2017

Keywords

  • Karel programming language
  • LSA
  • SVM
  • character n-grams
  • machine learning
  • similarity
  • word n-grams

Fingerprint

Dive into the research topics of 'Measuring similarity between Karel programs using character and word n-grams'. Together they form a unique fingerprint.

Cite this