Generating Comments From Source Code with CCGs
Sergey Matskevich, Colin S. Gordon

TL;DR
This paper introduces a method for automatically generating informative comments from source code using natural language processing techniques, aiming to improve code understanding and maintenance.
Contribution
It presents a novel approach that couples logical meaning and grammar rules in language models to generate comments directly from source code.
Findings
Effective comment generation for Python algorithms
Improves code comprehension and maintenance
Demonstrates feasibility of NLP-based code commenting
Abstract
Good comments help developers understand software faster and provide better maintenance. However, comments are often missing, generally inaccurate, or out of date. Many of these problems can be avoided by automatic comment generation. This paper presents a method to generate informative comments directly from the source code using general-purpose techniques from natural language processing. We generate comments using an existing natural language model that couples words with their individual logical meaning and grammar rules, allowing comment generation to proceed by search from declarative descriptions of program text. We evaluate our algorithm on several classic algorithms implemented in Python.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
