Hi Inanc,
On Mon, Mar 10, 2014 at 6:26 PM, Inanc Seylan <
inanc....@gmail.com> wrote:
> Hi,
>
> Suppose I have the ontology:
>
> A \sqsubseteq B
> B \sqsubseteq C
>
> When I compute the class hierarchy of this ontology using ELK, it does not
> return the inclusion A \sqsubseteq C.
What do you mean by that? How do you query for subclass relations?
In OWL API there are two methods which you can use to retrieve the
class hierarchy:
getSubClasses(OWLClassExpression ce, boolean direct)
getSuperClasses(OWLClassExpression ce, boolean direct)
If you set "direct" to "false", you will obtain all sub-classes,
respectively all super-classes.
Here is the documentation:
http://owlapi.sourceforge.net/javadoc/org/semanticweb/owlapi/reasoner/OWLReasoner.html
You can adapt the example from here accordingly:
https://code.google.com/p/elk-reasoner/wiki/QueryingComplexClasses
>
> Does ELK compute the transitive closure of the class hierarchy internally?
> If so, how can I access this information? The problem is that I do not want
> to recompute the transitive closure if it is already done by ELK.
Internally ELK computes all subsumption relations, but it applies
transitive reduction to obtain a more compact representation. So it
stores only direct subsumptions.
If you query for all sub-classes/super-classes of a given class then
ELK computes the transitive closure for the selected class "on the
fly". So, retrieving all sub/super classes is somewhat more expensive
than only the direct ones (which is basically a lookup).
Best regards,
Yevgeny
>
> Thanks,
>
> Inanc
>
> --
> You received this message because you are subscribed to the Google Groups
> "elk-reasoner-discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
elk-reasoner-disc...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.