Reputation: 21
My goal is to merge together YSO, JUPO and JUHO ontologies (from Finto-ontology family:https://finto.fi/en/). Using Python's RDFlib library I have been able to merge different turtle-files and get an union of the ontologies, using the graph merging properties:
from rdflib import Graph
graph = Graph()
graph.parse(input1)
graph.parse(input2)
specified here: https://rdflib.readthedocs.io/en/stable/merging.html.
However, this is not sufficient since these ontologies have overlapping terms (i.e. exact matches) which then are represented in the combined ontology as multiple terms. For example the term "Veterinarians" is shared by all three ontologies (https://finto.fi/yso/en/page/p14110; https://finto.fi/juho/en/page/p9292; https://finto.fi/jupo/en/page/p2661) and after unifying the ontologies this term will appear three times.
As I'm using the resulting ontology for subject indexing (i.e. assigning index terms from the ontology to text inputs) the exact matches cause problems when the model is used for prediction. For example the "veterinarian" word, will be predicted three times, since it has three different URIs in the ontology.
So my question comes to this: Is it possible to - automatically - unify multiple ontologies so that exact matches are mitigated and some preferred term is used? In the case of "veterinarians" using YSO-ontology as preferred term and specifying the other ontologies as related, would be an ideal solution.
All ideas are welcome!
Cheers, JK
Upvotes: 2
Views: 581
Reputation: 1241
If the ontologies you’re merging have skos:exactMatch properties, you should be able to union the ontologies (merge the graphs) and then pick any one of the exact match objects in each set of matches and replace all matched URIs with a single URI then purge the others you’ve replaced. Or retain the exact match links to all terms but replace references in data to all use just one of the terms.
If you’re not able to do this conceptually, it means skos:exactMatch has been used incorrectly as the exact matched items should be perfectly equivalent - exact in fact!
Same reasoning for owl:sameAs (Named Individuals) and owl:equivalentClass (classes in general, not skos:Concepts).
Upvotes: 2