convert_kg_to_index

KGE.data_utils.convert_kg_to_index(kg_data, ent2ind, rel2ind)[source]

Convert the KG data into index

Parameters
  • kg_data (np.array) – KG data to be converted

  • ent2ind (dict) – dictionary that map entity to index

  • rel2ind (dict) – dictionary that map relation to index

Returns

indexed KG data

Return type

np.array