Commit
·
b035b09
1
Parent(s):
bf40fce
Update MultiLegalNeg.py
Browse files- MultiLegalNeg.py +22 -5
MultiLegalNeg.py
CHANGED
@@ -26,7 +26,15 @@ _URL = {
|
|
26 |
'data/'
|
27 |
}
|
28 |
_LANGUAGES = [
|
29 |
-
"german", "french", "italian", "swiss"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
]
|
31 |
|
32 |
|
@@ -88,14 +96,23 @@ class MultiLegalNeg(datasets.GeneratorBasedBuilder):
|
|
88 |
try:
|
89 |
filepaths.append(dl_manager.download((f'data/{language}.jsonl.xz')))
|
90 |
except:
|
91 |
-
|
92 |
-
filepaths.append(dl_manager.download((f'data/english/{language}.jsonl.xz')))
|
93 |
-
except:
|
94 |
-
break
|
95 |
|
96 |
split_generators.append(
|
97 |
datasets.SplitGenerator(name=split, gen_kwargs={'filepaths': filepaths})
|
98 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
|
100 |
return split_generators
|
101 |
|
|
|
26 |
'data/'
|
27 |
}
|
28 |
_LANGUAGES = [
|
29 |
+
"german", "french", "italian", "swiss"
|
30 |
+
]
|
31 |
+
|
32 |
+
_ENGLISH = [
|
33 |
+
"sherlock", "bioscope", "sfu"
|
34 |
+
]
|
35 |
+
|
36 |
+
_ENGLISH_SPLITS = [
|
37 |
+
"abstracts", "full_papers", "dev", "test_cardboard_GOLD", "test_circle_GOLD", "training", ""
|
38 |
]
|
39 |
|
40 |
|
|
|
96 |
try:
|
97 |
filepaths.append(dl_manager.download((f'data/{language}.jsonl.xz')))
|
98 |
except:
|
99 |
+
break
|
|
|
|
|
|
|
100 |
|
101 |
split_generators.append(
|
102 |
datasets.SplitGenerator(name=split, gen_kwargs={'filepaths': filepaths})
|
103 |
)
|
104 |
+
|
105 |
+
for ds in _ENGLISH:
|
106 |
+
filepaths = []
|
107 |
+
for split in _ENGLISH_SPLITS:
|
108 |
+
try:
|
109 |
+
filepaths.append(dl_manager.download((f'data/english/{ds}_{split}.jsonl.xz')))
|
110 |
+
except:
|
111 |
+
break
|
112 |
+
|
113 |
+
split_generators.append(
|
114 |
+
datasets.SplitGenerator(name=ds, gen_kwargs={'filepaths': filepaths})
|
115 |
+
)
|
116 |
|
117 |
return split_generators
|
118 |
|