class_docstr: Transformation that leverage pre-defined spelling mistake dictionary to
  simulate spelling mistake.
  
  https://arxiv.org/ftp/arxiv/papers/1812/1812.04718.pdf
docstr: :param int trans_min: Minimum number of character will be augmented.
  :param int trans_max: Maximum number of character will be augmented.
      If None is passed, number of augmentation is calculated via
      aup_char_p.If calculated result from aug_p is smaller than aug_max,
      will use calculated result from aup_char_p. Otherwise, using
      aug_max.
  :param float trans_p: Percentage of character (per token) will be
      augmented.
  :param list stop_words: List of words which will be skipped from augment
      operation.
  :param bool include_reverse:  whether build reverse map according to
      spelling error list.
  :param str rules_path: rules_path
docstr_tok: [":","param","int","trans_min",":","Minimum","number","of","character","will","be","augmented",".",":","param","int","trans_max",":","Maximum","number","of","character","will","be","augmented",".","If","None","is","passed",",","number","of","augmentation","is","calculated","via","aup_char_p.If","calculated","result","from","aug_p","is","smaller","than","aug_max",",","will","use","calculated","result","from","aup_char_p",".","Otherwise",",","using","aug_max",".",":","param","float","trans_p",":","Percentage","of","character","(","per","token",")","will","be","augmented",".",":","param","list","stop_words",":","List","of","words","which","will","be","skipped","from","augment","operation",".",":","param","bool","include_reverse",":","whether","build","reverse","map","according","to","spelling","error","list",".",":","param","str","rules_path",":","rules_path"]
code: def __init__(
      self,
      trans_min=1,
      trans_max=10,
      trans_p=0.3,
      stop_words=None,
      include_reverse=True,
      rules_path=None,
      **kwargs,
  ):
      r"""
      :param int trans_min: Minimum number of character will be augmented.
      :param int trans_max: Maximum number of character will be augmented.
          If None is passed, number of augmentation is calculated via
          aup_char_p.If calculated result from aug_p is smaller than aug_max,
          will use calculated result from aup_char_p. Otherwise, using
          aug_max.
      :param float trans_p: Percentage of character (per token) will be
          augmented.
      :param list stop_words: List of words which will be skipped from augment
          operation.
      :param bool include_reverse:  whether build reverse map according to
          spelling error list.
      :param str rules_path: rules_path
  
      """
      super().__init__(
          trans_min=trans_min,
          trans_max=trans_max,
          trans_p=trans_p,
          stop_words=stop_words,
      )
  
      self.rules_path = rules_path if rules_path else SPELLING_ERROR_DIC
      self.include_reverse = include_reverse
      self.rules = self.get_rules()
  
file_path: textflint/textflint/generation/transformation/UT/spelling_error.py
imports: from ...transformation import WordSubstitute
  from ....common.settings import SPELLING_ERROR_DIC
  from ....common.utils.install import download_if_needed
label_desc: Use image node_id 1 to create a new SpellingError object from inherited base classes: WordSubstitute with example: obj = SpellingError(trans_min, trans_max, trans_p, stop_words, include_reverse, rules_path)