SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Downloaden Sie, um offline zu lesen
POSH : The Prolog OWL Shell

          Chris Mungall
   Lawrence Berkeley Laboratory



                                  1
Ontology Hacking
•  I’m in a hurry and I want to:
  – translate all “R some Y” to “(R some Y) or Y”
  – add an equivalence axiom for every class pair
    with closely matching labels
  – automatically extend an ontology using some
    tabular data files and/or relational db
  – iteratively refactor my ontology based on
    complex structural pattern matching
•  What are my options?
                                                2
Ontology Environments
•  GUI
  – Protégé 4
  – OBO-Edit
•  API
  – Java
     •  OWL API
     •  Jena
     •  Ortiz


                                 3
Ontology Environments
•  GUI
  – Protégé 4
  – OBO-Edit      }   Not powerful enough!
                      need programmatic capabilities

•  API
  – Java
     •  OWL API
     •  Jena      }    I’m in a hurry!
                       too verbose;
                       hard to read and write;
     •  Ortiz


                                                   4
Where is the Perl of OWL?
   •  Perl is remarkably good for slicing, dicing, twisting,
      wringing, smoothing, summarizing, and otherwise
      mangling text…
   •  Perl programs are easy to write and fast to
      develop…
   •  Perl is a good prototyping language…
– Lincoln Stein, How Perl Saved the Human
  genome Project, Dr Dobbs Journal, 1996, http://
  drdobbs.com/184410424

   •  What’s a good way for slicing, dicing, mangling and
      hacking axioms and expressions?


                                                               5
Pathologically Obfuscated
         Semantic Hacking (POSH)
•  What is it?
    –  Command line interface to Thea
       (Vassilidas, OWLED2009)
•  Features
    –  OWL2 Manchester-like syntax
    –  Command Line (REPL)
    –  Declarative
        •  but with full ‘impure’ programmatic
           capabilities
        •  Turing complete
    –  Succinct
    –  Configurable and extendable
    –  Behind the scenes label<->IRI
       translation



                                                 6
Posh Lightning summary
•  Infix predicates                •  Prolog syntax
   –  Axiom predicate shortcuts:
       •  < (SubClassOf)              –  variable leading upper case
       •  == (EquivalentClasses)
       •  (or use OWL2 syntax)
   –  Expression operators
                                   •  Prolog queries
       •    and                       –  Predicates dynamically
       •    or                           mapped to queries on in-
       •    not                          memory RDF db
       •    some
       •    all
                                      –  E.g.
       •    min(N)                        •  forebrain < part_of some
       •    max(N)                           brain.
       •    …



                                                                        7
Initiation
 $ thea-poshj --format rdf_direct http://
purl.obolibrary.org/obo/uberon.owl

% ::: Welcome to Posh, the Prolog OWL Shell :::
% Parsed uberon.owl
? - writeln('hello world').
hello world
true.                               standard Thea query
?- subClassOf(X,Y).
X = 'http://purl.obolibrary.org/obo/UBERON_0000002',
Y = 'http://purl.obolibrary.org/obo/UBERON_0001560' ;
X = 'http://purl.obolibrary.org/obo/UBERON_0000002',
Y = 'http://purl.obolibrary.org/obo/UBERON_0005156' ;
X = 'http://purl.obolibrary.org/obo/UBERON_0000002',

               underlying ontology uses numeric IRIs
                                                          8
Querying asserted axioms
  ?- q X where X < part_of some brain.     prolog syntax
forebrain.                                 is highly configurable!
'medial forebrain bundle'.
hindbrain.
'cranial dura mater'.
                                       Posh provides configurable
brainstem.
                                       IRI <-> label translation
'nucleus of brain'.
'regional part of brain'.
'midbrain-hindbrain boundary'.
'brain blood vessel'.
'brain grey matter'.
'brain white matter'.
'brain meninx'.
'brain pia mater'.
'subventricular zone'.
'ventricular system of brain'.
'brain vasculature'.
…                                                                9
Querying inferences
                                              axioms in {}s
