Datasets:
Tasks:
Text Classification
Formats:
json
Sub-tasks:
entity-linking-classification
Size:
100K - 1M
ArXiv:
DOI:
License:
Update doc2doc.py
Browse files- doc2doc.py +2 -10
doc2doc.py
CHANGED
@@ -63,8 +63,6 @@ class doc2doc(datasets.GeneratorBasedBuilder):
|
|
63 |
"language": datasets.Value("string"),
|
64 |
"year": datasets.Value("int32"),
|
65 |
"chamber": datasets.Value("string"),
|
66 |
-
"court": datasets.Value("string"),
|
67 |
-
"canton": datasets.Value("string"),
|
68 |
"region": datasets.Value("string"),
|
69 |
"origin_chamber": datasets.Value("string"),
|
70 |
"origin_court": datasets.Value("string"),
|
@@ -76,8 +74,6 @@ class doc2doc(datasets.GeneratorBasedBuilder):
|
|
76 |
"facts": datasets.Value("string"),
|
77 |
"considerations": datasets.Value("string"),
|
78 |
"rulings": datasets.Value("string"),
|
79 |
-
"origin_facts": datasets.Value("string"),
|
80 |
-
"origin_considerations": datasets.Value("string"),
|
81 |
# These are the features of your dataset like images, labels ...
|
82 |
}
|
83 |
)
|
@@ -145,14 +141,12 @@ class doc2doc(datasets.GeneratorBasedBuilder):
|
|
145 |
line_counter += 1
|
146 |
if line:
|
147 |
data = json.loads(line)
|
148 |
-
if self.config.name == "full"
|
149 |
yield id, {
|
150 |
"decision_id": data["decision_id"],
|
151 |
"language": data["language"],
|
152 |
"year": data["year"],
|
153 |
"chamber": data["chamber"],
|
154 |
-
"court": data["court"],
|
155 |
-
"canton": data["canton"],
|
156 |
"region": data["region"],
|
157 |
"origin_chamber": data["origin_chamber"],
|
158 |
"origin_court": data["origin_court"],
|
@@ -163,9 +157,7 @@ class doc2doc(datasets.GeneratorBasedBuilder):
|
|
163 |
"laws": data["laws"],
|
164 |
"facts": data["facts"],
|
165 |
"considerations": data["considerations"],
|
166 |
-
"rulings": data["rulings"]
|
167 |
-
"origin_facts": data["origin_facts"],
|
168 |
-
"origin_considerations": data["origin_considerations"]
|
169 |
}
|
170 |
except lzma.LZMAError as e:
|
171 |
print(split, e)
|
|
|
63 |
"language": datasets.Value("string"),
|
64 |
"year": datasets.Value("int32"),
|
65 |
"chamber": datasets.Value("string"),
|
|
|
|
|
66 |
"region": datasets.Value("string"),
|
67 |
"origin_chamber": datasets.Value("string"),
|
68 |
"origin_court": datasets.Value("string"),
|
|
|
74 |
"facts": datasets.Value("string"),
|
75 |
"considerations": datasets.Value("string"),
|
76 |
"rulings": datasets.Value("string"),
|
|
|
|
|
77 |
# These are the features of your dataset like images, labels ...
|
78 |
}
|
79 |
)
|
|
|
141 |
line_counter += 1
|
142 |
if line:
|
143 |
data = json.loads(line)
|
144 |
+
if self.config.name == "full":
|
145 |
yield id, {
|
146 |
"decision_id": data["decision_id"],
|
147 |
"language": data["language"],
|
148 |
"year": data["year"],
|
149 |
"chamber": data["chamber"],
|
|
|
|
|
150 |
"region": data["region"],
|
151 |
"origin_chamber": data["origin_chamber"],
|
152 |
"origin_court": data["origin_court"],
|
|
|
157 |
"laws": data["laws"],
|
158 |
"facts": data["facts"],
|
159 |
"considerations": data["considerations"],
|
160 |
+
"rulings": data["rulings"]
|
|
|
|
|
161 |
}
|
162 |
except lzma.LZMAError as e:
|
163 |
print(split, e)
|