class_docstr: Jieba+BPE, and convert tokens to ids.
code: def __init__(
      self,
      bpe_codes_fpath,
      src_vocab_fpath,
      trg_vocab_fpath,
      special_token=["<s>", "<e>", "<unk>"],
  ):
      bpe_parser = subword_nmt.create_apply_bpe_parser()
      bpe_args = bpe_parser.parse_args(args=["-c", bpe_codes_fpath])
      bpe_args.codes.close()
      bpe_args.codes = open(bpe_codes_fpath, "r", encoding="utf-8")
      self.bpe = subword_nmt.BPE(
          bpe_args.codes,
          bpe_args.merges,
          bpe_args.separator,
          None,
          bpe_args.glossaries,
      )
  
      self.src_vocab = Vocab.load_vocabulary(
          src_vocab_fpath,
          bos_token=special_token[0],
          eos_token=special_token[1],
          unk_token=special_token[2],
      )
  
      self.trg_vocab = Vocab.load_vocabulary(
          trg_vocab_fpath,
          bos_token=special_token[0],
          eos_token=special_token[1],
          unk_token=special_token[2],
      )
  
      self.src_vocab_size = len(self.src_vocab)
      self.trg_vocab_size = len(self.trg_vocab)
  
file_path: PaddleHub/modules/text/simultaneous_translation/stacl/transformer_nist_wait_3/processor.py
imports: import paddle
  from paddlenlp.data import Vocab
  from subword_nmt import subword_nmt
label_desc: Use image node_id 1 to create a new STACLTokenizer object  with example: obj = STACLTokenizer(bpe_codes_fpath, src_vocab_fpath, trg_vocab_fpath, special_token)