class_docstr: An class that supply methods for ABSA task data transformation.
docstr: Update the terms and sentence.
  
  :param list trans_words: tokenized words of transformed sentence
  :param dict trans_terms: transformed terms
  :param list trans_opinion_words: transformed opinion words
  :param list opinion_position: opinion position
  :return: transformed sentence and transformed terms
docstr_tok: ["Update","the","terms","and","sentence",".",":","param","list","trans_words",":","tokenized","words","of","transformed","sentence",":","param","dict","trans_terms",":","transformed","terms",":","param","list","trans_opinion_words",":","transformed","opinion","words",":","param","list","opinion_position",":","opinion","position",":","return",":","transformed","sentence","and","transformed","terms"]
code: def update_sentence_terms(
      self,
      trans_words,
      trans_terms,
      trans_opinion_words,
      opinion_position,
  ):
      r"""
      Update the terms and sentence.
  
      :param list trans_words: tokenized words of transformed sentence
      :param dict trans_terms: transformed terms
      :param list trans_opinion_words: transformed opinion words
      :param list opinion_position: opinion position
      :return: transformed sentence and transformed terms
      """
      terms = deepcopy(trans_terms)
      trans_opinion_position = deepcopy(opinion_position)
  
      for trans_id, trans_opi in enumerate(trans_opinion_words):
          offset = len(self.tokenize(trans_opi[2])) - (
              trans_opi[1] - trans_opi[0]
          )
          for opi_id, opi in enumerate(opinion_position):
              if opi[0] > trans_opi[0]:
                  trans_opinion_position[opi_id][0] += offset
                  trans_opinion_position[opi_id][1] += offset
          for term_id in terms:
              if terms[term_id]["from"] >= trans_opi[0]:
                  trans_terms[term_id]["from"] += offset
                  trans_terms[term_id]["to"] += offset
              positions = terms[term_id]["opinion_position"]
              for pos_id, position in enumerate(positions):
                  if position == opinion_position[trans_id]:
                      trans_terms[term_id]["opinion_words"][
                          pos_id
                      ] = trans_opi[2]
                      trans_terms[term_id]["opinion_position"][
                          pos_id
                      ] = [
                          trans_opinion_position[trans_id][0],
                          trans_opinion_position[trans_id][1] + offset,
                      ]
                  elif position[0] > trans_opi[0]:
                      trans_terms[term_id]["opinion_position"][pos_id][
                          0
                      ] += offset
                      trans_terms[term_id]["opinion_position"][pos_id][
                          1
                      ] += offset
  
      return trans_words, trans_terms
  
imports: import random
  from abc import ABC
  from copy import deepcopy
  from ..transformation import Transformation
  from ....common.settings import NEGATIVE_WORDS_LIST, DEGREE_WORD_LIST
label_desc: Use image node_id 14 for calling the ABSATransformation obj's underlying member method code with example usage: obj.update_sentence_terms(trans_words, trans_terms, trans_opinion_words, opinion_position) and returns: trans_words,  trans_terms