JOT: a Protg Scripting Environment for Creating and Managing - - PowerPoint PPT Presentation

jot a prot g scripting environment for creating and
SMART_READER_LITE
LIVE PREVIEW

JOT: a Protg Scripting Environment for Creating and Managing - - PowerPoint PPT Presentation

JOT: a Protg Scripting Environment for Creating and Managing Ontologies Olivier Dameron SMI - Stanford University Protg Conference 2004 Context / Problems 1. Repetitive tasks ex: creation of lateralized concepts and their


slide-1
SLIDE 1

JOT: a Protégé Scripting Environment for Creating and Managing Ontologies

Olivier Dameron

Protégé Conference 2004

SMI - Stanford University

slide-2
SLIDE 2

Context / Problems

  • 1. Repetitive tasks

ex: creation of lateralized concepts and their relationships

  • 2. Enumerations

ex: Ribs

  • 3. Dependancies between concepts or

relationships ex: Thorax / Skin of Thorax

  • 4. Ontology maintenance

require adhoc detection and fixing

slide-3
SLIDE 3

Objective:

Scripting environment for Protégé

  • 1. Create macros
  • 1. repetitive and error-prone tasks
  • 2. formalism for handling intrinsic complexity
  • 3. towards more abstraction
  • 2. Code reuse
  • 3. User-friendly and powerfull
  • 1. simple and intuitive syntax
  • 2. well formalised
slide-4
SLIDE 4

Architecture

  • 1. Principle
  • 1. Python interpreter in Java: Jython
  • 2. Thread (share address space with Protégé)
  • 2. Shared variable: kb
  • 3. Compatibility with frames and OWL
  • 1. instance of KnowledgeBase (Frames)
  • 2. instance of OWLKnowledgeBase (OWL)
slide-5
SLIDE 5

Architecture

slide-6
SLIDE 6

Architecture

  • 1. Python Code
slide-7
SLIDE 7

Architecture

  • 1. Python Code
  • 2. Python Console
slide-8
SLIDE 8

Architecture

  • 1. Python Code
  • 2. Python Console
  • 3. Jython
slide-9
SLIDE 9

Architecture

  • 1. Python Code
  • 2. Python Console
  • 3. Jython

JOT

slide-10
SLIDE 10

Architecture

  • 1. Python Code
  • 2. Python Console
  • 3. Jython
  • 4. Protégé

JOT

slide-11
SLIDE 11

Architecture

  • 1. Python Code
  • 2. Python Console
  • 3. Jython
  • 4. Protégé

kb

JOT

slide-12
SLIDE 12

Frames

  • 1. Get frame's attributes
  • 2. Create frame
  • 3. Create instances
slide-13
SLIDE 13

Frames

slide-14
SLIDE 14

Frames

slide-15
SLIDE 15

Frames

slide-16
SLIDE 16

Frames

slide-17
SLIDE 17

Frames

slide-18
SLIDE 18

OWL

  • 1. Get classes' attributes
  • 2. Create class
  • 3. Create relations
slide-19
SLIDE 19

OWL

slide-20
SLIDE 20

OWL

slide-21
SLIDE 21

OWL

slide-22
SLIDE 22

OWL

slide-23
SLIDE 23

Repetitive tasks

Creation of a lateralized anatomical concept: Hand

  • create Hand
  • create subconcepts LeftHand and

RightHand

  • define LeftHand = Hand on the LeftSide
  • Hand: either LeftHand or RightHand
  • LeftHand and RightHand are disjoint
slide-24
SLIDE 24

Repetitive tasks

slide-25
SLIDE 25

Repetitive tasks

slide-26
SLIDE 26

Repetitive tasks

slide-27
SLIDE 27

Repetitive tasks

slide-28
SLIDE 28

Repetitive tasks

slide-29
SLIDE 29

Repetitive tasks

createLateralizedConcept(“Hand”, “Anat”):

c = createConcept(“Hand”, “AnatomicalConcept”) lc = createConcept(“LeftHand”, “Hand”) rc = createConcept(“RightHand”, “Hand”) define c = lc or rc define lc = c and LeftAnatomicalConcept define rc = c and RightAnatomicalConcept make lc and rc disjoint

slide-30
SLIDE 30

Repetitive tasks

slide-31
SLIDE 31

Repetitive tasks

slide-32
SLIDE 32

Repetitive tasks

slide-33
SLIDE 33

Repetitive tasks

After classification:

  • LeftThumb
  • LeftIndex
  • LeftMiddleFinger
  • LeftRingFinger
  • LeftLittleFinger

... are LeftFinger

slide-34
SLIDE 34

Enumerations

  • 1. Vertebrae
  • 2. Ribs (lateralized !)
  • 3. Muscles
slide-35
SLIDE 35

Enumerations

slide-36
SLIDE 36

Enumerations

slide-37
SLIDE 37

Enumerations

Coverage (automatically generated)

slide-38
SLIDE 38

Dependencies

  • 1. Ex: Wall of Heart

Heart = WallOfHeart, Septum, 4 cavities Heart = LeftAtrium, RightAtrium, LeftVentricle, RightVentricle

  • 2. WallOfLeftAtrium

constitutionalPartOf LeftAtrium regionalPartOf WallOfHeart

  • 3. Epicardium, Myocardium, Endocardium

constitutionalPartOf WallOfLeftAtrium regionalPartOf Epicardium

slide-39
SLIDE 39

Dependencies

16 composed concepts 32 relations of direct composition You are lucky if you don't forget one If you do, enjoy the debuging Not scalable

no neighborhood relationships {anterior, posterior, lateral} + {inferior, superior} parts of LeftAtrium

slide-40
SLIDE 40

Ontology maintenance

  • 1. Make specific functions on the fly
  • 2. Reuse functions
  • 3. Dynamically insert / remove java listeners
  • 4. Take advantage of all the existing Java

libraries (web services, ...)

slide-41
SLIDE 41

Lessons learned

JOT is usefull :-)

higher level functions from extensional to intensional description

Domain-independant but language-specific macros Domain-dependant but language independent functions (reuse functions from 1 according to the language)

slide-42
SLIDE 42

Conclusion

  • 1. Direct calls to the Protégé API => no

limitations

  • 2. Jython => power of Python + Java
  • 3. Code reuse allow to hide the low-level

Protégé API