Chaos to Clarity with Semantic Inferencing for Python Source Code Snippets

Aviel J. Stein, Spiros Mancoridis · 2023

Our work investigates using semantic indicators in source code to generate descriptions of its functionality. We applied natural language processing (NLP) techniques to improve the performance of a neural machine translation (NMT) model on source code. We trained the model on 20,000 code-comment pairs from the Source Code Analysis Dataset (SCAD) using a custom Python source code tokenizer and a learning model with attention, RNNs, LSTMs, and auto-encoders. We evaluated the model’s performance on a hold-out dataset using several established translation metrics, and found that our methods outperform prior work with a mean Bilingual Evaluation Understudy (BLEU) score of 0.47.

Read the paper · More papers on PaperTik