Difference between revisions of "Prepare for Reasoning with SWRL"
Josef.Noll (Talk | contribs) |
Josef.Noll (Talk | contribs) |
||
Line 2: | Line 2: | ||
|Course=UNIK4710, UNIK9710 | |Course=UNIK4710, UNIK9710 | ||
|Title=Prepare for Reasoning with SWRL | |Title=Prepare for Reasoning with SWRL | ||
− | |Lecture date= | + | |Lecture date=2015/04/03 |
|time=09:15h | |time=09:15h | ||
− | |Lecturer=Josef Noll, | + | |Lecturer=Josef Noll, |
|Objective=Learn how to use SPQRL and SWRL | |Objective=Learn how to use SPQRL and SWRL | ||
|Learning outcomes=having joined this lecture, you will be able | |Learning outcomes=having joined this lecture, you will be able |
Latest revision as of 18:57, 18 January 2015
Wiki for ITS | ||||||
---|---|---|---|---|---|---|
|
![]() |
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
|
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
- Notes: Media:UNIK4710-L6-v12.pdf
Presentations
Presentations 2012
Presentations 2013
- 'Protégé: SWRL and SQWRL' by Susana, Media:UNIK4710-SWRL_Presentation.ppt, Media:UNIK4710-SWRL_Presentation.pdf
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?
- 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
- 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
⌘ Displaying Results
⌘ Displaying Results: SWRL
⌘ Displaying Results: SQWRL
⌘ Protege Rules - Examples
- Pizza Example: Media:pizza_SWRL_SQWRL.zip
- Student-centric learning: http://wiki.unik.no/index.php/Courses/UNIK4710; download Scenario: Student-centric learning by Maurice (.owl.zip)
- Ontology Example:Media:Ontology_SWRL_SQWRL.zip
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.