LisaWang0306 commited on
Commit
e8de9d0
1 Parent(s): 41fb062

Update dbp15k-fr-en.py

Browse files
Files changed (1) hide show
  1. dbp15k-fr-en.py +15 -1
dbp15k-fr-en.py CHANGED
@@ -99,6 +99,13 @@ class Dbp15kFrEn(datasets.GeneratorBasedBuilder):
99
  "split": "rel_triples_whole",
100
  },
101
  ),
 
 
 
 
 
 
 
102
  ]
103
  elif self.config.name == "target":
104
  return [
@@ -144,6 +151,13 @@ class Dbp15kFrEn(datasets.GeneratorBasedBuilder):
144
  "split": "rel_triples_whole",
145
  },
146
  ),
 
 
 
 
 
 
 
147
  ]
148
  elif self.config.name == "pairs":
149
  return [
@@ -202,7 +216,7 @@ class Dbp15kFrEn(datasets.GeneratorBasedBuilder):
202
  "column2": row[1],
203
  "column3": row[2]
204
  }
205
- elif split in ["attr_triples"]:
206
  row = data[i].rstrip('\n').split(' ',2)
207
  yield i, {
208
  "column1": row[0],
 
99
  "split": "rel_triples_whole",
100
  },
101
  ),
102
+ datasets.SplitGenerator(
103
+ name="rel_triples_whole",
104
+ gen_kwargs={
105
+ "data_file": os.path.join(dl_dir, "attr_triples_whole_1"),
106
+ "split": "attr_triples_whole",
107
+ },
108
+ ),
109
  ]
110
  elif self.config.name == "target":
111
  return [
 
151
  "split": "rel_triples_whole",
152
  },
153
  ),
154
+ datasets.SplitGenerator(
155
+ name="rel_triples_whole",
156
+ gen_kwargs={
157
+ "data_file": os.path.join(dl_dir, "attr_triples_whole_2"),
158
+ "split": "attr_triples_whole",
159
+ },
160
+ ),
161
  ]
162
  elif self.config.name == "pairs":
163
  return [
 
216
  "column2": row[1],
217
  "column3": row[2]
218
  }
219
+ elif split in ["attr_triples","attr_triples_whole"]:
220
  row = data[i].rstrip('\n').split(' ',2)
221
  yield i, {
222
  "column1": row[0],