AUTOMATED PYTHON FUNCTION DOCUMENTATION GENERATOR USING NLP

Authors

  • 1A Praveen, 2 M Teja sri, 3 C Guruvarun, 4 N Sai kumar,5 E Omprakash Author

DOI:

https://doi.org/10.62643/

Abstract

Software development projects often involve large volumes of source code that require proper documentation for effective understanding, maintenance, and collaboration. However, manual documentation is time-consuming and is often overlooked by developers, leading to reduced code readability and maintainability. This project proposes an automated approach for generating natural language descriptions from Python source code using a transformer-based deep learning model. The system utilizes a dataset consisting of Python functions and their corresponding documentation strings, which are preprocessed and tokenized to prepare them for training. A transformer architecture is employed to learn the relationship between code snippets and their textual explanations. During the training phase, the model optimizes prediction loss and learns to generate concise and meaningful one-line descriptions for given code segments. The performance of the system is evaluated using text generation metrics to assess the quality and relevance of the generated documentation. Experimental results demonstrate that the model can effectively produce accurate and context-aware descriptions, achieving an approximate accuracy of around 94%. Overall, the proposed system provides an efficient solution for automated code documentation, helping developers save time, improve code readability, and enhance software maintainability.

Downloads

Published

07-04-2026

How to Cite

AUTOMATED PYTHON FUNCTION DOCUMENTATION GENERATOR USING NLP. (2026). International Journal of Engineering Research and Science & Technology, 22(2(1), 220-227. https://doi.org/10.62643/