Statistical Translation of English Texts to API Code Templates

被引:12
|
作者
Anh Tuan Nguyen [1 ]
Rigby, Peter C. [2 ]
Thanh Nguyen [3 ]
Palani, Dharani [2 ]
Karanfil, Mark [2 ]
Nguyen, Tien N. [4 ]
机构
[1] Axon US Corp, New York, NY 10036 USA
[2] Concordia Univ, Montreal, PQ, Canada
[3] Iowa State Univ, Ames, IA USA
[4] Univ Texas Dallas, Richardson, TX 75083 USA
来源
PROCEEDINGS 2018 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME) | 2018年
基金
美国国家科学基金会;
关键词
D O I
10.1109/ICSME.2018.00029
中图分类号
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 API elements and determine the relevant API elements. The training is done on StackOverflow, 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, a 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. We curate a test benchmark of 250 real-world StackOverflow posts. Across the benchmark, T2API's synthesized snippets have the correct API elements with a median top-1 precision and recall of 67% and 100%, respectively. Four professional developers and five graduate students judged that 77% of our top synthesized API code templates are useful to solve the problem presented in the StackOverflow posts.
引用
收藏
页码:194 / 205
页数:12
相关论文
共 50 条
  • [21] TRANSLATION OF RELIGIOUS TEXTS AND THE MISSING LINK VERSE (60:13) - ENGLISH TRANSLATION
    Adiel, Mousab Alata Elseddig
    EUROPEAN JOURNAL OF SCIENCE AND THEOLOGY, 2024, 20 (05) : 1 - 10
  • [22] A cognitive approach to metaphor translation in business texts The case of English into Arabic translation
    Shehab, Ekrema Mohammad
    Daragmeh, Abdelkarim Tawfiq
    Qadan, Abdul-Rahman Saleh
    Nazzal, Reema Essam
    FORUM-REVUE INTERNATIONALE D INTERPRETATION ET DE TRADUCTION-INTERNATIONAL JOURNAL OF INTERPRETATION AND TRANSLATION, 2022, 20 (01): : 116 - 133
  • [23] Translation Students' knowledge of Lexical Cohesion Patterns and their performance in the translation of English texts
    Khany, Reza
    PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON CURRENT TRENDS IN ELT, 2014, 98 : 925 - 931
  • [24] Comparison of Statistical Approaches for Tamil to English Translation
    Rajkiran, R.
    Prashanth, S.
    Keshav, K. Amarnath
    Rajeswari, Sridhar
    COMPUTATIONAL INTELLIGENCE IN DATA MINING, VOL 2, 2015, 32 : 321 - 331
  • [25] Statistical machine translation from Slovenian to English
    Maucec, Mirjam Sepesy
    Kacic, Zdravko
    Journal of Computing and Information Technology, 2007, 15 (01) : 47 - 59
  • [26] ANNOTATED TEXTS FOR TRANSLATION, FRENCH-ENGLISH - ADAB,BJ
    DUBOIS, JF
    MODERN LANGUAGE JOURNAL, 1994, 78 (04): : 550 - 550
  • [27] Tools and techniques for English-Spanish translation: literary texts
    Mata Pastor, Carmen
    TRANS-REVISTA DE TRADUCTOLOGIA, 2016, (20): : 155 - 158
  • [28] Problems and Improvements in English Translation of Export Food Packaging Texts
    Ma Qinhua
    2019 INTERNATIONAL CONFERENCE ON ARTS, MANAGEMENT, EDUCATION AND INNOVATION (ICAMEI 2019), 2019, : 321 - 325
  • [30] A Study on Chinese-English Translation of Red Tourism Texts
    Wang, Yan
    INTERNATIONAL CONFERENCE ON EDUCATION INNOVATION AND ECONOMIC MANAGEMENT (EIEM 2017), 2017, : 100 - 103