Datasets:
Languages:
Japanese
Multilinguality:
monolingual
Annotations Creators:
crowdsourced
Source Datasets:
original
ArXiv:
License:
Specify open encoding (#6)
Browse files
JGLUE.py
CHANGED
@@ -580,7 +580,7 @@ class JGLUE(ds.GeneratorBasedBuilder):
|
|
580 |
if file_path is None:
|
581 |
raise ValueError(f"Invalid argument for {self.config.name}")
|
582 |
|
583 |
-
with open(file_path, "r") as rf:
|
584 |
for i, line in enumerate(rf):
|
585 |
json_dict = json.loads(line)
|
586 |
json_dict["label"] = f"choice{json_dict['label']}"
|
@@ -590,7 +590,7 @@ class JGLUE(ds.GeneratorBasedBuilder):
|
|
590 |
if file_path is None:
|
591 |
raise ValueError(f"Invalid argument for {self.config.name}")
|
592 |
|
593 |
-
with open(file_path, "r") as rf:
|
594 |
for i, line in enumerate(rf):
|
595 |
json_dict = json.loads(line)
|
596 |
yield i, json_dict
|
|
|
580 |
if file_path is None:
|
581 |
raise ValueError(f"Invalid argument for {self.config.name}")
|
582 |
|
583 |
+
with open(file_path, "r", encoding="utf-8") as rf:
|
584 |
for i, line in enumerate(rf):
|
585 |
json_dict = json.loads(line)
|
586 |
json_dict["label"] = f"choice{json_dict['label']}"
|
|
|
590 |
if file_path is None:
|
591 |
raise ValueError(f"Invalid argument for {self.config.name}")
|
592 |
|
593 |
+
with open(file_path, "r", encoding="utf-8") as rf:
|
594 |
for i, line in enumerate(rf):
|
595 |
json_dict = json.loads(line)
|
596 |
yield i, json_dict
|