KGraph commited on
Commit
520fdb7
·
1 Parent(s): 5f6842f

Update FB15k-237.py

Browse files
Files changed (1) hide show
  1. 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.features.Sequence({
143
  "id": datasets.Value("int32"),
144
  "text": datasets.Value("string"),
145
  }),
146
- "relation": datasets.features.Sequence({
147
  "id": datasets.Value("int32"),
148
  "text": datasets.Value("string"),
149
  }),
150
- "tail": datasets.features.Sequence({
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.features.Sequence({
161
  "description": datasets.Value("string"),
162
  "id": datasets.Value("int32"),
163
  "text": datasets.Value("string"),
164
  }),
165
- "relation": datasets.features.Sequence({
166
  "description": datasets.Value("string"),
167
  "id": datasets.Value("int32"),
168
  "text": datasets.Value("string"),
169
  }),
170
- "tail": datasets.features.Sequence({
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"),