ryo0634 commited on
Commit
cf4f9d8
1 Parent(s): f86aa51

Update preprocess_marc_ja.py

Browse files

specify default encoding as "utf-8"

Files changed (1) hide show
  1. 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