Datasets:
Commit ·
d8dcf64
1
Parent(s): 4f61c9c
Fixed Bug for multi_eurlex
Browse files- lextreme.py +2 -2
lextreme.py
CHANGED
|
@@ -3019,6 +3019,7 @@ _MULTI_EURLEX_LEVEL_1 = {
|
|
| 3019 |
"task_type": TaskType.MLTC,
|
| 3020 |
"hf_hub_name": "multi_eurlex",
|
| 3021 |
"config_name": "all_languages",
|
|
|
|
| 3022 |
"input_col": "text",
|
| 3023 |
"label_col": "labels",
|
| 3024 |
"url": "https://github.com/nlpaueb/MultiEURLEX/",
|
|
@@ -3044,7 +3045,6 @@ _MULTI_EURLEX_LEVEL_1 = {
|
|
| 3044 |
}
|
| 3045 |
"""
|
| 3046 |
,
|
| 3047 |
-
"label_level": "level_1",
|
| 3048 |
"label_classes": [
|
| 3049 |
"100149",
|
| 3050 |
"100160",
|
|
@@ -4071,7 +4071,7 @@ class LEXTREME(datasets.GeneratorBasedBuilder):
|
|
| 4071 |
"""This function returns the examples in the raw (text) form."""
|
| 4072 |
# we can just do this, since all our datasets are available on the huggingface hub
|
| 4073 |
if "multi_eurlex" in self.config.config_name:
|
| 4074 |
-
dataset = datasets.load_dataset(self.config.hf_hub_name, self.config.config_name, split=split,
|
| 4075 |
label_level=self.config.label_level)
|
| 4076 |
else:
|
| 4077 |
dataset = datasets.load_dataset(self.config.hf_hub_name, self.config.config_name, split=split)
|
|
|
|
| 3019 |
"task_type": TaskType.MLTC,
|
| 3020 |
"hf_hub_name": "multi_eurlex",
|
| 3021 |
"config_name": "all_languages",
|
| 3022 |
+
"label_level": "level_1",
|
| 3023 |
"input_col": "text",
|
| 3024 |
"label_col": "labels",
|
| 3025 |
"url": "https://github.com/nlpaueb/MultiEURLEX/",
|
|
|
|
| 3045 |
}
|
| 3046 |
"""
|
| 3047 |
,
|
|
|
|
| 3048 |
"label_classes": [
|
| 3049 |
"100149",
|
| 3050 |
"100160",
|
|
|
|
| 4071 |
"""This function returns the examples in the raw (text) form."""
|
| 4072 |
# we can just do this, since all our datasets are available on the huggingface hub
|
| 4073 |
if "multi_eurlex" in self.config.config_name:
|
| 4074 |
+
dataset = datasets.load_dataset(self.config.hf_hub_name, language=self.config.config_name, split=split,
|
| 4075 |
label_level=self.config.label_level)
|
| 4076 |
else:
|
| 4077 |
dataset = datasets.load_dataset(self.config.hf_hub_name, self.config.config_name, split=split)
|