class_docstr: Generate extra text for AbsaAddDiff,
  and dataset type is assigned in configure.
docstr: Get extra text from training dataset.
  
  :return: dict of extra text
docstr_tok: ["Get","extra","text","from","training","dataset",".",":","return",":","dict","of","extra","text"]
code: def get_extra_text(self):
      r"""
      Get extra text from training dataset.
  
      :return: dict of extra text
      """
      positive_text = []
      negative_text = []
      neutral_text = []
      logger.info(
          "******Prepare extra {0} corpus for AddDiff!******".format(
              self.dataset_config
          )
      )
      for text_id in tqdm(self.examples):
          text = self.examples[text_id]
          text_sample = ABSASample(text)
          term_list = text_sample.term_list
          text_doc = self.nlp(text_sample.sentence.text)
          phrase_list = []
          for token in text_doc:
              if len(list(token.subtree)) > 1:
                  phrase_list.append(list(token.subtree))
          for term_id in term_list:
              term = term_list[term_id]["term"]
              term_polarity = term_list[term_id]["polarity"]
              extra_sentence = self.get_extra_sentence(
                  term_list, term_id, phrase_list
              )
              if len(extra_sentence) == 0:
                  continue
              extra_sentence = extra_sentence[0]
  
              if term_polarity == "positive":
                  positive_text.append(
                      (term.lower(), [extra_sentence.lower()])
                  )
              elif term_polarity == "negative":
                  negative_text.append(
                      (term.lower(), [extra_sentence.lower()])
                  )
              elif term_polarity == "neutral":
                  neutral_text.append(
                      (term.lower(), [extra_sentence.lower()])
                  )
  
      return {
          "positive": positive_text,
          "negative": negative_text,
          "neutral": neutral_text,
      }
  
file_path: textflint/textflint/generation/generator/absa_generator.py
imports: from tqdm import tqdm
  from .generator import Generator
  from ...common.utils.logger import logger
  from ...input.component.sample import ABSASample
  from ..transformation.transformation import Transformation
  from ...common.utils.load import absa_dict_loader
  from ...common.utils.install import download_if_needed
  from ...common.settings import TASK_TRANSFORMATION_PATH, ALLOWED_TRANSFORMATIONS, TASK_SUBPOPULATION_PATH, ALLOWED_SUBPOPULATIONS, ABSA_TRAIN_RESTAURANT_PATH, ABSA_TRAIN_LAPTOP_PATH
label_desc: Use image node_id 3 for calling the ABSAGenerator obj's underlying member method code with example usage: obj.get_extra_text() and returns: dict