Datasets:
Tasks:
Text Retrieval
Sub-tasks:
entity-linking-retrieval
Languages:
English
Size:
100K<n<1M
ArXiv:
License:
Host data files
#6
by
albertvillanova
HF staff
- opened
- README.md +20 -6
- data/dev.json.gz +3 -0
- data/rel_info.json.gz +3 -0
- data/test.json.gz +3 -0
- data/train_annotated.json.gz +3 -0
- data/train_distant.json.gz +3 -0
- dataset_infos.json +0 -1
- docred.py +26 -19
README.md
CHANGED
@@ -239,13 +239,27 @@ The data fields are the same among all splits.
|
|
239 |
### Citation Information
|
240 |
|
241 |
```
|
242 |
-
@inproceedings{
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
}
|
248 |
-
|
249 |
```
|
250 |
|
251 |
|
|
|
239 |
### Citation Information
|
240 |
|
241 |
```
|
242 |
+
@inproceedings{yao-etal-2019-docred,
|
243 |
+
title = "{D}oc{RED}: A Large-Scale Document-Level Relation Extraction Dataset",
|
244 |
+
author = "Yao, Yuan and
|
245 |
+
Ye, Deming and
|
246 |
+
Li, Peng and
|
247 |
+
Han, Xu and
|
248 |
+
Lin, Yankai and
|
249 |
+
Liu, Zhenghao and
|
250 |
+
Liu, Zhiyuan and
|
251 |
+
Huang, Lixin and
|
252 |
+
Zhou, Jie and
|
253 |
+
Sun, Maosong",
|
254 |
+
booktitle = "Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics",
|
255 |
+
month = jul,
|
256 |
+
year = "2019",
|
257 |
+
address = "Florence, Italy",
|
258 |
+
publisher = "Association for Computational Linguistics",
|
259 |
+
url = "https://aclanthology.org/P19-1074",
|
260 |
+
doi = "10.18653/v1/P19-1074",
|
261 |
+
pages = "764--777",
|
262 |
}
|
|
|
263 |
```
|
264 |
|
265 |
|
data/dev.json.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6ae4d7f5b0b9d2cbe74b9634ed43b35b7cb5b7c0dc3a16226dbe343139a4ae05
|
3 |
+
size 928690
|
data/rel_info.json.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7ef27efff537ba89ae66f6f4e60e4908d4df3860a4c2819ea94fa5ed696bdc70
|
3 |
+
size 1037
|
data/test.json.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:eeb68c4c9c5925c20f6b7cbf014074bde4d3c5b976c4dfb4368936f013b3bead
|
3 |
+
size 835688
|
data/train_annotated.json.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0d01cd07cabd7f9077db6ea8628832cf60281b4228ec1ba54647f836a3b17d02
|
3 |
+
size 2810860
|
data/train_distant.json.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c420c0429310583cfc9459f7daa26b1f4c11ff5c7a1481aa64ab9db2b296b905
|
3 |
+
size 90991384
|
dataset_infos.json
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"default": {"description": "Multiple entities in a document generally exhibit complex inter-sentence relations, and cannot be well handled by existing relation extraction (RE) methods that typically focus on extracting intra-sentence relations for single entity pairs. In order to accelerate the research on document-level RE, we introduce DocRED, a new dataset constructed from Wikipedia and Wikidata with three features:\n - DocRED annotates both named entities and relations, and is the largest human-annotated dataset for document-level RE from plain text.\n - DocRED requires reading multiple sentences in a document to extract entities and infer their relations by synthesizing all information of the document.\n - Along with the human-annotated data, we also offer large-scale distantly supervised data, which enables DocRED to be adopted for both supervised and weakly supervised scenarios.\n", "citation": "@inproceedings{yao2019DocRED,\n title={{DocRED}: A Large-Scale Document-Level Relation Extraction Dataset},\n author={Yao, Yuan and Ye, Deming and Li, Peng and Han, Xu and Lin, Yankai and Liu, Zhenghao and Liu, Zhiyuan and Huang, Lixin and Zhou, Jie and Sun, Maosong},\n booktitle={Proceedings of ACL 2019},\n year={2019}\n}\n", "homepage": "https://github.com/thunlp/DocRED", "license": "", "features": {"title": {"dtype": "string", "id": null, "_type": "Value"}, "sents": {"feature": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "length": -1, "id": null, "_type": "Sequence"}, "vertexSet": [[{"name": {"dtype": "string", "id": null, "_type": "Value"}, "sent_id": {"dtype": "int32", "id": null, "_type": "Value"}, "pos": {"feature": {"dtype": "int32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "type": {"dtype": "string", "id": null, "_type": "Value"}}]], "labels": {"feature": {"head": {"dtype": "int32", "id": null, "_type": "Value"}, "tail": {"dtype": "int32", "id": null, "_type": "Value"}, "relation_id": {"dtype": "string", "id": null, "_type": "Value"}, "relation_text": {"dtype": "string", "id": null, "_type": "Value"}, "evidence": {"feature": {"dtype": "int32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "doc_red", "config_name": "default", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"validation": {"name": "validation", "num_bytes": 3425030, "num_examples": 998, "dataset_name": "doc_red"}, "test": {"name": "test", "num_bytes": 2843877, "num_examples": 1000, "dataset_name": "doc_red"}, "train_annotated": {"name": "train_annotated", "num_bytes": 10413156, "num_examples": 3053, "dataset_name": "doc_red"}, "train_distant": {"name": "train_distant", "num_bytes": 346001876, "num_examples": 101873, "dataset_name": "doc_red"}}, "download_checksums": {"https://drive.google.com/uc?export=download&id=1AHUm1-_V9GCtGuDcc8XrMUCJE8B-HHoL": {"num_bytes": 4287303, "checksum": "4554f7487a6fda3bab4d4e59432e065b7485dfb885bd7f05fd60fc7e93ee7e3e"}, "https://drive.google.com/uc?export=download&id=1Qr4Jct2IJ9BVI86_mCk_Pz0J32ww9dYw": {"num_bytes": 437046821, "checksum": "db6d3cdaab8d36926318bb9339f6fd82d19dbacd186c74d7c20c734355a58b36"}, "https://drive.google.com/uc?export=download&id=1NN33RzyETbanw4Dg2sRrhckhWpzuBQS9": {"num_bytes": 13029595, "checksum": "7e706348a02cf91f38bd8c379f934ab61aedadc901fca10d962c1d82ab78e95b"}, "https://drive.google.com/uc?export=download&id=1lAVDcD94Sigx7gR3jTfStI66o86cflum": {"num_bytes": 3674242, "checksum": "09386b5cb58249d8e087863c379ebd64557169c52ee502193d2f4f215e704ae8"}, "https://drive.google.com/uc?id=1y9A0zKrvETc1ddUFuFhBg3Xfr7FEL4dW&export=download": {"num_bytes": 2452, "checksum": "5ecf4e5e55c179fc83a3a3d19baa01efffecb26ba5edc0b4ac5a54ddf61fe3de"}}, "download_size": 458040413, "post_processing_size": null, "dataset_size": 362683939, "size_in_bytes": 820724352}}
|
|
|
|
docred.py
CHANGED
@@ -2,18 +2,31 @@
|
|
2 |
|
3 |
|
4 |
import json
|
5 |
-
import os
|
6 |
|
7 |
import datasets
|
8 |
|
9 |
|
10 |
_CITATION = """\
|
11 |
-
@inproceedings{
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
}
|
18 |
"""
|
19 |
|
@@ -28,11 +41,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 +86,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 |
|
8 |
|
9 |
_CITATION = """\
|
10 |
+
@inproceedings{yao-etal-2019-docred,
|
11 |
+
title = "{D}oc{RED}: A Large-Scale Document-Level Relation Extraction Dataset",
|
12 |
+
author = "Yao, Yuan and
|
13 |
+
Ye, Deming and
|
14 |
+
Li, Peng and
|
15 |
+
Han, Xu and
|
16 |
+
Lin, Yankai and
|
17 |
+
Liu, Zhenghao and
|
18 |
+
Liu, Zhiyuan and
|
19 |
+
Huang, Lixin and
|
20 |
+
Zhou, Jie and
|
21 |
+
Sun, Maosong",
|
22 |
+
booktitle = "Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics",
|
23 |
+
month = jul,
|
24 |
+
year = "2019",
|
25 |
+
address = "Florence, Italy",
|
26 |
+
publisher = "Association for Computational Linguistics",
|
27 |
+
url = "https://aclanthology.org/P19-1074",
|
28 |
+
doi = "10.18653/v1/P19-1074",
|
29 |
+
pages = "764--777",
|
30 |
}
|
31 |
"""
|
32 |
|
|
|
41 |
"""
|
42 |
|
43 |
_URLS = {
|
44 |
+
"dev": "data/dev.json.gz",
|
45 |
+
"train_distant": "data/train_distant.json.gz",
|
46 |
+
"train_annotated": "data/train_annotated.json.gz",
|
47 |
+
"test": "data/test.json.gz",
|
48 |
+
"rel_info": "data/rel_info.json.gz",
|
49 |
}
|
50 |
|
51 |
|
|
|
86 |
)
|
87 |
|
88 |
def _split_generators(self, dl_manager):
|
89 |
+
downloads = dl_manager.download_and_extract(_URLS)
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
return [
|
91 |
datasets.SplitGenerator(
|
92 |
name=datasets.Split.VALIDATION,
|