|
|
@ -46,7 +46,7 @@ def load_dict(dict_path: Optional[Text], maskctc=False) -> Optional[List[Text]]:
|
|
|
|
|
|
|
|
|
|
|
|
with open(dict_path, "r") as f:
|
|
|
|
with open(dict_path, "r") as f:
|
|
|
|
dictionary = f.readlines()
|
|
|
|
dictionary = f.readlines()
|
|
|
|
char_list = [entry.split(" ")[0] for entry in dictionary]
|
|
|
|
char_list = [entry.strip().split(" ")[0] for entry in dictionary]
|
|
|
|
if BLANK not in char_list:
|
|
|
|
if BLANK not in char_list:
|
|
|
|
char_list.insert(0, BLANK)
|
|
|
|
char_list.insert(0, BLANK)
|
|
|
|
if EOS not in char_list:
|
|
|
|
if EOS not in char_list:
|
|
|
|