class_docstr: OpenNMT Tokenizer transform class.
docstr: Return a dict containing kwargs relate to `side` subwords.
docstr_tok: ["Return","a","dict","containing","kwargs","relate","to","`","side","`","subwords","."]
code: def _get_subword_kwargs(self, side="src"):
      """Return a dict containing kwargs relate to `side` subwords."""
      subword_type = (
          self.tgt_subword_type
          if side == "tgt"
          else self.src_subword_type
      )
      subword_model = (
          self.tgt_subword_model
          if side == "tgt"
          else self.src_subword_model
      )
      subword_nbest = (
          self.tgt_subword_nbest
          if side == "tgt"
          else self.src_subword_nbest
      )
      subword_alpha = (
          self.tgt_subword_alpha
          if side == "tgt"
          else self.src_subword_alpha
      )
      kwopts = dict()
      if subword_type == "bpe":
          kwopts["bpe_model_path"] = subword_model
          kwopts["bpe_dropout"] = subword_alpha
      elif subword_type == "sentencepiece":
          kwopts["sp_model_path"] = subword_model
          kwopts["sp_nbest_size"] = subword_nbest
          kwopts["sp_alpha"] = subword_alpha
      else:
          logger.debug("No subword method will be applied.")
      vocabulary_threshold = (
          self.tgt_vocab_threshold
          if side == "tgt"
          else self.src_vocab_threshold
      )
      vocabulary_path = (
          self.tgt_subword_vocab
          if side == "tgt"
          else self.src_subword_vocab
      )
      if vocabulary_threshold > 0 and vocabulary_path != "":
          kwopts["vocabulary_path"] = vocabulary_path
          kwopts["vocabulary_threshold"] = vocabulary_threshold
      return kwopts
  
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 7 for calling the ONMTTokenizerTransform obj's underlying member method code with example usage: obj._get_subword_kwargs(side) and returns: kwopts