Update letras-carnaval-cadiz.py
Browse files- letras-carnaval-cadiz.py +2 -2
letras-carnaval-cadiz.py
CHANGED
@@ -89,10 +89,10 @@ class CadizCarnivalDataset(GeneratorBasedBuilder):
|
|
89 |
SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["midaccurate"], "prefix": "midaccurate"})
|
90 |
]
|
91 |
|
92 |
-
def _generate_examples(self, filepath: str):
|
93 |
with open(filepath, encoding="utf-8") as f:
|
94 |
data = json.load(f)
|
95 |
for item in data:
|
96 |
item["song_type"] = song_type_mapping.get(item["song_type"], "indefinido")
|
97 |
item["group_type"] = group_type_mapping.get(item["group_type"], "indefinido")
|
98 |
-
yield item["id"], item
|
|
|
89 |
SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["midaccurate"], "prefix": "midaccurate"})
|
90 |
]
|
91 |
|
92 |
+
def _generate_examples(self, filepath: str, prefix: str):
|
93 |
with open(filepath, encoding="utf-8") as f:
|
94 |
data = json.load(f)
|
95 |
for item in data:
|
96 |
item["song_type"] = song_type_mapping.get(item["song_type"], "indefinido")
|
97 |
item["group_type"] = group_type_mapping.get(item["group_type"], "indefinido")
|
98 |
+
yield prefix + "_" + item["id"], item
|