DocGen:在Python中生成详细的参数文档字符串
DocGen: Generating Detailed Parameter Docstrings in Python
AI总结:
针对开源软件中文档债务问题,提出多步骤方法结合多个特定任务模型,为Python函数生成详细参数文档字符串,实验证明其优于现有方法。
摘要:
文档债务阻碍了开源软件的有效利用。尽管代码摘要工具对开发者有所帮助,但大多数开发者更希望获得函数中每个参数的详细说明,而非高层级的摘要。然而,由于缺乏高质量的训练数据,生成此类摘要对于单一生成模型而言过于复杂,难以可靠完成。因此,我们提出了一种多步骤方法,结合多个特定任务模型,每个模型擅长生成文档字符串的特定部分。这些模型的组合确保了最终文档字符串中各部分的包含。我们使用自动指标和一项有17名开发者参与的人本评估,将我们的方法与现有生成模型的结果进行了比较,证明了我们的方法优于现有方法。
英文摘要:
Documentation debt hinders the effective utilization of open-source software. Although code summarization tools have been helpful for developers, most would prefer a detailed account of each parameter in a function rather than a high-level summary. However, generating such a summary is too intricate for a single generative model to produce reliably due to the lack of high-quality training data. Thus, we propose a multi-step approach that combines multiple task-specific models, each adept at producing a specific section of a docstring. The combination of these models ensures the inclusion of each section in the final docstring. We compared the results from our approach with existing generative models using both automatic metrics and a human-centred evaluation with 17 participating developers, which proves the superiority of our approach over existing methods.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。