Datasets:
Tasks:
Token Classification
Modalities:
Text
Sub-tasks:
coreference-resolution
Languages:
English
Size:
< 1K
License:
Arie Cattan
commited on
Commit
•
056956d
1
Parent(s):
4256f2d
first commit
Browse files
scico.py
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""SciCo"""
|
2 |
+
|
3 |
+
import os
|
4 |
+
import jsonlines
|
5 |
+
import datasets
|
6 |
+
|
7 |
+
|
8 |
+
_CITATION = """\
|
9 |
+
@inproceedings{
|
10 |
+
cattan2021scico,
|
11 |
+
title={SciCo: Hierarchical Cross-Document Coreference for Scientific Concepts},
|
12 |
+
author={Arie Cattan and Sophie Johnson and Daniel S. Weld and Ido Dagan and Iz Beltagy and Doug Downey and Tom Hope},
|
13 |
+
booktitle={3rd Conference on Automated Knowledge Base Construction},
|
14 |
+
year={2021},
|
15 |
+
url={https://openreview.net/forum?id=OFLbgUP04nC}
|
16 |
+
}
|
17 |
+
"""
|
18 |
+
|
19 |
+
_DESCRIPTION = """\
|
20 |
+
SciCo is a dataset for hierarchical cross-document coreference resolution
|
21 |
+
over scientific papers in the CS domain.
|
22 |
+
"""
|
23 |
+
|
24 |
+
_DATA_URL = https://nlp.biu.ac.il/~ariecattan/scico/data.tar
|
25 |
+
|
26 |
+
class Scico(datasets.GeneratorBasedBuilder):
|
27 |
+
def _info(self):
|
28 |
+
return datasets.DatasetInfo(
|
29 |
+
description=_DESCRIPTION,
|
30 |
+
homepage="https://scico.apps.allenai.org/",
|
31 |
+
citation = _CITATION)
|
32 |
+
|
33 |
+
|
34 |
+
def _split_generators(self, dl_manager):
|
35 |
+
data_dir = dl_manager.download_and_extract(_DATA_URL)
|
36 |
+
return [
|
37 |
+
datasets.SplitGenerator(
|
38 |
+
name=datasets.Split.TEST, gen_kwargs={"filepath": os.path.join(data_dir, "test.jsonl")}
|
39 |
+
),
|
40 |
+
datasets.SplitGenerator(
|
41 |
+
name=datasets.Split.VALIDATION, gen_kwargs={"filepath": os.path.join(data_dir, "dev.jsonl")}
|
42 |
+
),
|
43 |
+
datasets.SplitGenerator(
|
44 |
+
name=datasets.Split.TRAIN, gen_kwargs={"filepath": os.path.join(data_dir, "train.jsonl")}
|
45 |
+
),
|
46 |
+
]
|
47 |
+
|
48 |
+
def _generate_examples(self, filepath):
|
49 |
+
"""This function returns the examples in the raw (text) form."""
|
50 |
+
with jsonlines.open(filepath, 'r') as f:
|
51 |
+
for topic in f:
|
52 |
+
yield topic
|