?- init hermit.                               sent to reasoner
?- q X where {X < part_of some brain}.
'cortical layer VI'<part_of some brain.
'commissure of inferior colliculus'<part_of some brain.
'cortical layer V'<part_of some brain.
'cingulate cortex'<part_of some brain.
'brain arachnoid mater'<part_of some brain.
'limitans nucleus'<part_of some brain.
'cortical layer II'<part_of some brain.
'brachium of inferior colliculus'<part_of some brain.
'cortical layer I'<part_of some brain.
'pontine tegmentum'<part_of some brain.
'cortical layer IV'<part_of some brain.
'cortical layer III'<part_of some brain.
'brain arachnoid mater'<part_of some brain.
--[SNIP]--

                                                           10
Mixed prolog / reasoner queries
?- q X where
  {X < neuron and X < not(part_of some brain)}.
                   open-world
?- q X where
  {X < neuron}, +{X < not(part_of some brain)}.

              mixed open/closed world
              (cf SPARQL FILTER)




                                                   11
POPL: Prolog Ontology Processing
           Language
-- rewrites expressions as if R were reflexive:
?- R some Y ===> Y or R some Y.


-- add equivalence axioms where labels closely match
?- assert(
     sameLabel(X,Y) :- label(X,XN), label(Y,YN), X=Y,
porter_stem(XN,N),porter_stem(YN,N)
  ).

?- add X==Y where sameLabel(X,Y).




                                                         12
Similar tools
•  Declarative JVM language with REPL +
   OWL API
  – Groovy
    •  El-Vira (Hoehndorf)
  – Armed Bear Common Lisp
    •  LSW (Ruttenberg)
•  OPPL
•  owl.rb (Balhoff)
•  SPARQL + various environments
                                          13
Availability
•  http://blipkit.wordpress.com/posh/

•  also distributed as part of Thea:
  – http://www.semanticweb.gr/thea/
  – (check out “posh” branch)




                                        14

Weitere ähnliche Inhalte

Ähnlich wie POSH: The Prolog OWL Shell

Charles nutter star techconf 2011 - jvm languages
Charles nutter   star techconf 2011 - jvm languagesCharles nutter   star techconf 2011 - jvm languages
Charles nutter star techconf 2011 - jvm languagesStarTech Conference
 
OOp, core language & principles
OOp, core language & principlesOOp, core language & principles
OOp, core language & principlesNhan Cao
 
OWL Full Semantics
OWL Full SemanticsOWL Full Semantics
OWL Full SemanticsJie Bao
 
Natural language processing (NLP) introduction
Natural language processing (NLP) introductionNatural language processing (NLP) introduction
Natural language processing (NLP) introductionRobert Lujo
 
Macro discussion (owled 2010)
Macro discussion (owled 2010)Macro discussion (owled 2010)
Macro discussion (owled 2010)Chris Mungall
 
From oc_filecache to a flexible and scalable OC namespace
From oc_filecache to a flexible and scalable OC namespaceFrom oc_filecache to a flexible and scalable OC namespace
From oc_filecache to a flexible and scalable OC namespaceHugo González Labrador
 
Gryphon Framework - Preliminary Results Feb-2014
Gryphon Framework - Preliminary Results Feb-2014Gryphon Framework - Preliminary Results Feb-2014
Gryphon Framework - Preliminary Results Feb-2014Adriel Café
 
cade23-schneidsut-atp4owlfull-2011
cade23-schneidsut-atp4owlfull-2011cade23-schneidsut-atp4owlfull-2011
cade23-schneidsut-atp4owlfull-2011Michael Schneider
 
Pittaro open stackloganalysis_20130416
Pittaro open stackloganalysis_20130416Pittaro open stackloganalysis_20130416
Pittaro open stackloganalysis_20130416OpenStack Foundation
 
Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Martijn Verburg
 
Natural Language Processing: Lecture 255
Natural Language Processing: Lecture 255Natural Language Processing: Lecture 255
Natural Language Processing: Lecture 255deffa5
 
Beyond JVM - YOW Melbourne 2013
Beyond JVM - YOW Melbourne 2013Beyond JVM - YOW Melbourne 2013
Beyond JVM - YOW Melbourne 2013Charles Nutter
 

Ähnlich wie POSH: The Prolog OWL Shell (20)

BT02.pptx
BT02.pptxBT02.pptx
BT02.pptx
 
