exclude_prefix_stratified_many_to_many

exclude_prefix_stratified_many_to_many(triples: Iterable[TripleType], *, progress: bool = False) Iterable[TripleType][source]

Exclude prefix pair-stratified many-to-many relationships.

Warning

This function does not consider the predicate, so if you only want to make this operation based on specific predicate, then pre-group your triples based on predicate.

Parameters:
  • triples – An iterable of triples

  • progress – Whether to show a progress bar

Returns:

An iterable of triples

Warning

This operation fully consumes the iterator since it requires two passes