Albert Villanova del Moral
commited on
Commit
•
1ff41f9
1
Parent(s):
b443dc5
Add baseline ranges
Browse files- open_access.py +6 -1
open_access.py
CHANGED
@@ -57,6 +57,11 @@ _SUBSETS = {
|
|
57 |
}
|
58 |
_BASELINE_DATE = "2022-12-17"
|
59 |
_BASELINE_MAX_RANGE = 10
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
|
62 |
class OpenAccessConfig(datasets.BuilderConfig):
|
@@ -117,7 +122,7 @@ class OpenAccess(datasets.GeneratorBasedBuilder):
|
|
117 |
url = _URL.format(subset=_SUBSETS[subset])
|
118 |
basename = f"{_SUBSETS[subset]}_txt."
|
119 |
# Baselines
|
120 |
-
baselines = [f"PMC00{i}xxxxxx.baseline.{_BASELINE_DATE}" for i in
|
121 |
# baseline_urls = {
|
122 |
# "baseline_file_lists": [f"{url}{basename}{baseline}.filelist.csv" for baseline in baselines],
|
123 |
# "baseline_archives": [f"{url}{basename}{baseline}.tar.gz" for baseline in baselines],
|
|
|
57 |
}
|
58 |
_BASELINE_DATE = "2022-12-17"
|
59 |
_BASELINE_MAX_RANGE = 10
|
60 |
+
_BASELINE_RANGES = {
|
61 |
+
"commercial": range(_BASELINE_MAX_RANGE),
|
62 |
+
"non_commercial": range(1, _BASELINE_MAX_RANGE),
|
63 |
+
"other": range(_BASELINE_MAX_RANGE),
|
64 |
+
}
|
65 |
|
66 |
|
67 |
class OpenAccessConfig(datasets.BuilderConfig):
|
|
|
122 |
url = _URL.format(subset=_SUBSETS[subset])
|
123 |
basename = f"{_SUBSETS[subset]}_txt."
|
124 |
# Baselines
|
125 |
+
baselines = [f"PMC00{i}xxxxxx.baseline.{_BASELINE_DATE}" for i in _BASELINE_RANGES[subset]]
|
126 |
# baseline_urls = {
|
127 |
# "baseline_file_lists": [f"{url}{basename}{baseline}.filelist.csv" for baseline in baselines],
|
128 |
# "baseline_archives": [f"{url}{basename}{baseline}.tar.gz" for baseline in baselines],
|