class_docstr: WSDSample Class
class_docstr_tok: ["WSDSample","Class"]
docstr: delete word of given indices in sentence
  
  :param string field: field to be operated on
  :param list indices: a list of index to be deleted
  
  :return WSDSample sample: a modified sample
docstr_tok: ["delete","word","of","given","indices","in","sentence",":","param","string","field",":","field","to","be","operated","on",":","param","list","indices",":","a","list","of","index","to","be","deleted",":","return","WSDSample","sample",":","a","modified","sample"]
code: def delete_field_at_indices(self, field, indices):
      r"""delete word of given indices in sentence
  
      :param string field: field to be operated on
      :param list indices: a list of index to be deleted
  
      :return WSDSample sample: a modified sample
      """
      assert len(indices) > 0, "indices should be not null!"
      sample = self.clone(self)
      sample = super(WSDSample, sample).delete_field_at_indices(
          field, indices
      )
      # delete corresponding pos
      sample = super(WSDSample, sample).delete_field_at_indices(
          "pos", indices
      )
      # delete corresponding lemma
      sample = super(WSDSample, sample).delete_field_at_indices(
          "lemma", indices
      )
      # adjust positions of corresponding instance/delete the exact instance
      # check if any target word is deleted
      idx_list = self.get_idx_list(indices)
      targets = []  # update instance information
      for key, start, end, word, sense in sample.instance:
          # if deleted,skip this target word
          if start in idx_list or end - 1 in idx_list:
              continue
          # add intact target
          targets.append([key, start, end, word, sense])
  
      # get new position for each instance
      for i in range(len(targets)):
          # targets are kept impact
          start = targets[i][1]
          offset = len([idx for idx in idx_list if idx < start])
          targets[i][1] -= offset  # start
          targets[i][2] -= offset  # end
      setattr(sample, "instance", ListField(targets))
      return sample
  
imports: from .sample import Sample
  from ..field import TextField, ListField
  import json
  from ....common.settings import TASK_MASK, PUNC
  import nltk
label_desc: Use image node_id 11 for calling the WSDSample obj's underlying member method code with example usage: obj.delete_field_at_indices(field, indices) and returns: sample