Charles nutter star techconf 2011 - jvm languages
Charles nutter   star techconf 2011 - jvm languagesCharles nutter   star techconf 2011 - jvm languages
Charles nutter star techconf 2011 - jvm languages
 
OOp, core language & principles
OOp, core language & principlesOOp, core language & principles
OOp, core language & principles
 
OWL Full Semantics
OWL Full SemanticsOWL Full Semantics
OWL Full Semantics
 
Natural language processing (NLP) introduction
Natural language processing (NLP) introductionNatural language processing (NLP) introduction
Natural language processing (NLP) introduction
 
Macro discussion (owled 2010)
Macro discussion (owled 2010)Macro discussion (owled 2010)
Macro discussion (owled 2010)
 
From oc_filecache to a flexible and scalable OC namespace
From oc_filecache to a flexible and scalable OC namespaceFrom oc_filecache to a flexible and scalable OC namespace
From oc_filecache to a flexible and scalable OC namespace
 
Oop is not Dead
Oop is not DeadOop is not Dead
Oop is not Dead
 
eureka09
eureka09eureka09
eureka09
 
eureka09
eureka09eureka09
eureka09
 
NIFSTD: A Comprehensive Ontology for Neuroscience
NIFSTD: A Comprehensive Ontology for NeuroscienceNIFSTD: A Comprehensive Ontology for Neuroscience
NIFSTD: A Comprehensive Ontology for Neuroscience
 
Gryphon Framework - Preliminary Results Feb-2014
Gryphon Framework - Preliminary Results Feb-2014Gryphon Framework - Preliminary Results Feb-2014
Gryphon Framework - Preliminary Results Feb-2014
 
cade23-schneidsut-atp4owlfull-2011
cade23-schneidsut-atp4owlfull-2011cade23-schneidsut-atp4owlfull-2011
cade23-schneidsut-atp4owlfull-2011
 
Logic Programming and ILP
Logic Programming and ILPLogic Programming and ILP
Logic Programming and ILP
 
Pittaro open stackloganalysis_20130416
Pittaro open stackloganalysis_20130416Pittaro open stackloganalysis_20130416
Pittaro open stackloganalysis_20130416
 
Hadoop For OpenStack Log Analysis
Hadoop For OpenStack Log AnalysisHadoop For OpenStack Log Analysis
Hadoop For OpenStack Log Analysis
 
Yapc2012
Yapc2012Yapc2012
Yapc2012
 
Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)
 
Natural Language Processing: Lecture 255
Natural Language Processing: Lecture 255Natural Language Processing: Lecture 255
Natural Language Processing: Lecture 255
 
Beyond JVM - YOW Melbourne 2013
Beyond JVM - YOW Melbourne 2013Beyond JVM - YOW Melbourne 2013
Beyond JVM - YOW Melbourne 2013
 

Mehr von Chris Mungall

MADICES Mungall 2022.pptx
MADICES Mungall 2022.pptxMADICES Mungall 2022.pptx
MADICES Mungall 2022.pptxChris Mungall
 
Scaling up semantics; lessons learned across the life sciences
Scaling up semantics; lessons learned across the life sciencesScaling up semantics; lessons learned across the life sciences
Scaling up semantics; lessons learned across the life sciencesChris Mungall
 
LinkML Intro July 2022.pptx PLEASE VIEW THIS ON ZENODO
LinkML Intro July 2022.pptx PLEASE VIEW THIS ON ZENODOLinkML Intro July 2022.pptx PLEASE VIEW THIS ON ZENODO
LinkML Intro July 2022.pptx PLEASE VIEW THIS ON ZENODOChris Mungall
 
Ontology Access Kit_ Workshop Intro Slides.pptx
Ontology Access Kit_ Workshop Intro Slides.pptxOntology Access Kit_ Workshop Intro Slides.pptx
Ontology Access Kit_ Workshop Intro Slides.pptxChris Mungall
 
LinkML Intro (for Monarch devs)
LinkML Intro (for Monarch devs)LinkML Intro (for Monarch devs)
LinkML Intro (for Monarch devs)Chris Mungall
 
