We gratefully acknowledge support from
the Simons Foundation and member institutions.
Full-text links:

Download:

Current browse context:

cs.SE

Change to browse by:

References & Citations

DBLP - CS Bibliography

Bookmark

(what is this?)
CiteULike logo BibSonomy logo Mendeley logo del.icio.us logo Digg logo Reddit logo

Computer Science > Software Engineering

Title: Deep API Learning

Abstract: Developers often wonder how to implement a certain functionality (e.g., how to parse XML files) using APIs. Obtaining an API usage sequence based on an API-related natural language query is very helpful in this regard. Given a query, existing approaches utilize information retrieval models to search for matching API sequences. These approaches treat queries and APIs as bag-of-words (i.e., keyword matching or word-to-word alignment) and lack a deep understanding of the semantics of the query.
We propose DeepAPI, a deep learning based approach to generate API usage sequences for a given natural language query. Instead of a bags-of-words assumption, it learns the sequence of words in a query and the sequence of associated APIs. DeepAPI adapts a neural language model named RNN Encoder-Decoder. It encodes a word sequence (user query) into a fixed-length context vector, and generates an API sequence based on the context vector. We also augment the RNN Encoder-Decoder by considering the importance of individual APIs. We empirically evaluate our approach with more than 7 million annotated code snippets collected from GitHub. The results show that our approach generates largely accurate API sequences and outperforms the related approaches.
Comments: The paper is accepted at FSE 2016 (the 24th ACM SIGSOFT International Symposium on the Foundations of Software Engineering)
Subjects: Software Engineering (cs.SE); Computation and Language (cs.CL); Machine Learning (cs.LG); Neural and Evolutionary Computing (cs.NE)
ACM classes: D.2.13
Cite as: arXiv:1605.08535 [cs.SE]
  (or arXiv:1605.08535v3 [cs.SE] for this version)

Submission history

From: Xiaodong Gu [view email]
[v1] Fri, 27 May 2016 08:27:18 GMT (1807kb,D)
[v2] Thu, 13 Jul 2017 09:38:35 GMT (1807kb,D)
[v3] Fri, 14 Jul 2017 01:22:18 GMT (1807kb,D)

Link back to: arXiv, form interface, contact.