On 05/02/13 11:29, Rodrigo Jardim wrote:
Maybe using Pellet Reasoner + Jena.

--
Rodrigo

Em 05/02/2013 08:23, Vishal Sinha escreveu:
Can I do this in Jena? How?

In SPARQL:

{
  ?x a ?T .
  ?T rdfs:subClassOf*  :Politician
}

with the subclass relationships in the database.  Even a different graph:

{
  ?x a ?T .
  GRAPH <theOntologyGraph> { ?T rdfs:subClassOf*  :Politician }
}

Order of patterns may affect the speed or the query - experiment.

Or expand the data once on loading:

Use
riotcmd.infer --help

and
{
  ?x a :Politician .
}

Or

The Jena rule based reasons also do subClassOf

        Andy


----- Forwarded Message -----
*From:* Kingsley Idehen <[email protected]>
*To:* [email protected]
*Sent:* Monday, February 4, 2013 5:46 PM
*Subject:* Re: Inference Reqults according to DBPedia Ontology

On 2/4/13 2:25 AM, Vishal Sinha wrote:
Hi,

I am creating a local RDF store, and storing some information in it
myself.
For example,
- "Angela Merkel is a Chancellor"
- "Barack Obama is a President"

In DBPedia ontology it is stated that,
Chancellor is subclass of Politician. President is also subclass of
Politician.

When I make a SPARQL query to my local RDF store, I want to get
inference result according to DBPedia
OWL ontology.

In this case, if I ask give me all politicians, it should give me -
Angela Merkel and Barack Obama.

My Question: Should I keep a copy of DBPedia ontology in my RDF
store? Or what else could I do?

Thanks.


For inference to work the underlying axioms need to be processed.
Thus, you will need to read the DBpedia ontology, one way or the other.

Short answer: Yes.

--

Regards,

Kingsley Idehen

Reply via email to