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---
|
2 |
+
annotations_creators:
|
3 |
+
- found
|
4 |
+
language:
|
5 |
+
- bg
|
6 |
+
- cs
|
7 |
+
- da
|
8 |
+
- de
|
9 |
+
- el
|
10 |
+
- en
|
11 |
+
- es
|
12 |
+
- et
|
13 |
+
- fi
|
14 |
+
- fr
|
15 |
+
- ga
|
16 |
+
- hr
|
17 |
+
- hu
|
18 |
+
- it
|
19 |
+
- lt
|
20 |
+
- lv
|
21 |
+
- mt
|
22 |
+
- nl
|
23 |
+
- pl
|
24 |
+
- pt
|
25 |
+
- ro
|
26 |
+
- sk
|
27 |
+
- sl
|
28 |
+
- sv
|
29 |
+
language_creators:
|
30 |
+
- found
|
31 |
+
license:
|
32 |
+
- mit
|
33 |
+
multilinguality:
|
34 |
+
- multilingual
|
35 |
+
size_categories:
|
36 |
+
- 1M<n<10M
|
37 |
+
source_datasets:
|
38 |
+
- original
|
39 |
+
tags:
|
40 |
+
- legal documents
|
41 |
+
- corpus
|
42 |
+
- eurlex
|
43 |
+
- html
|
44 |
+
task_categories:
|
45 |
+
- text-classification
|
46 |
+
- fill-mask
|
47 |
+
task_ids:
|
48 |
+
- multi-class-classification
|
49 |
+
- multi-label-classification
|
50 |
+
pretty_name: 'SuperEURLEX: A Corpus of Plain Text and HTML from EURLEX, Annotated for multiple Legal Domain Text Classification Tasks.'
|
51 |
---
|
52 |
+
|
53 |
+
# Dataset Card for Dataset Name
|
54 |
+
|
55 |
+
This dataset contains over 4.6M Legal Documents from EURLEX with Annotations.
|
56 |
+
Over 3.7M of this 4.6M documents are also available in HTML format.
|
57 |
+
This dataset can be used for pretraining language models as well as for testing them on legal text classification tasks.
|
58 |
+
|
59 |
+
Use this dataset as follows:
|
60 |
+
|
61 |
+
```python
|
62 |
+
from datasets import load_dataset
|
63 |
+
config = "0.DE" # {sector}.{lang}[.html]
|
64 |
+
dataset = load_dataset("ddrg/super_eurlex", config, split='train')
|
65 |
+
```
|
66 |
+
|
67 |
+
## Dataset Details
|
68 |
+
|
69 |
+
### Dataset Description
|
70 |
+
|
71 |
+
This Dataset was scrapped from [EURLEX](https://eur-lex.europa.eu/homepage.html).
|
72 |
+
It contains more than 4.6M Legal Documents in Plain Text and over 3.7M In HTML Format.
|
73 |
+
Those Documents are separated by their language (This Dataset includes a total of 24 official European Languages)
|
74 |
+
and by their Sector.
|
75 |
+
|
76 |
+
|
77 |
+
#### The Table below shows the number of documents per language:
|
78 |
+
|
79 |
+
| | Raw | HTML |
|
80 |
+
|---:|--------:|--------:|
|
81 |
+
| BG | 29,778 | 27,718 |
|
82 |
+
| CS | 94,439 | 91,754 |
|
83 |
+
| DA | 398,559 | 300,488 |
|
84 |
+
| DE | 384,179 | 265,724 |
|
85 |
+
| EL | 167,502 | 117,009 |
|
86 |
+
| EN | 456,212 | 354,186 |
|
87 |
+
| ES | 253,821 | 201,400 |
|
88 |
+
| ET | 142,183 | 139,690 |
|
89 |
+
| FI | 238,143 | 214,206 |
|
90 |
+
| FR | 427,011 | 305,592 |
|
91 |
+
| GA | 19,673 | 19,437 |
|
92 |
+
| HR | 37,200 | 35,944 |
|
93 |
+
| HU | 69,275 | 66,334 |
|
94 |
+
| IT | 358,637 | 259,936 |
|
95 |
+
| LT | 62,975 | 61,139 |
|
96 |
+
| LV | 105,433 | 102,105 |
|
97 |
+
| MT | 46,695 | 43,969 |
|
98 |
+
| NL | 345,276 | 237,366 |
|
99 |
+
| PL | 146,502 | 143,490 |
|
100 |
+
| PT | 369,571 | 314,148 |
|
101 |
+
| RO | 47,398 | 45,317 |
|
102 |
+
| SK | 100,718 | 98,192 |
|
103 |
+
| SL | 170,583 | 166,646 |
|
104 |
+
| SV | 172,926 | 148,656 |
|
105 |
+
|
106 |
+
|
107 |
+
- **Curated by:** [More Information Needed]
|
108 |
+
- **Funded by [optional]:** [More Information Needed]
|
109 |
+
- **Shared by [optional]:** [More Information Needed]
|
110 |
+
- **Language(s) (NLP):** [More Information Needed]
|
111 |
+
- **License:** [More Information Needed]
|
112 |
+
|
113 |
+
### Dataset Sources [optional]
|
114 |
+
|
115 |
+
- **Repository:** https://huggingface.co/datasets/ddrg/super_eurlex/tree/main
|
116 |
+
- **Paper [optional]:** [More Information Needed]
|
117 |
+
- **Demo [optional]:** [More Information Needed]
|
118 |
+
|
119 |
+
## Uses
|
120 |
+
|
121 |
+
### As Corpus for:
|
122 |
+
- **Pretraining of Language Models with self supervised tasks** like Masked Language Modeling and Next Sentence Prediction
|
123 |
+
- Legal Text Analysis
|
124 |
+
|
125 |
+
### As Dataset for evaluation on the following task:
|
126 |
+
- *eurovoc*-Concepts Prediction i.e. which tags apply? (Muli-Label Classification (large Scale))
|
127 |
+
- Example for this task is given[below
|
128 |
+
- *subject-matter* Prediction i.e. which other tags apply (Multi-Label Classification)
|
129 |
+
- *form* Classification i.e. What Kind of Document is it? (Multi-Class)
|
130 |
+
- And more
|
131 |
+
|
132 |
+
### Example for Use Of EUROVOC-Concepts
|
133 |
+
|
134 |
+
```python
|
135 |
+
from datasets import load_dataset
|
136 |
+
import transformers as tr
|
137 |
+
from sklearn.preprocessing import MultiLabelBinarizer
|
138 |
+
import numpy as np
|
139 |
+
import evaluate
|
140 |
+
import uuid
|
141 |
+
|
142 |
+
# ==================== #
|
143 |
+
# Prepare Data #
|
144 |
+
# ==================== #
|
145 |
+
CONFIG = "3.EN" # {sector}.{lang}[.html]
|
146 |
+
MODEL_NAME = "distilroberta-base"
|
147 |
+
dataset = load_dataset("ddrg/super_eurlex", CONFIG, split='train')
|
148 |
+
tokenizer = tr.AutoTokenizer.from_pretrained(MODEL_NAME)
|
149 |
+
|
150 |
+
# Remove Unlabeled Columns
|
151 |
+
def remove_nulls(batch):
|
152 |
+
return [(sample != None) for sample in batch["eurovoc"]]
|
153 |
+
dataset = dataset.filter(remove_nulls, batched=True, keep_in_memory=True)
|
154 |
+
|
155 |
+
# Tokenize Text
|
156 |
+
def tokenize(batch):
|
157 |
+
return tokenizer(batch["text_cleaned"], truncation=True, padding="max_length")
|
158 |
+
# Keep in Memory is optional (The Dataset is large though and can easily use up alot of memory)
|
159 |
+
dataset = dataset.map(tokenize, batched=True, keep_in_memory=True)
|
160 |
+
|
161 |
+
# Create Label Column by encoding Eurovoc Concepts
|
162 |
+
encoder = MultiLabelBinarizer()
|
163 |
+
# List of all Possible Labels
|
164 |
+
eurovoc_concepts = dataset["eurovoc"]
|
165 |
+
encoder.fit(eurovoc_concepts)
|
166 |
+
def encode_labels(batch):
|
167 |
+
batch["label"] = encoder.transform(batch["eurovoc"])
|
168 |
+
return batch
|
169 |
+
dataset = dataset.map(encode_labels, batched=True, keep_in_memory=True)
|
170 |
+
|
171 |
+
# Split into train and Test set
|
172 |
+
dataset = dataset.train_test_split(0.2)
|
173 |
+
|
174 |
+
# ==================== #
|
175 |
+
# Load & Train Model #
|
176 |
+
# ==================== #
|
177 |
+
model = tr.AutoModelForSequenceClassification.from_pretrained(
|
178 |
+
MODEL_NAME,
|
179 |
+
num_labels=len(encoder.classes_),
|
180 |
+
problem_type="multi_label_classification",
|
181 |
+
)
|
182 |
+
|
183 |
+
metric = evaluate.load("JP-SystemsX/nDCG", experiment_id=uuid.uuid4())
|
184 |
+
def compute_metric(eval_pred):
|
185 |
+
predictions, labels = eval_pred
|
186 |
+
return metric.compute(predictions=predictions, references=labels, k=5)
|
187 |
+
|
188 |
+
# Set Hyperparameter
|
189 |
+
# Note: We stay mostly with default values to keep example short
|
190 |
+
# Though more hyperparameter should be set and tuned in praxis
|
191 |
+
train_args = tr.TrainingArguments(
|
192 |
+
output_dir="./cache",
|
193 |
+
per_device_train_batch_size=16,
|
194 |
+
num_train_epochs=20
|
195 |
+
)
|
196 |
+
trainer = tr.Trainer(
|
197 |
+
model=model,
|
198 |
+
args=train_args,
|
199 |
+
train_dataset=dataset["train"],
|
200 |
+
compute_metrics=compute_metric,
|
201 |
+
)
|
202 |
+
trainer.train() # This will take a while
|
203 |
+
print(trainer.evaluate(dataset["test"]))
|
204 |
+
# >>> {'eval_loss': 0.0018887673504650593, 'eval_nDCG@5': 0.8072531683578489, 'eval_runtime': 663.8582, 'eval_samples_per_second': 32.373, 'eval_steps_per_second': 4.048, 'epoch': 20.0}
|
205 |
+
```
|
206 |
+
|
207 |
+
|
208 |
+
### Out-of-Scope Use
|
209 |
+
|
210 |
+
<!-- This section addresses misuse, malicious use, and uses that the dataset will not work well for. -->
|
211 |
+
|
212 |
+
[More Information Needed]
|
213 |
+
|
214 |
+
## Dataset Structure
|
215 |
+
|
216 |
+
This dataset is divided into multiple split by _Sector x Language x Format_
|
217 |
+
|
218 |
+
Sector refers to the kind of Document it belongs to:
|
219 |
+
- **0:** Consolidated acts
|
220 |
+
- **1:** Treaties
|
221 |
+
- **2:** International agreements
|
222 |
+
- **3:** Legislation
|
223 |
+
- **4:** Complementary legislation
|
224 |
+
- **5:** Preparatory acts and working documents
|
225 |
+
- **6:** Case-law
|
226 |
+
- **7:** National transposition measures
|
227 |
+
- **8:** References to national case-law concerning EU law
|
228 |
+
- **9:** Parliamentary questions
|
229 |
+
- **C:** Other documents published in the Official Journal C series
|
230 |
+
- **E:** EFTA documents
|
231 |
+
|
232 |
+
Language refers to each of the 24 official European Languages that were included at the date of the dataset creation:
|
233 |
+
- BG ~ Bulgarian
|
234 |
+
- CS ~ Czech
|
235 |
+
- DA ~ Danish
|
236 |
+
- DE ~ German
|
237 |
+
- EL ~ Greek
|
238 |
+
- EN ~ English
|
239 |
+
- ES ~ Spanish
|
240 |
+
- ET ~ Estonian
|
241 |
+
- FI ~ Finnish
|
242 |
+
- FR ~ French
|
243 |
+
- GA ~ Irish
|
244 |
+
- HR ~ Croatian
|
245 |
+
- HU ~ Hungarian
|
246 |
+
- IT ~ Italian
|
247 |
+
- LT ~ Lithuanian
|
248 |
+
- LV ~ Latvian
|
249 |
+
- MT ~ Maltese
|
250 |
+
- NL ~ Dutch
|
251 |
+
- PL ~ Polish
|
252 |
+
- PT ~ Portuguese
|
253 |
+
- RO ~ Romanian
|
254 |
+
- SK ~ Slovak
|
255 |
+
- SL ~ Slovenian
|
256 |
+
- SV ~ Swedish
|
257 |
+
|
258 |
+
Format refers to plain Text (default) or HTML format (.html)
|
259 |
+
> Note: Plain Text contains generally more documents because not all documents were available in HTML format but those that were are included in both formats
|
260 |
+
|
261 |
+
Those Splits are named the following way:
|
262 |
+
`{sector}.{lang}[.html]`
|
263 |
+
|
264 |
+
For Example:
|
265 |
+
- `3.EN` would be English legislative documents in plain text format
|
266 |
+
- `3.EN.html` would be the same in HTML Format
|
267 |
+
|
268 |
+
Each _Sector_ has its own set of meta data:
|
269 |
+
|
270 |
+
<details><summary>Sector 0 (Consolidated acts)</summary><p>
|
271 |
+
|
272 |
+
- _celex_id_ ~ Unique Identifier for each document
|
273 |
+
- _text_cleaned_ (Plain Text) **or** _text_html_raw_ (HTML Format)
|
274 |
+
- _form_ ~ Kind of Document e.g. Consolidated text, or Treaty
|
275 |
+
|
276 |
+
</p>
|
277 |
+
</details>
|
278 |
+
|
279 |
+
<details><summary>Sector 1 (Treaties)</summary><p>
|
280 |
+
|
281 |
+
- _celex_id_ ~ Unique Identifier for each document
|
282 |
+
- _text_cleaned_ (Plain Text) **or** _text_html_raw_ (HTML Format)
|
283 |
+
- _form_ ~ Kind of Document e.g. Consolidated text, or Treaty
|
284 |
+
- _subject_matter_ ~ Keywords that provide general overview of content in a document see [here](https://eur-lex.europa.eu/content/e-learning/browsing_options.html) for more information
|
285 |
+
- _current_consolidated_version_ ~ date when this version of the document was consolidated `Format DD/MM/YYYY`
|
286 |
+
- _directory_code_ ~ Information to structure documents in some kind of directory structure by topic e.g. `'03.50.30.00 Agriculture / Approximation of laws and health measures / Animal health and zootechnics'`
|
287 |
+
- _eurovoc_ ~ Keywords that describe document content based on the European Vocabulary see [here](https://eur-lex.europa.eu/browse/eurovoc.html) for more information
|
288 |
+
|
289 |
+
</p>
|
290 |
+
</details>
|
291 |
+
|
292 |
+
|
293 |
+
<details><summary>Sector 2 (International agreements)</summary><p>
|
294 |
+
|
295 |
+
- _celex_id_ ~ Unique Identifier for each document
|
296 |
+
- _text_cleaned_ (Plain Text) **or** _text_html_raw_ (HTML Format)
|
297 |
+
- _form_ ~ Kind of Document e.g. Consolidated text, or Treaty
|
298 |
+
- _directory_code_ ~ Information to structure documents in some kind of directory structure by topic e.g. `'03.50.30.00 Agriculture / Approximation of laws and health measures / Animal health and zootechnics'`
|
299 |
+
- _subject_matter_ ~ Keywords that provide general overview of content in a document see [here](https://eur-lex.europa.eu/content/e-learning/browsing_options.html) for more information
|
300 |
+
- _eurovoc_ ~ Keywords that describe document content based on the European Vocabulary see [here](https://eur-lex.europa.eu/browse/eurovoc.html) for more information
|
301 |
+
- _latest_consolidated_version_ ~ `Format DD/MM/YYYY`
|
302 |
+
- _current_consolidated_version_ ~ `Format DD/MM/YYYY`
|
303 |
+
|
304 |
+
</p>
|
305 |
+
</details>
|
306 |
+
|
307 |
+
|
308 |
+
<details><summary>Sector 3 (Legislation)</summary><p>
|
309 |
+
|
310 |
+
- _celex_id_ ~ Unique Identifier for each document
|
311 |
+
- _text_cleaned_ (Plain Text) **or** _text_html_raw_ (HTML Format)
|
312 |
+
- _form_ ~ Kind of Document e.g. Consolidated text, or Treaty
|
313 |
+
- _directory_code_ ~ Information to structure documents in some kind of directory structure by topic e.g. `'03.50.30.00 Agriculture / Approximation of laws and health measures / Animal health and zootechnics'`
|
314 |
+
- _subject_matter_ ~ Keywords that provide general overview of content in a document see [here](https://eur-lex.europa.eu/content/e-learning/browsing_options.html) for more information
|
315 |
+
- _eurovoc_ ~ Keywords that describe document content based on the European Vocabulary see [here](https://eur-lex.europa.eu/browse/eurovoc.html) for more information
|
316 |
+
- _latest_consolidated_version_ ~ `Format DD/MM/YYYY`
|
317 |
+
- _current_consolidated_version_ ~ `Format DD/MM/YYYY`
|
318 |
+
|
319 |
+
</p>
|
320 |
+
</details>
|
321 |
+
|
322 |
+
|
323 |
+
<details><summary>Sector 4 (Complementary legislation)</summary><p>
|
324 |
+
|
325 |
+
- _celex_id_ ~ Unique Identifier for each document
|
326 |
+
- _text_cleaned_ (Plain Text) **or** _text_html_raw_ (HTML Format)
|
327 |
+
- _form_ ~ Kind of Document e.g. Consolidated text, or Treaty
|
328 |
+
- _directory_code_ ~ Information to structure documents in some kind of directory structure by topic e.g. `'03.50.30.00 Agriculture / Approximation of laws and health measures / Animal health and zootechnics'`
|
329 |
+
- _subject_matter_ ~ Keywords that provide general overview of content in a document see [here](https://eur-lex.europa.eu/content/e-learning/browsing_options.html) for more information
|
330 |
+
- _eurovoc_ ~ Keywords that describe document content based on the European Vocabulary see [here](https://eur-lex.europa.eu/browse/eurovoc.html) for more information
|
331 |
+
- _latest_consolidated_version_ ~ `Format DD/MM/YYYY`
|
332 |
+
- _current_consolidated_version_ ~ `Format DD/MM/YYYY`
|
333 |
+
|
334 |
+
</p>
|
335 |
+
</details>
|
336 |
+
|
337 |
+
|
338 |
+
<details><summary>Sector 5 (Preparatory acts and working documents)</summary><p>
|
339 |
+
|
340 |
+
- _celex_id_ ~ Unique Identifier for each document
|
341 |
+
- _text_cleaned_ (Plain Text) **or** _text_html_raw_ (HTML Format)
|
342 |
+
- _form_ ~ Kind of Document e.g. Consolidated text, or Treaty
|
343 |
+
- _directory_code_ ~ Information to structure documents in some kind of directory structure by topic e.g. `'03.50.30.00 Agriculture / Approximation of laws and health measures / Animal health and zootechnics'`
|
344 |
+
- _subject_matter_ ~ Keywords that provide general overview of content in a document see [here](https://eur-lex.europa.eu/content/e-learning/browsing_options.html) for more information
|
345 |
+
- _eurovoc_ ~ Keywords that describe document content based on the European Vocabulary see [here](https://eur-lex.europa.eu/browse/eurovoc.html) for more information
|
346 |
+
- _latest_consolidated_version_ ~ `Format DD/MM/YYYY`
|
347 |
+
|
348 |
+
</p>
|
349 |
+
</details>
|
350 |
+
|
351 |
+
|
352 |
+
<details><summary>Sector 6 (Case-law)</summary><p>
|
353 |
+
|
354 |
+
- _celex_id_ ~ Unique Identifier for each document
|
355 |
+
- _text_cleaned_ (Plain Text) **or** _text_html_raw_ (HTML Format)
|
356 |
+
- _form_ ~ Kind of Document e.g. Consolidated text, or Treaty
|
357 |
+
- _directory_code_ ~ Information to structure documents in some kind of directory structure by topic e.g. `'03.50.30.00 Agriculture / Approximation of laws and health measures / Animal health and zootechnics'`
|
358 |
+
- _subject_matter_ ~ Keywords that provide general overview of content in a document see [here](https://eur-lex.europa.eu/content/e-learning/browsing_options.html) for more information
|
359 |
+
- _eurovoc_ ~ Keywords that describe document content based on the European Vocabulary see [here](https://eur-lex.europa.eu/browse/eurovoc.html) for more information
|
360 |
+
- _case-law_directory_code_before_lisbon_ ~ Classification system used for case law before Treaty of Lisbon came into effect (2009), each code reflects a particular area of EU law
|
361 |
+
|
362 |
+
</p>
|
363 |
+
</details>
|
364 |
+
|
365 |
+
|
366 |
+
<details><summary>Sector 7 (National transposition measures)</summary><p>
|
367 |
+
|
368 |
+
- _celex_id_ ~ Unique Identifier for each document
|
369 |
+
- _text_cleaned_ (Plain Text) **or** _text_html_raw_ (HTML Format)
|
370 |
+
- _form_ ~ Kind of Document e.g. Consolidated text, or Treaty
|
371 |
+
- _transposed_legal_acts_ ~ national laws that exist in EU member states as a direct result of the need to comply with EU directives
|
372 |
+
|
373 |
+
</p>
|
374 |
+
</details>
|
375 |
+
|
376 |
+
|
377 |
+
<details><summary>Sector 8 (References to national case-law concerning EU law)</summary><p>
|
378 |
+
|
379 |
+
- _celex_id_ ~ Unique Identifier for each document
|
380 |
+
- _text_cleaned_ (Plain Text) **or** _text_html_raw_ (HTML Format)
|
381 |
+
- _form_ ~ Kind of Document e.g. Consolidated text, or Treaty
|
382 |
+
- _case-law_directory_code_before_lisbon_ ~ Classification system used for case law before Treaty of Lisbon came into effect (2009), each code reflects a particular area of EU law
|
383 |
+
- _subject_matter_ ~ Keywords that provide general overview of content in a document see [here](https://eur-lex.europa.eu/content/e-learning/browsing_options.html) for more information
|
384 |
+
|
385 |
+
</p>
|
386 |
+
</details>
|
387 |
+
|
388 |
+
|
389 |
+
<details><summary>Sector 9 (Parliamentary questions)</summary><p>
|
390 |
+
|
391 |
+
- _celex_id_ ~ Unique Identifier for each document
|
392 |
+
- _text_cleaned_ (Plain Text) **or** _text_html_raw_ (HTML Format)
|
393 |
+
- _form_ ~ Kind of Document e.g. Consolidated text, or Treaty
|
394 |
+
- _directory_code_ ~ Information to structure documents in some kind of directory structure by topic e.g. `'03.50.30.00 Agriculture / Approximation of laws and health measures / Animal health and zootechnics'`
|
395 |
+
- _subject_matter_ ~ Keywords that provide general overview of content in a document see [here](https://eur-lex.europa.eu/content/e-learning/browsing_options.html) for more information
|
396 |
+
- _eurovoc_ ~ Keywords that describe document content based on the European Vocabulary see [here](https://eur-lex.europa.eu/browse/eurovoc.html) for more information
|
397 |
+
|
398 |
+
</p>
|
399 |
+
</details>
|
400 |
+
|
401 |
+
|
402 |
+
<details><summary>Sector C (Other documents published in the Official Journal C series)</summary><p>
|
403 |
+
|
404 |
+
- _celex_id_ ~ Unique Identifier for each document
|
405 |
+
- _text_cleaned_ (Plain Text) **or** _text_html_raw_ (HTML Format)
|
406 |
+
- _form_ ~ Kind of Document e.g. Consolidated text, or Treaty
|
407 |
+
- _eurovoc_ ~ Keywords that describe document content based on the European Vocabulary see [here](https://eur-lex.europa.eu/browse/eurovoc.html) for more information
|
408 |
+
|
409 |
+
</p>
|
410 |
+
</details>
|
411 |
+
|
412 |
+
|
413 |
+
<details><summary>Sector E (EFTA documents)</summary><p>
|
414 |
+
|
415 |
+
- _celex_id_ ~ Unique Identifier for each document
|
416 |
+
- _text_cleaned_ (Plain Text) **or** _text_html_raw_ (HTML Format)
|
417 |
+
- _form_ ~ Kind of Document e.g. Consolidated text, or Treaty
|
418 |
+
- _directory_code_ ~ Information to structure documents in some kind of directory structure by topic e.g. `'03.50.30.00 Agriculture / Approximation of laws and health measures / Animal health and zootechnics'`
|
419 |
+
- _subject_matter_ ~ Keywords that provide general overview of content in a document see [here](https://eur-lex.europa.eu/content/e-learning/browsing_options.html) for more information
|
420 |
+
- _eurovoc_ ~ Keywords that describe document content based on the European Vocabulary see [here](https://eur-lex.europa.eu/browse/eurovoc.html) for more information
|
421 |
+
|
422 |
+
</p>
|
423 |
+
</details>
|
424 |
+
|
425 |
+
|
426 |
+
## Dataset Creation
|
427 |
+
|
428 |
+
### Curation Rationale
|
429 |
+
|
430 |
+
This dataset was created for the creation and/or evaluation of pretrained Legal Language Models.
|
431 |
+
|
432 |
+
### Source Data
|
433 |
+
|
434 |
+
#### Data Collection and Processing
|
435 |
+
|
436 |
+
We used the [EURLEX-Web-Scrapper Repo](https://github.com/JP-SystemsX/Eurlex-Web-Scrapper) for the data collection process.
|
437 |
+
|
438 |
+
|
439 |
+
#### Who are the source data producers?
|
440 |
+
|
441 |
+
The Source data stems from the [EURLEX-Website](https://eur-lex.europa.eu/) and was therefore produced by various entities within the European Union
|
442 |
+
|
443 |
+
|
444 |
+
#### Personal and Sensitive Information
|
445 |
+
|
446 |
+
No Personal or Sensitive Information is included to the best of our knowledge.
|
447 |
+
|
448 |
+
## Bias, Risks, and Limitations
|
449 |
+
|
450 |
+
- We removed HTML documents from which we couldn't extract plain text under the assumption that those are **corrupted files**.
|
451 |
+
However, we can't guarantee that we removed all.
|
452 |
+
- The Extraction of plain text from legal HTML documents can lead to **formatting issues**
|
453 |
+
e.g. the extraction of text from tables might mix up the order such that it becomes nearly incomprehensible.
|
454 |
+
- This dataset might contain many **missing values** in the meta-data columns as not every document was annotated in the same way
|
455 |
+
|
456 |
+
[More Information Needed]
|
457 |
+
|
458 |
+
### Recommendations
|
459 |
+
|
460 |
+
- Consider Removing rows with missing values for the task before training a model on it
|
461 |
+
|
462 |
+
## Citation [optional]
|
463 |
+
|
464 |
+
<!-- If there is a paper or blog post introducing the dataset, the APA and Bibtex information for that should go in this section. -->
|
465 |
+
|
466 |
+
**BibTeX:**
|
467 |
+
|
468 |
+
[More Information Needed]
|
469 |
+
|
470 |
+
**APA:**
|
471 |
+
|
472 |
+
[More Information Needed]
|
473 |
+
|
474 |
+
## Glossary [optional]
|
475 |
+
|
476 |
+
<!-- If relevant, include terms and calculations in this section that can help readers understand the dataset or dataset card. -->
|
477 |
+
|
478 |
+
[More Information Needed]
|
479 |
+
|
480 |
+
## More Information [optional]
|
481 |
+
|
482 |
+
[More Information Needed]
|
483 |
+
|
484 |
+
## Dataset Card Authors [optional]
|
485 |
+
|
486 |
+
[More Information Needed]
|
487 |
+
|
488 |
+
## Dataset Card Contact
|
489 |
+
|
490 |
+
[More Information Needed]
|