galtimur commited on
Commit
d74f6f1
·
verified ·
1 Parent(s): 36f058f

Update dataset/dataset.py

Browse files
Files changed (1) hide show
  1. dataset/dataset.py +19 -17
dataset/dataset.py CHANGED
@@ -1,24 +1,26 @@
1
- import datasets
 
 
2
 
3
- _LANGUAGES = ["python", "java", "kotlin"]
 
4
 
5
- class BugLocalizationConfig(datasets.BuilderConfig):
6
- """BuilderConfig for BugLocalizationConfig"""
7
- def __init__(self, **kwargs):
8
- """BuilderConfig for BugLocalization Dataset.
9
- Args:
10
- **kwargs: keyword arguments forwarded to super.
11
- """
12
- super(BugLocalizationConfig, self).__init__(**kwargs)
13
 
14
 
15
- class BugLocalizationDatset(datasets.GeneratorBasedBuilder):
16
- """BugLocalizationDatset Dataset"""
17
- BUILDER_CONFIGS = [
18
- BugLocalizationConfig(name=lang, description=f"Bug localization dataset for {lang}.")
19
- for lang in _LANGUAGES
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