LinkML presentation to Yosemite Group
LinkML presentation to Yosemite GroupLinkML presentation to Yosemite Group
LinkML presentation to Yosemite GroupChris Mungall
 
Experiences in the biosciences with the open biological ontologies foundry an...
Experiences in the biosciences with the open biological ontologies foundry an...Experiences in the biosciences with the open biological ontologies foundry an...
Experiences in the biosciences with the open biological ontologies foundry an...Chris Mungall
 
All together now: piecing together the knowledge graph of life
All together now: piecing together the knowledge graph of lifeAll together now: piecing together the knowledge graph of life
All together now: piecing together the knowledge graph of lifeChris Mungall
 
Collaboratively Creating the Knowledge Graph of Life
Collaboratively Creating the Knowledge Graph of LifeCollaboratively Creating the Knowledge Graph of Life
Collaboratively Creating the Knowledge Graph of LifeChris Mungall
 
Representation of kidney structures in Uberon
Representation of kidney structures in UberonRepresentation of kidney structures in Uberon
Representation of kidney structures in UberonChris Mungall
 
SparqlProg (BioHackathon 2019)
SparqlProg (BioHackathon 2019)SparqlProg (BioHackathon 2019)
SparqlProg (BioHackathon 2019)Chris Mungall
 
Ontology Development Kit: Bio-Ontologies 2019
Ontology Development Kit: Bio-Ontologies 2019Ontology Development Kit: Bio-Ontologies 2019
Ontology Development Kit: Bio-Ontologies 2019Chris Mungall
 
US2TS: Reasoning over multiple open bio-ontologies to make machines and human...
US2TS: Reasoning over multiple open bio-ontologies to make machines and human...US2TS: Reasoning over multiple open bio-ontologies to make machines and human...
US2TS: Reasoning over multiple open bio-ontologies to make machines and human...Chris Mungall
 
Uberon: opening up to community contributions
Uberon: opening up to community contributionsUberon: opening up to community contributions
Uberon: opening up to community contributionsChris Mungall
 
Modeling exposure events and adverse outcome pathways using ontologies
Modeling exposure events and adverse outcome pathways using ontologiesModeling exposure events and adverse outcome pathways using ontologies
Modeling exposure events and adverse outcome pathways using ontologiesChris Mungall
 
Causal reasoning using the Relation Ontology
Causal reasoning using the Relation OntologyCausal reasoning using the Relation Ontology
Causal reasoning using the Relation OntologyChris Mungall
 
US2TS presentation on Gene Ontology
US2TS presentation on Gene OntologyUS2TS presentation on Gene Ontology
US2TS presentation on Gene OntologyChris Mungall
 
Introduction to the BioLink datamodel
Introduction to the BioLink datamodelIntroduction to the BioLink datamodel
Introduction to the BioLink datamodelChris Mungall
 
Computing on Phenotypes AMP 2015
Computing on Phenotypes AMP 2015Computing on Phenotypes AMP 2015
Computing on Phenotypes AMP 2015Chris Mungall
 

Mehr von Chris Mungall (20)

MADICES Mungall 2022.pptx
MADICES Mungall 2022.pptxMADICES Mungall 2022.pptx
MADICES Mungall 2022.pptx
 
Scaling up semantics; lessons learned across the life sciences
Scaling up semantics; lessons learned across the life sciencesScaling up semantics; lessons learned across the life sciences
Scaling up semantics; lessons learned across the life sciences
 
LinkML Intro July 2022.pptx PLEASE VIEW THIS ON ZENODO
LinkML Intro July 2022.pptx PLEASE VIEW THIS ON ZENODOLinkML Intro July 2022.pptx PLEASE VIEW THIS ON ZENODO
LinkML Intro July 2022.pptx PLEASE VIEW THIS ON ZENODO
 
Ontology Access Kit_ Workshop Intro Slides.pptx
Ontology Access Kit_ Workshop Intro Slides.pptxOntology Access Kit_ Workshop Intro Slides.pptx
Ontology Access Kit_ Workshop Intro Slides.pptx
 
LinkML Intro (for Monarch devs)
LinkML Intro (for Monarch devs)LinkML Intro (for Monarch devs)
LinkML Intro (for Monarch devs)
 
