remove_trivial_negative

remove_trivial_negative(mappings: Iterable[MappingTypeVar]) Iterable[MappingTypeVar][source]

Remove trivial negative triples.

A negative mapping is trivial in the context of collection of mappings if there exists another non-negative mapping with the same subject and object.

Parameters:

mappings – An iterable of semantic mappings

Yields:

An iterable of semantic mappings (in the same order) with trivial negative mappings removed