From: Jim B. <ba...@ne...> - 2015-06-08 17:23:03
|
I would like to obtain the set of least common subsumers of two RDF nodes along some transitive property. For example for two given OWL classes, I want to obtain the set of common superclasses along rdfs:subClassOf of those two classes that aren’t themselves superclasses of any common superclasses of those two classes. My class hierarchy is a DAG but not a tree, so there can be more than one most specific shared super class. Just to be clear although it might be obvious: Nurse subClassOf MedicalProfessional MaleNurse subClassOf Nurse MaleNurse subClassOf MalePerson FemaleNurse subClassOf Nurse FemaleNurse subClassOf FemalePerson Doctor subClassOf MedicalProfessional FemaleDoctor subClassOf FemalePerson MalePerson subClassOf Person FemalePerson subClassOf Person Results for various pairs: (FemaleNurse, FemaleDoctor) => MedicalProfessional, FemalePerson (MaleNurse, FemaleDoctor) => MedicalProfessional, Person (MaleNurse, FemaleNurse) => Nurse, Person I can do this with SPARQL using multiple property paths and FILTER but it is pretty slow on our complete dataset where we have some really deep hierarchies. I have been wondering whether it is possible to apply Gather Apply Scatter to this, but I find it hard to wrap my head around that abstraction, I just keep thinking in terms of SPARQL queries. So before I really try to figure it out I thought I would just ask if it sounds like the sort of question that would benefit from a GAS algorithm. We have an application where we need to do many of these lookups so it would be great to somehow speed that up with MapGraph, maybe after testing with the RDF GAS API. A related question: for the right problem, are there cases where the RDF GAS API would be faster than equivalent SPARQL queries? Thank you, Jim |