P2N2S: Bridging the gap between natural and programming languages for code summarization via large language models.
Saved in:
| Title: | P2N2S: Bridging the gap between natural and programming languages for code summarization via large language models. |
|---|---|
| Authors: | Tang, Yijia1 (AUTHOR) yijiat@nuaa.edu.cn, Yu, YaoShen2,3 (AUTHOR) yaoshen.yu@outlook.com, Huang, Zhiqiu1,2,4 (AUTHOR) zqhuang@nuaa.edu.cn, Xia, Bowei1 (AUTHOR) xiabowei@nuaa.edu.cn, Cao, Yukun5 (AUTHOR) marilyn_cao@163.com |
| Source: | World Wide Web. Feb2026, Vol. 29 Issue 1, p1-25. 25p. |
| Abstract: | Code summarization aims to generate natural language descriptions of source code to support program comprehension and software maintenance. Traditional programming-language-processing (PLP) pipelines rely on syntax parsing and structural representations such as abstract syntax trees (ASTs). However, their strict separation of programming language (PL) and natural language (NL) often results in brittle generalization and limited adaptability. We introduce P2N2S, a fully NL-grounded framework that departs from the PLP paradigm. It operates in two stages: (1) PL2NL Conversion, where large language models (LLMs) actively translate code into line-level natural language annotations, producing semantically faithful and interpretable intermediate representations; and (2) NL2Summary Generation, where pre-trained natural language processing (NLP) summarizers refine these annotations into concise and coherent summaries. By integrating the LLM’s capability to capture detailed semantics with the NLP summarizer’s strengths in selective abstraction and stylistic coherence, P2N2S overcomes the rigid, structure-dependent limitations of PLP methods and produces summaries that remain concise, fluent, and accurate without relying on fragile program analyses. Experiments on two Java benchmarks show that P2N2S consistently outperforms state-of-the-art PLP and LLM baselines across four evaluation metrics. The framework also demonstrates strong robustness in automatic and human assessments, and offers practical deployability by relying solely on readily available LLM and NLP tools. Overall, P2N2S provides a stable, flexible, and accessible solution for advancing code summarization in real-world software engineering workflows. [ABSTRACT FROM AUTHOR] |
| Database: | Academic Search Index |
Be the first to leave a comment!
Full Text Finder
Nájsť tento článok vo Web of Science