set the default encoding to utf-8
Browse files- jawiki-20220404-c400.py +1 -1
jawiki-20220404-c400.py
CHANGED
@@ -49,7 +49,7 @@ class JaWiki20220404Passages(datasets.GeneratorBasedBuilder):
|
|
49 |
def _generate_examples(self, filepath: str) -> Tuple[str, Dict[str, Any]]:
|
50 |
logger.info(f"generating examples from {filepath}")
|
51 |
|
52 |
-
with gzip.open(filepath, "rt") as f:
|
53 |
reader = csv.DictReader(f, delimiter="\t")
|
54 |
# the tsv file has a header [id, title, text]
|
55 |
for key, data in enumerate(reader):
|
|
|
49 |
def _generate_examples(self, filepath: str) -> Tuple[str, Dict[str, Any]]:
|
50 |
logger.info(f"generating examples from {filepath}")
|
51 |
|
52 |
+
with gzip.open(filepath, "rt", encoding="utf-8") as f:
|
53 |
reader = csv.DictReader(f, delimiter="\t")
|
54 |
# the tsv file has a header [id, title, text]
|
55 |
for key, data in enumerate(reader):
|