Datasets:
gabeorlanski
commited on
Commit
·
ad9d68c
1
Parent(s):
d73f58b
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,130 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
+
task_categories:
|
4 |
+
- text-generation
|
5 |
+
- text2text-generation
|
6 |
+
- translation
|
7 |
+
language:
|
8 |
+
- en
|
9 |
+
tags:
|
10 |
+
- code
|
11 |
+
pretty_name: BabelCode Transcoder
|
12 |
+
size_categories:
|
13 |
+
- 1K<n<10K
|
14 |
---
|
15 |
+
# Dataset Card for BabelCode Transcoder
|
16 |
+
|
17 |
+
## Dataset Description
|
18 |
+
|
19 |
+
- **Repository:** [GitHub Repository](https://github.com/google-research/babelcode)
|
20 |
+
- **Paper:** [Measuring The Impact Of Programming Language Distribution](https://arxiv.org/abs/2302.01973)
|
21 |
+
|
22 |
+
### How To Use This Dataset
|
23 |
+
|
24 |
+
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](https://github.com/google-research/babelcode), and you can evaluate your predictions.
|
25 |
+
|
26 |
+
### Dataset Summary
|
27 |
+
|
28 |
+
The Transcoder dataset in BabelCode format. Currently supports translation from C++ and Python.
|
29 |
+
|
30 |
+
### Supported Tasks and Leaderboards
|
31 |
+
|
32 |
+
### Languages
|
33 |
+
BC-Transcoder supports:
|
34 |
+
* C++
|
35 |
+
* C#
|
36 |
+
* Dart
|
37 |
+
* Go
|
38 |
+
* Haskell
|
39 |
+
* Java
|
40 |
+
* Javascript
|
41 |
+
* Julia
|
42 |
+
* Kotlin
|
43 |
+
* Lua
|
44 |
+
* PHP
|
45 |
+
* Python
|
46 |
+
* R
|
47 |
+
* Rust
|
48 |
+
* Scala
|
49 |
+
* TypeScript
|
50 |
+
|
51 |
+
## Dataset Structure
|
52 |
+
|
53 |
+
```python
|
54 |
+
>>> from datasets import load_dataset
|
55 |
+
>>> load_dataset("gabeorlanski/bc-transcoder")
|
56 |
+
DatasetDict({
|
57 |
+
test: Dataset({
|
58 |
+
features: ['qid', 'title', 'language', 'text', 'signature_with_docstring', 'signature', 'arguments', 'entry_fn_name', 'entry_cls_name', 'test_code'],
|
59 |
+
num_rows: 2576
|
60 |
+
})
|
61 |
+
})
|
62 |
+
```
|
63 |
+
|
64 |
+
### Data Fields
|
65 |
+
|
66 |
+
- `qid`: The question ID used for running tests.
|
67 |
+
- `title`: The title of the question.
|
68 |
+
- `language`: The programming language of the example.
|
69 |
+
- `text`: The description of the problem.
|
70 |
+
- `signature`: The signature for the problem.
|
71 |
+
- `signature_with_docstring`: The signature with the adequately formatted docstring for the given problem.
|
72 |
+
- `arguments`: The arguments of the problem.
|
73 |
+
- `entry_fn_name`: The function's name to use an entry point.
|
74 |
+
- `entry_cls_name`: The class name to use an entry point.
|
75 |
+
- `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.
|
76 |
+
- `source_py`: The source solution in Python.
|
77 |
+
- `source_cpp`: The source in C++.
|
78 |
+
## Dataset Creation
|
79 |
+
See section 2 of the [BabelCode Paper](https://arxiv.org/abs/2302.01973) to learn more about how the datasets are translated.
|
80 |
+
|
81 |
+
### Curation Rationale
|
82 |
+
|
83 |
+
### Source Data
|
84 |
+
|
85 |
+
#### Initial Data Collection and Normalization
|
86 |
+
|
87 |
+
#### Who are the source language producers?
|
88 |
+
|
89 |
+
### Annotations
|
90 |
+
|
91 |
+
#### Annotation process
|
92 |
+
|
93 |
+
#### Who are the annotators?
|
94 |
+
|
95 |
+
### Personal and Sensitive Information
|
96 |
+
None.
|
97 |
+
|
98 |
+
## Considerations for Using the Data
|
99 |
+
|
100 |
+
### Social Impact of Dataset
|
101 |
+
|
102 |
+
|
103 |
+
### Discussion of Biases
|
104 |
+
|
105 |
+
### Other Known Limitations
|
106 |
+
|
107 |
+
## Additional Information
|
108 |
+
|
109 |
+
### Dataset Curators
|
110 |
+
Google Research
|
111 |
+
|
112 |
+
### Licensing Information
|
113 |
+
CC-BY-4.0
|
114 |
+
|
115 |
+
### Citation Information
|
116 |
+
```
|
117 |
+
@article{orlanski2023measuring,
|
118 |
+
title={Measuring The Impact Of Programming Language Distribution},
|
119 |
+
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},
|
120 |
+
journal={arXiv preprint arXiv:2302.01973},
|
121 |
+
year={2023}
|
122 |
+
}
|
123 |
+
@article{roziere2020unsupervised,
|
124 |
+
title={Unsupervised translation of programming languages},
|
125 |
+
author={Roziere, Baptiste and Lachaux, Marie-Anne and Chanussot, Lowik and Lample, Guillaume},
|
126 |
+
journal={Advances in Neural Information Processing Systems},
|
127 |
+
volume={33},
|
128 |
+
year={2020}
|
129 |
+
}
|
130 |
+
```
|