stanbol-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reto Bachmann-Gmür <>
Subject Fwd: inference support when querying triple collection
Date Mon, 23 Sep 2013 17:20:26 GMT
Forwarding this Mail from the Stanbol Mailing list to clerezza dev as the
question seems equally related to clerezza.

For the Jena based backend provider it should be quite straight forward to
enable inference on particular (or all) graphs. But if ontologymanager
provides a graph with all the inferences this could be registered with
TcManager as to allow sparql queries over it. This latter approach would
have the advantage of being independent of the storage used.


PS: Glad to hear so! Hope you enjoy the reading.

---------- Forwarded message ----------
From: Marvin Luchs <>
Date: Mon, Sep 23, 2013 at 2:30 PM
Subject: inference support when querying triple collection
To: "" <>

Hello everybody,

for my master's thesis I'm working on a custom Stanbol Module. Its concrete
purpose is not important. Basically I...

1.       create a new triple collection using the TC Manager from Clerezza:


2.  import an Ontology which contains the ontology amongst

OWLOntologyManager manager = OWLManager.createOWLOntologyManager();

OWLOntology ontology = manager.loadOntologyFromOntologyDocument(content);


3.  import a whole bunch of RDF statements:

Parser parser = Parser.getInstance();

Graph rdfData = parser.parse(inputStream, format);

Up to this point everything works fine. However, I ran into an issue when I
wanted to query that triple collection using types from For
example I have some entity which is of type schema:Movie. My ontology
states that schema:Movie is rfds:subClassOf schema:CreativeWork which in
turn is rfds:subClassOf schema:Thing. However it seems, that not there's no
automatic inference that schema:Movie is also a subclass of schema:Thing.

I tried it using this query:

PREFIX rdf:<>
PREFIX rdfs:<>
PREFIX schema:<>
SELECT ?type ?label {
       <> rdf:type ?type .
        ?type rdfs:subClassOf schema:Thing .
        ?type rdfs:label ?label .

... and this method:


Before I started implementing my project in Stanbol I imported my ontology
as well as all the RDF files into a Sesame repository. With that repository
the query worked fine as Sesame automatically inferred that SomeEntity is
of type schema:Thing.

Is  there any way to configure an inference like this for the triple store
that's used by Clerezza (Jena I Think?) in this example?

Best regards,
Marvin Luchs

PS: @Reto Bachmann-Gmür: Thanks a lot for your "Instant Apache Stanbol"
E-Book! I already decided to implement my project independently of Stanbol,
but your book came out just in time to change my mind :-)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message