add configs.py to dynamically update configs
Browse files- bbc_alltime.py +1 -6
- configs.py +1 -0
bbc_alltime.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import datasets
|
2 |
import json
|
3 |
-
import
|
4 |
-
import os
|
5 |
|
6 |
_CITATION = """\
|
7 |
@misc{li2023estimating,
|
@@ -20,10 +19,6 @@ This dataset contains BBC News articles from 2017 to 2022. The articles are arra
|
|
20 |
|
21 |
_HOMEPAGE = "https://github.com/liyucheng09/Contamination_Detector"
|
22 |
|
23 |
-
all_articles = glob.glob('articles/*.json')
|
24 |
-
file_names = [os.path.splitext(os.path.basename(path))[0] for path in all_articles]
|
25 |
-
_TIMES = sorted(file_names) + ['all']
|
26 |
-
|
27 |
class Bbc_alltimes(datasets.GeneratorBasedBuilder):
|
28 |
|
29 |
BUILDER_CONFIGS = [
|
|
|
1 |
import datasets
|
2 |
import json
|
3 |
+
from configs import _TIMES
|
|
|
4 |
|
5 |
_CITATION = """\
|
6 |
@misc{li2023estimating,
|
|
|
19 |
|
20 |
_HOMEPAGE = "https://github.com/liyucheng09/Contamination_Detector"
|
21 |
|
|
|
|
|
|
|
|
|
22 |
class Bbc_alltimes(datasets.GeneratorBasedBuilder):
|
23 |
|
24 |
BUILDER_CONFIGS = [
|
configs.py
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
_TIMES = ['2017-1', '2017-10', '2017-11', '2017-12', '2017-2', '2017-3', '2017-4', '2017-5', '2017-6', '2017-7', '2017-8', '2017-9', '2018-1', '2018-10', '2018-11', '2018-12', '2018-2', '2018-3', '2018-4', '2018-5', '2018-6', '2018-7', '2018-8', '2018-9', '2019-1', '2019-10', '2019-11', '2019-12', '2019-2', '2019-3', '2019-4', '2019-5', '2019-6', '2019-7', '2019-8', '2019-9', '2020-1', '2020-10', '2020-11', '2020-12', '2020-2', '2020-3', '2020-4', '2020-5', '2020-6', '2020-7', '2020-8', '2020-9', '2021-1', '2021-10', '2021-11', '2021-12', '2021-2', '2021-3', '2021-4', '2021-5', '2021-6', '2021-7', '2021-8', '2021-9', '2022-1', '2022-10', '2022-11', '2022-12', '2022-2', '2022-3', '2022-4', '2022-5', '2022-6', '2022-7', '2022-8', '2022-9', 'all']
|