Generating Application Ontologies from Reference Ontologies Marianne Shaw


























- Slides: 26
Generating Application Ontologies from Reference Ontologies Marianne Shaw Todd Detwiler Jim Brinkley Dan Suciu University of Washington
Motivation • Growing # of specialized ontologies • Open Biomedical Ontologies (OBO), >50 ontologies • Unified Medical Language System (UMLS), >90 ontologies • Link ontologies via reference ontologies • Reference ontologies are: – Large • e. g. Foundational Model of Anatomy (FMA) – 75, 000 classes; 120, 000 terms; 168 relationship types; – >2. 1 million relationship instances – Complex – Comprehensive
Problem Statement • How can we enable large ontologies to be used to create application ontologies?
Problem Statement • How can we enable large ontologies to be used to create application ontologies? • Approach: Add Views to SPARQL
Outline • Motivation / Problem Statement • SPARQL • Our Solution: v. SPARQL – Subqueries – Recursive Queries – Skolem Functions • Radiology Example • Related Work • Conclusions
The Basics: SPARQL • SPARQL: W 3 C’s standard for querying RDF – RDF: (subject, predicate, object) triples • Simple SPARQL query over FMA – Creates a new RDF graph – “Get direct properties of liver” PREFIX fma: <http: //. . . /fma_1_4_0#> CONSTRUCT { fma: Liver ? y ? z } FROM <http: //. . . /fma_1_4_0> WHERE { fma: Liver ? y ? z }
Outline • Motivation / Problem Statement • SPARQL • Our Solution: v. SPARQL – Subqueries – Recursive Queries – Skolem Functions • Radiology Example • Related Work • Conclusions
v. SPARQL • Extend SPARQL to support views • Extensions enable three types of functionality – Querying over existing queries – Gathering subgraphs of an ontology – Creating new data by combining data from multiple ontologies
Subqueries: Querying over an existing query • Alice’s ontology contains info queried from FMA – “Get organs & their direct properties” Alice’s Organ Ontology Query 1 FMA CONSTRUCT { ? sub ? prop ? val } FROM <http: //. . . /fma_1_4_0> WHERE { ? sub rdfs: sub. Class. Of fma: Organ. ? sub ? prop ? val }
Subqueries: Querying over an existing query Bob’s Liver Ontology Query 2 Alice’s Organ Query 1 Ontology FMA • Alice’s ontology contains info queried from FMA • Bob only interested in Alice’s info about liver • Subqueries allow us to query existing queries FROM NAMED <subquery> [ CONSTRUCT { … } WHERE { … } ]
Subqueries: Querying over an existing query Bob’s Liver Ontology Query 2 Alice’s Organ Query 1 Ontology FMA • Bob only interested in Alice’s info about liver CONSTRUCT { fma: Liver ? lprop ? lval } FROM <alice_ontology> [ CONSTRUCT { ? sub ? prop ? val } FROM <http: //. . . /fma_1_4_0> WHERE { ? sub rdfs: sub. Class. Of fma: Organ. ? sub ? prop ? val. } ] WHERE { fma: Liver ? lprop ? lval. }
Recursive queries: Gathering subgraphs • What if we only want a portion of an ontology? … …
Recursive queries: Gathering subgraphs • What if we only want a portion of an ontology? – Only want parts of the liver … … Liver … …
Recursive queries: Gathering subgraphs • What if we only want a portion of an ontology? – Only want parts of the liver Recursive queries allow us to query for arbitrary subgraphs … … Liver … … FROM NAMED <recursive_liver> [ CONSTRUCT { … } Base case WHERE { … } UNION … … CONSTRUCT { … } Recursive case FROM <recursive_liver> WHERE { GRAPH <recursive_liver> { … } } ]
Recursive example: All parts of the liver CONSTRUCT { ? sub ? prop ? obj. } FROM NAMED <recursive_liver> [ // Base: Direct parts of liver CONSTRUCT { fma: Liver fma: part ? obj. } FROM <http: //. . . /fma_1_4_0> WHERE { fma: Liver fma: part ? obj. } UNION … … // Recursive: Transitively, parts of liver Liver … … CONSTRUCT {? c fma: part ? d} FROM <http: //. . . /fma_1_4_0> FROM NAMED <recursive_liver> WHERE { GRAPH <recursive_liver> { ? a ? b ? c. }. ? c fma: part ? d. } ] WHERE { GRAPH <recursive_liver> { ? sub ? prop ? obj } }
Skolem Functions: Combining data from two ontologies Pressure Fluid. Pressure OPB Aortic Blood FMA • Ontology of Physics for Biology (OPB) • FMA
Skolem Functions: Combining data from two ontologies Pressure Fluid. Pressure OPB Aortic. Blood Pressure Aortic Blood FMA • OPB • FMA • Combine OPB: Fluid. Pressure, FMA: Aortic. Blood
Skolem Functions: Combining data from two ontologies Pressure Fluid. Pressure OPB • OPB • FMA • Combine OPB: Fluid. Pressure, FMA: Aortic. Blood Pressure Aortic Blood Skolem Functions generate new nodes from queried info [[ <skolem_function_url>(arg 1, . . . ) ]] FMA
Skolem Functions: Combining data from two ontologies PREFIX fma: <http: //. . . /fma_1_4_0#> PREFIX opb: <http: //. . . /opb#> PREFIX new: <http: //. . . /new_ontology#> CONSTRUCT { [[new: fma_phys(fma: Aortic_Blood, opb: Fluid. Pressure)]] ? p_prop ? p_obj. } FROM NAMED <http: //. . . /fma_1_4_0> Pressure FROM NAMED <http: //. . . /opb> WHERE { Fluid. Pressure GRAPH <http: //. . . /fma_1_4_0> Aortic { fma: Aortic_Blood ? ab_prop ? ab_obj. } OPB GRAPH <http: //. . . /opb> Blood { opb: Fluid. Pressure ? p_prop ? p_obj. } Pressure } Aortic Blood FMA
Outline • Motivation / Problem Statement • SPARQL • Our Solution: v. SPARQL – Subqueries – Recursive Queries – Skolem Functions • Radiology Example • Related Work • Conclusions
Example: Radiology Ontology from FMA • All of the visible parts of the liver
Radiology Ontology Results <http: //. . . /fma_1_4_0#Right_portal_vein> <http: //. . . /fma_1_4_0#part> <http: //. . . /fma_1_4_0#Anterior_branch_of_right_portal_vein> ; <http: //. . . /fma_1_4_0#part> <http: //. . . /fma_1_4_0#Caudate_lobe_branch_of_right_portal_vein> ; <http: //. . . /fma_1_4_0#part> <http: //. . . /fma_1_4_0#Trunk_of_right_portal_vein> ; <http: //. . . /fma_1_4_0#part> <http: //. . . /fma_1_4_0#Posterior_branch_of_right_portal_vein>. <http: //. . . /fma_1_4_0#Segment_of_liver> <http: //. . . /fma_1_4_0#part> <http: //. . . /fma_1_4_0#Subsegment_of_liver>. <http: //. . . /fma_1_4_0#Parenchymatous_organ> <http: //www. w 3. org/2000/01/rdf-schema#sub. Class. Of> <http: //. . . /fma_1_4_0#Organ>. <http: //. . . /fma_1_4_0#Caudate_lobe_of_liver> <http: //. . . /fma_1_4_0#part> <http: //. . . /fma_1_4_0#Papillary_process_of_caudate_lobe_of_liver> ; <http: //. . . /fma_1_4_0#part> <http: //. . . /fma_1_4_0#Left_segment_of_caudate_lobe_of_liver> ; <http: //. . . /fma_1_4_0#part> <http: //. . . /fma_1_4_0#Caudate_process_of_caudate_lobe_of_liver> ;
Radiology Ontology Results • FMA ontology size – 1. 7 million RDF triples – 178 MB text file • Radiology Ontology size – 164 RDF triples – 38 KB text file
Related Work Subqueries • Schenk S. A SPARQL Semantics Based on Datalog. KI 2007: Advances in Artificial Intelligence. Regular Expressions • Detwiler LT, Suciu D, Brinkley J. Regular paths in SPARQL: Querying the NCI Thesaurus. AMIA’ 08. • Kochut K, Janik M. SPARQLer: Extended SPARQL for Semantic Association Discovery. ESWC 2007. • Alkhateeb F, Baget JF, Euzenat J. RDF with Regular Expressions. http: //hal. inria. fr/inria-00144922/en. Views • Noy NF, Musen MA. Specifying Ontology Views by Traversal. ISWC 2004. • Magkanaraki A, et al. Viewing the Semantic Web through RVL lenses. ISWC 2003. • Miklos Z, et al. Querying Semantic Web Resources using TRIPLE Views. ISWC 2003.
Wrap. Up • Reference ontologies can be used to link together specialized ontologies • Views can make large reference ontology datasets manageable • v. SPARQL extends SPARQL • Subqueries • Recursive queries • Skolem Functions • v. SPARQL can be used to generate application ontologies using views over reference ontologies
Questions?