Create string-IDs mappings for entities and relations.
Entities and relations are assigned incremental, unique integer IDs. Mappings are preserved in two distinct dictionaries, and counters are separated for entities and relations mappings.
Parameters: X (ndarray, shape [n, 3]) – The triples to extract mappings. Returns:
- rel_to_idx (dict) – The relation-to-internal-id associations.
- ent_to_idx (dict) – The entity-to-internal-id associations.