Prepare for Reasoning with SWRL

From its-wiki.no
Jump to: navigation, search

Prepare for Reasoning with SWRL

Course UNIK4710, UNIK9710
Title Prepare for Reasoning with SWRL
Lecture date 2015/04/03 09:15h
presented by Josef Noll
Objective Learn how to use SPQRL and SWRL
Learning outcomes having joined this lecture, you will be able
  • to formulate your rules in a "human understandable language".
  • to know how to add SWRL to your Protege 3.5 (unsure about the status in Protege 4.3)
  • to see one example of a SWRL rule
Pensum (read before) Read before:
References (further info) References:
Keywords Protege, SPARQL, SWRL, Rules, Reasoning, Open world assumption, Closed world assumption

this page was created by Special:FormEdit/Lecture, and can be edited by Special:FormEdit/Lecture/Prepare for Reasoning with SWRL.


This lecture was originally prepared by Susana Rodriguez de Novoa. Having moved to Protege 4.x, we have not seen how to apply semantic web rules (SWRL) or semantic web rule queries (SQWRL).

Done prior to the lecture

  • Create your ontology in Protege 4.3 (or Web Protege)
  • have a simple ontology ready with a SPARQL query
  • formulate your real query in words and tell what you would expect

Test yourself, answer these questions

  • What is SWRL?
  • How many Atom types are provided by SWRL?
  • What is a Class atom? What is an Individual Property atom?
  • Does SWRL adopt the Open World Assumption?
  • Does SWRL support OWL Full? and RDF?

(Revisit the "rules" for the ontologies from everyone)

Lecture notes

Lecture notes 2014

Lecture notes 2013

Lecture notes 2012

Presentations

Presentations 2012

Presentations 2013

Other Info

Title
Prepare for Reasoning with SWRL
Author
Susana R. de Novoa
Footer
Prepare for Reasoning with SWRL
Subfooter
UNIK4710/UNIK9710


⌘ What is SWRL?

Rules and Ontologies
  • SWRL is an acronym for Semantic Web Rule Language.
  • SWRL is intended to be the rule language of the Semantic Web.
  • All rules are expressed in terms of OWL concepts (classes, properties, individuals).
  • Ontology languages do not offer the expressiveness we want → Rules do it well.

⌘ What is Jess?

  • Jess system consists of a rule base, fact base, and an execution engine.
  • Has been used in Protégé-based tools, e.g., SWRLJessTab, SweetJess, JessTab.
  • Download Jess: http://herzberg.ca.sandia.gov/
  • Install Jess:
    • Unzip Jess70p2.zip
    • Copy Jess70p2\Jess70p2\lib\jess.jar to
    • [Protégé install Folder]/plugins/edu.stanford.smi.protegex.owl/

⌘ SWRL Rules

Rule
  • Contains an antecedent part(body), and a consequent (head).
  • The body and head consist of positive conjunctions of atoms: Atom ^ Atom … → Atom ^ Atom ….
  • An atom is an expression of the form: P(arg1 arg2,...)
    • P is a predicate symbol (classes, properties...)
    • Arguments of the expression: arg1, arg2,… (individuals, data values or variables)

⌘ SWRL Atoms

  • Class Atom: Consists of an OWL named class or class expression and a single argument representing an OWL individual. Person(?p)
  • Individual Property atoms: Consists of an OWL object property and two arguments representing OWL individuals. hasBrother(?x, ?y)
  • Data Valued Property atoms: A data valued property atom consists of an OWL data property and two arguments ( OWL individual , data value). hasAge(?x, ?age)
  • Different & Same Individuals atoms: SWRL supports sameAs and differentFrom atoms to determine if individuals refer to the same underlying individual or are distinct, and can use owl:sameAs, owl:allDifferents. sameAs(?x, ?y)
  • Built-in atoms: A built-in is a predicate that takes one or more arguments and evaluates to true if the arguments satisfy the predicate. swrlb:greaterThan(?age, 17)  

⌘ SQWRL

  • A rule antecedent can be viewed as a pattern matching specification, i.e., a query
  • With built-ins, language compliant query extensions are possible.

swrlq:select(?p) swrlq:orderBy(?age)

⌘ Creating Rules

Creating Rules

⌘ Displaying Results

⌘ Displaying Results: SWRL

SWRL Tab

⌘ Displaying Results: SQWRL

SQWRL Tab

⌘ Protege Rules - Examples

In the student-centric learning Maurice developed an ontology providing students just the content they need in a given situation. Focus was here on the communication, e.g. which devices the user had, what kind of bandwidth, in what environment he was listening to the course. We are still looking for tools allowing the user to judge himself, and adapt the course content to his needs.