Open jamieparkinson opened 3 years ago
Def. An overlinked Miro work is one that has a Miro source identifier and is linked to by more than subgraph - the number of subgraphs is called the number of links. Note that a Miro work can have multiple neighbours and not be overlinked if those neighbours are still in the same (sub)graph when the Miro work is discounted.
Def. A canonical parent record is a Sierra work that links to a Miro work and can be regarded as a description of the digitised content therein. Sierra records can link to Miro works but not be canonical parents - for example, a record describing a photo album that links to several Miro works containing individual digitised pages would not be a canonical parent if there also existed Sierra records for those individual pages (the latter would be the canonical parents).
Desiderata: Split works graphs such that non-ambiguous overlinked Miro works are eliminated and that the required partitions never separate them from their canonical parent.
Algorithm
G is a graph that contains at least one overlinked Miro work.
Select all of the overlinked Miro works in G, call this ordered set M.
Sort M by the number of links of each work in it.
For each work m in M:
If any neighbour of m has a neighbour that is a METS work, then remove all edges except the one connecting m to this. Otherwise:
These are work IDs where the graph in which the work belongs contains an overlinked Miro work. Some of them are in the same graph.
This notebook contains some snippets that were used in investigating these works (you will need to either change the kernel or create your own matcher-nb
kernel)
Somewhat relevant conversation which is another case of the merger's lack of knowledge of graph topology (ie that it only has knowledge of the nodes) causing an issue https://wellcome.slack.com/archives/C8X9YKM5X/p1628601560049300?thread_ts=1628597088.049100&cid=C8X9YKM5X
Another potential wrinkle I thought of while chatting with @cbowskill recently:
Consider a journal which has been catalogued in Sierra with:
Where do you put the digitised items for the issues? Ideally you have them on both, but that's completely impossible in our current approach (and there's no way to render multiple items on the journal page).
I noticed this when thinking about Archivematica/CALM merges a few weeks ago Slack. I've not suffered by it. It was just something that I spotted.
Context
We have previously assumed that the matcher graphs recorded by the matcher would be relatively simple and predictable - for example, a Sierra work and a METS work, or a Sierra work and several Miro works. However, it turns out that for some works the graphs can be extremely complex:
These complexities most often occur when several Sierra works link to a single Miro work, although we've seen that it can also occur when Sierra works link to each other. I've only explored the Miro case so far.
The problem
The merger has no understanding of graphs and just operates on lists of works (it does not care how they are linked, as this is the job of the matcher). While this works well for most cases, it does not handle the complex graphs: we see non-deterministic behaviour depending on the order in which the merger encounters the works. In the case of high-degree Miro works, this usually manifests as images being linked to the wrong Sierra works and so seeming to disappear.
In some cases, we can identify these cases as errors in the catalogue records (ie incorrect linking). However, in many others, the links are valid representations - see next comment for some examples.
Incomplete solutions
It seems likely that we can automatically break up graphs in the matcher by applying some sort of business logic, but this has turned out to be both difficult and incomplete. Perhaps we can be OK with this, but it needs some more work. Some initial work on this is given below.
Further work on this would probably aim to handle some of these cases automatically, and warn (or even error) on ambiguous cases. It may be that the solution is not to merge the ambiguous cases at all so as to ensure that no information is hidden unexpectedly.