Peter Henderson
commited on
Commit
•
6ef1e09
1
Parent(s):
ab0b497
Add initial test data
Browse files- eoir_privacy.py +3 -1
eoir_privacy.py
CHANGED
@@ -36,7 +36,7 @@ _DATA_URL = {
|
|
36 |
_VARIANTS = ["all"] + list(_DATA_URL.keys())
|
37 |
|
38 |
|
39 |
-
class
|
40 |
"""TODO"""
|
41 |
|
42 |
BUILDER_CONFIGS = [datasets.BuilderConfig(name) for name in _VARIANTS]
|
@@ -85,5 +85,7 @@ class PileOfLaw(datasets.GeneratorBasedBuilder):
|
|
85 |
for line in f:
|
86 |
if line:
|
87 |
example = json.loads(line)
|
|
|
|
|
88 |
yield id_, example
|
89 |
id_ += 1
|
|
|
36 |
_VARIANTS = ["all"] + list(_DATA_URL.keys())
|
37 |
|
38 |
|
39 |
+
class EOIRPrivacy(datasets.GeneratorBasedBuilder):
|
40 |
"""TODO"""
|
41 |
|
42 |
BUILDER_CONFIGS = [datasets.BuilderConfig(name) for name in _VARIANTS]
|
|
|
85 |
for line in f:
|
86 |
if line:
|
87 |
example = json.loads(line)
|
88 |
+
label = example["label"]
|
89 |
+
example["label"] = int(label)
|
90 |
yield id_, example
|
91 |
id_ += 1
|