Kosuke-Yamada
commited on
Commit
•
397c16a
1
Parent(s):
7d7d86f
modify function
Browse files- 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
|
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":
|
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 |
}
|