Datasets:
Tasks:
Text Classification
Sub-tasks:
multi-class-classification
Languages:
English
Size:
100K<n<1M
ArXiv:
Tags:
relation extraction
License:
fixed patch dict for re-tacred
Browse files
tacred.py
CHANGED
@@ -363,7 +363,7 @@ class Tacred(datasets.GeneratorBasedBuilder):
|
|
363 |
if self.config.name == "revisited":
|
364 |
patch_examples = {example["id"]: example for example in json.load(f)}
|
365 |
elif self.config.name == "re-tacred":
|
366 |
-
patch_examples = {_id: {"id": _id, "
|
367 |
|
368 |
with open(filepath, encoding="utf-8") as f:
|
369 |
data = json.load(f)
|
|
|
363 |
if self.config.name == "revisited":
|
364 |
patch_examples = {example["id"]: example for example in json.load(f)}
|
365 |
elif self.config.name == "re-tacred":
|
366 |
+
patch_examples = {_id: {"id": _id, "relation": label} for _id, label in json.load(f).items()}
|
367 |
|
368 |
with open(filepath, encoding="utf-8") as f:
|
369 |
data = json.load(f)
|