class_docstr: OpenNMT Tokenizer transform class.
code: def tokenize_string(self, sentence, side="src", is_train=False):
      tokenizer = self.load_models[side]
      if self.gpt2_pretok:
          sentence = "".join(
              self.maptable[b]
              for b in sentence.replace(DefaultTokens.SEP, "\n").encode(
                  "utf-8"
              )
          )
          segmented = tokenizer(sentence)
      else:
          segmented = tokenizer(sentence)
      return segmented
  
imports: import re
  from onmt.utils.logging import logger
  from onmt.transforms import register_transform
  from .transform import Transform, ObservableStats
  from onmt.constants import DefaultTokens
label_desc: Use image node_id 9 for calling the ONMTTokenizerTransform obj's underlying member method code with example usage: obj.tokenize_string(sentence, side, is_train) and returns: segmented