class_docstr: WSCSample Class
class_docstr_tok: ["WSCSample","Class"]
docstr: Convert data dict which contains essential information to WSCSample.
  
  :param dict data: contains 'text', 'target' and 'label' keys.
  :return:
docstr_tok: ["Convert","data","dict","which","contains","essential","information","to","WSCSample",".",":","param","dict","data",":","contains","'text","'",",","'target","'","and","'label","'","keys",".",":","return",":"]
code: def load(self, data):
      r"""
      Convert data dict which contains essential information to WSCSample.
  
      :param dict data: contains 'text', 'target' and 'label' keys.
      :return:
  
      """
      self.text = TextField(data["text"])
      self.target = data["target"]
      self.label = data["label"]
      self.index = data["index"]
  
      self.noun1 = data["target"]["noun1"]
      self.noun2 = data["target"]["noun2"]
      self.noun1_idx = data["target"]["noun1_idx"]
      self.noun2_idx = data["target"]["noun2_idx"]
      self.pron = data["target"]["pron"]
      self.pron_idx = data["target"]["pron_idx"]
  
      if not self.is_legal():
          raise ValueError(
              "noun index and pronoun index should be greater than or equal to zero"
          )
  
imports: from copy import deepcopy
  import nltk
  import string
  from .sample import Sample
  from ..field import TextField
  from ....common.utils.error import FlintError
  from ....common.utils.list_op import normalize_scope
label_desc: Use image node_id 4 for calling the WSCSample obj's underlying member method code with example usage: obj.load(data) without return types