Difference between revisions of "Applying SWRL, DL Query and SPARQL to your ontology"

From its-wiki.no
Jump to: navigation, search
 
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Lecture
 
{{Lecture
 
|Course=UNIK4710, UNIK9710,
 
|Course=UNIK4710, UNIK9710,
|Title=Applying SWRL to your ontology
+
|Title=Applying SWRL, DL Query or SPARQL to your ontology
|Lecture date=2013/03/01
+
|Lecture date=2014/04/23
 
|time=09:15h
 
|time=09:15h
|Lecturer=Josef.Noll,
+
|Lecturer=Josef Noll,
|Objective=Representing your scenario into a set of rules, and converting the rules to SWRL rules
+
|Objective=Representing your scenario into a set of rules, and converting the rules to SPARQL queries or SWRL rules
|Learning outcomes=Having visited the course, you will  
+
|Learning outcomes=Having visited the lecture, you will  
* Understand how to describe a scenario through rules
+
* Have understood the principle of using SWRL (Protege 3.x) or Query (Protege 4.x)
* Have identified the "input"....
+
* Have learned how to apply a SPARQL query
 
* Have learned how to create a SWRL rule
 
* Have learned how to create a SWRL rule
 
|Pensum (read before)=Formulate a set of rules in a linguistic way
 
|Pensum (read before)=Formulate a set of rules in a linguistic way
 
* Understand and explain the components of a SWRL rule
 
* Understand and explain the components of a SWRL rule
* Run example from http://wiki.unik.no/index.php/Courses/UNIK4710
+
* Run example
** Scenario (a) - course members have access to course documents
+
** Installation and Rule execution: http://wiki.unik.no/index.php/Courses/4710Access
+
** based on example from Frederick, enhanced by Mushfiq: Attach:CourseOntologyFrederik_v2.zip
+
 
|References (further info)=References:
 
|References (further info)=References:
 
* OWL and Rules: http://semantic-web-book.org/w/images/5/5e/KI09-OWL-Rules-2.pdf
 
* OWL and Rules: http://semantic-web-book.org/w/images/5/5e/KI09-OWL-Rules-2.pdf
Line 22: Line 19:
 
* SWRL Tutorial: http://protege.cim3.net/cgi-bin/wiki.pl?SQWRL  
 
* SWRL Tutorial: http://protege.cim3.net/cgi-bin/wiki.pl?SQWRL  
 
* Book: See 2012/02/17 and 2012/03/09 "Other Info".
 
* Book: See 2012/02/17 and 2012/03/09 "Other Info".
|Keywords=SWRL, RulesML, OWL-DL, Jess
+
|Keywords=SWRL, RulesML, OWL-DL, Jess, DL Tab, SPARQL,
 
}}
 
}}
 
= Test yourself, answer these questions =
 
= Test yourself, answer these questions =
Line 31: Line 28:
 
Try to understand the examples.  
 
Try to understand the examples.  
  
= Recall from last lecture =
+
= Expected progress so far  =
* Discussion on short-term (decisions) versus long-term (knowledge-creation)
+
* Establish a scenario described by use case - ''done''
 +
* Have a verbal expression of queries  - ''done''
 +
* Have taken a decision to work with
 +
** Protégé 3.5 with SWRL or SQWRL or
 +
** Protégé 4.3 with DL Query og SPARQL
 +
 
 +
Working on
 +
* Apply SWRL or SPARQL to your ontologies
 +
 
 +
* Discussion on short-term (decisions) versus long-term (knowledge-creation). Typical time frames for knowledge-update are 1/hour or 1/day, whereas decisions are taken about 10/min or 1/min (see slide 3-5 in [[Media:UNIK4710-L10-v14.pdf]])
 
* Discussion on "history" of decisions, to be taken into consideration through "weighted context"
 
* Discussion on "history" of decisions, to be taken into consideration through "weighted context"
  
 +
Upcoming
 +
* Interfaces to programmes (APIs) to work with your knowledge base. Typical APIs are OWL, Protege, Jena and SPARQL
 +
* Programming your scenario
 +
* Presentation of your integrated solution
 
= Lecture notes =
 
= Lecture notes =
 +
== Lecture notes 2014==
 +
* Notes: [[Media:UNIK4710-L10-v14.pdf]]
 +
