class_docstr: ABSASample Class
class_docstr_tok: ["ABSASample","Class"]
docstr: Delete items of given scopes of field value.
  
  :param str field: transformed field
  :param list indices: indices of delete positions
  :return ABSAsample: modified sample
docstr_tok: ["Delete","items","of","given","scopes","of","field","value",".",":","param","str","field",":","transformed","field",":","param","list","indices",":","indices","of","delete","positions",":","return","ABSAsample",":","modified","sample"]
code: def delete_field_at_indices(self, field, indices):
      r"""Delete items of given scopes of field value.
  
      :param str field: transformed field
      :param list indices: indices of delete positions
      :return ABSAsample: modified sample
  
      """
      assert len(indices) > 0
      sample = self.clone(self)
      sample = super(ABSASample, sample).delete_field_at_indices(
          field, indices
      )
  
      sorted_indices = sorted(indices, key=lambda x: x, reverse=True)
  
      if not isinstance(sorted_indices[0], list):
          sorted_indices = [sorted_indices]
  
      for del_index in sorted_indices:
          del_from = del_index[0]
          if len(del_index) != 1:
              del_len = del_index[1] - del_index[0]
          else:
              del_len = 1
          for term_id in sample.terms:
              if del_from < sample.terms[term_id]["from"]:
                  sample.terms[term_id]["from"] -= del_len
                  sample.terms[term_id]["to"] -= del_len
              elif del_from < sample.terms[term_id]["to"]:
                  sample.terms[term_id]["to"] -= del_len
              for opinion_word in sample.terms[term_id][
                  "opinion_position"
              ]:
                  if del_from < opinion_word[0]:
                      opinion_word[0] -= del_len
                      opinion_word[1] -= del_len
                  elif del_from < opinion_word[1]:
                      opinion_word[1] -= del_len
          sample.update_term_list(sample)
  
      return sample
  
imports: from .sample import Sample
  from ..field import TextField
  from ....common.utils.error import FlintError
label_desc: Use image node_id 15 for calling the ABSASample obj's underlying member method code with example usage: obj.delete_field_at_indices(field, indices) and returns: sample