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 convertedent2ind (
dict) – dictionary that map entity to indexrel2ind (
dict) – dictionary that map relation to index
- Returns
indexed KG data
- Return type
np.array