Datasets:
Tasks:
Token Classification
Modalities:
Text
Sub-tasks:
coreference-resolution
Languages:
English
Size:
< 1K
License:
Arie Cattan
commited on
Commit
•
2c94766
1
Parent(s):
f08dbf3
fix
Browse files
scico.py
CHANGED
@@ -25,15 +25,7 @@ _DESCRIPTION = """\
|
|
25 |
|
26 |
_DATA_URL = "https://nlp.biu.ac.il/~ariecattan/scico/data.tar"
|
27 |
|
28 |
-
class Scico(datasets.GeneratorBasedBuilder):
|
29 |
-
# BUILDER_CONFIGS = [
|
30 |
-
# datasets.BuilderConfig(
|
31 |
-
# name="plain_text",
|
32 |
-
# version=datasets.Version("1.0.0", ""),
|
33 |
-
# description="SciCo",
|
34 |
-
# )
|
35 |
-
# ]
|
36 |
-
|
37 |
def _info(self):
|
38 |
return datasets.DatasetInfo(
|
39 |
description=_DESCRIPTION,
|
@@ -84,25 +76,9 @@ class Scico(datasets.GeneratorBasedBuilder):
|
|
84 |
|
85 |
def _generate_examples(self, filepath):
|
86 |
"""This function returns the examples in the raw (text) form."""
|
87 |
-
print(filepath)
|
88 |
with jsonlines.open(filepath, 'r') as f:
|
89 |
for i, topic in enumerate(f):
|
90 |
topic['hard_10'] = topic['hard_10'] if 'hard_10' in topic else False
|
91 |
topic['hard_20'] = topic['hard_20'] if 'hard_20' in topic else False
|
92 |
topic["curated"] = topic["curated"] if "curated" in topic else False
|
93 |
-
yield i,
|
94 |
-
"flatten_tokens": topic['flatten_tokens'],
|
95 |
-
"flatten_mentions": topic["flatten_mentions"],
|
96 |
-
"tokens": topic["tokens"],
|
97 |
-
"doc_ids": topic["doc_ids"],
|
98 |
-
"doc_ids": topic["doc_ids"],
|
99 |
-
"metadata": topic["metadata"],
|
100 |
-
"sentences": topic["sentences"],
|
101 |
-
"mentions": topic["mentions"],
|
102 |
-
"relations": topic["relations"],
|
103 |
-
"id": topic["id"],
|
104 |
-
"source": topic["source"],
|
105 |
-
"hard_10": topic["hard_10"],
|
106 |
-
"hard_20": topic["hard_20"],
|
107 |
-
"curated": topic["curated"]
|
108 |
-
}
|
|
|
25 |
|
26 |
_DATA_URL = "https://nlp.biu.ac.il/~ariecattan/scico/data.tar"
|
27 |
|
28 |
+
class Scico(datasets.GeneratorBasedBuilder):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
def _info(self):
|
30 |
return datasets.DatasetInfo(
|
31 |
description=_DESCRIPTION,
|
|
|
76 |
|
77 |
def _generate_examples(self, filepath):
|
78 |
"""This function returns the examples in the raw (text) form."""
|
|
|
79 |
with jsonlines.open(filepath, 'r') as f:
|
80 |
for i, topic in enumerate(f):
|
81 |
topic['hard_10'] = topic['hard_10'] if 'hard_10' in topic else False
|
82 |
topic['hard_20'] = topic['hard_20'] if 'hard_20' in topic else False
|
83 |
topic["curated"] = topic["curated"] if "curated" in topic else False
|
84 |
+
yield i, topic
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|