Using machine translation for converting Python 2 to Python 3 code

Using machine translation for converting Python 2 to Python 3 code
复制标题

使用机器翻译将 Python 2 代码转换为 Python 3 代码

DOI:
--
复制
发表时间:
2015
期刊:
PeerJ Preprints
影响因子:
--
通讯作者:
Abram Hindle
Abram Hindle
中科院分区:
--
文献类型:
--
作者:
Karan Aggarwal;Mohammad Salameh;Abram Hindle

文献摘要

被引文献

相似文献

在本文中,我们尝试使用统计机器翻译来将Python2代码转换为Python3代码。我们使用了两个项目的数据,并取得了BLEU的高分。我们还调查了跨项目的培训和测试,以分析错误,以确定与以前的案例的差异。我们描述了一项将编程语言建模为自然语言的试点研究,以在自然语言的基础上构建翻译模型。这可以进一步用于在编程语言的不同版本之间进行翻译或跨编程语言代码翻译。
In this paper, we have tried to use Statistical machine translation in order to convert Python 2 code to Python 3 code. We use data from two projects and achieve a high BLEU score. We also investigate the cross-project training and testing to analyze the errors so as to ascertain differences with previous case. We have described a pilot study on modeling programming languages as natural language to build translation models on the lines of natural languages. This can be further worked on to translate between versions of a programming language or crossprogramming-languages code translation.