PreprintCited by 20Software Engineering ResearchNatural Language Processing TechniquesTranslation Studies and Practices

Using machine translation for converting Python 2 to Python 3 code

Open access
Aggarwal, Karan, Salameh, Mohammad, Hindle, Abram·2015

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 versions of a programming language or cross-programming-languages code translation.

Integrity signals

Registry

Crossref · 10.7287/peerj.preprints.1459v1

Cites

Statistics

Recomputing p-values needs the paper’s full text.

Claims the paper makes

We couldn’t retrieve this paper’s full text, so its claims and self-check weren’t run. The registry and citation checks still apply.

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • Code translation facilitates refactoring outdated languages, transitions to faster languages, and supports programming language migration.

    “It facilitates the refactoring of code written in outdated languages [10], transitions from simpler but slower languages to more complex and faster ones [11], and supports programming language migration in software development [12]-[19].”

Cited by

Sorted by citations

Authors
Aggarwal, K., Salameh, M., & Hindle, A.
Affiliations
University of Alberta (CA)
Publisher
PeerJ
Published
2015-10-29
OpenAlex
W1846534677
Cited by
20
References
0
Citations by year
2026: 3 · 2025: 2 · 2024: 2 · 2023: 3 · 2022: 2 · 2021: 4 · 2020: 3 · 2018: 1
Type
posted content
Language
en
Open access
Topics
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
  • Social Sciences › Arts and Humanities › Language and Linguistics › Translation Studies and Practices
Keywords
statistical machine translation, program translation, programming language translation, BLEU evaluation

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review