class_docstr: An class that supply methods for ABSA task data transformation.
docstr: Check the negation words in trans_words and delete them.
  
  :param list trans_words: tokenized words of transformed sentence
  :param int opinion_from: start index of opinion
  :param int opinion_to: end index of opinion
  :return: transformed words, opinion words, position of opinion, and
  whether exist negation in transformed sentence
docstr_tok: ["Check","the","negation","words","in","trans_words","and","delete","them",".",":","param","list","trans_words",":","tokenized","words","of","transformed","sentence",":","param","int","opinion_from",":","start","index","of","opinion",":","param","int","opinion_to",":","end","index","of","opinion",":","return",":","transformed","words",",","opinion","words",",","position","of","opinion",",","and","whether","exist","negation","in","transformed","sentence"]
code: def check_negation(self, trans_words, opinion_from, opinion_to):
      r"""
      Check the negation words in trans_words and delete them.
  
      :param list trans_words: tokenized words of transformed sentence
      :param int opinion_from: start index of opinion
      :param int opinion_to: end index of opinion
      :return: transformed words, opinion words, position of opinion, and
      whether exist negation in transformed sentence
      """
      opinion_words = trans_words[opinion_from:opinion_to]
      has_neg = False
  
      for w in self.negative_words_list:
          ws = self.tokenize(w)
          for j in range(opinion_from, opinion_to - len(ws) + 1):
              trans_words_ = " ".join(trans_words[j : j + len(ws)])
              ws_ = " ".join(ws)
              if trans_words_.lower() == ws_.lower():
                  trans_words[j : j + len(ws)] = ["DELETE"] * len(ws)
                  has_neg = True
                  opinion_words = trans_words[opinion_from:opinion_to]
                  break
  
          if has_neg:
              opinion_words.remove("DELETE")
              break
  
      return (
          trans_words,
          opinion_words,
          opinion_from,
          opinion_to,
          has_neg,
      )
  
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 12 for calling the ABSATransformation obj's underlying member method code with example usage: obj.check_negation(trans_words, opinion_from, opinion_to) and returns: trans_words,  opinion_words,  opinion_from,  opinion_to,  has_neg