index_kg

KGE.data_utils.index_kg(kg_data)[source]

Index the Knowledge Graph data.

Parameters

kg_data (np.array) – KG data to be indexed

Returns

metadata of KG <br> 'ent2ind': dictionary that map entity to index 'ind2ent': list that map index to entity 'rel2ind': dictionary that map relation to index 'ind2rel': list that map index to relation

Return type

dict