class_docstr: WSDSample Class
class_docstr_tok: ["WSDSample","Class"]
docstr: Dump the legal data in json format.
  :return: dict:sample in json format
docstr_tok: ["Dump","the","legal","data","in","json","format",".",":","return",":","dict",":","sample","in","json","format"]
code: def dump(self):
      r"""
      Dump the legal data in json format.
      :return: dict:sample in json format
      """
      # check legality before dump
      if not self.is_legal():
          raise ValueError("Data is not legal to dump")
      # fetch data of json format
      return {
          "sentence": self.sentence.field_value,
          "pos": self.pos.field_value,
          "lemma": self.lemma.field_value,
          "instance": self.instance.field_value,
          "sentence_id": self.sentence_id.field_value,
          "source": self.source.field_value,
          "sample_id": self.sample_id,
      }
  
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 8 for calling the WSDSample obj's underlying member method code with example usage: obj.dump() and returns: dict