LinkML presentation to Yosemite Group
LinkML presentation to Yosemite GroupLinkML presentation to Yosemite Group
LinkML presentation to Yosemite Group
 
Experiences in the biosciences with the open biological ontologies foundry an...
Experiences in the biosciences with the open biological ontologies foundry an...Experiences in the biosciences with the open biological ontologies foundry an...
Experiences in the biosciences with the open biological ontologies foundry an...
 
All together now: piecing together the knowledge graph of life
All together now: piecing together the knowledge graph of lifeAll together now: piecing together the knowledge graph of life
All together now: piecing together the knowledge graph of life
 
Collaboratively Creating the Knowledge Graph of Life
Collaboratively Creating the Knowledge Graph of LifeCollaboratively Creating the Knowledge Graph of Life
Collaboratively Creating the Knowledge Graph of Life
 
Representation of kidney structures in Uberon
Representation of kidney structures in UberonRepresentation of kidney structures in Uberon
Representation of kidney structures in Uberon
 
SparqlProg (BioHackathon 2019)
SparqlProg (BioHackathon 2019)SparqlProg (BioHackathon 2019)
SparqlProg (BioHackathon 2019)
 
Ontology Development Kit: Bio-Ontologies 2019
Ontology Development Kit: Bio-Ontologies 2019Ontology Development Kit: Bio-Ontologies 2019
Ontology Development Kit: Bio-Ontologies 2019
 
US2TS: Reasoning over multiple open bio-ontologies to make machines and human...
US2TS: Reasoning over multiple open bio-ontologies to make machines and human...US2TS: Reasoning over multiple open bio-ontologies to make machines and human...
US2TS: Reasoning over multiple open bio-ontologies to make machines and human...
 
Uberon: opening up to community contributions
Uberon: opening up to community contributionsUberon: opening up to community contributions
Uberon: opening up to community contributions
 
Modeling exposure events and adverse outcome pathways using ontologies
Modeling exposure events and adverse outcome pathways using ontologiesModeling exposure events and adverse outcome pathways using ontologies
Modeling exposure events and adverse outcome pathways using ontologies
 
Causal reasoning using the Relation Ontology
Causal reasoning using the Relation OntologyCausal reasoning using the Relation Ontology
Causal reasoning using the Relation Ontology
 
US2TS presentation on Gene Ontology
US2TS presentation on Gene OntologyUS2TS presentation on Gene Ontology
US2TS presentation on Gene Ontology
 
Introduction to the BioLink datamodel
Introduction to the BioLink datamodelIntroduction to the BioLink datamodel
Introduction to the BioLink datamodel
 
Computing on Phenotypes AMP 2015
Computing on Phenotypes AMP 2015Computing on Phenotypes AMP 2015
Computing on Phenotypes AMP 2015
 
ENVO GSC 2015
ENVO GSC 2015ENVO GSC 2015
ENVO GSC 2015
 

Kürzlich hochgeladen

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 

