code: def __init__(
      self,
      vocab_file: str,
      sp_model_dir: str,
      word_dict: str,
      ws: bool = True,
      lower: bool = True,
  ):
      self.vocab = load_vocab(vocab_file)
      self.inv_vocab = {v: k for k, v in self.vocab.items()}
      self.ws = ws
      self.lower = lower
      self.dict = pickle.load(open(word_dict, "rb"))
  
      import sentencepiece as spm
  
      self.sp_model = spm.SentencePieceProcessor()
      self.window_size = 5
      self.sp_model.Load(sp_model_dir)
  
imports: import collections
  import io
  import pickle
  import unicodedata
  from typing import List, Union
label_desc: Use image node_id 1 to create a new WSSPTokenizer object from inherited base classes: object with example: obj = WSSPTokenizer(vocab_file, sp_model_dir, word_dict, ws, lower)