class_docstr: NER Sample class to hold the necessary info and provide atomic operations.
class_docstr_tok: ["NER","Sample","class","to","hold","the","necessary","info","and","provide","atomic","operations","."]
docstr: Parse data into sample field value.
  
  :param dict data: rare data input.
docstr_tok: ["Parse","data","into","sample","field","value",".",":","param","dict","data",":","rare","data","input","."]
code: def load(self, data):
      r"""
      Parse data into sample field value.
  
      :param dict data: rare data input.
  
      """
      self.text = TextField(data["x"])
      tags = (
          data["y"].split() if isinstance(data["y"], str) else data["y"]
      )
      self.tags = ListField(tags)
  
      # set mask to prevent UT transform modify entity word.
      if self.mode == "BIO":
          self.entities = ListField(
              self.find_entities_BIO(self.text.words, self.tags)
          )
      elif self.mode == "BIOES":
          self.entities = ListField(
              self.find_entities_BIOES(self.text.words, self.tags)
          )
      if not self.is_legal():
          raise ValueError(
              "A failed transformation which leads to "
              "mismatch between input and output."
          )
  
imports: from .sample import Sample
  from ..field import ListField, TextField
  from ....common.utils.list_op import get_align_seq
label_desc: Use image node_id 5 for calling the NERSample obj's underlying member method code with example usage: obj.load(data) without return types