ExtraRelationGraphPairCombinator
- class ExtraRelationGraphPairCombinator[source]
Bases:
GraphPairCombinator
This combinator keeps all entities, but introduces a novel alignment relation.
Attributes Summary
the name of the additional alignment relation
Methods Summary
process
(mapped_triples, alignment, offsets)Process the combined mapped triples.
Attributes Documentation
Methods Documentation
- process(mapped_triples, alignment, offsets)[source]
Process the combined mapped triples.
- Parameters
mapped_triples (
LongTensor
) – shape: (n, 3) the id-based merged triplesalignment (
LongTensor
) – shape: (2, m) the id-based entity alignmentoffsets (
LongTensor
) – shape: (2, 2) the entity and relation offsets from merging
- Return type
- Returns
updated triples and alignment tensor, as well as parameters for updating label-to-id mappings