class_docstr: Word replace transformation to implement normal word replace functions.
docstr: Get the num of words/chars transformation.
  
  :param int size: the size of target sentence
  :return int: number of words to apply transformation.
docstr_tok: ["Get","the","num","of","words\/chars","transformation",".",":","param","int","size",":","the","size","of","target","sentence",":","return","int",":","number","of","words","to","apply","transformation","."]
code: def get_trans_cnt(self, size):
      r"""
      Get the num of words/chars transformation.
  
      :param int size: the size of target sentence
      :return int: number of words to apply transformation.
  
      """
  
      cnt = int(self.trans_p * size)
  
      if cnt < self.trans_min:
          return self.trans_min
      if self.trans_max is not None and cnt > self.trans_max:
          return self.trans_max
  
      return cnt
  
file_path: textflint/textflint/generation/transformation/cn_word_substitute.py
imports: from abc import abstractmethod
  from ..transformation import Transformation
  from ...common.settings import STOP_WORDS, ORIGIN
  from ...common.utils.list_op import trade_off_sub_words
label_desc: Use image node_id 9 for calling the CnWordSubstitute obj's underlying member method code with example usage: obj.get_trans_cnt(size) and returns: cnt, self, self