Datasets:
Tasks:
Text Classification
Sub-tasks:
multi-class-classification
Size:
100K<n<1M
ArXiv:
Tags:
relation extraction
License:
code reformatting
Browse files- tacred_dfki.py +7 -5
tacred_dfki.py
CHANGED
|
@@ -97,7 +97,7 @@ _LANGS = [
|
|
| 97 |
"de",
|
| 98 |
"en",
|
| 99 |
"es",
|
| 100 |
-
#"eu",
|
| 101 |
"fi",
|
| 102 |
"fr",
|
| 103 |
"hi",
|
|
@@ -177,9 +177,11 @@ class TacredDfki(datasets.GeneratorBasedBuilder):
|
|
| 177 |
and web text from the corpus used in the yearly TAC Knowledge Base Population (TAC KBP) challenges."""
|
| 178 |
|
| 179 |
BUILDER_CONFIGS = [
|
| 180 |
-
TacredDfkiConfig(
|
| 181 |
-
|
| 182 |
-
|
|
|
|
|
|
|
| 183 |
]
|
| 184 |
|
| 185 |
DEFAULT_CONFIG_NAME = "original-en" # type: ignore
|
|
@@ -238,7 +240,7 @@ class TacredDfki(datasets.GeneratorBasedBuilder):
|
|
| 238 |
patch_files = dl_manager.download_and_extract(_PATCH_URLs)
|
| 239 |
|
| 240 |
data_dir = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
|
| 241 |
-
lang = self.config.name.split(
|
| 242 |
|
| 243 |
if not os.path.exists(data_dir):
|
| 244 |
raise FileNotFoundError(
|
|
|
|
| 97 |
"de",
|
| 98 |
"en",
|
| 99 |
"es",
|
| 100 |
+
# "eu",
|
| 101 |
"fi",
|
| 102 |
"fr",
|
| 103 |
"hi",
|
|
|
|
| 177 |
and web text from the corpus used in the yearly TAC Knowledge Base Population (TAC KBP) challenges."""
|
| 178 |
|
| 179 |
BUILDER_CONFIGS = [
|
| 180 |
+
TacredDfkiConfig(
|
| 181 |
+
name=f"{variant}-{lang}",
|
| 182 |
+
description=f"{'The revised TACRED (corrected labels in dev and test split)' if variant == 'revised' else 'The original TACRED'} examples in language '{lang}'.",
|
| 183 |
+
)
|
| 184 |
+
for (lang, variant) in itertools.product(_LANGS, ["original", "revised"])
|
| 185 |
]
|
| 186 |
|
| 187 |
DEFAULT_CONFIG_NAME = "original-en" # type: ignore
|
|
|
|
| 240 |
patch_files = dl_manager.download_and_extract(_PATCH_URLs)
|
| 241 |
|
| 242 |
data_dir = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
|
| 243 |
+
lang = self.config.name.split("-")[1]
|
| 244 |
|
| 245 |
if not os.path.exists(data_dir):
|
| 246 |
raise FileNotFoundError(
|