diff --git a/g2pw/api.py b/g2pw/api.py index 5ef3791..bdb5995 100644 --- a/g2pw/api.py +++ b/g2pw/api.py @@ -76,7 +76,7 @@ def __init__(self, model_dir='G2PWModel/', style='bopomofo', model_source=None, self.model_source = model_source if model_source else self.config.model_source self.turnoff_tqdm = turnoff_tqdm - self.tokenizer = BertTokenizer.from_pretrained(self.config.model_source) + self.tokenizer = BertTokenizer.from_pretrained(self.model_source) polyphonic_chars_path = os.path.join(model_dir, 'POLYPHONIC_CHARS.txt') monophonic_chars_path = os.path.join(model_dir, 'MONOPHONIC_CHARS.txt')