首页> 外文会议>IEEE International Conference on Software Maintenance and Evolution >Statistical Translation of English Texts to API Code Templates
【24h】

Statistical Translation of English Texts to API Code Templates

机译:英语文本统计翻译API代码模板

获取原文

摘要

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.
机译:我们开发T2API,一种基于图形的基于图形的统计翻译方法,它将作为编程任务的英语描述,并合成任务的相应API代码模板。我们训练T2API在统计上学习英语和API元素之间的对齐,并确定相关的API元素。培训是在Sackagoverflow上完成的,一种双语语料库,开发人员在两种类型的语言中讨论编程问题:英语和编程语言。 T2API考虑输入查询中的单词的上下文以及通常在语料库中一起一起使用的API元素的上下文。具有其相关性分数的派生API元素被组装成Grasyn的API使用,这是一种基于图形的API合成算法,其生成表示来自大代码语料库的API使用的图表。重要的是,它能够从先前看到的子用户中生成新的API us。我们策划了250个现实世界Stackoverflow帖子的测试基准。在基准中,T2API的合成代码段具有正确的API元素,具有中位的前1个精度,再调用67%和100%。四名专业开发人员和五位研究生判断我们的77%的顶级合成API代码模板可用于解决StackOverflow Post中的问题。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号