* Video: mms://lux.unik.no/UNIK4710-JN/2014/UNIK-20140404.wmv
 +
* Presentation from Andreas: https://docs.google.com/file/d/0Bym8iViXFpvkMGwyaTE2Z0ZXeXM/edit?hl=en-GB&forcehl=1
 
== Lecture notes 2013==
 
== Lecture notes 2013==
 
* Notes: [[Media:UNIK4710-L7-v13.pdf]], [[Media:UNIK4710-L7-v13-part2.pdf]]
 
* Notes: [[Media:UNIK4710-L7-v13.pdf]], [[Media:UNIK4710-L7-v13-part2.pdf]]
Line 41: Line 55:
 
== Lecture notes 2012==
 
== Lecture notes 2012==
 
* Notes: [[Media:UNIK4710-L7-v12.pdf]]
 
* Notes: [[Media:UNIK4710-L7-v12.pdf]]
* Video: mms://lux.unik.no/UNIK4710-JN/2012/UNIK-20120309.wmv
+
 
  
 
= Presentations =
 
= Presentations =

Latest revision as of 19:00, 18 January 2015

Applying SWRL, DL Query and SPARQL to your ontology

Course UNIK4710, UNIK9710
Title Applying SWRL, DL Query or SPARQL to your ontology
Lecture date 2014/04/23 09:15h
presented by Josef Noll
Objective Representing your scenario into a set of rules, and converting the rules to SPARQL queries or SWRL rules
Learning outcomes Having visited the lecture, you will
  • Have understood the principle of using SWRL (Protege 3.x) or Query (Protege 4.x)
  • Have learned how to apply a SPARQL query
  • Have learned how to create a SWRL rule
Pensum (read before) Formulate a set of rules in a linguistic way
  • Understand and explain the components of a SWRL rule
  • Run example
References (further info) References:
Keywords SWRL, RulesML, OWL-DL, Jess, DL Tab, SPARQL

this page was created by Special:FormEdit/Lecture, and can be edited by Special:FormEdit/Lecture/Applying SWRL, DL Query and SPARQL to your ontology.


Test yourself, answer these questions

Try to understand the examples.

Expected progress so far

  • Establish a scenario described by use case - done
  • Have a verbal expression of queries - done
  • Have taken a decision to work with
    • Protégé 3.5 with SWRL or SQWRL or
    • Protégé 4.3 with DL Query og SPARQL

Working on

  • Apply SWRL or SPARQL to your ontologies
  • Discussion on short-term (decisions) versus long-term (knowledge-creation). Typical time frames for knowledge-update are 1/hour or 1/day, whereas decisions are taken about 10/min or 1/min (see slide 3-5 in Media:UNIK4710-L10-v14.pdf)
  • Discussion on "history" of decisions, to be taken into consideration through "weighted context"

Upcoming

  • Interfaces to programmes (APIs) to work with your knowledge base. Typical APIs are OWL, Protege, Jena and SPARQL
  • Programming your scenario
  • Presentation of your integrated solution

Lecture notes

Lecture notes 2014

Lecture notes 2013

Lecture notes 2012


Presentations

Presentations 2012

Other info

SWRL examples

  • Is the person running?
Person(?person) ∧ hasSpeed(?person, ?speed)  ∧ swrlb:greaterThanOrEqual(?speed, 10) →  hasStatus(?person, running) 
  • Is Susana walking?
Person(Susana) ∧ hasSpeed(Susana, ?speed)  ∧ swrlb:greaterThanOrEqual(?speed, 1) →  hasStatus(Susana, walking) 
  • which songs the person likes
Person(?person) ∧ hasPreference(?person, ?prefer) ∧ Music(?music) ∧ hasStyle(?music, ?prefer) →  like(?person, ?music)  
  • LowRisk state range for the persons who have a passive action and a heart rate between 81 – 120
Person(?p) ∧ LowRiskState(?n) ∧ Passive(?y) ∧ hasAction(?x, ?y) ∧ hasHeartRateOf(?x, ?z)∧ swrlb:greatherThanOrEqual(?z, 81) 
∧ swrlb:lessThanOrEqual(?z, 120) →  hasHealthCondition(?x, ?n)

Ontology examples

RDF examples