LAMNER: Code Comment Generation Using Character Language Model and Named Entity Recognition
Rishab Sharma, Fuxiang Chen, Fatemeh Fard

TL;DR
LAMNER is a novel code comment generation approach that combines character-level language modeling and named entity recognition to better encode code tokens and improve comment quality.
Contribution
The paper introduces LAMNER, a new method that effectively encodes code tokens using character-level language models and NER, enhancing comment generation beyond existing models.
Findings
LAMNER outperforms baselines on multiple metrics by significant margins.
Fusing LAMNER's representations with baselines further improves results.
Human evaluation confirms the high quality of generated comments.
Abstract
Code comment generation is the task of generating a high-level natural language description for a given code method or function. Although researchers have been studying multiple ways to generate code comments automatically, previous work mainly considers representing a code token in its entirety semantics form only (e.g., a language model is used to learn the semantics of a code token), and additional code properties such as the tree structure of a code are included as an auxiliary input to the model. There are two limitations: 1) Learning the code token in its entirety form may not be able to capture information succinctly in source code, and 2) The code token does not contain additional syntactic information, inherently important in programming languages. In this paper, we present LAnguage Model and Named Entity Recognition (LAMNER), a code comment generator capable of encoding code…
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.
Taxonomy
TopicsSoftware Engineering Research · Software Reliability and Analysis Research · Topic Modeling
