Yabin Li
2023-07-14 7c7e1c3a6d0fc58db3e7331873c6600b4bb5b970
funasr/text/sentencepiece_tokenizer.py
@@ -4,14 +4,12 @@
from typing import Union
import sentencepiece as spm
from typeguard import check_argument_types
from funasr.text.abs_tokenizer import AbsTokenizer
class SentencepiecesTokenizer(AbsTokenizer):
    def __init__(self, model: Union[Path, str]):
        assert check_argument_types()
        self.model = str(model)
        # NOTE(kamo):
        # Don't build SentencePieceProcessor in __init__()