Policies and Semantic Web Rules in Practise

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

Policies and Semantic Web Rules in Practise

Course UNIK4710, UNIK9710
Title Policies and Semantic Web Rules in Practise
Lecture date 2015/04/17
presented by Josef.Noll
Objective During this lecture we will discuss the important requirements in the semantic web services context, focusing on policies.
Learning outcomes During this lecture you will have your own rules defined in your ontologies. You also know the difference between the outcome of a semantic rule and the outcome of a query:
  • the outcome of a rule is new knowledge, which can be feeded back into the ontology
  • the outcome of a query is a list of values, which can be used in other programs
Pensum (read before)
References (further info) References:
Keywords policy languages, SWRL, Policies, Rules, Query

this page was created by Special:FormEdit/Lecture, and can be edited by Special:FormEdit/Lecture/Policies and Semantic Web Rules in Practise.


Test yourself, answer these questions

  • Try to understand the examples: See "References".
  • Try to implement a counter: See "Adding amounts".

Lecture notes

Lecture notes 2014

Lecture notes 2013

Lecture notes 2012

Presentations

Presentations 2013

Good presentation

Other Info

Title
Running an example: Rules for measures
Author
Josef Noll
Footer
Policies and Semantic Web Rules in Practise
Subfooter
UNIK4710/UNIK9710


⌘ Ontology

⌘ Rules for measures

  • Have owl class called Salary with properties hasCurrency and hasAmount,
Person(?p) ^ hasMinSalary(?p, ?s) ^ hasAmount(?s, ?a) ^ swrlb:greaterThan(?a, 10000) -> query:select(?p)
  • Creating a query to get information out of my ontology:

Person -> Instance: Arne -> hasMinSalary -> has value (15000)

Person(?x) ^ hasMinSalary(?x,?p) ^ hasAmount(?p,?a) ^ swrlb:greaterThan(?a,90) -> sqwrl:slect(?x,?a)

⌘ Example

Person(?p) ^ hasAge(?p, ?age) ^ swrlb:greaterThan(?age, 17) -> Adult(?p)   

Can be easily turned in to a SQWRL query by replacing its consequent:

Person(?p) ^ hasAge(?p, ?age) ^ swrlb:greaterThan(?age, 17) -> sqwrl:select(?p, ?age)    

Another alternative is to simply add a sqwrl:select clause at the end of a rule:

Person(?p) ^ hasAge(?p, ?age) ^ swrlb:greaterThan(?age, 17) -> Adult(?p) ^ sqwrl:select(?p, ?age)

⌘ Adding amounts

how do I formulate that

  • Person listens to a song -> count+1 (of that person listening to the song)

⌘ Protége 3.x versus 4.x

by Martin

Two different modeling paradimgs:

  • Protege 3.x using OWL 1.0
  • Protege 4.x using Frames

What we want to use depends on the need of our ontology

⌘ Similarities

Same structure:

  • Classes (collection of instances)
  • Properties (describes attributes of classes and relationships)
  • Individuals

The difference lies within the semantics….

⌘ Differences

OWL 1.0 (Protege 3.x)

  • Objects with same name can be the same thing
  • Open World Assumption (everything is ALLOWED until otherwise specified)
  • Can contain instances of all kinds of interpretations
  • Statements about classes can be both must and necessary
  • Different reasoner
  • SWRL Query language

Frames, OWL 2.0 (Protege 4.x)

  • Objects with same name are assumed to be different
  • Closed World Assumption (everything is PROHIBITED unitil otherwise specified)
  • Can only contain instances which are explicitly specified
  • Statements about classes goes for all children (only must)
  • Logical query language
  • More property characteristics

⌘ Strengths of OWL 1.0/Protége 3.x

  • Allowing inferred subclasses and type information
  • Reducing number of facts we need to know before making complex expression (more freedom)
  • Apply standard set of operations on classes
  • Transitive properties

⌘ Strenghts of OWL 2.0/Protége 4.x

  • Supports metamodeling
  • Classes may be used as property values
  • Default reasoning (defaults are used to fill partial knowledge)
  • User defined data types