一种无监督的方法来发现API的相关数据片段
An Unsupervised Approach for Discovering Relevant Tutorial Fragments for APIs
摘要:
开发人员越来越依赖API教程来促进软件开发。然而,对于他们来说,发现解释不熟悉的API的相关API教程片段仍然是一项具有挑战性的任务。现有的监督方法遭受手动准备语料库特定的注释数据和特征的沉重负担。在这项研究中,我们提出了一种新的无监督的方法,即片段推荐API与PageRank和主题模型(FRAPT)。FRAPT可以很好地解决任务中存在的两个主要挑战,并有效地确定API的相关教程片段。在FRAPT中,提出了一个片段解析器来识别教程片段中的API,并用相关的本体和API名称替换模糊的代词和变量,以解决代词和变量解析的挑战。然后,片段过滤器采用一组非解释性检测规则来去除非解释性片段,从而解决非解释性片段识别挑战。最后,通过将主题模型和PageRank算法应用于保留的片段,获得两个相关性得分并聚合以确定API的相关片段。在两个公开的教程语料库上的实验表明,FRAPT在F-Measure方面分别提高了8.77%和12.32%。验证了FRAPT关键组件的有效性。
英文摘要:
Developers increasingly rely on API tutorials to facilitate software development. However, it remains a challenging task for them to discover relevant API tutorial fragments explaining unfamiliar APIs. Existing supervised approaches suffer from the heavy burden of manually preparing corpus-specific annotated data and features. In this study, we propose a novel unsupervised approach, namely Fragment Recommender for APIs with PageRank and Topic model (FRAPT). FRAPT can well address two main challenges lying in the task and effectively determine relevant tutorial fragments for APIs. In FRAPT, a Fragment Parser is proposed to identify APIs in tutorial fragments and replace ambiguous pronouns and variables with related ontologies and API names, so as to address the pronoun and variable resolution challenge. Then, a Fragment Filter employs a set of nonexplanatory detection rules to remove non-explanatory fragments, thus address the non-explanatory fragment identification challenge. Finally, two correlation scores are achieved and aggregated to determine relevant fragments for APIs, by applying both topic model and PageRank algorithm to the retained fragments. Extensive experiments over two publicly open tutorial corpora show that, FRAPT improves the state-of-the-art approach by 8.77% and 12.32% respectively in terms of F-Measure. The effectiveness of key components of FRAPT is also validated.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。