Enhancing API Retrieval through Multi‐Source information Knowledge Graph Construction

Weiwei Wang, Zijie Che, Ruilian Zhao, Zhan Ma, Ying Shang · 2024

API-related knowledge is typically dispersed across various sources of information, including API documentation, Q&A forums, and other unstructured texts.This fragmentation of knowledge makes it challenging for developers to effectively query and retrieve APIs.In this paper, an API knowledge graph construction method based on multi-source information fusion is proposed to overcome these issues and enhance API retrieval.Specifically, the API-related knowledge is acquired from multiple sources, including API documentation and Stack Overflow, where API documentation describes the function and structure of APIs from designers' perspective, and Stack Overflow provides insights into the purpose and usage scenarios of APIs from users' perspective.They complement each other and together provide support for API query and retrieval.By analyzing API documentation, the corresponding APIs and domain concepts are extracted as entities and relationships between them are identified.Moreover, to extract Q&A entities from Stack Overflow, machine learning is adopted to classify the purpose of the question and performs the summary generation for its answers.Since there exists a gap between the entities from API documentation and Stack Overflow, a fusion method is raised to establish connections between them, constructing a more comprehensive API knowledge graph.To verify the effectiveness of our API knowledge graph construction method, we evaluate it in terms of the accuracy of knowledge extraction and API recommendation.The experimental results demonstrate that our API knowledge graph can significantly improve the efficiency and effectiveness of API recommendation.

Read the paper · More papers on PaperTik