Update mega.py
Browse files
mega.py
CHANGED
@@ -37,8 +37,8 @@ class Mega(datasets.GeneratorBasedBuilder):
|
|
37 |
def _info(self):
|
38 |
return datasets.DatasetInfo()
|
39 |
|
40 |
-
def _generate_examples(self):
|
41 |
-
with open(
|
42 |
reader = csv.DictReader(f,delimiter='\t' if '.tsv' in self.config.data_dir else ',')
|
43 |
for id_, row in enumerate(reader):
|
44 |
if id_ == 0:
|
|
|
37 |
def _info(self):
|
38 |
return datasets.DatasetInfo()
|
39 |
|
40 |
+
def _generate_examples(self, filepath):
|
41 |
+
with open(filepath, encoding="utf-8") as f:
|
42 |
reader = csv.DictReader(f,delimiter='\t' if '.tsv' in self.config.data_dir else ',')
|
43 |
for id_, row in enumerate(reader):
|
44 |
if id_ == 0:
|