Yabin Li
2023-09-05 aa9a863d0bae9f46bd55f0b5f277e45da5bb9ee5
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__()