Kürzlich hochgeladen (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

POSH: The Prolog OWL Shell

  • 1. POSH : The Prolog OWL Shell Chris Mungall Lawrence Berkeley Laboratory 1
  • 2. Ontology Hacking •  I’m in a hurry and I want to: – translate all “R some Y” to “(R some Y) or Y” – add an equivalence axiom for every class pair with closely matching labels – automatically extend an ontology using some tabular data files and/or relational db – iteratively refactor my ontology based on complex structural pattern matching •  What are my options? 2
  • 3. Ontology Environments •  GUI – Protégé 4 – OBO-Edit •  API – Java •  OWL API •  Jena •  Ortiz 3
  • 4. Ontology Environments •  GUI – Protégé 4 – OBO-Edit } Not powerful enough! need programmatic capabilities •  API – Java •  OWL API •  Jena } I’m in a hurry! too verbose; hard to read and write; •  Ortiz 4
  • 5. Where is the Perl of OWL? •  Perl is remarkably good for slicing, dicing, twisting, wringing, smoothing, summarizing, and otherwise mangling text… •  Perl programs are easy to write and fast to develop… •  Perl is a good prototyping language… – Lincoln Stein, How Perl Saved the Human genome Project, Dr Dobbs Journal, 1996, http:// drdobbs.com/184410424 •  What’s a good way for slicing, dicing, mangling and hacking axioms and expressions? 5
  • 6. Pathologically Obfuscated Semantic Hacking (POSH) •  What is it? –  Command line interface to Thea (Vassilidas, OWLED2009) •  Features –  OWL2 Manchester-like syntax –  Command Line (REPL) –  Declarative •  but with full ‘impure’ programmatic capabilities •  Turing complete –  Succinct –  Configurable and extendable –  Behind the scenes label<->IRI translation 6
  • 7. Posh Lightning summary •  Infix predicates •  Prolog syntax –  Axiom predicate shortcuts: •  < (SubClassOf) –  variable leading upper case •  == (EquivalentClasses) •  (or use OWL2 syntax) –  Expression operators •  Prolog queries •  and –  Predicates dynamically •  or mapped to queries on in- •  not memory RDF db •  some •  all –  E.g. •  min(N) •  forebrain < part_of some •  max(N) brain. •  … 7
  • 8. Initiation $ thea-poshj --format rdf_direct http:// purl.obolibrary.org/obo/uberon.owl % ::: Welcome to Posh, the Prolog OWL Shell ::: % Parsed uberon.owl ? - writeln('hello world'). hello world true. standard Thea query ?- subClassOf(X,Y). X = 'http://purl.obolibrary.org/obo/UBERON_0000002', Y = 'http://purl.obolibrary.org/obo/UBERON_0001560' ; X = 'http://purl.obolibrary.org/obo/UBERON_0000002', Y = 'http://purl.obolibrary.org/obo/UBERON_0005156' ; X = 'http://purl.obolibrary.org/obo/UBERON_0000002', underlying ontology uses numeric IRIs 8
  • 9. Querying asserted axioms ?- q X where X < part_of some brain. prolog syntax forebrain. is highly configurable! 'medial forebrain bundle'. hindbrain. 'cranial dura mater'. Posh provides configurable brainstem. IRI <-> label translation 'nucleus of brain'. 'regional part of brain'. 'midbrain-hindbrain boundary'. 'brain blood vessel'. 'brain grey matter'. 'brain white matter'. 'brain meninx'. 'brain pia mater'. 'subventricular zone'. 'ventricular system of brain'. 'brain vasculature'. … 9
  • 10. Querying inferences axioms in {}s ?- init hermit. sent to reasoner ?- q X where {X < part_of some brain}. 'cortical layer VI'<part_of some brain. 'commissure of inferior colliculus'<part_of some brain. 'cortical layer V'<part_of some brain. 'cingulate cortex'<part_of some brain. 'brain arachnoid mater'<part_of some brain. 'limitans nucleus'<part_of some brain. 'cortical layer II'<part_of some brain. 'brachium of inferior colliculus'<part_of some brain. 'cortical layer I'<part_of some brain. 'pontine tegmentum'<part_of some brain. 'cortical layer IV'<part_of some brain. 'cortical layer III'<part_of some brain. 'brain arachnoid mater'<part_of some brain. --[SNIP]-- 10
  • 11. Mixed prolog / reasoner queries ?- q X where {X < neuron and X < not(part_of some brain)}. open-world ?- q X where {X < neuron}, +{X < not(part_of some brain)}. mixed open/closed world (cf SPARQL FILTER) 11
  • 12. POPL: Prolog Ontology Processing Language -- rewrites expressions as if R were reflexive: ?- R some Y ===> Y or R some Y. -- add equivalence axioms where labels closely match ?- assert( sameLabel(X,Y) :- label(X,XN), label(Y,YN), X=Y, porter_stem(XN,N),porter_stem(YN,N) ). ?- add X==Y where sameLabel(X,Y). 12
  • 13. Similar tools •  Declarative JVM language with REPL + OWL API – Groovy •  El-Vira (Hoehndorf) – Armed Bear Common Lisp •  LSW (Ruttenberg) •  OPPL •  owl.rb (Balhoff) •  SPARQL + various environments 13
  • 14. Availability •  http://blipkit.wordpress.com/posh/ •  also distributed as part of Thea: – http://www.semanticweb.gr/thea/ – (check out “posh” branch) 14