Datasets:

Languages:
Japanese
License:
Kosuke-Yamada commited on
Commit
397c16a
1 Parent(s): 7d7d86f

modify function

Browse files
Files changed (1) hide show
  1. ner-wikipedia-dataset.py +2 -2
ner-wikipedia-dataset.py CHANGED
@@ -164,12 +164,12 @@ class NerWikipediaDataset(datasets.GeneratorBasedBuilder):
164
  ]
165
 
166
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
167
- def _generate_examples(self, data, split):
168
  # TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
169
  # The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
170
  for key, data in enumerate(data):
171
  yield key, {
172
  "curid": data["curid"],
173
  "text": data["text"],
174
- "entities": "" if split == "test" else data["entities"],
175
  }
 
164
  ]
165
 
166
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
167
+ def _generate_examples(self, data):
168
  # TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
169
  # The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
170
  for key, data in enumerate(data):
171
  yield key, {
172
  "curid": data["curid"],
173
  "text": data["text"],
174
+ "entities": data["entities"],
175
  }