跳到主要导航 跳到搜索 跳到主要内容

Automatically Generating API Usage Patterns from Natural Language Queries

  • Beihang University
  • Beijing Advanced Innovation Center for Big Data and Brain Computing

科研成果: 书/报告/会议事项章节会议稿件同行评审

摘要

Automatically generating code from natural language query is a very promising but much challenging direction. Existing approaches either try to generate the whole code or only predict a small part of critical code elements such as API sequence. Meanwhile, API usage patterns, including APIs and API-related control-flow statements, have the moderate complexity, but can provide enough code framework information and are very helpful for developers to implement various functionalities. Therefore, in this work, we study the problem of generating API usage patterns, represent API usage patterns by one special constrained tree API-MCTree and design one new API-MCTree decoder for automatically transforming natural language queries to API usage patterns, which can leverage both the difference of control-flow statement types and the syntactic knowledge of API usage patterns. We evaluate our model with annotated code snippets in real Java projects collected from GitHub, and the experimental results show that our approach is effective and outperforms the related approaches.

源语言英语
主期刊名Proceedings - 25th Asia-Pacific Software Engineering Conference, APSEC 2018
出版商IEEE Computer Society
59-68
页数10
ISBN(电子版)9781728119700
DOI
出版状态已出版 - 2 7月 2018
活动25th Asia-Pacific Software Engineering Conference, APSEC 2018 - Nara, 日本
期限: 4 12月 20187 12月 2018

出版系列

姓名Proceedings - Asia-Pacific Software Engineering Conference, APSEC
2018-December
ISSN(印刷版)1530-1362

会议

会议25th Asia-Pacific Software Engineering Conference, APSEC 2018
国家/地区日本
Nara
时期4/12/187/12/18

指纹

探究 'Automatically Generating API Usage Patterns from Natural Language Queries' 的科研主题。它们共同构成独一无二的指纹。

引用此