游雁
2023-12-07 fc246ab820cf57ba08afbe3cbeb4d471036eb83c
funasr2
2个文件已修改
5 ■■■■■ 已修改文件
funasr/tokenizer/abs_tokenizer.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
funasr/tokenizer/build_tokenizer.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
funasr/tokenizer/abs_tokenizer.py
@@ -21,11 +21,12 @@
class BaseTokenizer(ABC):
    def __init__(self, token_list: Union[Path, str, Iterable[str]],
    def __init__(self, token_list: Union[Path, str, Iterable[str]]=None,
                 unk_symbol: str = "<unk>",
                 **kwargs,
                 ):
        
        if token_list is not None:
        if isinstance(token_list, (Path, str)):
            token_list = Path(token_list)
            self.token_list_repr = str(token_list)
funasr/tokenizer/build_tokenizer.py
@@ -29,7 +29,7 @@
    delimiter: str = None,
    g2p_type: str = None,
    **kwargs,
) -> AbsTokenizer:
):
    """A helper function to instantiate Tokenizer"""
    if token_type == "bpe":
        if bpemodel is None: