File size: 2,235 Bytes
019ac30
 
115fec7
019ac30
 
 
 
 
 
 
ec5c834
019ac30
8c0d9ea
 
 
 
 
115fec7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
019ac30
 
 
 
 
8c0d9ea
 
115fec7
 
 
 
a18da1f
 
 
 
019ac30
a18da1f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
aa93a3f
 
a18da1f
aa93a3f
 
a18da1f
 
aa93a3f
 
 
 
a18da1f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
dataset_info:
- config_name: default
  features:
  - name: utterance
    dtype: string
  - name: label
    sequence: int64
  splits:
  - name: train
    num_bytes: 396298199
    num_examples: 55000
  - name: test
    num_bytes: 59593199
    num_examples: 5000
  download_size: 189778506
  dataset_size: 455891398
- config_name: intents
  features:
  - name: id
    dtype: int64
  - name: name
    dtype: 'null'
  - name: tags
    sequence: 'null'
  - name: regexp_full_match
    sequence: 'null'
  - name: regexp_partial_match
    sequence: 'null'
  - name: description
    dtype: 'null'
  splits:
  - name: intents
    num_bytes: 420
    num_examples: 21
  download_size: 2970
  dataset_size: 420
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: test
    path: data/test-*
- config_name: intents
  data_files:
  - split: intents
    path: intents/intents-*
task_categories:
- text-classification
language:
- en
---

# eurlex

This is a text classification dataset. It is intended for machine learning research and experimentation.

This dataset is obtained via formatting another publicly available data to be compatible with our [AutoIntent Library](https://deeppavlov.github.io/AutoIntent/index.html).

## Usage

It is intended to be used with our [AutoIntent Library](https://deeppavlov.github.io/AutoIntent/index.html):

```python
from autointent import Dataset

eurlex = Dataset.from_datasets("AutoIntent/eurlex")
```

## Source

This dataset is taken from `coastalcph/multi_eurlex` and formatted with our [AutoIntent Library](https://deeppavlov.github.io/AutoIntent/index.html):

```python
from datasets import load_dataset
from autointent import Dataset

eurlex = load_dataset("coastalcph/multi_eurlex", "en", split="train", trust_remote_code=True)
labels = []
def transform(example: dict):
    for intent in example["labels"]:
        labels.append(intent)
    return {"utterance": example["text"], "label": example["labels"]}

labels = [{"id": label, "name": None} for label in set(labels)]
multilabel_eurlex = eurlex.map(transform, remove_columns=eurlex.features.keys())
eurlex_converted = Dataset.from_dict({"intents": labels, "train": multilabel_eurlex.to_list()})

```