Sebastian Gehrmann
commited on
Commit
·
22e3128
1
Parent(s):
ac2dd3f
- common_gen.py +14 -12
common_gen.py
CHANGED
|
@@ -41,22 +41,24 @@ class CommonGen(datasets.GeneratorBasedBuilder):
|
|
| 41 |
|
| 42 |
def _info(self):
|
| 43 |
features = datasets.Features(
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
|
| 56 |
return datasets.DatasetInfo(
|
| 57 |
description=_DESCRIPTION,
|
| 58 |
features=features,
|
| 59 |
-
supervised_keys=datasets.info.SupervisedKeysData(
|
|
|
|
|
|
|
| 60 |
homepage="https://inklab.usc.edu/CommonGen/",
|
| 61 |
citation=_CITATION,
|
| 62 |
)
|
|
|
|
| 41 |
|
| 42 |
def _info(self):
|
| 43 |
features = datasets.Features(
|
| 44 |
+
{
|
| 45 |
+
"gem_id": datasets.Value("string"),
|
| 46 |
+
"gem_parent_id": datasets.Value("string"),
|
| 47 |
+
"concept_set_id": datasets.Value("int32"),
|
| 48 |
+
"concepts": [datasets.Value("string")],
|
| 49 |
+
"target": datasets.Value("string"), # single target for train
|
| 50 |
+
"references": [
|
| 51 |
+
datasets.Value("string")
|
| 52 |
+
], # multiple references for validation
|
| 53 |
+
}
|
| 54 |
+
)
|
| 55 |
|
| 56 |
return datasets.DatasetInfo(
|
| 57 |
description=_DESCRIPTION,
|
| 58 |
features=features,
|
| 59 |
+
supervised_keys=datasets.info.SupervisedKeysData(
|
| 60 |
+
input="concepts", output="target"
|
| 61 |
+
),
|
| 62 |
homepage="https://inklab.usc.edu/CommonGen/",
|
| 63 |
citation=_CITATION,
|
| 64 |
)
|