Datasets:
Tasks:
Text Retrieval
Sub-tasks:
entity-linking-retrieval
Languages:
English
Size:
100K<n<1M
ArXiv:
License:
Update loading script
Browse files
docred.py
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
|
3 |
|
4 |
import json
|
5 |
-
import os
|
6 |
|
7 |
import datasets
|
8 |
|
@@ -28,11 +27,11 @@ from Wikipedia and Wikidata with three features:
|
|
28 |
"""
|
29 |
|
30 |
_URLS = {
|
31 |
-
"dev": "
|
32 |
-
"train_distant": "
|
33 |
-
"train_annotated": "
|
34 |
-
"test": "
|
35 |
-
"rel_info": "
|
36 |
}
|
37 |
|
38 |
|
@@ -73,13 +72,7 @@ class DocRed(datasets.GeneratorBasedBuilder):
|
|
73 |
)
|
74 |
|
75 |
def _split_generators(self, dl_manager):
|
76 |
-
downloads =
|
77 |
-
for key in _URLS.keys():
|
78 |
-
downloads[key] = dl_manager.download_and_extract(_URLS[key])
|
79 |
-
# Fix for dummy data
|
80 |
-
if os.path.isdir(downloads[key]):
|
81 |
-
downloads[key] = os.path.join(downloads[key], key + ".json")
|
82 |
-
|
83 |
return [
|
84 |
datasets.SplitGenerator(
|
85 |
name=datasets.Split.VALIDATION,
|
|
|
2 |
|
3 |
|
4 |
import json
|
|
|
5 |
|
6 |
import datasets
|
7 |
|
|
|
27 |
"""
|
28 |
|
29 |
_URLS = {
|
30 |
+
"dev": "data/dev.json.gz",
|
31 |
+
"train_distant": "data/train_distant.json.gz",
|
32 |
+
"train_annotated": "data/train_annotated.json.gz",
|
33 |
+
"test": "data/test.json.gz",
|
34 |
+
"rel_info": "data/rel_info.json.gz",
|
35 |
}
|
36 |
|
37 |
|
|
|
72 |
)
|
73 |
|
74 |
def _split_generators(self, dl_manager):
|
75 |
+
downloads = dl_manager.download_and_extract(_URLS)
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
return [
|
77 |
datasets.SplitGenerator(
|
78 |
name=datasets.Split.VALIDATION,
|