Date: 2011-05-15 16:57:25
From: volivardia@centauritech.com
Hello, I?m new with Owlim and I?m trying to do some inference tests with
reasoning but its not working.  Here is the problem I want to solve with the
reasoner:
I have a group of mothers and their sons and I wanto to infer who of them
are siblings.
I?m using protege to edit the ontology.
My only entity is "Person"
My object properties are:
- "isMotherOf" - Asserted
- "isChidOf" - inferred by inverse property
- "isSiblingOf" - Have Sparql Rule for Inferring it.
My Sparql Rule:
"isMotherOf(?z,?x), isMotherOf(?z,?y), DifferentFrom(?x,?y) ->
isSiblingOf(?x,?y)"
In the ontology I use "AllDifferent" to say that all the individuals are
different (I mean including all individuales inside AllDifferent).
I tested it with pellet reasoner in protege and it worked fine, but when I
try to implement with Owlim it doesn't show the siblings.  I know that owlim
is reading the ontology because in workbench I can query the "isChildOf"
property and in the section of Types I can see the "siblingOf" property but
is not assigned to anyone.
Here is the Repository template:
#
# Sesame configuration template for a owlim repository
#
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rep: <http://www.openrdf.org/config/repository#>.
@prefix sr: <http://www.openrdf.org/config/repository/sail#>.
@prefix sail: <http://www.openrdf.org/config/sail#>.
@prefix owlim: <http://www.ontotext.com/trree/owlim#>.
[] a rep:Repository ;
rep:repositoryID "{%Repository ID|bigowlimTest%}" ;
rdfs:label "{%Repository title|BigOWLIM Test store%}" ;
rep:repositoryImpl [
rep:repositoryType "openrdf:SailRepository" ;
sr:sailImpl [
sail:sailType "owlim:Sail" ;
owlim:ruleset "{%Set of rules|owl-horst-optimized%}" ;
owlim:storage-folder "{%Storage folder|owlimTest-storage%}" ;
owlim:base-URL "http://www.mycompany.com/ontologies/family.owl#" ;
owlim:entity-index-size "{%entity index size|200000%}" ;
owlim:repository-type "file-repository" ;
owlim:imports "C:/SemVOM/Ontologies/OntologyAllDifferent3.owl.rdfs" ;
owlim:defaultNS "http://www.mycomany.com/ontologies/family.owl#"
]
].
Regards
-- 
*Virgilio Olivard?a*

asked 03 Apr '13, 06:23

Discussion-Board-Archive's gravatar image

Discussion-B...
6.1k138156216
accept rate: 30%


Date: 2011-05-17 12:08:44
From: barry.bishop@ontotext.com
Hello Virgilio,
OWLIM does not support SWRL, but does have enough expressivity for the 
sibling rule you want to define. You just have to write it in a 
different format, i.e. the PIE format as I described in my last email.
Actually, defining 'uncle' as a property chain is a common example for 
OWL2 reasoning:
http://example.com#uncle owl:propertyChainAxiom( 
http://example.com#parent http://example.com#brother )
However, this doesn't help you if it is hard to define 
sibling/brother/sister in the first place. Unfortunately, I don't know 
how to do this without creating a custom rule. (If anyone else on the 
mailing list knows a way to do this using the semantics of OWL2-RL then 
I would love to know.)
The only safe way is to explicitly assert the brother/sister 
relationships, which is what you were trying to avoid doing in the first 
place.
By the way, in case it helps, childOf is not the inverse of motherOf. 
Better to say that motherOf and fatherOf are sub properties of parentOf, 
where childOf is an inverse of parentOf.
You could do something similar with daughterOf and sonOf being sub 
properties of childOf.
Best,
barry
link

answered 03 Apr '13, 06:23

Discussion-Board-Archive's gravatar image

Discussion-B...
6.1k138156216
accept rate: 30%

Date: 2011-05-16 18:04:53
From: barry.bishop@ontotext.com
Hello Virgilio,
There are a number of topics involved here, firstly, in order to 
implement the 'SPARQL Rule':
"isMotherOf(?z,?x), isMotherOf(?z,?y), DifferentFrom(?x,?y) -> 
isSiblingOf(?x,?y)"
you would need to create a custom rule-set that includes it. This needs 
to be created in the OWLIM rule format, so it would look something like 
this:
Id: sibling_rule
m <http://example.com#mother> c1
m <http://example.com#mother> c2  [Constraint c1 != c2]
------------------
c1 <http://example.com#sibling> c2
You would also need to explicitly state that:
http://example.com#sibling rdf:type owl:SymmetricProperty
Alternatively, if you used the owl2-rl ruleset, you could define 
'sibling' as a property chain, although this would lead to the inference 
that every child is a sibling of itself. This could be filtered out at 
query time, although is a little bit of an annoyance. The RDF to define 
this property chain would like something like this (in Turtle syntax):
http://example.com#sibling owl:propertyChainAxiom( 
http://example.com#mother http://example.com#child )
Then a query would just need to filter out siblings of self, e.g.
SELECT * WHERE {
?c1 <http://example.com#sibling> ?c2 .
FILTER ( ?c1 != ?c2 )
}
I hope this helps,
barry
link

answered 03 Apr '13, 06:23

Discussion-Board-Archive's gravatar image

Discussion-B...
6.1k138156216
accept rate: 30%

From: volivardia@centauritech.com
Thanks for your answer, I used the wrong word, I meaned "SWRL rule" instead
of "SPARQL Rule".  You can see that I used SWRL format.
For using SWRL I also have to configure the rule set?
I already tried to do the property chain, the problem is that if I try to
use the sibling property to infer other relationships like Uncles it gets
very complicated to filter.
-- 
*Virgilio Olivard?a*
link

answered 03 Apr '13, 06:23

Discussion-Board-Archive's gravatar image

Discussion-B...
6.1k138156216
accept rate: 30%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×261
×242

Asked: 03 Apr '13, 06:23

Seen: 4,761 times

Last updated: 19 Jul, 04:47

powered by BitNami OSQA