Update dataset/dataset.py
Browse files- dataset/dataset.py +19 -17
dataset/dataset.py
CHANGED
|
@@ -1,24 +1,26 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
|
|
|
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
def _info(self):
|
| 23 |
pass
|
| 24 |
|
|
|
|
| 1 |
+
import json
|
| 2 |
+
import os
|
| 3 |
+
import datasets
|
| 4 |
|
| 5 |
+
# Define the different configurations (languages)
|
| 6 |
+
_LANGUAGES = ["java", "kt", "py"]
|
| 7 |
|
| 8 |
+
class BugLocalizationConfig(datasets.BuilderConfig):
|
| 9 |
+
"""BuilderConfig for BugLocalization dataset"""
|
| 10 |
+
def __init__(self, **kwargs):
|
| 11 |
+
"""BuilderConfig for BugLocalization.
|
| 12 |
+
Args:
|
| 13 |
+
**kwargs: keyword arguments forwarded to super.
|
| 14 |
+
"""
|
| 15 |
+
super(BugLocalizationConfig, self).__init__(**kwargs)
|
| 16 |
|
| 17 |
|
| 18 |
+
class BugLocalization(datasets.GeneratorBasedBuilder):
|
| 19 |
+
"""BugLocalization dataset"""
|
| 20 |
+
BUILDER_CONFIGS = [
|
| 21 |
+
BugLocalizationConfig(name=lang, description=f"My dataset for {lang}.")
|
| 22 |
+
for lang in _LANGUAGES
|
| 23 |
+
]
|
|
|
|
| 24 |
def _info(self):
|
| 25 |
pass
|
| 26 |
|