voorhs commited on
Commit
a18da1f
·
verified ·
1 Parent(s): 019ac30

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +36 -0
README.md CHANGED
@@ -16,4 +16,40 @@ configs:
16
  data_files:
17
  - split: train
18
  path: data/train-*
 
 
 
 
19
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  data_files:
17
  - split: train
18
  path: data/train-*
19
+ task_categories:
20
+ - text-classification
21
+ language:
22
+ - en
23
  ---
24
+
25
+ # eurlex
26
+
27
+ This is a text classification dataset. It is intended for machine learning research and experimentation.
28
+
29
+ This dataset is obtained via formatting another publicly available data to be compatible with our [AutoIntent Library](https://deeppavlov.github.io/AutoIntent/index.html).
30
+
31
+ ## Usage
32
+
33
+ It is intended to be used with our [AutoIntent Library](https://deeppavlov.github.io/AutoIntent/index.html):
34
+
35
+ ```python
36
+ from autointent import Dataset
37
+
38
+ eurlex = Dataset.from_datasets("AutoIntent/eurlex")
39
+ ```
40
+
41
+ ## Source
42
+
43
+ This dataset is taken from `coastalcph/multi_eurlex` and formatted with our [AutoIntent Library](https://deeppavlov.github.io/AutoIntent/index.html):
44
+
45
+ ```python
46
+ from datasets import load_dataset
47
+ from autointent import Dataset
48
+
49
+ eurlex = load_dataset("coastalcph/multi_eurlex", "en", trust_remote_code=True)
50
+ def transform(example: dict):
51
+ return {"utterance": example["text"], "label": example["labels"]}
52
+
53
+ multilabel_eurlex = eurlex["train"].map(transform, remove_columns=eurlex["train"].features.keys())
54
+ eurlex_converted = Dataset.from_dict({"train": multilabel_eurlex.to_list()})
55
+ ```