from abc import ABC | |
from abc import abstractmethod | |
from typing import Iterable | |
from typing import List | |
class AbsTokenizer(ABC): | |
def text2tokens(self, line: str) -> List[str]: | |
raise NotImplementedError | |
def tokens2text(self, tokens: Iterable[str]) -> str: | |
raise NotImplementedError | |