ontocast.tool.agg.merge_provenance¶
Which multi-valued facts of a merged graph an identity merge produced.
A source subject is a subject as one unit wrote it. Values or links that a single source subject already held were together before any identity decision, so they cannot be the residue of a bad merge, and the un-merge repair, which can only undo identity decisions, must not act on them.
Classes¶
Functions:¶
build_merge_provenance(units, final_mapping)
¶
Record which multi-valued facts of the merged graph a merge produced.
Values are compared by :func:object_value_key, as the validation gate
compares them. Keys are canonicalized through final_mapping, because
the gate sees the post-merge graph and a pre-merge IRI would never match.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
units
|
Sequence[ContentUnit]
|
The content units that contributed to the merged graph. |
required |
final_mapping
|
dict[URIRef, URIRef]
|
Source entity -> final URI, as used for the rewrite. |
required |
Returns:
| Type | Description |
|---|---|
MergeProvenance
|
The (subject, predicate) pairs with at least two distinct values, and |
MergeProvenance
|
the (subject, object) pairs linked by at least two predicates, that no |
MergeProvenance
|
single source subject accounts for. |