class_docstr: Augmenter that apply randomly behavior for augmentation.
  
  :param str action: 'substitute', 'swap', 'delete' or 'crop'. If value is 'swap', adjacent words will be swapped randomly.
      If value is 'delete', word will be removed randomly. If value is 'crop', a set of contunous word will be removed randomly.
  :param float aug_p: Percentage of word will be augmented. 
  :param int aug_min: Minimum number of word will be augmented.
  :param int aug_max: Maximum number of word will be augmented. If None is passed, number of augmentation is
      calculated via aup_p. If calculated result from aug_p is smaller than aug_max, will use calculated result from
      aug_p. Otherwise, using aug_max.
  :param list stopwords: List of words which will be skipped from augment operation. Not effective if action is 'crop'
  :param str stopwords_regex: Regular expression for matching words which will be skipped from augment operation. Not effective if action is 'crop'
  :param list target_words: List of word for replacement (used for substitute operation only). Default value is _.
  :param func tokenizer: Customize tokenization process
  :param func reverse_tokenizer: Customize reverse of tokenization process
  :param str name: Name of this augmenter
  
  >>> import nlpaug.augmenter.word as naw
  >>> aug = naw.RandomWordAug()
code: def change_case(
      self, doc, original_word_idx, swap_word_idx, change_seq
  ):
      original_token = (
          doc.get_token(original_word_idx).get_latest_token().token
      )
      swap_token = doc.get_token(swap_word_idx).get_latest_token().token
  
      if original_word_idx != 0 and swap_word_idx != 0:
          doc.add_change_log(
              original_word_idx,
              new_token=swap_token,
              action=Action.SWAP,
              change_seq=self.parent_change_seq + change_seq,
          )
          doc.add_change_log(
              swap_word_idx,
              new_token=original_token,
              action=Action.SWAP,
              change_seq=self.parent_change_seq + change_seq,
          )
          return doc
  
      original_token_case = self.get_word_case(original_token)
      swap_token_case = self.get_word_case(swap_token)
  
      if original_word_idx == 0:
          if (
              original_token_case == "capitalize"
              and swap_token_case == "lower"
          ):
              doc.add_change_log(
                  original_word_idx,
                  new_token=swap_token.capitalize(),
                  action=Action.SWAP,
                  change_seq=self.parent_change_seq + change_seq,
              )
          else:
              doc.add_change_log(
                  original_word_idx,
                  new_token=swap_token,
                  action=Action.SWAP,
                  change_seq=self.parent_change_seq + change_seq,
              )
          if original_token_case == "capitalize":
              doc.add_change_log(
                  swap_word_idx,
                  new_token=original_token.lower(),
                  action=Action.SWAP,
                  change_seq=self.parent_change_seq + change_seq,
              )
          else:
              doc.add_change_log(
                  swap_word_idx,
                  new_token=original_token,
                  action=Action.SWAP,
                  change_seq=self.parent_change_seq + change_seq,
              )
  
      if swap_word_idx == 0:
          if original_token_case == "lower":
              doc.add_change_log(
                  swap_word_idx,
                  new_token=original_token.capitalize(),
                  action=Action.SWAP,
                  change_seq=self.parent_change_seq + change_seq,
              )
          else:
              doc.add_change_log(
                  swap_word_idx,
                  new_token=original_token,
                  action=Action.SWAP,
                  change_seq=self.parent_change_seq + change_seq,
              )
  
          if swap_token_case == "capitalize":
              doc.add_change_log(
                  original_word_idx,
                  new_token=swap_token.lower(),
                  action=Action.SWAP,
                  change_seq=self.parent_change_seq + change_seq,
              )
          else:
              doc.add_change_log(
                  original_word_idx,
                  new_token=swap_token,
                  action=Action.SWAP,
                  change_seq=self.parent_change_seq + change_seq,
              )
  
      # Special case for i
      if (
          doc.get_token(original_word_idx).get_latest_token().token
          == "i"
      ):
          doc.update_change_log(original_word_idx, token="I")
      if doc.get_token(swap_word_idx).get_latest_token().token == "i":
          doc.update_change_log(swap_word_idx, token="I")
  
      return doc
  
file_path: nlpaug/nlpaug/augmenter/word/random.py
imports: from nlpaug.augmenter.word import WordAugmenter
  from nlpaug.util import Action, Doc
label_desc: Use image node_id 3 for calling the RandomWordAug obj's underlying member method code with example usage: obj.change_case(doc, original_word_idx, swap_word_idx, change_seq) and returns: doc, doc