ARCLIN:无格式文本的自动API提及解析
ARCLIN: Automated API Mention Resolution for Unformatted Texts
摘要:
在线技术论坛(例如,StackOverflow)是开发人员讨论技术问题的流行平台,例如如何使用特定的应用程序编程接口(API),如何解决编程任务或如何修复代码中的错误。这些讨论通常可以提供有关如何使用官方文档中未涵盖的软件的辅助知识。这些知识的自动提取将支持一系列下游任务,如API搜索或索引。然而,与专家撰写的官方文档不同,开放论坛中的讨论是由普通开发人员撰写的,他们使用简短和非正式的文本,包括拼写错误或缩写。对于准确的API识别和将所提及的API从非结构化自然语言文档链接到API存储库中的条目存在三个主要挑战:(1)将API提及与常见词区分开;(2)识别没有完全限定名称的API提及;以及(3)消除具有类似方法名称但在不同库中的API提及的歧义。在本文中,为了解决这些挑战,我们提出了一个ARCLIN工具,它可以有效地区分和链接API,而无需使用人工注释。具体来说,我们首先设计了一个API识别器,通过双向长短期记忆(Bi-LSTM)模块顶部的条件随机场(CRF)自动从自然语言句子中提取API提及,然后我们应用上下文感知评分机制来计算API存储库中每个条目的提及条目相似度。与以前使用启发式规则的方法相比,我们提出的没有手动检查的工具在高质量数据集Py-mention中的性能优于8%,该数据集包含来自五个流行Python库的558个提及和2,830个句子。
英文摘要:
Online technical forums (e.g., StackOverflow) are popular platforms for developers to discuss technical problems such as how to use specific Application Programming Interface (API), how to solve the programming tasks, or how to fix bugs in their codes. These discussions can often provide auxiliary knowledge of how to use the software that is not covered by the official documents. The automatic extraction of such knowledge will support a set of downstream tasks like API searching or indexing. However, unlike official documentation written by experts, discussions in open forums are made by regular developers who write in short and informal texts, including spelling errors or abbreviations. There are three major challenges for the accurate APIs recognition and linking mentioned APIs from unstructured natural language documents to an entry in the API repository: (1) distinguishing API mentions from common words; (2) identifying API mentions without a fully qualified name; and (3) disambiguating API mentions with similar method names but in a different library. In this paper, to tackle these challenges, we propose an ARCLIN tool, which can effectively distinguish and link APIs without using human annotations. Specifically, we first design an API recognizer to automatically extract API mentions from natural language sentences by a Conditional Random Field (CRF) on the top of a Bi-directional Long Short-Term Memory (Bi-LSTM) module, then we apply a context-aware scoring mechanism to compute the mention-entry similarity for each entry in an API repository. Compared to previous approaches with heuristic rules, our proposed tool without manual inspection outperforms by 8% in a high-quality dataset Py-mention, which contains 558 mentions and 2,830 sentences from five popular Python libraries.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。