You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Sean Champ <gi...@gmail.com> on 2010/12/21 07:21:21 UTC

symmetry of class-equivalence relation in OWL

Hi folks, just a question:

Given an OWL class A, with A denoted as (the subject) having an equivalent
class B: I've seen that Jena will return B within the return value of
A.listEquivalentClasses(). However - in my experience with using Jena 2.6.3
- the return value of B.listEquivalentClasses() will not contain A, in that
same situation.

My question: Isn't the OWL class-equivalence relation a symmetric relation,
though?

It was my understanding that it was a symmetric relation, but it seems that
Jena is not representing it as so, at that point, in Jena 2.6.3.

I might consider trying to develop a patch, to that ends, myself, but I'm
not sure what the group consensus would be, about it. Simply, it seems to me
that Jena is not currently treating OWL 2 class equivalence as it being a
symmetric relation, given that it does not return A within that call on B,
as above.

Though I can work around that, to produce the desired ends - using a hash
table (one to many) and a method computing all of the equivalent classes of
all classes in a model, and symmetrically storing and returning a map of the
same - but I'm not sure if there may be a more efficient approach to the
same ends, if it would be addressed within Jena itself.

Thanks!

-- Sean

Re: symmetry of class-equivalence relation in OWL

Posted by Ian Dickinson <ia...@epimorphics.com>.
Hi Sean,
On 21/12/10 08:30, Chris Dollin wrote:
> On Tuesday, December 21, 2010 06:21:21 am Sean Champ wrote:
>> Hi folks, just a question:
>>
>> Given an OWL class A, with A denoted as (the subject) having an equivalent
>> class B: I've seen that Jena will return B within the return value of
>> A.listEquivalentClasses(). However - in my experience with using Jena 2.6.3
>> - the return value of B.listEquivalentClasses() will not contain A, in that
>> same situation.
>
> What reasoner are you using?
>
> The different OntModelSpec's give you different reasoning power. The
> /default/ reasoner for createOntologyModel only does RDFS reasoning,
> which knows not owl:equivalentClass.
>
> So show us how you create your model.

Just to follow-up on what Chris wrote with a brief explanation: the 
convenience methods in the Ontology API, such as 
listEquivalentClasses(), are designed to work on whatever triples it the 
OntModel can see - those methods don't do any computation themselves. 
Jena's layered architecture means that if you use a reasoner, it will 
/appear/ as though additional triples are in the model, when in fact 
they're entailed from the triples asserted in the base model. So with 
listEquivalentClasses as an example, the symmetry of the 
owl:equivalentClass relationship entails

:B owl:equivalentClass :A

from

:A owl:equivalentClass :B

But this has to be handled by a reasoner that can process the semantics 
of OWL. As Chris wrote, the default model, for historical reasons, 
handles only the semantics of RDFS. If you create your OntModel with (wteo):

OntModel m = ModelFactory.createOntologyModel( 
OntModelSpec.OWL_MEM_MICRO_RULE_INF );

you should see the symmetry you're expecting.

Ian

-- 
____________________________________________________________
Ian Dickinson                   Epimorphics Ltd, Bristol, UK
mailto:ian@epimorphics.com        http://www.epimorphics.com
cell: +44-7786-850536              landline: +44-1275-399069
------------------------------------------------------------
Epimorphics Ltd.  is a limited company registered in England
(no. 7016688). Registered address: Court Lodge, 105 High St,
               Portishead, Bristol BS20 6PT, UK


Re: symmetry of class-equivalence relation in OWL

Posted by Chris Dollin <ch...@epimorphics.com>.
On Tuesday, December 21, 2010 06:21:21 am Sean Champ wrote:
> Hi folks, just a question:
> 
> Given an OWL class A, with A denoted as (the subject) having an equivalent
> class B: I've seen that Jena will return B within the return value of
> A.listEquivalentClasses(). However - in my experience with using Jena 2.6.3
> - the return value of B.listEquivalentClasses() will not contain A, in that
> same situation.

What reasoner are you using?

The different OntModelSpec's give you different reasoning power. The
/default/ reasoner for createOntologyModel only does RDFS reasoning,
which knows not owl:equivalentClass.

So show us how you create your model.

Chris

-- 
"Why do our plans never work?"                            Ka D'Argo, /Farscape/

Epimorphics Ltd, http://www.epimorphics.com
Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20 6PT
Epimorphics Ltd. is a limited company registered in England (number 7016688)