Datasets:

Modalities:
Text
Languages:
English
ArXiv:
Tags:
code
Libraries:
Datasets
License:
bc-transcoder / README.md
gabeorlanski's picture
Update README.md
87dc8cb
|
raw
history blame
3.26 kB
metadata
license: apache-2.0
task_categories:
  - text-generation
  - text2text-generation
  - translation
language:
  - en
tags:
  - code
pretty_name: BabelCode Transcoder
size_categories:
  - 1K<n<10K

Dataset Card for BabelCode Transcoder

Dataset Description

How To Use This Dataset

To quickly evaluate BC-Transcoder predictions, save the qid and language keys along with the postprocessed prediction code in a JSON lines file. Then follow the install instructions for BabelCode, and you can evaluate your predictions.

Dataset Summary

The Transcoder dataset in BabelCode format. Currently supports translation from C++ and Python.

Supported Tasks and Leaderboards

Languages

BC-Transcoder supports:

  • C++
  • C#
  • Dart
  • Go
  • Haskell
  • Java
  • Javascript
  • Julia
  • Kotlin
  • Lua
  • PHP
  • Python
  • R
  • Rust
  • Scala
  • TypeScript

Dataset Structure

>>> from datasets import load_dataset
>>> load_dataset("gabeorlanski/bc-transcoder")
DatasetDict({
    test: Dataset({
        features: ['qid', 'title', 'language', 'signature', 'arguments', 'entry_fn_name', 'entry_cls_name', 'test_code', 'source_py', 'source_cpp'],
        num_rows: 8384
    })
})

Data Fields

  • qid: The question ID used for running tests.
  • title: The title of the question.
  • language: The programming language of the example.
  • signature: The signature for the problem.
  • arguments: The arguments of the problem.
  • entry_fn_name: The function's name to use an entry point.
  • entry_cls_name: The class name to use an entry point.
  • test_code: The raw testing script used in the language. If you want to use this, replace PLACEHOLDER_FN_NAME (and PLACEHOLDER_CLS_NAME if needed) with the corresponding entry points. Next, replace PLACEHOLDER_CODE_BODY with the postprocessed prediction.
  • source_py: The source solution in Python.
  • source_cpp: The source in C++.

Dataset Creation

See section 2 of the BabelCode Paper to learn more about how the datasets are translated.

For information on the original curation of the Transcoder Dataset, please see Unsupervised Translation of Programming Languages by Roziere et. al.

Dataset Curators

Google Research

Licensing Information

CC-BY-4.0

Citation Information

@article{orlanski2023measuring,
  title={Measuring The Impact Of Programming Language Distribution},
  author={Orlanski, Gabriel and Xiao, Kefan and Garcia, Xavier and Hui, Jeffrey and Howland, Joshua and Malmaud, Jonathan and Austin, Jacob and Singh, Rishah and Catasta, Michele},
  journal={arXiv preprint arXiv:2302.01973},
  year={2023}
}
@article{roziere2020unsupervised,
  title={Unsupervised translation of programming languages},
  author={Roziere, Baptiste and Lachaux, Marie-Anne and Chanussot, Lowik and Lample, Guillaume},
  journal={Advances in Neural Information Processing Systems},
  volume={33},
  year={2020}
}