Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
annotations_creators: []
|
| 3 |
+
language_creators:
|
| 4 |
+
- crowdsourced
|
| 5 |
+
- expert-generated
|
| 6 |
+
language:
|
| 7 |
+
- code
|
| 8 |
+
license:
|
| 9 |
+
- mit
|
| 10 |
+
multilinguality:
|
| 11 |
+
- monolingual
|
| 12 |
+
size_categories:
|
| 13 |
+
- unknown
|
| 14 |
+
source_datasets:
|
| 15 |
+
- original
|
| 16 |
+
task_categories:
|
| 17 |
+
- text2text-generation
|
| 18 |
+
task_ids: []
|
| 19 |
+
pretty_name: DocPrompting-CoNaLa
|
| 20 |
+
tags:
|
| 21 |
+
- code-generation
|
| 22 |
+
- doc retrieval
|
| 23 |
+
- retrieval augmented generation
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
## Dataset Description
|
| 27 |
+
- **Repository:** https://github.com/shuyanzhou/docprompting
|
| 28 |
+
- **Paper:** [DocPrompting: Generating Code by Retrieving the Docs](https://arxiv.org/pdf/2207.05987.pdf)
|
| 29 |
+
|
| 30 |
+
### Dataset Summary
|
| 31 |
+
This is the natural language to bash generation dataset we harvested from the English subset of [`tldr`](https://github.com/tldr-pages/tldr)
|
| 32 |
+
We split the dataset by bash commands. Every command in the dev and test set is held out from the training set.
|
| 33 |
+
|
| 34 |
+
### Supported Tasks and Leaderboards
|
| 35 |
+
This dataset is used to evaluate code generations.
|
| 36 |
+
|
| 37 |
+
### Languages
|
| 38 |
+
English - Bash
|
| 39 |
+
|
| 40 |
+
## Dataset Structure
|
| 41 |
+
```python
|
| 42 |
+
dataset = load_dataset("neulab/tldr")
|
| 43 |
+
DatasetDict({
|
| 44 |
+
train: Dataset({
|
| 45 |
+
features: ['question_id', 'nl', 'cmd', 'oracle_man', 'cmd_name', 'tldr_cmd_name', 'manual_exist', 'matching_info'],
|
| 46 |
+
num_rows: 6414
|
| 47 |
+
})
|
| 48 |
+
test: Dataset({
|
| 49 |
+
features: ['question_id', 'nl', 'cmd', 'oracle_man', 'cmd_name', 'tldr_cmd_name', 'manual_exist', 'matching_info'],
|
| 50 |
+
num_rows: 928
|
| 51 |
+
})
|
| 52 |
+
validation: Dataset({
|
| 53 |
+
features: ['question_id', 'nl', 'cmd', 'oracle_man', 'cmd_name', 'tldr_cmd_name', 'manual_exist', 'matching_info'],
|
| 54 |
+
num_rows: 1845
|
| 55 |
+
})
|
| 56 |
+
})
|
| 57 |
+
|
| 58 |
+
code_docs = load_dataset("neulab/docprompting-conala", "docs")
|
| 59 |
+
DatasetDict({
|
| 60 |
+
train: Dataset({
|
| 61 |
+
features: ['doc_id', 'doc_content'],
|
| 62 |
+
num_rows: 439064
|
| 63 |
+
})
|
| 64 |
+
})
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
### Data Fields
|
| 68 |
+
train/dev/test:
|
| 69 |
+
- nl: The natural language intent
|
| 70 |
+
- cmd: The reference code snippet
|
| 71 |
+
- question_id: the unique id of a question
|
| 72 |
+
- oracle_man: The `doc_id` of the functions used in the reference code snippet. The corresponding contents are in `doc` split
|
| 73 |
+
- cmd_name: the bash command of this code snippet
|
| 74 |
+
- tldr_cmd_name: the bash command used in tldr github repo. The `cmd_name` and `tldr_cmd_name` can be different due to naming difference
|
| 75 |
+
- manual_exist: whether the manual exists in https://manned.org
|
| 76 |
+
- matching_info: each code snippets have multiple tokens, this is the detailed reference doc matching on each token.
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
docs:
|
| 80 |
+
- doc_id: the id of a doc
|
| 81 |
+
- doc_content: the content of the doc
|
| 82 |
+
|
| 83 |
+
## Dataset Creation
|
| 84 |
+
The dataset was curated from [`tldr`](https://github.com/tldr-pages/tldr).
|
| 85 |
+
The project aims to provide frequent usage of bash commands with natural language intents.
|
| 86 |
+
For more details, please check the repo.
|
| 87 |
+
|
| 88 |
+
### Citation Information
|
| 89 |
+
|
| 90 |
+
```
|
| 91 |
+
@article{zhou2022doccoder,
|
| 92 |
+
title={DocCoder: Generating Code by Retrieving and Reading Docs},
|
| 93 |
+
author={Zhou, Shuyan and Alon, Uri and Xu, Frank F and Jiang, Zhengbao and Neubig, Graham},
|
| 94 |
+
journal={arXiv preprint arXiv:2207.05987},
|
| 95 |
+
year={2022}
|
| 96 |
+
}
|
| 97 |
+
```
|