SlideShare a Scribd company logo
1 of 14
Download to read offline
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

More Related Content

Similar to 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
 

Similar to 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
 
Hadoop For OpenStack Log Analysis
Hadoop For OpenStack Log AnalysisHadoop For OpenStack Log Analysis
Hadoop For OpenStack Log Analysis
 
Pittaro open stackloganalysis_20130416
Pittaro open stackloganalysis_20130416Pittaro open stackloganalysis_20130416
Pittaro open stackloganalysis_20130416
 
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
 

More from 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
 

More from 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
 

Recently uploaded

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Recently uploaded (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

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