arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2303.13041cs.SE
收藏

gDoc:结构化API文档的自动生成

gDoc: Automatic Generation of Structured API Documentation

Shujun Wang, Yongqiang Tian, Dengcheng He

摘要:

对于不断发展的API来说,生成和维护完整性和一致性的API文档可能是耗时且昂贵的。为了解决这个问题,已经提出了几种方法来自动生成高质量的API文档的基础上,从不同的Web资源的知识的组合。然而,目前的研究是薄弱的,在处理不流行的API,不能生成结构化的API文档。因此,在这张海报中,我们提出了一种混合技术(即\textit{gDoc}),用于自动生成结构化的API文档。首先提出了一种基于细粒度搜索的策略,通过计算API之间的相关性来生成部分API参数的描述,保证了API文档的一致性。然后,我们采用跨模态预训练Seq2Seq模型M6为每个API生成结构化的API文档,将文档生成问题视为翻译问题。最后,我们提出了一个启发式算法,从API请求日志中提取实际参数的例子。在线系统上的实验表明,该方法显著提高了API文档生成的有效性和效率。

英文摘要:

Generating and maintaining API documentation with integrity and consistency can be time-consuming and expensive for evolving APIs. To solve this problem, several approaches have been proposed to automatically generate high-quality API documentation based on a combination of knowledge from different web sources. However, current researches are weak in handling unpopular APIs and cannot generate structured API documentation. Hence, in this poster, we propose a hybrid technique(namely \textit{gDoc}) for the automatic generation of structured API documentation. We first present a fine-grained search-based strategy to generate the description for partial API parameters via computing the relevance between various APIs, ensuring the consistency of API documentation. Then, we employ the cross-modal pretraining Seq2Seq model M6 to generate a structured API document for each API, which treats the document generation problem as a translation problem. Finally, we propose a heuristic algorithm to extract practical parameter examples from API request logs. The experiments evaluated on the online system show that this work's approach significantly improves the effectiveness and efficiency of API document generation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