KGInfo

class KGInfo(num_entities: int, num_relations: int, create_inverse_triples: bool)[source]

Bases: ExtraReprMixin

An object storing information about the number of entities and relations.

Initialize the information object.

Parameters:
  • num_entities (int) – the number of entities.

  • num_relations (int) – the number of relations, excluding artifical inverse relations.

  • create_inverse_triples (bool) – whether to create inverse triples

Methods Summary

iter_extra_repr()

Iterate over extra_repr components.

Methods Documentation

iter_extra_repr() Iterable[str][source]

Iterate over extra_repr components.

Return type:

Iterable[str]