class_docstr: @article{xu2017discourse,
  title={A discourse-level named entity recognition and relation extraction dataset for chinese literature text},
  author={Xu, Jingjing and Wen, Ji and Sun, Xu and Su, Qi},
  journal={arXiv preprint arXiv:1711.07010},
  year={2017}
  }
class_docstr_tok: ["@","article","{","xu2017discourse",",","title=","{","A","discourse-level","named","entity","recognition","and","relation","extraction","dataset","for","chinese","literature","text","}",",","author=","{","Xu",",","Jingjing","and","Wen",",","Ji","and","Sun",",","Xu","and","Su",",","Qi","}",",","journal=","{","arXiv","preprint","arXiv:1711.07010","}",",","year=","{","2017","}","}"]
code: def get_examples(self, data_dir, split):
      path = os.path.join(data_dir, f"{split}.jsonl")
  
      with open(path, encoding="utf8") as f:
          for line in f:
              example_json = json.loads(line)
              for relation in example_json["relations"]:
                  example = InputExample(
                      meta={
                          "text": example_json["text"],
                          "head": example_json["entities"][
                              relation["head"]
                          ][0]["mention"],
                          "tail": example_json["entities"][
                              relation["tail"]
                          ][0]["mention"],
                          "options": self.labels_mapped,
                      },
                      tgt_text=self.get_label(relation["label"]),
                  )
                  examples.append(example)
  
file_path: OpenPrompt/openprompt/data_utils/ZH/relation.py
imports: from .processor import *
label_desc: Use image node_id 2 for calling the Chinese_Literature_NER_RE obj's underlying member method code with example usage: obj.get_examples(data_dir, split) without return types