class_docstr: Augmenter that leverage TF-IDF statistics to insert or substitute word.
  
  :param str model_path: Downloaded model directory. Either model_path or model is must be provided
  :param str action: Either 'insert or 'substitute'. If value is 'insert', a new word will be injected to random
      position according to TF-IDF calculation. If value is 'substitute', word will be replaced according
      to TF-IDF calculation
  :param int top_k: Controlling lucky draw pool. Top k score token will be used for augmentation. Larger k, more
      token can be used. Default value is 5. If value is None which means using all possible tokens.
  :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.
  :param str stopwords_regex: Regular expression for matching words which will be skipped from augment operation.
  :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.TfIdfAug(model_path='.')
code: def substitute(self, data):
      if not data or not data.strip():
          return data
  
      change_seq = 0
      doc = Doc(data, self.tokenizer(data))
  
      aug_idxes = self._get_aug_idxes(doc.get_original_tokens())
      if aug_idxes is None:
          return data
  
      for aug_idx in aug_idxes:
          original_token = doc.get_token(aug_idx).orig_token.token
          candidate_tokens = self.model.predict(
              original_token, top_k=self.top_k
          )
          substitute_token = self.sample(candidate_tokens, 1)[0]
          if aug_idx == 0:
              substitute_token = self.align_capitalization(
                  original_token, substitute_token
              )
  
          change_seq += 1
          doc.add_change_log(
              aug_idx,
              new_token=substitute_token,
              action=Action.SUBSTITUTE,
              change_seq=self.parent_change_seq + change_seq,
          )
  
      if self.include_detail:
          return (
              self.reverse_tokenizer(doc.get_augmented_tokens()),
              doc.get_change_logs(),
          )
      else:
          return self.reverse_tokenizer(doc.get_augmented_tokens())
  
file_path: nlpaug/nlpaug/augmenter/word/tfidf.py
imports: from nlpaug.augmenter.word import WordAugmenter
  from nlpaug.util import Action, Doc, WarningException, WarningName, WarningCode, WarningMessage
  import nlpaug.model.word_stats
label_desc: Use image node_id 5 for calling the TfIdfAug obj's underlying member method code with example usage: obj.substitute(data) and returns: data, data, self,  doc, self