基于提示学习的API评论知识图谱构建方法

CONSTRUCTION METHOD OF API REVIEWS KNOWLEDGE GRAPH BASED ON PROMPT LEARNING

  • 摘要: API(ApplicationProgrammingInterface)是现代软件开发中提升效率的重要组件,开发者经常在问答社区的评论中学习不同类型的API知识,由此引发一系列对API评论进行分类的研究工作。然而相关工作在分类时均需要大量标注数据,成本较高。为此,提出一种基于提示学习的API评论知识图谱构建方法,能够将评论分类任务转化为模型擅长的单词预测任务从而提升分类效果。相对于基线方法,该方法的F1指标提升16.1%~21%,召回率提升30.6%~36.2%。此外,所提出的知识图谱结构可以将不同帖子中的API评论按照不同粒度、不同类别、去冗余地整合在一起。并且通过实验证明所建知识图谱能够有效帮助开发者学习相关API知识。

     

    Abstract: Application programming interfaces (API) are important software components to improve development efficiency in modern software development. Developers often learn different types of API knowledge from comments in question-and-answer communities such as StackOverflow, which leads to many research works on API comments classification. However, existing works need to use a large amount of manually labeled data in the classification which is of high cost. To solve these problems, this paper proposes a method for constructing an API reviews knowledge graph based on prompt learning. This method improved the classification effect by converting the review classification task into the masked token prediction that the model was good at. Compared with baseline methods, our F1 metric was increased by 16.1%~21%, and the recall was increased by 30.6%~36.2%. In addition, the knowledge graph structure proposed in this paper could integrate API comments in different posts according to different granularities and categories, and eliminate redundancy. The experiments prove that API reviews knowledge graph can effectively help developers learn API knowledge.

     

/

返回文章
返回