Statistical Translation of English Texts to API Code Templates

被引:7
作者
Anh Tuan Nguyen [1 ]
Rigby, Peter C. [2 ]
Thanh Van Nguyen [1 ]
Karanfil, Mark [2 ]
Nguyen, Tien N. [3 ]
机构
[1] Iowa State Univ, Ames, IA 50011 USA
[2] Concordia Univ, Montreal, PQ, Canada
[3] Univ Texas Dallas, Richardson, TX 75083 USA
来源
PROCEEDINGS OF THE 2017 IEEE/ACM 39TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING COMPANION (ICSE-C 2017) | 2017年
基金
美国国家科学基金会;
关键词
Text-to-Code Translation; API Usage Synthesis; Statistical Machine Translation;
D O I
10.1109/ICSE-C.2017.81
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We develop T2API, a context-sensitive, graph-based statistical translation approach that takes as input an English description of a programming task and synthesizes the corresponding API code template for the task. We train T2API to statistically learn the alignments between English and APIs and determine the relevant API elements. The training is done on StackOverflow, which is a bilingual corpus on which developers discuss programming problems in two types of language: English and programming language. T2API considers both the context of the words in the input query and the context of API elements that often go together in the corpus. The derived API elements with their relevance scores are assembled into an API usage by GRASYN, our novel graph-based API synthesis algorithm that generates a graph representing an API usage from a large code corpus. Importantly, it is capable of generating new API usages from previously seen sub-usages.
引用
收藏
页码:331 / 333
页数:3
相关论文
共 15 条
[1]   Graph-based Statistical Language Model for Code [J].
Anh Tuan Nguyen ;
Nguyen, Tien N. .
2015 IEEE/ACM 37TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, VOL 1, 2015, :858-868
[2]  
Brown P. F., 1993, Computational Linguistics, V19, P263
[3]  
Buse RPL, 2012, PROC INT CONF SOFTW, P782, DOI 10.1109/ICSE.2012.6227140
[4]  
Chan W.-K, 2012, P ACM SIGSOFT 20 INT
[5]   Program Synthesis using Natural Language [J].
Desai, Aditya ;
Gulwani, Sumit ;
Hingorani, Vineet ;
Jain, Nidhi ;
Karkare, Amey ;
Marron, Mark ;
Sailesh, R. ;
Roy, Subhajit .
2016 IEEE/ACM 38TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2016, :345-356
[6]  
Duala-Ekoko E, 2011, LECT NOTES COMPUT SC, V6813, P79, DOI 10.1007/978-3-642-22655-7_5
[7]  
Duala-Ekoko E, 2012, PROC INT CONF SOFTW, P266, DOI 10.1109/ICSE.2012.6227187
[8]   Deep API Learning [J].
Gu, Xiaodong ;
Zhang, Hongyu ;
Zhang, Dongmei ;
Kim, Sunghun .
FSE'16: PROCEEDINGS OF THE 2016 24TH ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON FOUNDATIONS OF SOFTWARE ENGINEERING, 2016, :631-642
[9]  
Gvero T, 2015, ACM SIGPLAN NOTICES, V50, P416, DOI [10.1145/2814270.2814295, 10.1145/2858965.2814295]
[10]  
Koehn P., 2003, Proceedings of the 2003 Conference of the North American Chapter of the Association for Computational Linguistics on Human Language Technology-Volume, P48