1+1>2:编程“知什么”与“知如何”知识的融合、语义丰富与连贯应用
1+1>2: Programming Know-What and Know-How Knowledge Fusion, Semantic Enrichment and Coherent Application
AI总结:
本文首次通过 API 实体链接融合 API-KG 与 Task-KG,生成九类 API 语义关系和两类任务语义关系,构建语义丰富的 API-Task KG,以支持连贯的 API/任务中心化知识搜索。
摘要:
软件编程既需要 API 参考(知什么)知识,也需要编程任务(知如何)知识。大量编程“知什么”和“知如何”知识以文本形式记录,例如 API 参考文档和编程教程。为了提高知识的可访问性和使用效率,近期一些研究使用自然语言处理(NLP)方法从软件文档中构建 API“知什么”知识图谱(API-KG)和编程任务“知如何”知识图谱(Task-KG)。尽管这些方法具有前景,但当前的 API-KG 和 Task-KG 彼此独立,因此缺乏两类知识之间的内在联系。我们对 Stack Overflow 问题的实证研究证实,只有 36% 的 API 使用问题可以仅通过“知如何”或“知什么”知识单独回答,其余问题则需要两者的融合。受这一观察启发,我们首次尝试通过 API 实体链接融合 API-KG 和 Task-KG。该融合创建了九类 API 语义关系和两类任务语义关系,这些关系在独立的 API-KG 或 Task-KG 中并不存在。根据这些新的 API 和任务语义关系的定义,我们的方法比 API-KG 和 Task-KG 的表层 API 链接更深入,从任务描述中推断出九类 API 语义关系,并在 API-KG 的辅助下推断出两类任务语义关系,从而丰富了当前 API-KG 和 Task-KG 中的声明性或语法性关系。我们融合并经过语义丰富的 API-Task KG 支持通过文本或代码查询进行连贯的以 API/任务为中心的知识搜索。
英文摘要:
Software programming requires both API reference (know-what) knowledge and programming task (know-how) knowledge. Lots of programming know-what and know-how knowledge is documented in text, for example, API reference documentation and programming tutorials. To improve knowledge accessibility and usage, several recent studies use Natural Language Processing (NLP) methods to construct API know-what knowledge graph (API-KG) and programming task know-how knowledge graph (Task-KG) from software documentation. Although being promising, current API-KG and Task-KG are independent of each other, and thus are void of inherent connections between the two types of knowledge. Our empirical study on Stack Overflow questions confirms that only 36% of the API usage problems can be answered by the know-how or the know-what knowledge alone, while the rest questions require a fusion of both. Inspired by this observation, we make the first attempt to fuse API-KG and Task-KG by API entity linking. This fusion creates nine categories of API semantic relations and two types of task semantic relations which are not present in the stand-alone API-KG or Task-KG. According to the definitions of these new API and task semantic relations, our approach dives deeper than the surface-level API linking of API-KG and Task-KG, and infers nine categories of API semantic relations from task descriptions and two types of task semantic relations with the assistance of API-KG, which enrich the declaration or syntactic relations in the current API-KG and Task-KG. Our fused and semantically-enriched API-Task KG supports coherent API/Task-centric knowledge search by text or code queries.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。