Datasets:
Dr. Jorge Abreu Vicente
commited on
Commit
·
0ecdee3
1
Parent(s):
16e01d5
Update sd-nlp-non-tokenized.py
Browse files- sd-nlp-non-tokenized.py +1 -4
sd-nlp-non-tokenized.py
CHANGED
@@ -145,7 +145,7 @@ class SourceDataNLP(datasets.GeneratorBasedBuilder):
|
|
145 |
return datasets.DatasetInfo(
|
146 |
description=self._DESCRIPTION,
|
147 |
features=features,
|
148 |
-
supervised_keys=("
|
149 |
homepage=self._HOMEPAGE,
|
150 |
license=self._LICENSE,
|
151 |
citation=self._CITATION,
|
@@ -197,7 +197,6 @@ class SourceDataNLP(datasets.GeneratorBasedBuilder):
|
|
197 |
yield id_, {
|
198 |
"words": data["words"],
|
199 |
"labels": labels,
|
200 |
-
"tag_mask": tag_mask,
|
201 |
}
|
202 |
elif self.config.name == "GENEPROD_ROLES":
|
203 |
labels = data["label_ids"]["entity_types"]
|
@@ -206,7 +205,6 @@ class SourceDataNLP(datasets.GeneratorBasedBuilder):
|
|
206 |
yield id_, {
|
207 |
"words": data["words"],
|
208 |
"labels": data["label_ids"]["geneprod_roles"],
|
209 |
-
"tag_mask": tag_mask,
|
210 |
}
|
211 |
elif self.config.name == "SMALL_MOL_ROLES":
|
212 |
labels = data["words"]["entity_types"]
|
@@ -215,7 +213,6 @@ class SourceDataNLP(datasets.GeneratorBasedBuilder):
|
|
215 |
yield id_, {
|
216 |
"words": data["words"],
|
217 |
"labels": data["label_ids"]["small_mol_roles"],
|
218 |
-
"tag_mask": tag_mask,
|
219 |
}
|
220 |
elif self.config.name == "BORING":
|
221 |
yield id_, {"words": data["words"], "labels": data["label_ids"]["boring"]}
|
|
|
145 |
return datasets.DatasetInfo(
|
146 |
description=self._DESCRIPTION,
|
147 |
features=features,
|
148 |
+
supervised_keys=("words", "label_ids"),
|
149 |
homepage=self._HOMEPAGE,
|
150 |
license=self._LICENSE,
|
151 |
citation=self._CITATION,
|
|
|
197 |
yield id_, {
|
198 |
"words": data["words"],
|
199 |
"labels": labels,
|
|
|
200 |
}
|
201 |
elif self.config.name == "GENEPROD_ROLES":
|
202 |
labels = data["label_ids"]["entity_types"]
|
|
|
205 |
yield id_, {
|
206 |
"words": data["words"],
|
207 |
"labels": data["label_ids"]["geneprod_roles"],
|
|
|
208 |
}
|
209 |
elif self.config.name == "SMALL_MOL_ROLES":
|
210 |
labels = data["words"]["entity_types"]
|
|
|
213 |
yield id_, {
|
214 |
"words": data["words"],
|
215 |
"labels": data["label_ids"]["small_mol_roles"],
|
|
|
216 |
}
|
217 |
elif self.config.name == "BORING":
|
218 |
yield id_, {"words": data["words"], "labels": data["label_ids"]["boring"]}
|