xiaojuan0920 commited on
Commit
f3d6e89
1 Parent(s): 68b61d5

Update CSKG.py

Browse files
Files changed (1) hide show
  1. CSKG.py +4 -0
CSKG.py CHANGED
@@ -165,8 +165,12 @@ class CSKG(datasets.GeneratorBasedBuilder):
165
  def _generate_examples(self, filepath, split):
166
  # TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
167
  # The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
 
 
168
  with open(filepath, 'rb') as f:
169
  for id_, row in enumerate(f):
 
 
170
  if self.config.name == "cskg":
171
  row = row.split(b"\t")
172
 
 
165
  def _generate_examples(self, filepath, split):
166
  # TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
167
  # The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
168
+ # jump the first row
169
+
170
  with open(filepath, 'rb') as f:
171
  for id_, row in enumerate(f):
172
+ if id_ == 0:
173
+ continue
174
  if self.config.name == "cskg":
175
  row = row.split(b"\t")
176