class_docstr: Transformation that simulate typo error by random values.
  
  https://arxiv.org/pdf/1711.02173.pdf
  
  For example, people may type i as o incorrectly.\
  One keyboard distance is leveraged to replace character by possible
  keyboard error.
class_docstr_tok: ["Transformation","that","simulate","typo","error","by","random","values",".","https",":","\/\/arxiv.org\/pdf\/1711.02173.pdf","For","example",",","people","may","type","i","as","o","incorrectly.\\","One","keyboard","distance","is","leveraged","to","replace","character","by","possible","keyboard","error","."]
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.
  :param str rules_path: Loading customize model from file system
  :param bool include_special_char: Include special character
  :param bool include_numeric: If True, numeric character may be included
      in augmented data.
  :param bool include_upper_case: If True, upper case character may be
      included in augmented data.
  :param str lang: Indicate built-in language model. Default value is
      'en'. Possible values are 'en' and 'th'. If custom model is used
      (passing model_path), this value will be ignored.
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",".",":","param","str","rules_path",":","Loading","customize","model","from","file","system",":","param","bool","include_special_char",":","Include","special","character",":","param","bool","include_numeric",":","If","True",",","numeric","character","may","be","included","in","augmented","data",".",":","param","bool","include_upper_case",":","If","True",",","upper","case","character","may","be","included","in","augmented","data",".",":","param","str","lang",":","Indicate","built-in","language","model",".","Default","value","is","'en","'",".","Possible","values","are","'en","'","and","'th","'",".","If","custom","model","is","used","(","passing","model_path",")",",","this","value","will","be","ignored","."]
code: def __init__(
      self,
      min_char=4,
      trans_min=1,
      trans_max=10,
      trans_p=0.2,
      stop_words=None,
      rules_path=None,
      include_special_char=True,
      include_numeric=True,
      include_upper_case=True,
      lang="en",
      **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.
      :param str rules_path: Loading customize model from file system
      :param bool include_special_char: Include special character
      :param bool include_numeric: If True, numeric character may be included
          in augmented data.
      :param bool include_upper_case: If True, upper case character may be
          included in augmented data.
      :param str lang: Indicate built-in language model. Default value is
          'en'. Possible values are 'en' and 'th'. If custom model is used
          (passing model_path), this value will be ignored.
  
      """
      super().__init__(
          min_char=min_char,
          trans_min=trans_min,
          trans_max=trans_max,
          trans_p=trans_p,
          stop_words=stop_words,
      )
  
      self.include_special_char = include_special_char
      self.include_numeric = include_numeric
      self.include_upper_case = include_upper_case
      self.include_lower_case = True
      self.lang = lang
  
      if rules_path is None:
          if lang != "en":
              raise ValueError(
                  "Only support en now. You may provide the keyboard mapping "
                  'such that we can support "{}"'.format(lang)
              )
          self.rules_path = KEYBOARD_RULES
      else:
          self.rules_path = rules_path
  
      self.rules = self.get_rules(
          include_special_char,
          include_numeric,
          include_upper_case,
          lang,
          self.rules_path,
      )
  
file_path: textflint/textflint/generation/transformation/UT/keyboard.py
imports: import os
  import re
  import random
  from ....common.settings import KEYBOARD_RULES
  from ...transformation import WordSubstitute
  from ....common.utils.install import download_if_needed
  from ....common.utils.load import json_loader
label_desc: Use image node_id 1 to create a new Keyboard object from inherited base classes: WordSubstitute with example: obj = Keyboard(min_char, trans_min, trans_max, trans_p, stop_words, rules_path, include_special_char, include_numeric, include_upper_case, lang)