Update preprocess_marc_ja.py
Browse filesspecify default encoding as "utf-8"
- preprocess_marc_ja.py +2 -2
preprocess_marc_ja.py
CHANGED
@@ -117,11 +117,11 @@ def get_label_conv_review_id_list(
|
|
117 |
label_conv_review_id_list: Dict[str, Dict[str, str]] = {}
|
118 |
|
119 |
if label_conv_review_id_list_valid is not None:
|
120 |
-
with open(label_conv_review_id_list_valid, "r") as rf:
|
121 |
label_conv_review_id_list["valid"] = {row[0]: row[1] for row in csv.reader(rf)}
|
122 |
|
123 |
if label_conv_review_id_list_test is not None:
|
124 |
-
with open(label_conv_review_id_list_test, "r") as rf:
|
125 |
label_conv_review_id_list["test"] = {row[0]: row[1] for row in csv.reader(rf)}
|
126 |
|
127 |
return label_conv_review_id_list
|
|
|
117 |
label_conv_review_id_list: Dict[str, Dict[str, str]] = {}
|
118 |
|
119 |
if label_conv_review_id_list_valid is not None:
|
120 |
+
with open(label_conv_review_id_list_valid, "r", encoding="utf-8") as rf:
|
121 |
label_conv_review_id_list["valid"] = {row[0]: row[1] for row in csv.reader(rf)}
|
122 |
|
123 |
if label_conv_review_id_list_test is not None:
|
124 |
+
with open(label_conv_review_id_list_test, "r", encoding="utf-8") as rf:
|
125 |
label_conv_review_id_list["test"] = {row[0]: row[1] for row in csv.reader(rf)}
|
126 |
|
127 |
return label_conv_review_id_list
|