class_docstr: Transforms an affirmative sentence into a negative sentence, or vice versa.
  Each sample generate one transformed sample at most.
class_docstr_tok: ["Transforms","an","affirmative","sentence","into","a","negative","sentence",",","or","vice","versa",".","Each","sample","generate","one","transformed","sample","at","most","."]
code: def _get_del_sample(
      self, tokens, field, sample, split_by_space=False
  ):
      for i, token in enumerate(tokens):
          # do not + verb → verb
          if token in ["do", "does", "did"] and len(tokens) > i + 2:
              if tokens[i + 1] in ["not", "n't"]:
                  root_id_list = self._parse_sentence(
                      tokens, split_by_space=split_by_space
                  )
                  pos_tag = self.processor.get_pos(tokens[i + 2])[0][1]
  
                  if (
                      pos_tag
                      in ["VB", "VBP", "VBZ", "VBG", "VBD", "VBN"]
                      or (i + 2) in root_id_list
                  ):
                      del_list = [i, i + 1]
                      del_sample = sample
  
                      for i, index in enumerate(del_list):
                          del_sample = del_sample.delete_field_at_index(
                              field, index - i
                          )
  
                      return del_sample
  
          if token in [
              "not",
              "n't",
              "don",
              "didn",
              "doesn",
              "doesn",
              "aren",
              "isn",
              "wasn",
              "weren",
          ]:
              return sample.delete_field_at_index(field, i)
  
      return []
  
file_path: textflint/textflint/generation/transformation/UT/reverse_neg.py
imports: from ..transformation import Transformation
label_desc: Use image node_id 7 for calling the ReverseNeg obj's underlying member method code with example usage: obj._get_del_sample(tokens, field, sample, split_by_space) and returns: list, sample, del_sample