Refactor: unify invoke format of open() function

This commit is contained in:
tsukumi
2024-03-12 18:00:51 +00:00
parent 74af2c831c
commit 483bc68d57
9 changed files with 24 additions and 21 deletions

View File

@@ -20,7 +20,7 @@ def get_dict() -> dict[str, list[list[str]]]:
def read_dict() -> dict[str, list[list[str]]]:
g2p_dict = {}
start_line = 49
with open(CMU_DICT_PATH) as f:
with open(CMU_DICT_PATH, "r", encoding="utf-8") as f:
line = f.readline()
line_index = 1
while line: