2015
DOI: 10.7287/peerj.preprints.1459v1
|View full text |Cite
Preprint
|
Sign up to set email alerts
|

Using machine translation for converting Python 2 to Python 3 code

Abstract: 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 ve… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
2
2
1

Citation Types

0
6
0

Year Published

2021
2021
2024
2024

Publication Types

Select...
5
1
1

Relationship

0
7

Authors

Journals

citations
Cited by 11 publications
(6 citation statements)
references
References 3 publications
0
6
0
Order By: Relevance
“…Programming Language Translation Translating programs or source code across different pro-gramming languages (PL) requires a profound understanding of the PLs. Having strictly defined syntax and semantics, PLs are suitable for phrasebased statistical machine translation (Nguyen et al, 2013;Karaivanov et al, 2014;Aggarwal et al, 2015). Chen et al ( 2018) introduced a tree-to-tree machine translation to translate programs and to learn the syntactic alignment between source and target PL.…”
Section: Related Workmentioning
confidence: 99%
“…Programming Language Translation Translating programs or source code across different pro-gramming languages (PL) requires a profound understanding of the PLs. Having strictly defined syntax and semantics, PLs are suitable for phrasebased statistical machine translation (Nguyen et al, 2013;Karaivanov et al, 2014;Aggarwal et al, 2015). Chen et al ( 2018) introduced a tree-to-tree machine translation to translate programs and to learn the syntactic alignment between source and target PL.…”
Section: Related Workmentioning
confidence: 99%
“…Initially, the phrase-based statistical machine translation model was primarily used for program translation between Java and C# (Nguyen et al 2013;Karaivanov et al 2014). Aggarwal et al (2015) used a similar approach to train a translation model from python2 to python3 on a parallel corpus generated by the open-source library 2 to 3. 1 Later, with the development of deep learning, research on program code translation based on the Tree2Tree model emerged.…”
Section: Translation Of Programming Languagesmentioning
confidence: 99%
“…Early program translation models mainly conducted supervised learning on large bilingual corpora. Aggarwal et al [21] used the python2 to python3 parallel corpora of the post-open source code library 2to3 1 for supervised training. Anh et al [22] used a phrase-based statistical machine translation model to conduct supervised learning training for languages from Java to C#.…”
Section: Supervised Program Translationmentioning
confidence: 99%