Data Augmentation for Code Translation with Comparable Corpora and Multiple References
One major challenge of translating code between programming languages is that parallel training data is often limited. To overcome this challenge, we present two data augmentation techniques, one that builds comparable corpora (i.e., code pairs with similar functionality), and another that augments existing parallel data with multiple reference translations. Specifically, we build and analyze multiple types of comparable corpora, including programs generated from natural language documentation using a code generation model. Furthermore, to reduce overfitting to a single reference translation, we automatically generate additional translation references for available parallel data and filter the translations by unit tests, which increases variation in target translations. Experiments show that our data augmentation techniques significantly improve CodeT5 for translation between Java, Python, and C++ by an average of 7.5% Computational Accuracy (CA@1), which verifies the correctness of translations by execution. The code is available at https://github.com/Veronicium/CMTrans.
Code (1)
Tasks
Code GenerationCode TranslationData AugmentationTranslationMethods 이 논문이 사용한 방법론
Similar Papers 제목 키워드 기반
Data Selection for Bilingual Lexicon Induction from Specialized Comparable Corpora
Narrow specialized comparable corpora are often small in size. This particularity makes it difficult to build efficient models to acquire translation equivalents, especially for less frequent and rare words. One way to o…
Bilingual Lexicon InductionData AugmentationMachine TranslationTranslationAutomated Snippet-Alignment Data Augmentation for Code Translation
Code translation aims to translate the code from its source language to the target language and is used in various software development scenarios. Recent developments in Large Language Models (LLMs) have showcased their …
Data AugmentationCode TranslationSwitchOut: an Efficient Data Augmentation Algorithm for Neural Machine Translation
In this work, we examine methods for data augmentation for text-based tasks such as neural machine translation (NMT). We formulate the design of a data augmentation policy with desirable properties as an optimization pro…
Data AugmentationMachine TranslationNMTSentence+1From Machine Translation to Code-Switching: Generating High-Quality Code-Switched Text
Generating code-switched text is a problem of growing interest, especially given the scarcity of corpora containing large volumes of real code-switched text. In this work, we adapt a state-of-the-art neural machine trans…
Data AugmentationLanguage ModelingLanguage ModellingMachine Translation+2Collecting and Using Comparable Corpora for Statistical Machine Translation
Lack of sufficient parallel data for many languages and domains is currently one of the major obstacles to further advancement of automated translation. The ACCURAT project is addressing this issue by researching methods…
Machine TranslationTranslation