Algernon Tutorial 1.g
Simple Queries
previous next
These exercises and examples use the newspaper project included
in the examples folder of your Protege installation.
Simple queries
Start Protege, go to the Algernon tab, type these into the Algernon input box and press the Ask button:
- ((:DIRECT-SUBCLASS Author ?x)) Returns 4 bindings for ?x
Note: :DIRECT-SUBCLASS is an Algernon macro, not the similarly-named Protege slot.
- Clear the variable list first, then Ask:
((:DIRECT-SUBCLASS Author ?x)(:INSTANCE ?x ?y)) Returns 9 binding lists.
- Clear the variable list, then Ask:
((:DIRECT-SUBCLASS Author ?x)(:INSTANCE ?x ?y)(name ?y ?name)) Returns only 7 binding lists. Why?
- Clear the variable list, then Ask:
((:INSTANCE :THING ?x)) Returns 181 bindings for ?x
- Look at the newspaper class hierarchy and make up your own query using :DIRECT-SUBCLASS,
:DIRECT-SUPERCLASS, :INSTANCE and the slots of the different frames.
- Bonus question: Which design decisions in the Newspaper ontology complicate the task
of writing general queries against this KB?
Related links
previous next
Author: Micheal Hewett
Email: mhewett@users.sf.net
Last Updated: Monday, June 06, 2005