Open vinamarora8 opened 4 hours ago
If we're at it, we could also define a base-class for transforms
class TransformBase:
def __call__(self, data: Data) -> Data:
raise NotImplementedError
We could also just define types like
TokenizerType = Callable[[Data], Dict]
TransformType = Callable[[Data], Data]
Having a base-class for tokenizers could be useful. It would be like this:
All tokenizers will inherit this. It only defines an interface for tokenizers and would help the LSP understand the code better.