Running an example: Rules for measures

Josef Noll

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