class_docstr: Transformation that simulate typos error to transform sentence.
  
  https://arxiv.org/pdf/1711.02173.pdf
class_docstr_tok: ["Transformation","that","simulate","typos","error","to","transform","sentence",".","https",":","\/\/arxiv.org\/pdf\/1711.02173.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 str mode: just support ['random', 'replace', 'swap', 'insert',
      'delete'].
  :param bool skip_first_char: whether skip the first char of target word.
  :param bool skip_last_char: whether skip the last char of target word.
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","str","mode",":","just","support","[","'random","'",",","'replace","'",",","'swap","'",",","'insert","'",",","'delete","'","]",".",":","param","bool","skip_first_char",":","whether","skip","the","first","char","of","target","word",".",":","param","bool","skip_last_char",":","whether","skip","the","last","char","of","target","word","."]
code: def __init__(
      self,
      trans_min=1,
      trans_max=10,
      trans_p=0.3,
      stop_words=None,
      mode="random",
      skip_first_char=True,
      skip_last_char=True,
      **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 str mode: just support ['random', 'replace', 'swap', 'insert',
          'delete'].
      :param bool skip_first_char: whether skip the first char of target word.
      :param bool skip_last_char: whether skip the last char of target word.
  
      """
      super().__init__(
          trans_min=trans_min,
          trans_max=trans_max,
          trans_p=trans_p,
          stop_words=stop_words,
      )
      self._mode = mode
      self.skip_first_char = skip_first_char
      self.skip_last_char = skip_last_char
  
file_path: textflint/textflint/generation/transformation/UT/typos.py
imports: from ...transformation import WordSubstitute
  from ....common.utils.word_op import *
label_desc: Use image node_id 1 to create a new Typos object from inherited base classes: WordSubstitute with example: obj = Typos(trans_min, trans_max, trans_p, stop_words, mode, skip_first_char, skip_last_char)