class_docstr: load the FB15K
docstr: Read in kg files.
code: def load_kg_triple(self, file):
      """
      Read in kg files.
      """
      triples = []
      with open(os.path.join(self._data_dir, file), "r") as f:
          for line in f.readlines():
              line_list = line.strip().split("\t")
              assert len(line_list) == 3
              head = self._entity2id[line_list[0]]
              tail = self._entity2id[line_list[1]]
              relation = self._relation2id[line_list[2]]
              triples.append((head, relation, tail))
      return np.array(triples)
  
file_path: PGL/legacy/examples/pgl-ke/data_loader.py
imports: import os
  import numpy
  from collections import defaultdict
  from pgl.utils.logger import log
label_desc: Use image node_id 6 for calling the KGLoader obj's underlying member method code with example usage: obj.load_kg_triple(file) and returns: np