Introduction to SWRL

This slide explains what is SWRL and why we need it. It also shows how we write SWRL rule in Protege. Though the protege 3.2 editor shown in the slide, it can be used similarly in protege 4.0 as well ( View -> Ontology View -> Rules ). Below is a line that explains limitation of OWL and suggests use of rules to in ontology :

In OWL it is not possible to establish that a person is the boss of a secretary, only that a person is a boss.

SWRL Tips:
  • A SWRL rule contains an antecedent part, which is referred to as the body, and a consequent part, which is referred to as the head
  • Both the body and head consist of positive conjunctions of atoms. SWRL does not support negated atoms or disjunction.  Thus, a SWRL rule may be read as meaning that if all the atoms in the antecedent are true, then the consequent must also be true.
  • How to write rule like :  Prop1(?x,?y) V Prop2(?y,?x) -> Prop3(?y,?x) ?. Answer: As disjunction is not allowed in SWRL, we can break it down into two sub-rules. R1: Prop1(?x,?y) -> Prop3(?y,?x) and R2: Prop2(?y,?x) -> Prop3(?y,?x)
SWRL Tutorial 01

0 comments:

Post a Comment