Edge
- class mowl.projection.Edge(src, rel, dst, weight=1.0)[source]
Bases:
object
Class representing a graph edge.
Attributes Summary
Getter method for
_dst
attributeGetter method for
_rel
attributeGetter method for
_src
attributeGetter method for
_weight
attributeMethods Summary
as_pykeen
(edges[, create_inverse_triples, ...])This method transform a set of edges into an object of the type
pykeen.triples.triples_factory.TriplesFactory
.astuple
()getEntitiesAndRelations
(edges)Deprecated since version 0.1.0.
get_entities_and_relations
(edges)- param edges:
list of edges
zip
(edges)Attributes Documentation
Methods Documentation
- static as_pykeen(edges, create_inverse_triples=True, entity_to_id=None, relation_to_id=None)[source]
This method transform a set of edges into an object of the type
pykeen.triples.triples_factory.TriplesFactory
. This method is intended to be used for PyKEEN methods.- Parameters:
- Return type:
New in version 0.1.0: This method is available to transform graph edges obtained from ontologies into PyKEEN triples.
- static getEntitiesAndRelations(edges)[source]
Deprecated since version 0.1.0: Use get_entities_and_relations instead