Update FB15k-237.py
Browse files- FB15k-237.py +6 -6
FB15k-237.py
CHANGED
|
@@ -139,15 +139,15 @@ class FB15k237(datasets.GeneratorBasedBuilder):
|
|
| 139 |
if self.config.name == "kgraph":
|
| 140 |
features = datasets.Features(
|
| 141 |
{
|
| 142 |
-
"head": datasets.
|
| 143 |
"id": datasets.Value("int32"),
|
| 144 |
"text": datasets.Value("string"),
|
| 145 |
}),
|
| 146 |
-
"relation": datasets.
|
| 147 |
"id": datasets.Value("int32"),
|
| 148 |
"text": datasets.Value("string"),
|
| 149 |
}),
|
| 150 |
-
"tail": datasets.
|
| 151 |
"id": datasets.Value("int32"),
|
| 152 |
"text": datasets.Value("string"),
|
| 153 |
}),
|
|
@@ -157,17 +157,17 @@ class FB15k237(datasets.GeneratorBasedBuilder):
|
|
| 157 |
else: # This is an example to show how to have different features for "first_domain" and "second_domain"
|
| 158 |
features = datasets.Features(
|
| 159 |
{
|
| 160 |
-
"head": datasets.
|
| 161 |
"description": datasets.Value("string"),
|
| 162 |
"id": datasets.Value("int32"),
|
| 163 |
"text": datasets.Value("string"),
|
| 164 |
}),
|
| 165 |
-
"relation": datasets.
|
| 166 |
"description": datasets.Value("string"),
|
| 167 |
"id": datasets.Value("int32"),
|
| 168 |
"text": datasets.Value("string"),
|
| 169 |
}),
|
| 170 |
-
"tail": datasets.
|
| 171 |
"description": datasets.Value("string"),
|
| 172 |
"id": datasets.Value("int32"),
|
| 173 |
"text": datasets.Value("string"),
|
|
|
|
| 139 |
if self.config.name == "kgraph":
|
| 140 |
features = datasets.Features(
|
| 141 |
{
|
| 142 |
+
"head": datasets.Features({
|
| 143 |
"id": datasets.Value("int32"),
|
| 144 |
"text": datasets.Value("string"),
|
| 145 |
}),
|
| 146 |
+
"relation": datasets.Features({
|
| 147 |
"id": datasets.Value("int32"),
|
| 148 |
"text": datasets.Value("string"),
|
| 149 |
}),
|
| 150 |
+
"tail": datasets.Features({
|
| 151 |
"id": datasets.Value("int32"),
|
| 152 |
"text": datasets.Value("string"),
|
| 153 |
}),
|
|
|
|
| 157 |
else: # This is an example to show how to have different features for "first_domain" and "second_domain"
|
| 158 |
features = datasets.Features(
|
| 159 |
{
|
| 160 |
+
"head": datasets.Features({
|
| 161 |
"description": datasets.Value("string"),
|
| 162 |
"id": datasets.Value("int32"),
|
| 163 |
"text": datasets.Value("string"),
|
| 164 |
}),
|
| 165 |
+
"relation": datasets.Features({
|
| 166 |
"description": datasets.Value("string"),
|
| 167 |
"id": datasets.Value("int32"),
|
| 168 |
"text": datasets.Value("string"),
|
| 169 |
}),
|
| 170 |
+
"tail": datasets.Features({
|
| 171 |
"description": datasets.Value("string"),
|
| 172 |
"id": datasets.Value("int32"),
|
| 173 |
"text": datasets.Value("string"),
|