class_docstr: Transformation that simulate ocr error by random values.
class_docstr_tok: ["Transformation","that","simulate","ocr","error","by","random","values","."]
docstr: :param int min_char: If word less than this value, do not draw word for
  augmentation
  :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.
docstr_tok: [":","param","int","min_char",":","If","word","less","than","this","value",",","do","not","draw","word","for","augmentation",":","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","."]
code: def __init__(
      self,
      min_char=1,
      trans_min=1,
      trans_max=10,
      trans_p=0.2,
      stop_words=None,
      **kwargs,
  ):
      r"""
      :param int min_char: If word less than this value, do not draw word for
      augmentation
      :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.
  
      """
      super().__init__(
          min_char=min_char,
          trans_min=trans_min,
          trans_max=trans_max,
          trans_p=trans_p,
          stop_words=stop_words,
      )
  
      self.rules = self.get_rules()
  
file_path: textflint/textflint/generation/transformation/UT/ocr.py
imports: import random
  from ...transformation import WordSubstitute
label_desc: Use image node_id 1 to create a new Ocr object from inherited base classes: WordSubstitute with example: obj = Ocr(min_char, trans_min, trans_max, trans_p, stop_words)